@constructive-io/react 0.10.1 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/public/hooks/index.d.ts +1 -1
- package/esm/public/hooks/index.js +1 -1
- package/esm/public/hooks/invalidation.d.ts +11 -11
- package/esm/public/hooks/invalidation.js +26 -26
- package/esm/public/hooks/mutation-keys.d.ts +22 -22
- package/esm/public/hooks/mutation-keys.js +13 -13
- package/esm/public/hooks/mutations/index.d.ts +2 -4
- package/esm/public/hooks/mutations/index.js +2 -4
- package/esm/public/hooks/mutations/useCreateMigrateFileMutation.d.ts +34 -0
- package/esm/public/hooks/mutations/{useCreateFieldModuleMutation.js → useCreateMigrateFileMutation.js} +7 -7
- package/esm/public/hooks/mutations/useCreateSqlActionMutation.d.ts +34 -0
- package/esm/public/hooks/mutations/{useCreateSqlMigrationMutation.js → useCreateSqlActionMutation.js} +7 -7
- package/esm/public/hooks/queries/index.d.ts +4 -4
- package/esm/public/hooks/queries/index.js +4 -4
- package/esm/public/hooks/queries/useMigrateFileQuery.d.ts +65 -0
- package/esm/public/hooks/queries/{useFieldModuleQuery.js → useMigrateFileQuery.js} +11 -11
- package/esm/public/hooks/queries/useMigrateFilesQuery.d.ts +69 -0
- package/esm/public/hooks/queries/{useFieldModulesQuery.js → useMigrateFilesQuery.js} +11 -11
- package/esm/public/hooks/queries/useSqlActionQuery.d.ts +65 -0
- package/esm/public/hooks/queries/{useSqlMigrationQuery.js → useSqlActionQuery.js} +11 -11
- package/esm/public/hooks/queries/useSqlActionsQuery.d.ts +69 -0
- package/esm/public/hooks/queries/{useSqlMigrationsQuery.js → useSqlActionsQuery.js} +11 -11
- package/esm/public/hooks/query-keys.d.ts +26 -26
- package/esm/public/hooks/query-keys.js +15 -15
- package/esm/public/orm/index.d.ts +4 -4
- package/esm/public/orm/index.js +4 -4
- package/esm/public/orm/input-types.d.ts +118 -247
- package/esm/public/orm/input-types.js +0 -1
- package/esm/public/orm/models/index.d.ts +2 -2
- package/esm/public/orm/models/index.js +2 -2
- package/esm/public/orm/models/migrateFile.d.ts +38 -0
- package/esm/public/orm/models/migrateFile.js +72 -0
- package/esm/public/orm/models/sqlAction.d.ts +38 -0
- package/esm/public/orm/models/{sqlMigration.js → sqlAction.js} +17 -17
- package/esm/public/schema-types.d.ts +112 -150
- package/esm/public/types.d.ts +7 -12
- package/package.json +5 -5
- package/public/hooks/index.d.ts +1 -1
- package/public/hooks/index.js +1 -1
- package/public/hooks/invalidation.d.ts +11 -11
- package/public/hooks/invalidation.js +25 -25
- package/public/hooks/mutation-keys.d.ts +22 -22
- package/public/hooks/mutation-keys.js +16 -16
- package/public/hooks/mutations/index.d.ts +2 -4
- package/public/hooks/mutations/index.js +2 -4
- package/public/hooks/mutations/useCreateMigrateFileMutation.d.ts +34 -0
- package/public/hooks/mutations/{useCreateFieldModuleMutation.js → useCreateMigrateFileMutation.js} +6 -6
- package/public/hooks/mutations/useCreateSqlActionMutation.d.ts +34 -0
- package/public/hooks/mutations/{useCreateSqlMigrationMutation.js → useCreateSqlActionMutation.js} +6 -6
- package/public/hooks/queries/index.d.ts +4 -4
- package/public/hooks/queries/index.js +4 -4
- package/public/hooks/queries/useMigrateFileQuery.d.ts +65 -0
- package/public/hooks/queries/{useFieldModuleQuery.js → useMigrateFileQuery.js} +14 -14
- package/public/hooks/queries/useMigrateFilesQuery.d.ts +69 -0
- package/public/hooks/queries/{useFieldModulesQuery.js → useMigrateFilesQuery.js} +14 -14
- package/public/hooks/queries/useSqlActionQuery.d.ts +65 -0
- package/public/hooks/queries/{useSqlMigrationQuery.js → useSqlActionQuery.js} +14 -14
- package/public/hooks/queries/useSqlActionsQuery.d.ts +69 -0
- package/public/hooks/queries/{useSqlMigrationsQuery.js → useSqlActionsQuery.js} +14 -14
- package/public/hooks/query-keys.d.ts +26 -26
- package/public/hooks/query-keys.js +18 -18
- package/public/orm/index.d.ts +4 -4
- package/public/orm/index.js +4 -4
- package/public/orm/input-types.d.ts +118 -247
- package/public/orm/input-types.js +0 -1
- package/public/orm/models/index.d.ts +2 -2
- package/public/orm/models/index.js +7 -7
- package/public/orm/models/migrateFile.d.ts +38 -0
- package/public/orm/models/{sqlMigration.js → migrateFile.js} +19 -19
- package/public/orm/models/sqlAction.d.ts +38 -0
- package/public/orm/models/sqlAction.js +76 -0
- package/public/schema-types.d.ts +112 -150
- package/public/types.d.ts +7 -12
- package/esm/public/hooks/mutations/useCreateFieldModuleMutation.d.ts +0 -34
- package/esm/public/hooks/mutations/useCreateSqlMigrationMutation.d.ts +0 -34
- package/esm/public/hooks/mutations/useDeleteFieldModuleMutation.d.ts +0 -38
- package/esm/public/hooks/mutations/useDeleteFieldModuleMutation.js +0 -36
- package/esm/public/hooks/mutations/useUpdateFieldModuleMutation.d.ts +0 -40
- package/esm/public/hooks/mutations/useUpdateFieldModuleMutation.js +0 -37
- package/esm/public/hooks/queries/useFieldModuleQuery.d.ts +0 -65
- package/esm/public/hooks/queries/useFieldModulesQuery.d.ts +0 -69
- package/esm/public/hooks/queries/useSqlMigrationQuery.d.ts +0 -65
- package/esm/public/hooks/queries/useSqlMigrationsQuery.d.ts +0 -69
- package/esm/public/orm/models/fieldModule.d.ts +0 -56
- package/esm/public/orm/models/fieldModule.js +0 -96
- package/esm/public/orm/models/sqlMigration.d.ts +0 -38
- package/public/hooks/mutations/useCreateFieldModuleMutation.d.ts +0 -34
- package/public/hooks/mutations/useCreateSqlMigrationMutation.d.ts +0 -34
- package/public/hooks/mutations/useDeleteFieldModuleMutation.d.ts +0 -38
- package/public/hooks/mutations/useDeleteFieldModuleMutation.js +0 -39
- package/public/hooks/mutations/useUpdateFieldModuleMutation.d.ts +0 -40
- package/public/hooks/mutations/useUpdateFieldModuleMutation.js +0 -40
- package/public/hooks/queries/useFieldModuleQuery.d.ts +0 -65
- package/public/hooks/queries/useFieldModulesQuery.d.ts +0 -69
- package/public/hooks/queries/useSqlMigrationQuery.d.ts +0 -65
- package/public/hooks/queries/useSqlMigrationsQuery.d.ts +0 -69
- package/public/orm/models/fieldModule.d.ts +0 -56
- package/public/orm/models/fieldModule.js +0 -100
- package/public/orm/models/sqlMigration.d.ts +0 -38
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Update mutation hook for FieldModule
|
|
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 { FieldModuleSelect, FieldModuleWithRelations, FieldModulePatch } from '../../orm/input-types';
|
|
8
|
-
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
-
export type { FieldModuleSelect, FieldModuleWithRelations, FieldModulePatch, } from '../../orm/input-types';
|
|
10
|
-
/**
|
|
11
|
-
* Mutation hook for updating a FieldModule
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const { mutate, isPending } = useUpdateFieldModuleMutation({
|
|
16
|
-
* selection: { fields: { id: true, name: true } },
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* mutate({ id: 'value-here', fieldModulePatch: { name: 'Updated' } });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare function useUpdateFieldModuleMutation<S extends FieldModuleSelect>(params: {
|
|
23
|
-
selection: {
|
|
24
|
-
fields: S & FieldModuleSelect;
|
|
25
|
-
} & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
26
|
-
} & Omit<UseMutationOptions<{
|
|
27
|
-
updateFieldModule: {
|
|
28
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
29
|
-
};
|
|
30
|
-
}, Error, {
|
|
31
|
-
id: string;
|
|
32
|
-
fieldModulePatch: FieldModulePatch;
|
|
33
|
-
}>, 'mutationFn'>): UseMutationResult<{
|
|
34
|
-
updateFieldModule: {
|
|
35
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
36
|
-
};
|
|
37
|
-
}, Error, {
|
|
38
|
-
id: string;
|
|
39
|
-
fieldModulePatch: FieldModulePatch;
|
|
40
|
-
}>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Update mutation hook for FieldModule
|
|
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 { fieldModuleKeys } from '../query-keys';
|
|
10
|
-
import { fieldModuleMutationKeys } from '../mutation-keys';
|
|
11
|
-
export function useUpdateFieldModuleMutation(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: fieldModuleMutationKeys.all,
|
|
18
|
-
mutationFn: ({ id, fieldModulePatch }) => getClient()
|
|
19
|
-
.fieldModule.update({
|
|
20
|
-
where: {
|
|
21
|
-
id,
|
|
22
|
-
},
|
|
23
|
-
data: fieldModulePatch,
|
|
24
|
-
select: args.select,
|
|
25
|
-
})
|
|
26
|
-
.unwrap(),
|
|
27
|
-
onSuccess: (_, variables) => {
|
|
28
|
-
queryClient.invalidateQueries({
|
|
29
|
-
queryKey: fieldModuleKeys.detail(variables.id),
|
|
30
|
-
});
|
|
31
|
-
queryClient.invalidateQueries({
|
|
32
|
-
queryKey: fieldModuleKeys.lists(),
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
...mutationOptions,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Single item query hook for FieldModule
|
|
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 { FieldModuleSelect, FieldModuleWithRelations } from '../../orm/input-types';
|
|
8
|
-
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
-
export type { FieldModuleSelect, FieldModuleWithRelations } from '../../orm/input-types';
|
|
10
|
-
/** Query key factory - re-exported from query-keys.ts */
|
|
11
|
-
export declare const fieldModuleQueryKey: (id: string | number) => readonly ["fieldmodule", "detail", string | number];
|
|
12
|
-
/**
|
|
13
|
-
* Query hook for fetching a single FieldModule
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* const { data, isLoading } = useFieldModuleQuery({
|
|
18
|
-
* id: 'some-id',
|
|
19
|
-
* selection: { fields: { id: true, name: true } },
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare function useFieldModuleQuery<S extends FieldModuleSelect, TData = {
|
|
24
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S> | null;
|
|
25
|
-
}>(params: {
|
|
26
|
-
id: string;
|
|
27
|
-
selection: {
|
|
28
|
-
fields: S;
|
|
29
|
-
} & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
30
|
-
} & Omit<UseQueryOptions<{
|
|
31
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S> | null;
|
|
32
|
-
}, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
|
|
33
|
-
/**
|
|
34
|
-
* Fetch a single FieldModule without React hooks
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const data = await fetchFieldModuleQuery({
|
|
39
|
-
* id: 'some-id',
|
|
40
|
-
* selection: { fields: { id: true } },
|
|
41
|
-
* });
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare function fetchFieldModuleQuery<S extends FieldModuleSelect>(params: {
|
|
45
|
-
id: string;
|
|
46
|
-
selection: {
|
|
47
|
-
fields: S;
|
|
48
|
-
} & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
49
|
-
}): Promise<{
|
|
50
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S> | null;
|
|
51
|
-
}>;
|
|
52
|
-
/**
|
|
53
|
-
* Prefetch a single FieldModule for SSR or cache warming
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```ts
|
|
57
|
-
* await prefetchFieldModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function prefetchFieldModuleQuery<S extends FieldModuleSelect>(queryClient: QueryClient, params: {
|
|
61
|
-
id: string;
|
|
62
|
-
selection: {
|
|
63
|
-
fields: S;
|
|
64
|
-
} & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
65
|
-
}): Promise<void>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List query hook for FieldModule
|
|
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 { FieldModuleSelect, FieldModuleWithRelations, FieldModuleFilter, FieldModuleOrderBy } from '../../orm/input-types';
|
|
9
|
-
import type { InferSelectResult, ConnectionResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
-
export type { FieldModuleSelect, FieldModuleWithRelations, FieldModuleFilter, FieldModuleOrderBy, } from '../../orm/input-types';
|
|
11
|
-
/** Query key factory - re-exported from query-keys.ts */
|
|
12
|
-
export declare const fieldModulesQueryKey: (variables?: object) => readonly ["fieldmodule", "list", object];
|
|
13
|
-
/**
|
|
14
|
-
* Query hook for fetching FieldModule list
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* const { data, isLoading } = useFieldModulesQuery({
|
|
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 useFieldModulesQuery<S extends FieldModuleSelect, TData = {
|
|
29
|
-
fieldModules: ConnectionResult<InferSelectResult<FieldModuleWithRelations, S>>;
|
|
30
|
-
}>(params: {
|
|
31
|
-
selection: {
|
|
32
|
-
fields: S;
|
|
33
|
-
} & Omit<ListSelectionConfig<S, FieldModuleFilter, FieldModuleOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
34
|
-
} & Omit<UseQueryOptions<{
|
|
35
|
-
fieldModules: ConnectionResult<InferSelectResult<FieldModuleWithRelations, S>>;
|
|
36
|
-
}, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
|
|
37
|
-
/**
|
|
38
|
-
* Fetch FieldModule list without React hooks
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```ts
|
|
42
|
-
* const data = await fetchFieldModulesQuery({
|
|
43
|
-
* selection: {
|
|
44
|
-
* fields: { id: true },
|
|
45
|
-
* first: 10,
|
|
46
|
-
* },
|
|
47
|
-
* });
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
export declare function fetchFieldModulesQuery<S extends FieldModuleSelect>(params: {
|
|
51
|
-
selection: {
|
|
52
|
-
fields: S;
|
|
53
|
-
} & Omit<ListSelectionConfig<S, FieldModuleFilter, FieldModuleOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
54
|
-
}): Promise<{
|
|
55
|
-
fieldModules: ConnectionResult<InferSelectResult<FieldModuleWithRelations, S>>;
|
|
56
|
-
}>;
|
|
57
|
-
/**
|
|
58
|
-
* Prefetch FieldModule list for SSR or cache warming
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* await prefetchFieldModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } });
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
export declare function prefetchFieldModulesQuery<S extends FieldModuleSelect>(queryClient: QueryClient, params: {
|
|
66
|
-
selection: {
|
|
67
|
-
fields: S;
|
|
68
|
-
} & Omit<ListSelectionConfig<S, FieldModuleFilter, FieldModuleOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
69
|
-
}): Promise<void>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Single item query hook for SqlMigration
|
|
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 { SqlMigrationSelect, SqlMigrationWithRelations } from '../../orm/input-types';
|
|
8
|
-
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
-
export type { SqlMigrationSelect, SqlMigrationWithRelations } from '../../orm/input-types';
|
|
10
|
-
/** Query key factory - re-exported from query-keys.ts */
|
|
11
|
-
export declare const sqlMigrationQueryKey: (id: string | number) => readonly ["sqlmigration", "detail", string | number];
|
|
12
|
-
/**
|
|
13
|
-
* Query hook for fetching a single SqlMigration
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* const { data, isLoading } = useSqlMigrationQuery({
|
|
18
|
-
* id: 'some-id',
|
|
19
|
-
* selection: { fields: { id: true, name: true } },
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare function useSqlMigrationQuery<S extends SqlMigrationSelect, TData = {
|
|
24
|
-
sqlMigration: InferSelectResult<SqlMigrationWithRelations, S> | null;
|
|
25
|
-
}>(params: {
|
|
26
|
-
id: number;
|
|
27
|
-
selection: {
|
|
28
|
-
fields: S;
|
|
29
|
-
} & HookStrictSelect<NoInfer<S>, SqlMigrationSelect>;
|
|
30
|
-
} & Omit<UseQueryOptions<{
|
|
31
|
-
sqlMigration: InferSelectResult<SqlMigrationWithRelations, S> | null;
|
|
32
|
-
}, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
|
|
33
|
-
/**
|
|
34
|
-
* Fetch a single SqlMigration without React hooks
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const data = await fetchSqlMigrationQuery({
|
|
39
|
-
* id: 'some-id',
|
|
40
|
-
* selection: { fields: { id: true } },
|
|
41
|
-
* });
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare function fetchSqlMigrationQuery<S extends SqlMigrationSelect>(params: {
|
|
45
|
-
id: number;
|
|
46
|
-
selection: {
|
|
47
|
-
fields: S;
|
|
48
|
-
} & HookStrictSelect<NoInfer<S>, SqlMigrationSelect>;
|
|
49
|
-
}): Promise<{
|
|
50
|
-
sqlMigration: InferSelectResult<SqlMigrationWithRelations, S> | null;
|
|
51
|
-
}>;
|
|
52
|
-
/**
|
|
53
|
-
* Prefetch a single SqlMigration for SSR or cache warming
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```ts
|
|
57
|
-
* await prefetchSqlMigrationQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function prefetchSqlMigrationQuery<S extends SqlMigrationSelect>(queryClient: QueryClient, params: {
|
|
61
|
-
id: number;
|
|
62
|
-
selection: {
|
|
63
|
-
fields: S;
|
|
64
|
-
} & HookStrictSelect<NoInfer<S>, SqlMigrationSelect>;
|
|
65
|
-
}): Promise<void>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List query hook for SqlMigration
|
|
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 { SqlMigrationSelect, SqlMigrationWithRelations, SqlMigrationFilter, SqlMigrationOrderBy } from '../../orm/input-types';
|
|
9
|
-
import type { InferSelectResult, ConnectionResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
-
export type { SqlMigrationSelect, SqlMigrationWithRelations, SqlMigrationFilter, SqlMigrationOrderBy, } from '../../orm/input-types';
|
|
11
|
-
/** Query key factory - re-exported from query-keys.ts */
|
|
12
|
-
export declare const sqlMigrationsQueryKey: (variables?: object) => readonly ["sqlmigration", "list", object];
|
|
13
|
-
/**
|
|
14
|
-
* Query hook for fetching SqlMigration list
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* const { data, isLoading } = useSqlMigrationsQuery({
|
|
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 useSqlMigrationsQuery<S extends SqlMigrationSelect, TData = {
|
|
29
|
-
sqlMigrations: ConnectionResult<InferSelectResult<SqlMigrationWithRelations, S>>;
|
|
30
|
-
}>(params: {
|
|
31
|
-
selection: {
|
|
32
|
-
fields: S;
|
|
33
|
-
} & Omit<ListSelectionConfig<S, SqlMigrationFilter, SqlMigrationOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, SqlMigrationSelect>;
|
|
34
|
-
} & Omit<UseQueryOptions<{
|
|
35
|
-
sqlMigrations: ConnectionResult<InferSelectResult<SqlMigrationWithRelations, S>>;
|
|
36
|
-
}, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
|
|
37
|
-
/**
|
|
38
|
-
* Fetch SqlMigration list without React hooks
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```ts
|
|
42
|
-
* const data = await fetchSqlMigrationsQuery({
|
|
43
|
-
* selection: {
|
|
44
|
-
* fields: { id: true },
|
|
45
|
-
* first: 10,
|
|
46
|
-
* },
|
|
47
|
-
* });
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
export declare function fetchSqlMigrationsQuery<S extends SqlMigrationSelect>(params: {
|
|
51
|
-
selection: {
|
|
52
|
-
fields: S;
|
|
53
|
-
} & Omit<ListSelectionConfig<S, SqlMigrationFilter, SqlMigrationOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, SqlMigrationSelect>;
|
|
54
|
-
}): Promise<{
|
|
55
|
-
sqlMigrations: ConnectionResult<InferSelectResult<SqlMigrationWithRelations, S>>;
|
|
56
|
-
}>;
|
|
57
|
-
/**
|
|
58
|
-
* Prefetch SqlMigration list for SSR or cache warming
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* await prefetchSqlMigrationsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } });
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
export declare function prefetchSqlMigrationsQuery<S extends SqlMigrationSelect>(queryClient: QueryClient, params: {
|
|
66
|
-
selection: {
|
|
67
|
-
fields: S;
|
|
68
|
-
} & Omit<ListSelectionConfig<S, SqlMigrationFilter, SqlMigrationOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, SqlMigrationSelect>;
|
|
69
|
-
}): Promise<void>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FieldModule model for ORM client
|
|
3
|
-
* @generated by @constructive-io/graphql-codegen
|
|
4
|
-
* DO NOT EDIT - changes will be overwritten
|
|
5
|
-
*/
|
|
6
|
-
import { OrmClient } from '../client';
|
|
7
|
-
import { QueryBuilder } from '../query-builder';
|
|
8
|
-
import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { FieldModuleWithRelations, FieldModuleSelect, FieldModuleFilter, FieldModuleOrderBy, CreateFieldModuleInput, FieldModulePatch } from '../input-types';
|
|
10
|
-
export declare class FieldModuleModel {
|
|
11
|
-
private client;
|
|
12
|
-
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends FieldModuleSelect>(args: FindManyArgs<S, FieldModuleFilter, never, FieldModuleOrderBy> & {
|
|
14
|
-
select: S;
|
|
15
|
-
} & StrictSelect<S, FieldModuleSelect>): QueryBuilder<{
|
|
16
|
-
fieldModules: ConnectionResult<InferSelectResult<FieldModuleWithRelations, S>>;
|
|
17
|
-
}>;
|
|
18
|
-
findFirst<S extends FieldModuleSelect>(args: FindFirstArgs<S, FieldModuleFilter> & {
|
|
19
|
-
select: S;
|
|
20
|
-
} & StrictSelect<S, FieldModuleSelect>): QueryBuilder<{
|
|
21
|
-
fieldModules: {
|
|
22
|
-
nodes: InferSelectResult<FieldModuleWithRelations, S>[];
|
|
23
|
-
};
|
|
24
|
-
}>;
|
|
25
|
-
findOne<S extends FieldModuleSelect>(args: {
|
|
26
|
-
id: string;
|
|
27
|
-
select: S;
|
|
28
|
-
} & StrictSelect<S, FieldModuleSelect>): QueryBuilder<{
|
|
29
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S> | null;
|
|
30
|
-
}>;
|
|
31
|
-
create<S extends FieldModuleSelect>(args: CreateArgs<S, CreateFieldModuleInput['fieldModule']> & {
|
|
32
|
-
select: S;
|
|
33
|
-
} & StrictSelect<S, FieldModuleSelect>): QueryBuilder<{
|
|
34
|
-
createFieldModule: {
|
|
35
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
36
|
-
};
|
|
37
|
-
}>;
|
|
38
|
-
update<S extends FieldModuleSelect>(args: UpdateArgs<S, {
|
|
39
|
-
id: string;
|
|
40
|
-
}, FieldModulePatch> & {
|
|
41
|
-
select: S;
|
|
42
|
-
} & StrictSelect<S, FieldModuleSelect>): QueryBuilder<{
|
|
43
|
-
updateFieldModule: {
|
|
44
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
45
|
-
};
|
|
46
|
-
}>;
|
|
47
|
-
delete<S extends FieldModuleSelect>(args: DeleteArgs<{
|
|
48
|
-
id: string;
|
|
49
|
-
}, S> & {
|
|
50
|
-
select: S;
|
|
51
|
-
} & StrictSelect<S, FieldModuleSelect>): QueryBuilder<{
|
|
52
|
-
deleteFieldModule: {
|
|
53
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
54
|
-
};
|
|
55
|
-
}>;
|
|
56
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
|
|
2
|
-
import { connectionFieldsMap } from '../input-types';
|
|
3
|
-
export class FieldModuleModel {
|
|
4
|
-
client;
|
|
5
|
-
constructor(client) {
|
|
6
|
-
this.client = client;
|
|
7
|
-
}
|
|
8
|
-
findMany(args) {
|
|
9
|
-
const { document, variables } = buildFindManyDocument('FieldModule', 'fieldModules', args.select, {
|
|
10
|
-
where: args?.where,
|
|
11
|
-
orderBy: args?.orderBy,
|
|
12
|
-
first: args?.first,
|
|
13
|
-
last: args?.last,
|
|
14
|
-
after: args?.after,
|
|
15
|
-
before: args?.before,
|
|
16
|
-
offset: args?.offset,
|
|
17
|
-
}, 'FieldModuleFilter', 'FieldModuleOrderBy', connectionFieldsMap);
|
|
18
|
-
return new QueryBuilder({
|
|
19
|
-
client: this.client,
|
|
20
|
-
operation: 'query',
|
|
21
|
-
operationName: 'FieldModule',
|
|
22
|
-
fieldName: 'fieldModules',
|
|
23
|
-
document,
|
|
24
|
-
variables,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
findFirst(args) {
|
|
28
|
-
const { document, variables } = buildFindFirstDocument('FieldModule', 'fieldModules', args.select, {
|
|
29
|
-
where: args?.where,
|
|
30
|
-
}, 'FieldModuleFilter', connectionFieldsMap);
|
|
31
|
-
return new QueryBuilder({
|
|
32
|
-
client: this.client,
|
|
33
|
-
operation: 'query',
|
|
34
|
-
operationName: 'FieldModule',
|
|
35
|
-
fieldName: 'fieldModules',
|
|
36
|
-
document,
|
|
37
|
-
variables,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
findOne(args) {
|
|
41
|
-
const { document, variables } = buildFindManyDocument('FieldModule', 'fieldModules', args.select, {
|
|
42
|
-
where: {
|
|
43
|
-
id: {
|
|
44
|
-
equalTo: args.id,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
first: 1,
|
|
48
|
-
}, 'FieldModuleFilter', 'FieldModuleOrderBy', connectionFieldsMap);
|
|
49
|
-
return new QueryBuilder({
|
|
50
|
-
client: this.client,
|
|
51
|
-
operation: 'query',
|
|
52
|
-
operationName: 'FieldModule',
|
|
53
|
-
fieldName: 'fieldModule',
|
|
54
|
-
document,
|
|
55
|
-
variables,
|
|
56
|
-
transform: (data) => ({
|
|
57
|
-
fieldModule: data.fieldModules?.nodes?.[0] ?? null,
|
|
58
|
-
}),
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
create(args) {
|
|
62
|
-
const { document, variables } = buildCreateDocument('FieldModule', 'createFieldModule', 'fieldModule', args.select, args.data, 'CreateFieldModuleInput', connectionFieldsMap);
|
|
63
|
-
return new QueryBuilder({
|
|
64
|
-
client: this.client,
|
|
65
|
-
operation: 'mutation',
|
|
66
|
-
operationName: 'FieldModule',
|
|
67
|
-
fieldName: 'createFieldModule',
|
|
68
|
-
document,
|
|
69
|
-
variables,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
update(args) {
|
|
73
|
-
const { document, variables } = buildUpdateByPkDocument('FieldModule', 'updateFieldModule', 'fieldModule', args.select, args.where.id, args.data, 'UpdateFieldModuleInput', 'id', 'fieldModulePatch', connectionFieldsMap);
|
|
74
|
-
return new QueryBuilder({
|
|
75
|
-
client: this.client,
|
|
76
|
-
operation: 'mutation',
|
|
77
|
-
operationName: 'FieldModule',
|
|
78
|
-
fieldName: 'updateFieldModule',
|
|
79
|
-
document,
|
|
80
|
-
variables,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
delete(args) {
|
|
84
|
-
const { document, variables } = buildDeleteByPkDocument('FieldModule', 'deleteFieldModule', 'fieldModule', {
|
|
85
|
-
id: args.where.id,
|
|
86
|
-
}, 'DeleteFieldModuleInput', args.select, connectionFieldsMap);
|
|
87
|
-
return new QueryBuilder({
|
|
88
|
-
client: this.client,
|
|
89
|
-
operation: 'mutation',
|
|
90
|
-
operationName: 'FieldModule',
|
|
91
|
-
fieldName: 'deleteFieldModule',
|
|
92
|
-
document,
|
|
93
|
-
variables,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SqlMigration model for ORM client
|
|
3
|
-
* @generated by @constructive-io/graphql-codegen
|
|
4
|
-
* DO NOT EDIT - changes will be overwritten
|
|
5
|
-
*/
|
|
6
|
-
import { OrmClient } from '../client';
|
|
7
|
-
import { QueryBuilder } from '../query-builder';
|
|
8
|
-
import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { SqlMigrationWithRelations, SqlMigrationSelect, SqlMigrationFilter, SqlMigrationOrderBy, CreateSqlMigrationInput } from '../input-types';
|
|
10
|
-
export declare class SqlMigrationModel {
|
|
11
|
-
private client;
|
|
12
|
-
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends SqlMigrationSelect>(args: FindManyArgs<S, SqlMigrationFilter, never, SqlMigrationOrderBy> & {
|
|
14
|
-
select: S;
|
|
15
|
-
} & StrictSelect<S, SqlMigrationSelect>): QueryBuilder<{
|
|
16
|
-
sqlMigrations: ConnectionResult<InferSelectResult<SqlMigrationWithRelations, S>>;
|
|
17
|
-
}>;
|
|
18
|
-
findFirst<S extends SqlMigrationSelect>(args: FindFirstArgs<S, SqlMigrationFilter> & {
|
|
19
|
-
select: S;
|
|
20
|
-
} & StrictSelect<S, SqlMigrationSelect>): QueryBuilder<{
|
|
21
|
-
sqlMigrations: {
|
|
22
|
-
nodes: InferSelectResult<SqlMigrationWithRelations, S>[];
|
|
23
|
-
};
|
|
24
|
-
}>;
|
|
25
|
-
findOne<S extends SqlMigrationSelect>(args: {
|
|
26
|
-
id: number;
|
|
27
|
-
select: S;
|
|
28
|
-
} & StrictSelect<S, SqlMigrationSelect>): QueryBuilder<{
|
|
29
|
-
sqlMigration: InferSelectResult<SqlMigrationWithRelations, S> | null;
|
|
30
|
-
}>;
|
|
31
|
-
create<S extends SqlMigrationSelect>(args: CreateArgs<S, CreateSqlMigrationInput['sqlMigration']> & {
|
|
32
|
-
select: S;
|
|
33
|
-
} & StrictSelect<S, SqlMigrationSelect>): QueryBuilder<{
|
|
34
|
-
createSqlMigration: {
|
|
35
|
-
sqlMigration: InferSelectResult<SqlMigrationWithRelations, S>;
|
|
36
|
-
};
|
|
37
|
-
}>;
|
|
38
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create mutation hook for FieldModule
|
|
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 { FieldModuleSelect, FieldModuleWithRelations, CreateFieldModuleInput } from '../../orm/input-types';
|
|
8
|
-
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
-
export type { FieldModuleSelect, FieldModuleWithRelations, CreateFieldModuleInput, } from '../../orm/input-types';
|
|
10
|
-
/**
|
|
11
|
-
* Mutation hook for creating a FieldModule
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const { mutate, isPending } = useCreateFieldModuleMutation({
|
|
16
|
-
* selection: { fields: { id: true, name: true } },
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* mutate({ name: 'New item' });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare function useCreateFieldModuleMutation<S extends FieldModuleSelect>(params: {
|
|
23
|
-
selection: {
|
|
24
|
-
fields: S & FieldModuleSelect;
|
|
25
|
-
} & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
26
|
-
} & Omit<UseMutationOptions<{
|
|
27
|
-
createFieldModule: {
|
|
28
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
29
|
-
};
|
|
30
|
-
}, Error, CreateFieldModuleInput['fieldModule']>, 'mutationFn'>): UseMutationResult<{
|
|
31
|
-
createFieldModule: {
|
|
32
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
33
|
-
};
|
|
34
|
-
}, Error, CreateFieldModuleInput['fieldModule']>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create mutation hook for SqlMigration
|
|
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 { SqlMigrationSelect, SqlMigrationWithRelations, CreateSqlMigrationInput } from '../../orm/input-types';
|
|
8
|
-
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
-
export type { SqlMigrationSelect, SqlMigrationWithRelations, CreateSqlMigrationInput, } from '../../orm/input-types';
|
|
10
|
-
/**
|
|
11
|
-
* Mutation hook for creating a SqlMigration
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const { mutate, isPending } = useCreateSqlMigrationMutation({
|
|
16
|
-
* selection: { fields: { id: true, name: true } },
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* mutate({ name: 'New item' });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare function useCreateSqlMigrationMutation<S extends SqlMigrationSelect>(params: {
|
|
23
|
-
selection: {
|
|
24
|
-
fields: S & SqlMigrationSelect;
|
|
25
|
-
} & HookStrictSelect<NoInfer<S>, SqlMigrationSelect>;
|
|
26
|
-
} & Omit<UseMutationOptions<{
|
|
27
|
-
createSqlMigration: {
|
|
28
|
-
sqlMigration: InferSelectResult<SqlMigrationWithRelations, S>;
|
|
29
|
-
};
|
|
30
|
-
}, Error, CreateSqlMigrationInput['sqlMigration']>, 'mutationFn'>): UseMutationResult<{
|
|
31
|
-
createSqlMigration: {
|
|
32
|
-
sqlMigration: InferSelectResult<SqlMigrationWithRelations, S>;
|
|
33
|
-
};
|
|
34
|
-
}, Error, CreateSqlMigrationInput['sqlMigration']>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Delete mutation hook for FieldModule
|
|
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 { FieldModuleSelect, FieldModuleWithRelations } from '../../orm/input-types';
|
|
8
|
-
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
-
export type { FieldModuleSelect, FieldModuleWithRelations } from '../../orm/input-types';
|
|
10
|
-
/**
|
|
11
|
-
* Mutation hook for deleting a FieldModule with typed selection
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const { mutate, isPending } = useDeleteFieldModuleMutation({
|
|
16
|
-
* selection: { fields: { id: true } },
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* mutate({ id: 'value-to-delete' });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare function useDeleteFieldModuleMutation<S extends FieldModuleSelect>(params: {
|
|
23
|
-
selection: {
|
|
24
|
-
fields: S & FieldModuleSelect;
|
|
25
|
-
} & HookStrictSelect<NoInfer<S>, FieldModuleSelect>;
|
|
26
|
-
} & Omit<UseMutationOptions<{
|
|
27
|
-
deleteFieldModule: {
|
|
28
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
29
|
-
};
|
|
30
|
-
}, Error, {
|
|
31
|
-
id: string;
|
|
32
|
-
}>, 'mutationFn'>): UseMutationResult<{
|
|
33
|
-
deleteFieldModule: {
|
|
34
|
-
fieldModule: InferSelectResult<FieldModuleWithRelations, S>;
|
|
35
|
-
};
|
|
36
|
-
}, Error, {
|
|
37
|
-
id: string;
|
|
38
|
-
}>;
|