@constructive-io/react 0.10.16 → 0.10.18
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 +24 -12
- package/esm/public/hooks/invalidation.js +65 -33
- package/esm/public/hooks/mutation-keys.d.ts +64 -30
- package/esm/public/hooks/mutation-keys.js +55 -23
- package/esm/public/hooks/mutations/index.d.ts +16 -5
- package/esm/public/hooks/mutations/index.js +16 -5
- package/esm/public/hooks/mutations/useCreateBlueprintConstructionMutation.d.ts +34 -0
- package/esm/public/hooks/mutations/useCreateBlueprintConstructionMutation.js +31 -0
- package/esm/public/hooks/mutations/useCreateBlueprintMutation.d.ts +2 -2
- package/esm/public/hooks/mutations/useCreateBlueprintMutation.js +1 -1
- package/esm/public/hooks/mutations/useCreateSecureTableProvisionMutation.d.ts +2 -2
- package/esm/public/hooks/mutations/useCreateSecureTableProvisionMutation.js +1 -1
- package/esm/public/hooks/mutations/useCreateStorageModuleMutation.d.ts +34 -0
- package/esm/public/hooks/mutations/useCreateStorageModuleMutation.js +31 -0
- package/esm/public/hooks/mutations/useDeleteBlueprintConstructionMutation.d.ts +38 -0
- package/esm/public/hooks/mutations/useDeleteBlueprintConstructionMutation.js +36 -0
- package/esm/public/hooks/mutations/useDeleteBlueprintMutation.d.ts +2 -2
- package/esm/public/hooks/mutations/useDeleteBlueprintMutation.js +1 -1
- package/esm/public/hooks/mutations/useDeleteSecureTableProvisionMutation.d.ts +2 -2
- package/esm/public/hooks/mutations/useDeleteSecureTableProvisionMutation.js +1 -1
- package/esm/public/hooks/mutations/useDeleteStorageModuleMutation.d.ts +38 -0
- package/esm/public/hooks/mutations/useDeleteStorageModuleMutation.js +36 -0
- package/esm/public/hooks/mutations/useProvisionFullTextSearchMutation.d.ts +20 -0
- package/esm/public/hooks/mutations/useProvisionFullTextSearchMutation.js +23 -0
- package/esm/public/hooks/mutations/useProvisionIndexMutation.d.ts +20 -0
- package/esm/public/hooks/mutations/useProvisionIndexMutation.js +23 -0
- package/esm/public/hooks/mutations/useProvisionRelationMutation.d.ts +20 -0
- package/esm/public/hooks/mutations/useProvisionRelationMutation.js +23 -0
- package/esm/public/hooks/mutations/useProvisionTableMutation.d.ts +20 -0
- package/esm/public/hooks/mutations/useProvisionTableMutation.js +23 -0
- package/esm/public/hooks/mutations/useProvisionUniqueConstraintMutation.d.ts +20 -0
- package/esm/public/hooks/mutations/useProvisionUniqueConstraintMutation.js +23 -0
- package/esm/public/hooks/mutations/useUpdateBlueprintConstructionMutation.d.ts +40 -0
- package/esm/public/hooks/mutations/useUpdateBlueprintConstructionMutation.js +37 -0
- package/esm/public/hooks/mutations/useUpdateBlueprintMutation.d.ts +2 -2
- package/esm/public/hooks/mutations/useUpdateBlueprintMutation.js +1 -1
- package/esm/public/hooks/mutations/useUpdateSecureTableProvisionMutation.d.ts +2 -2
- package/esm/public/hooks/mutations/useUpdateSecureTableProvisionMutation.js +1 -1
- package/esm/public/hooks/mutations/useUpdateStorageModuleMutation.d.ts +40 -0
- package/esm/public/hooks/mutations/useUpdateStorageModuleMutation.js +37 -0
- package/esm/public/hooks/queries/index.d.ts +8 -3
- package/esm/public/hooks/queries/index.js +8 -3
- package/esm/public/hooks/queries/useBlueprintConstructionQuery.d.ts +65 -0
- package/esm/public/hooks/queries/useBlueprintConstructionQuery.js +47 -0
- package/esm/public/hooks/queries/useBlueprintConstructionsQuery.d.ts +69 -0
- package/esm/public/hooks/queries/useBlueprintConstructionsQuery.js +32 -0
- package/esm/public/hooks/queries/useBlueprintQuery.d.ts +4 -4
- package/esm/public/hooks/queries/useBlueprintQuery.js +1 -1
- package/esm/public/hooks/queries/useBlueprintsQuery.d.ts +4 -4
- package/esm/public/hooks/queries/useBlueprintsQuery.js +1 -1
- package/esm/public/hooks/queries/useResolveBlueprintTableQuery.d.ts +53 -0
- package/esm/public/hooks/queries/useResolveBlueprintTableQuery.js +47 -0
- package/esm/public/hooks/queries/useSecureTableProvisionQuery.d.ts +4 -4
- package/esm/public/hooks/queries/useSecureTableProvisionQuery.js +1 -1
- package/esm/public/hooks/queries/useSecureTableProvisionsQuery.d.ts +4 -4
- package/esm/public/hooks/queries/useSecureTableProvisionsQuery.js +1 -1
- package/esm/public/hooks/queries/useStorageModuleQuery.d.ts +65 -0
- package/esm/public/hooks/queries/useStorageModuleQuery.js +47 -0
- package/esm/public/hooks/queries/useStorageModulesQuery.d.ts +69 -0
- package/esm/public/hooks/queries/useStorageModulesQuery.js +32 -0
- package/esm/public/hooks/query-keys.d.ts +58 -28
- package/esm/public/hooks/query-keys.js +33 -16
- package/esm/public/orm/index.d.ts +53 -19
- package/esm/public/orm/index.js +8 -4
- package/esm/public/orm/input-types.d.ts +886 -249
- package/esm/public/orm/input-types.js +5 -0
- package/esm/public/orm/models/blueprintConstruction.d.ts +56 -0
- package/esm/public/orm/models/blueprintConstruction.js +96 -0
- package/esm/public/orm/models/index.d.ts +4 -2
- package/esm/public/orm/models/index.js +4 -2
- package/esm/public/orm/models/storageModule.d.ts +56 -0
- package/esm/public/orm/models/storageModule.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +86 -26
- package/esm/public/orm/mutation/index.js +96 -36
- package/esm/public/orm/query/index.d.ts +16 -0
- package/esm/public/orm/query/index.js +28 -0
- package/esm/public/schema-types.d.ts +990 -645
- package/esm/public/types.d.ts +42 -18
- package/package.json +3 -3
- package/public/hooks/index.d.ts +1 -1
- package/public/hooks/index.js +1 -1
- package/public/hooks/invalidation.d.ts +24 -12
- package/public/hooks/invalidation.js +64 -32
- package/public/hooks/mutation-keys.d.ts +64 -30
- package/public/hooks/mutation-keys.js +58 -26
- package/public/hooks/mutations/index.d.ts +16 -5
- package/public/hooks/mutations/index.js +16 -5
- package/public/hooks/mutations/useCreateBlueprintConstructionMutation.d.ts +34 -0
- package/public/hooks/mutations/useCreateBlueprintConstructionMutation.js +34 -0
- package/public/hooks/mutations/useCreateBlueprintMutation.d.ts +2 -2
- package/public/hooks/mutations/useCreateBlueprintMutation.js +1 -1
- package/public/hooks/mutations/useCreateSecureTableProvisionMutation.d.ts +2 -2
- package/public/hooks/mutations/useCreateSecureTableProvisionMutation.js +1 -1
- package/public/hooks/mutations/useCreateStorageModuleMutation.d.ts +34 -0
- package/public/hooks/mutations/useCreateStorageModuleMutation.js +34 -0
- package/public/hooks/mutations/useDeleteBlueprintConstructionMutation.d.ts +38 -0
- package/public/hooks/mutations/useDeleteBlueprintConstructionMutation.js +39 -0
- package/public/hooks/mutations/useDeleteBlueprintMutation.d.ts +2 -2
- package/public/hooks/mutations/useDeleteBlueprintMutation.js +1 -1
- package/public/hooks/mutations/useDeleteSecureTableProvisionMutation.d.ts +2 -2
- package/public/hooks/mutations/useDeleteSecureTableProvisionMutation.js +1 -1
- package/public/hooks/mutations/useDeleteStorageModuleMutation.d.ts +38 -0
- package/public/hooks/mutations/useDeleteStorageModuleMutation.js +39 -0
- package/public/hooks/mutations/useProvisionFullTextSearchMutation.d.ts +20 -0
- package/public/hooks/mutations/useProvisionFullTextSearchMutation.js +26 -0
- package/public/hooks/mutations/useProvisionIndexMutation.d.ts +20 -0
- package/public/hooks/mutations/useProvisionIndexMutation.js +26 -0
- package/public/hooks/mutations/useProvisionRelationMutation.d.ts +20 -0
- package/public/hooks/mutations/useProvisionRelationMutation.js +26 -0
- package/public/hooks/mutations/useProvisionTableMutation.d.ts +20 -0
- package/public/hooks/mutations/useProvisionTableMutation.js +26 -0
- package/public/hooks/mutations/useProvisionUniqueConstraintMutation.d.ts +20 -0
- package/public/hooks/mutations/useProvisionUniqueConstraintMutation.js +26 -0
- package/public/hooks/mutations/useUpdateBlueprintConstructionMutation.d.ts +40 -0
- package/public/hooks/mutations/useUpdateBlueprintConstructionMutation.js +40 -0
- package/public/hooks/mutations/useUpdateBlueprintMutation.d.ts +2 -2
- package/public/hooks/mutations/useUpdateBlueprintMutation.js +1 -1
- package/public/hooks/mutations/useUpdateSecureTableProvisionMutation.d.ts +2 -2
- package/public/hooks/mutations/useUpdateSecureTableProvisionMutation.js +1 -1
- package/public/hooks/mutations/useUpdateStorageModuleMutation.d.ts +40 -0
- package/public/hooks/mutations/useUpdateStorageModuleMutation.js +40 -0
- package/public/hooks/queries/index.d.ts +8 -3
- package/public/hooks/queries/index.js +8 -3
- package/public/hooks/queries/useBlueprintConstructionQuery.d.ts +65 -0
- package/public/hooks/queries/useBlueprintConstructionQuery.js +53 -0
- package/public/hooks/queries/useBlueprintConstructionsQuery.d.ts +69 -0
- package/public/hooks/queries/useBlueprintConstructionsQuery.js +38 -0
- package/public/hooks/queries/useBlueprintQuery.d.ts +4 -4
- package/public/hooks/queries/useBlueprintQuery.js +1 -1
- package/public/hooks/queries/useBlueprintsQuery.d.ts +4 -4
- package/public/hooks/queries/useBlueprintsQuery.js +1 -1
- package/public/hooks/queries/useResolveBlueprintTableQuery.d.ts +53 -0
- package/public/hooks/queries/useResolveBlueprintTableQuery.js +53 -0
- package/public/hooks/queries/useSecureTableProvisionQuery.d.ts +4 -4
- package/public/hooks/queries/useSecureTableProvisionQuery.js +1 -1
- package/public/hooks/queries/useSecureTableProvisionsQuery.d.ts +4 -4
- package/public/hooks/queries/useSecureTableProvisionsQuery.js +1 -1
- package/public/hooks/queries/useStorageModuleQuery.d.ts +65 -0
- package/public/hooks/queries/useStorageModuleQuery.js +53 -0
- package/public/hooks/queries/useStorageModulesQuery.d.ts +69 -0
- package/public/hooks/queries/useStorageModulesQuery.js +38 -0
- package/public/hooks/query-keys.d.ts +58 -28
- package/public/hooks/query-keys.js +36 -19
- package/public/orm/index.d.ts +53 -19
- package/public/orm/index.js +8 -4
- package/public/orm/input-types.d.ts +886 -249
- package/public/orm/input-types.js +5 -0
- package/public/orm/models/blueprintConstruction.d.ts +56 -0
- package/public/orm/models/blueprintConstruction.js +100 -0
- package/public/orm/models/index.d.ts +4 -2
- package/public/orm/models/index.js +11 -7
- package/public/orm/models/storageModule.d.ts +56 -0
- package/public/orm/models/storageModule.js +100 -0
- package/public/orm/mutation/index.d.ts +86 -26
- package/public/orm/mutation/index.js +96 -36
- package/public/orm/query/index.d.ts +16 -0
- package/public/orm/query/index.js +28 -0
- package/public/schema-types.d.ts +990 -645
- package/public/types.d.ts +42 -18
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts.
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useCreateBlueprintConstructionMutation = useCreateBlueprintConstructionMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const query_keys_1 = require("../query-keys");
|
|
13
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
14
|
+
function useCreateBlueprintConstructionMutation(params) {
|
|
15
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
16
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
17
|
+
void _selection;
|
|
18
|
+
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
|
+
return (0, react_query_1.useMutation)({
|
|
20
|
+
mutationKey: mutation_keys_1.blueprintConstructionMutationKeys.create(),
|
|
21
|
+
mutationFn: (data) => (0, client_1.getClient)()
|
|
22
|
+
.blueprintConstruction.create({
|
|
23
|
+
data,
|
|
24
|
+
select: args.select,
|
|
25
|
+
})
|
|
26
|
+
.unwrap(),
|
|
27
|
+
onSuccess: () => {
|
|
28
|
+
queryClient.invalidateQueries({
|
|
29
|
+
queryKey: query_keys_1.blueprintConstructionKeys.lists(),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
...mutationOptions,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* An owned,
|
|
2
|
+
* An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
* DO NOT EDIT - changes will be overwritten
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import type { BlueprintSelect, BlueprintWithRelations, CreateBlueprintInput } fr
|
|
|
8
8
|
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
9
|
export type { BlueprintSelect, BlueprintWithRelations, CreateBlueprintInput, } from '../../orm/input-types';
|
|
10
10
|
/**
|
|
11
|
-
* An owned,
|
|
11
|
+
* An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* An owned,
|
|
3
|
+
* An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.
|
|
4
4
|
* @generated by @constructive-io/graphql-codegen
|
|
5
5
|
* DO NOT EDIT - changes will be overwritten
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via
|
|
2
|
+
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
* DO NOT EDIT - changes will be overwritten
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import type { SecureTableProvisionSelect, SecureTableProvisionWithRelations, Cre
|
|
|
8
8
|
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
9
|
export type { SecureTableProvisionSelect, SecureTableProvisionWithRelations, CreateSecureTableProvisionInput, } from '../../orm/input-types';
|
|
10
10
|
/**
|
|
11
|
-
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via
|
|
11
|
+
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via
|
|
3
|
+
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.
|
|
4
4
|
* @generated by @constructive-io/graphql-codegen
|
|
5
5
|
* DO NOT EDIT - changes will be overwritten
|
|
6
6
|
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create mutation hook for StorageModule
|
|
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 { StorageModuleSelect, StorageModuleWithRelations, CreateStorageModuleInput } from '../../orm/input-types';
|
|
8
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
+
export type { StorageModuleSelect, StorageModuleWithRelations, CreateStorageModuleInput, } from '../../orm/input-types';
|
|
10
|
+
/**
|
|
11
|
+
* Mutation hook for creating a StorageModule
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const { mutate, isPending } = useCreateStorageModuleMutation({
|
|
16
|
+
* selection: { fields: { id: true, name: true } },
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* mutate({ name: 'New item' });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function useCreateStorageModuleMutation<S extends StorageModuleSelect>(params: {
|
|
23
|
+
selection: {
|
|
24
|
+
fields: S & StorageModuleSelect;
|
|
25
|
+
} & HookStrictSelect<NoInfer<S>, StorageModuleSelect>;
|
|
26
|
+
} & Omit<UseMutationOptions<{
|
|
27
|
+
createStorageModule: {
|
|
28
|
+
storageModule: InferSelectResult<StorageModuleWithRelations, S>;
|
|
29
|
+
};
|
|
30
|
+
}, Error, CreateStorageModuleInput['storageModule']>, 'mutationFn'>): UseMutationResult<{
|
|
31
|
+
createStorageModule: {
|
|
32
|
+
storageModule: InferSelectResult<StorageModuleWithRelations, S>;
|
|
33
|
+
};
|
|
34
|
+
}, Error, CreateStorageModuleInput['storageModule']>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Create mutation hook for StorageModule
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useCreateStorageModuleMutation = useCreateStorageModuleMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const query_keys_1 = require("../query-keys");
|
|
13
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
14
|
+
function useCreateStorageModuleMutation(params) {
|
|
15
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
16
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
17
|
+
void _selection;
|
|
18
|
+
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
|
+
return (0, react_query_1.useMutation)({
|
|
20
|
+
mutationKey: mutation_keys_1.storageModuleMutationKeys.create(),
|
|
21
|
+
mutationFn: (data) => (0, client_1.getClient)()
|
|
22
|
+
.storageModule.create({
|
|
23
|
+
data,
|
|
24
|
+
select: args.select,
|
|
25
|
+
})
|
|
26
|
+
.unwrap(),
|
|
27
|
+
onSuccess: () => {
|
|
28
|
+
queryClient.invalidateQueries({
|
|
29
|
+
queryKey: query_keys_1.storageModuleKeys.lists(),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
...mutationOptions,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts.
|
|
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 { BlueprintConstructionSelect, BlueprintConstructionWithRelations } from '../../orm/input-types';
|
|
8
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
+
export type { BlueprintConstructionSelect, BlueprintConstructionWithRelations, } from '../../orm/input-types';
|
|
10
|
+
/**
|
|
11
|
+
* Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const { mutate, isPending } = useDeleteBlueprintConstructionMutation({
|
|
16
|
+
* selection: { fields: { id: true } },
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* mutate({ id: 'value-to-delete' });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function useDeleteBlueprintConstructionMutation<S extends BlueprintConstructionSelect>(params: {
|
|
23
|
+
selection: {
|
|
24
|
+
fields: S & BlueprintConstructionSelect;
|
|
25
|
+
} & HookStrictSelect<NoInfer<S>, BlueprintConstructionSelect>;
|
|
26
|
+
} & Omit<UseMutationOptions<{
|
|
27
|
+
deleteBlueprintConstruction: {
|
|
28
|
+
blueprintConstruction: InferSelectResult<BlueprintConstructionWithRelations, S>;
|
|
29
|
+
};
|
|
30
|
+
}, Error, {
|
|
31
|
+
id: string;
|
|
32
|
+
}>, 'mutationFn'>): UseMutationResult<{
|
|
33
|
+
deleteBlueprintConstruction: {
|
|
34
|
+
blueprintConstruction: InferSelectResult<BlueprintConstructionWithRelations, S>;
|
|
35
|
+
};
|
|
36
|
+
}, Error, {
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts.
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useDeleteBlueprintConstructionMutation = useDeleteBlueprintConstructionMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const query_keys_1 = require("../query-keys");
|
|
13
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
14
|
+
function useDeleteBlueprintConstructionMutation(params) {
|
|
15
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
16
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
17
|
+
void _selection;
|
|
18
|
+
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
|
+
return (0, react_query_1.useMutation)({
|
|
20
|
+
mutationKey: mutation_keys_1.blueprintConstructionMutationKeys.all,
|
|
21
|
+
mutationFn: ({ id }) => (0, client_1.getClient)()
|
|
22
|
+
.blueprintConstruction.delete({
|
|
23
|
+
where: {
|
|
24
|
+
id,
|
|
25
|
+
},
|
|
26
|
+
select: args.select,
|
|
27
|
+
})
|
|
28
|
+
.unwrap(),
|
|
29
|
+
onSuccess: (_, variables) => {
|
|
30
|
+
queryClient.removeQueries({
|
|
31
|
+
queryKey: query_keys_1.blueprintConstructionKeys.detail(variables.id),
|
|
32
|
+
});
|
|
33
|
+
queryClient.invalidateQueries({
|
|
34
|
+
queryKey: query_keys_1.blueprintConstructionKeys.lists(),
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
...mutationOptions,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* An owned,
|
|
2
|
+
* An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
* DO NOT EDIT - changes will be overwritten
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import type { BlueprintSelect, BlueprintWithRelations } from '../../orm/input-ty
|
|
|
8
8
|
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
9
|
export type { BlueprintSelect, BlueprintWithRelations } from '../../orm/input-types';
|
|
10
10
|
/**
|
|
11
|
-
* An owned,
|
|
11
|
+
* An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* An owned,
|
|
3
|
+
* An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.
|
|
4
4
|
* @generated by @constructive-io/graphql-codegen
|
|
5
5
|
* DO NOT EDIT - changes will be overwritten
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via
|
|
2
|
+
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
* DO NOT EDIT - changes will be overwritten
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import type { SecureTableProvisionSelect, SecureTableProvisionWithRelations } fr
|
|
|
8
8
|
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
9
|
export type { SecureTableProvisionSelect, SecureTableProvisionWithRelations, } from '../../orm/input-types';
|
|
10
10
|
/**
|
|
11
|
-
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via
|
|
11
|
+
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via
|
|
3
|
+
* Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.
|
|
4
4
|
* @generated by @constructive-io/graphql-codegen
|
|
5
5
|
* DO NOT EDIT - changes will be overwritten
|
|
6
6
|
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delete mutation hook for StorageModule
|
|
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 { StorageModuleSelect, StorageModuleWithRelations } from '../../orm/input-types';
|
|
8
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
+
export type { StorageModuleSelect, StorageModuleWithRelations } from '../../orm/input-types';
|
|
10
|
+
/**
|
|
11
|
+
* Mutation hook for deleting a StorageModule with typed selection
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const { mutate, isPending } = useDeleteStorageModuleMutation({
|
|
16
|
+
* selection: { fields: { id: true } },
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* mutate({ id: 'value-to-delete' });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function useDeleteStorageModuleMutation<S extends StorageModuleSelect>(params: {
|
|
23
|
+
selection: {
|
|
24
|
+
fields: S & StorageModuleSelect;
|
|
25
|
+
} & HookStrictSelect<NoInfer<S>, StorageModuleSelect>;
|
|
26
|
+
} & Omit<UseMutationOptions<{
|
|
27
|
+
deleteStorageModule: {
|
|
28
|
+
storageModule: InferSelectResult<StorageModuleWithRelations, S>;
|
|
29
|
+
};
|
|
30
|
+
}, Error, {
|
|
31
|
+
id: string;
|
|
32
|
+
}>, 'mutationFn'>): UseMutationResult<{
|
|
33
|
+
deleteStorageModule: {
|
|
34
|
+
storageModule: InferSelectResult<StorageModuleWithRelations, S>;
|
|
35
|
+
};
|
|
36
|
+
}, Error, {
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Delete mutation hook for StorageModule
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useDeleteStorageModuleMutation = useDeleteStorageModuleMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const query_keys_1 = require("../query-keys");
|
|
13
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
14
|
+
function useDeleteStorageModuleMutation(params) {
|
|
15
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
16
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
17
|
+
void _selection;
|
|
18
|
+
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
|
+
return (0, react_query_1.useMutation)({
|
|
20
|
+
mutationKey: mutation_keys_1.storageModuleMutationKeys.all,
|
|
21
|
+
mutationFn: ({ id }) => (0, client_1.getClient)()
|
|
22
|
+
.storageModule.delete({
|
|
23
|
+
where: {
|
|
24
|
+
id,
|
|
25
|
+
},
|
|
26
|
+
select: args.select,
|
|
27
|
+
})
|
|
28
|
+
.unwrap(),
|
|
29
|
+
onSuccess: (_, variables) => {
|
|
30
|
+
queryClient.removeQueries({
|
|
31
|
+
queryKey: query_keys_1.storageModuleKeys.detail(variables.id),
|
|
32
|
+
});
|
|
33
|
+
queryClient.invalidateQueries({
|
|
34
|
+
queryKey: query_keys_1.storageModuleKeys.lists(),
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
...mutationOptions,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom mutation hook for provisionFullTextSearch
|
|
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 { ProvisionFullTextSearchVariables } from '../../orm/mutation';
|
|
8
|
+
import type { ProvisionFullTextSearchPayloadSelect, ProvisionFullTextSearchPayload } from '../../orm/input-types';
|
|
9
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
+
export type { ProvisionFullTextSearchVariables } from '../../orm/mutation';
|
|
11
|
+
export type { ProvisionFullTextSearchPayloadSelect } from '../../orm/input-types';
|
|
12
|
+
export declare function useProvisionFullTextSearchMutation<S extends ProvisionFullTextSearchPayloadSelect>(params: {
|
|
13
|
+
selection: {
|
|
14
|
+
fields: S & ProvisionFullTextSearchPayloadSelect;
|
|
15
|
+
} & HookStrictSelect<NoInfer<S>, ProvisionFullTextSearchPayloadSelect>;
|
|
16
|
+
} & Omit<UseMutationOptions<{
|
|
17
|
+
provisionFullTextSearch: InferSelectResult<ProvisionFullTextSearchPayload, S> | null;
|
|
18
|
+
}, Error, ProvisionFullTextSearchVariables>, 'mutationFn'>): UseMutationResult<{
|
|
19
|
+
provisionFullTextSearch: InferSelectResult<ProvisionFullTextSearchPayload, S> | null;
|
|
20
|
+
}, Error, ProvisionFullTextSearchVariables>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Custom mutation hook for provisionFullTextSearch
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useProvisionFullTextSearchMutation = useProvisionFullTextSearchMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
13
|
+
function useProvisionFullTextSearchMutation(params) {
|
|
14
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
15
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
16
|
+
void _selection;
|
|
17
|
+
return (0, react_query_1.useMutation)({
|
|
18
|
+
mutationKey: mutation_keys_1.customMutationKeys.provisionFullTextSearch(),
|
|
19
|
+
mutationFn: (variables) => (0, client_1.getClient)()
|
|
20
|
+
.mutation.provisionFullTextSearch(variables, {
|
|
21
|
+
select: args.select,
|
|
22
|
+
})
|
|
23
|
+
.unwrap(),
|
|
24
|
+
...mutationOptions,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom mutation hook for provisionIndex
|
|
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 { ProvisionIndexVariables } from '../../orm/mutation';
|
|
8
|
+
import type { ProvisionIndexPayloadSelect, ProvisionIndexPayload } from '../../orm/input-types';
|
|
9
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
+
export type { ProvisionIndexVariables } from '../../orm/mutation';
|
|
11
|
+
export type { ProvisionIndexPayloadSelect } from '../../orm/input-types';
|
|
12
|
+
export declare function useProvisionIndexMutation<S extends ProvisionIndexPayloadSelect>(params: {
|
|
13
|
+
selection: {
|
|
14
|
+
fields: S & ProvisionIndexPayloadSelect;
|
|
15
|
+
} & HookStrictSelect<NoInfer<S>, ProvisionIndexPayloadSelect>;
|
|
16
|
+
} & Omit<UseMutationOptions<{
|
|
17
|
+
provisionIndex: InferSelectResult<ProvisionIndexPayload, S> | null;
|
|
18
|
+
}, Error, ProvisionIndexVariables>, 'mutationFn'>): UseMutationResult<{
|
|
19
|
+
provisionIndex: InferSelectResult<ProvisionIndexPayload, S> | null;
|
|
20
|
+
}, Error, ProvisionIndexVariables>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Custom mutation hook for provisionIndex
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useProvisionIndexMutation = useProvisionIndexMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
13
|
+
function useProvisionIndexMutation(params) {
|
|
14
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
15
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
16
|
+
void _selection;
|
|
17
|
+
return (0, react_query_1.useMutation)({
|
|
18
|
+
mutationKey: mutation_keys_1.customMutationKeys.provisionIndex(),
|
|
19
|
+
mutationFn: (variables) => (0, client_1.getClient)()
|
|
20
|
+
.mutation.provisionIndex(variables, {
|
|
21
|
+
select: args.select,
|
|
22
|
+
})
|
|
23
|
+
.unwrap(),
|
|
24
|
+
...mutationOptions,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom mutation hook for provisionRelation
|
|
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 { ProvisionRelationVariables } from '../../orm/mutation';
|
|
8
|
+
import type { ProvisionRelationPayloadSelect, ProvisionRelationPayload } from '../../orm/input-types';
|
|
9
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
+
export type { ProvisionRelationVariables } from '../../orm/mutation';
|
|
11
|
+
export type { ProvisionRelationPayloadSelect } from '../../orm/input-types';
|
|
12
|
+
export declare function useProvisionRelationMutation<S extends ProvisionRelationPayloadSelect>(params: {
|
|
13
|
+
selection: {
|
|
14
|
+
fields: S & ProvisionRelationPayloadSelect;
|
|
15
|
+
} & HookStrictSelect<NoInfer<S>, ProvisionRelationPayloadSelect>;
|
|
16
|
+
} & Omit<UseMutationOptions<{
|
|
17
|
+
provisionRelation: InferSelectResult<ProvisionRelationPayload, S> | null;
|
|
18
|
+
}, Error, ProvisionRelationVariables>, 'mutationFn'>): UseMutationResult<{
|
|
19
|
+
provisionRelation: InferSelectResult<ProvisionRelationPayload, S> | null;
|
|
20
|
+
}, Error, ProvisionRelationVariables>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Custom mutation hook for provisionRelation
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useProvisionRelationMutation = useProvisionRelationMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
13
|
+
function useProvisionRelationMutation(params) {
|
|
14
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
15
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
16
|
+
void _selection;
|
|
17
|
+
return (0, react_query_1.useMutation)({
|
|
18
|
+
mutationKey: mutation_keys_1.customMutationKeys.provisionRelation(),
|
|
19
|
+
mutationFn: (variables) => (0, client_1.getClient)()
|
|
20
|
+
.mutation.provisionRelation(variables, {
|
|
21
|
+
select: args.select,
|
|
22
|
+
})
|
|
23
|
+
.unwrap(),
|
|
24
|
+
...mutationOptions,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom mutation hook for provisionTable
|
|
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 { ProvisionTableVariables } from '../../orm/mutation';
|
|
8
|
+
import type { ProvisionTablePayloadSelect, ProvisionTablePayload } from '../../orm/input-types';
|
|
9
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
+
export type { ProvisionTableVariables } from '../../orm/mutation';
|
|
11
|
+
export type { ProvisionTablePayloadSelect } from '../../orm/input-types';
|
|
12
|
+
export declare function useProvisionTableMutation<S extends ProvisionTablePayloadSelect>(params: {
|
|
13
|
+
selection: {
|
|
14
|
+
fields: S & ProvisionTablePayloadSelect;
|
|
15
|
+
} & HookStrictSelect<NoInfer<S>, ProvisionTablePayloadSelect>;
|
|
16
|
+
} & Omit<UseMutationOptions<{
|
|
17
|
+
provisionTable: InferSelectResult<ProvisionTablePayload, S> | null;
|
|
18
|
+
}, Error, ProvisionTableVariables>, 'mutationFn'>): UseMutationResult<{
|
|
19
|
+
provisionTable: InferSelectResult<ProvisionTablePayload, S> | null;
|
|
20
|
+
}, Error, ProvisionTableVariables>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Custom mutation hook for provisionTable
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useProvisionTableMutation = useProvisionTableMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
13
|
+
function useProvisionTableMutation(params) {
|
|
14
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
15
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
16
|
+
void _selection;
|
|
17
|
+
return (0, react_query_1.useMutation)({
|
|
18
|
+
mutationKey: mutation_keys_1.customMutationKeys.provisionTable(),
|
|
19
|
+
mutationFn: (variables) => (0, client_1.getClient)()
|
|
20
|
+
.mutation.provisionTable(variables, {
|
|
21
|
+
select: args.select,
|
|
22
|
+
})
|
|
23
|
+
.unwrap(),
|
|
24
|
+
...mutationOptions,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom mutation hook for provisionUniqueConstraint
|
|
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 { ProvisionUniqueConstraintVariables } from '../../orm/mutation';
|
|
8
|
+
import type { ProvisionUniqueConstraintPayloadSelect, ProvisionUniqueConstraintPayload } from '../../orm/input-types';
|
|
9
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
+
export type { ProvisionUniqueConstraintVariables } from '../../orm/mutation';
|
|
11
|
+
export type { ProvisionUniqueConstraintPayloadSelect } from '../../orm/input-types';
|
|
12
|
+
export declare function useProvisionUniqueConstraintMutation<S extends ProvisionUniqueConstraintPayloadSelect>(params: {
|
|
13
|
+
selection: {
|
|
14
|
+
fields: S & ProvisionUniqueConstraintPayloadSelect;
|
|
15
|
+
} & HookStrictSelect<NoInfer<S>, ProvisionUniqueConstraintPayloadSelect>;
|
|
16
|
+
} & Omit<UseMutationOptions<{
|
|
17
|
+
provisionUniqueConstraint: InferSelectResult<ProvisionUniqueConstraintPayload, S> | null;
|
|
18
|
+
}, Error, ProvisionUniqueConstraintVariables>, 'mutationFn'>): UseMutationResult<{
|
|
19
|
+
provisionUniqueConstraint: InferSelectResult<ProvisionUniqueConstraintPayload, S> | null;
|
|
20
|
+
}, Error, ProvisionUniqueConstraintVariables>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Custom mutation hook for provisionUniqueConstraint
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useProvisionUniqueConstraintMutation = useProvisionUniqueConstraintMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
13
|
+
function useProvisionUniqueConstraintMutation(params) {
|
|
14
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
15
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
16
|
+
void _selection;
|
|
17
|
+
return (0, react_query_1.useMutation)({
|
|
18
|
+
mutationKey: mutation_keys_1.customMutationKeys.provisionUniqueConstraint(),
|
|
19
|
+
mutationFn: (variables) => (0, client_1.getClient)()
|
|
20
|
+
.mutation.provisionUniqueConstraint(variables, {
|
|
21
|
+
select: args.select,
|
|
22
|
+
})
|
|
23
|
+
.unwrap(),
|
|
24
|
+
...mutationOptions,
|
|
25
|
+
});
|
|
26
|
+
}
|