@squonk/data-manager-client 4.2.0 → 4.3.0
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/accounting/accounting.cjs +96 -95
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +47 -47
- package/accounting/accounting.d.ts +47 -47
- package/accounting/accounting.js +102 -101
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +120 -145
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +121 -121
- package/admin/admin.d.ts +121 -121
- package/admin/admin.js +127 -152
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +39 -43
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +25 -25
- package/application/application.d.ts +25 -25
- package/application/application.js +42 -46
- package/application/application.js.map +1 -1
- package/chunk-OYRETEBZ.js +25 -0
- package/chunk-OYRETEBZ.js.map +1 -0
- package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
- package/chunk-RB2KVIEK.cjs.map +1 -0
- package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
- package/chunk-XYDLYMQ2.js.map +1 -0
- package/chunk-ZLY5XEOQ.cjs +25 -0
- package/chunk-ZLY5XEOQ.cjs.map +1 -0
- package/configuration/configuration.cjs +38 -45
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +25 -25
- package/configuration/configuration.d.ts +25 -25
- package/configuration/configuration.js +42 -49
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +126 -141
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +102 -102
- package/dataset/dataset.d.ts +102 -102
- package/dataset/dataset.js +132 -147
- package/dataset/dataset.js.map +1 -1
- package/digest/digest.cjs +22 -24
- package/digest/digest.cjs.map +1 -1
- package/digest/digest.d.cts +14 -14
- package/digest/digest.d.ts +14 -14
- package/digest/digest.js +24 -26
- package/digest/digest.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +111 -109
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +69 -69
- package/exchange-rate/exchange-rate.d.ts +69 -69
- package/exchange-rate/exchange-rate.js +117 -115
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +93 -138
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +102 -102
- package/file-and-path/file-and-path.d.ts +102 -102
- package/file-and-path/file-and-path.js +105 -150
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +80 -102
- package/index.cjs.map +1 -1
- package/index.d.cts +2401 -2326
- package/index.d.ts +2401 -2326
- package/index.js +79 -101
- package/index.js.map +1 -1
- package/instance/instance.cjs +100 -107
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +76 -76
- package/instance/instance.d.ts +76 -76
- package/instance/instance.js +105 -112
- package/instance/instance.js.map +1 -1
- package/inventory/inventory.cjs +22 -25
- package/inventory/inventory.cjs.map +1 -1
- package/inventory/inventory.d.cts +14 -14
- package/inventory/inventory.d.ts +14 -14
- package/inventory/inventory.js +24 -27
- package/inventory/inventory.js.map +1 -1
- package/job/job.cjs +55 -67
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +36 -36
- package/job/job.d.ts +36 -36
- package/job/job.js +60 -72
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +61 -59
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +47 -47
- package/metadata/metadata.d.ts +47 -47
- package/metadata/metadata.js +65 -63
- package/metadata/metadata.js.map +1 -1
- package/package.json +13 -16
- package/project/project.cjs +165 -186
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +157 -157
- package/project/project.d.ts +157 -157
- package/project/project.js +172 -193
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +767 -461
- package/src/admin/admin.ts +1187 -787
- package/src/application/application.ts +377 -231
- package/src/configuration/configuration.ts +348 -237
- package/src/custom-instance.ts +3 -3
- package/src/data-manager-api.schemas.ts +2538 -2492
- package/src/dataset/dataset.ts +1199 -792
- package/src/digest/digest.ts +198 -122
- package/src/exchange-rate/exchange-rate.ts +1088 -612
- package/src/file-and-path/file-and-path.ts +869 -616
- package/src/index.ts +2 -2
- package/src/instance/instance.ts +804 -539
- package/src/inventory/inventory.ts +200 -122
- package/src/job/job.ts +556 -348
- package/src/metadata/metadata.ts +587 -371
- package/src/options-mutator.ts +27 -0
- package/src/project/project.ts +1576 -1034
- package/src/task/task.ts +434 -295
- package/src/type/type.ts +180 -126
- package/src/user/user.ts +846 -398
- package/src/workflow/workflow.ts +1750 -1089
- package/task/task.cjs +45 -59
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +33 -33
- package/task/task.d.ts +33 -33
- package/task/task.js +51 -65
- package/task/task.js.map +1 -1
- package/type/type.cjs +21 -26
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +14 -14
- package/type/type.d.ts +14 -14
- package/type/type.js +24 -29
- package/type/type.js.map +1 -1
- package/user/user.cjs +114 -80
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +107 -48
- package/user/user.d.ts +107 -48
- package/user/user.js +120 -86
- package/user/user.js.map +1 -1
- package/workflow/workflow.cjs +179 -193
- package/workflow/workflow.cjs.map +1 -1
- package/workflow/workflow.d.cts +146 -146
- package/workflow/workflow.d.ts +146 -146
- package/workflow/workflow.js +187 -201
- package/workflow/workflow.js.map +1 -1
- package/chunk-EBOQPVLG.js.map +0 -1
- package/chunk-TKLTUR4R.cjs.map +0 -1
|
@@ -1,136 +1,112 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
|
|
4
|
-
|
|
5
|
-
// src/file-and-path/file-and-path.ts
|
|
6
3
|
|
|
4
|
+
var _chunkZLY5XEOQcjs = require('../chunk-ZLY5XEOQ.cjs');
|
|
7
5
|
|
|
8
6
|
|
|
7
|
+
var _chunkRB2KVIEKcjs = require('../chunk-RB2KVIEK.cjs');
|
|
9
8
|
|
|
9
|
+
// src/file-and-path/file-and-path.ts
|
|
10
10
|
var _reactquery = require('@tanstack/react-query');
|
|
11
11
|
var createPath = (params, options) => {
|
|
12
|
-
return
|
|
13
|
-
{
|
|
14
|
-
url: `/path`,
|
|
15
|
-
method: "PUT",
|
|
16
|
-
params
|
|
17
|
-
},
|
|
18
|
-
options
|
|
19
|
-
);
|
|
12
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/path`, method: "PUT", params }, options);
|
|
20
13
|
};
|
|
21
|
-
var
|
|
14
|
+
var useCreatePathMutationOptions = (options) => {
|
|
22
15
|
const mutationKey = ["createPath"];
|
|
23
16
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
24
17
|
const mutationFn = (props) => {
|
|
25
18
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
26
19
|
return createPath(params, requestOptions);
|
|
27
20
|
};
|
|
28
|
-
|
|
21
|
+
const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
22
|
+
return customOptions;
|
|
29
23
|
};
|
|
30
|
-
var useCreatePath = (options) => {
|
|
31
|
-
const mutationOptions =
|
|
32
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
24
|
+
var useCreatePath = (options, queryClient) => {
|
|
25
|
+
const mutationOptions = useCreatePathMutationOptions(options);
|
|
26
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
33
27
|
};
|
|
34
28
|
var deletePath = (params, options) => {
|
|
35
|
-
return
|
|
36
|
-
{
|
|
37
|
-
url: `/path`,
|
|
38
|
-
method: "DELETE",
|
|
39
|
-
params
|
|
40
|
-
},
|
|
41
|
-
options
|
|
42
|
-
);
|
|
29
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/path`, method: "DELETE", params }, options);
|
|
43
30
|
};
|
|
44
|
-
var
|
|
31
|
+
var useDeletePathMutationOptions = (options) => {
|
|
45
32
|
const mutationKey = ["deletePath"];
|
|
46
33
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
47
34
|
const mutationFn = (props) => {
|
|
48
35
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
49
36
|
return deletePath(params, requestOptions);
|
|
50
37
|
};
|
|
51
|
-
|
|
38
|
+
const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
39
|
+
return customOptions;
|
|
52
40
|
};
|
|
53
|
-
var useDeletePath = (options) => {
|
|
54
|
-
const mutationOptions =
|
|
55
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
41
|
+
var useDeletePath = (options, queryClient) => {
|
|
42
|
+
const mutationOptions = useDeletePathMutationOptions(options);
|
|
43
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
56
44
|
};
|
|
57
45
|
var movePath = (params, options) => {
|
|
58
|
-
return
|
|
59
|
-
{
|
|
60
|
-
url: `/path/move`,
|
|
61
|
-
method: "PUT",
|
|
62
|
-
params
|
|
63
|
-
},
|
|
64
|
-
options
|
|
65
|
-
);
|
|
46
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/path/move`, method: "PUT", params }, options);
|
|
66
47
|
};
|
|
67
|
-
var
|
|
48
|
+
var useMovePathMutationOptions = (options) => {
|
|
68
49
|
const mutationKey = ["movePath"];
|
|
69
50
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
70
51
|
const mutationFn = (props) => {
|
|
71
52
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
72
53
|
return movePath(params, requestOptions);
|
|
73
54
|
};
|
|
74
|
-
|
|
55
|
+
const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
56
|
+
return customOptions;
|
|
75
57
|
};
|
|
76
|
-
var useMovePath = (options) => {
|
|
77
|
-
const mutationOptions =
|
|
78
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
58
|
+
var useMovePath = (options, queryClient) => {
|
|
59
|
+
const mutationOptions = useMovePathMutationOptions(options);
|
|
60
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
79
61
|
};
|
|
80
62
|
var getFiles = (params, options, signal) => {
|
|
81
|
-
return
|
|
82
|
-
{
|
|
83
|
-
url: `/file`,
|
|
84
|
-
method: "GET",
|
|
85
|
-
params,
|
|
86
|
-
signal
|
|
87
|
-
},
|
|
88
|
-
options
|
|
89
|
-
);
|
|
63
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file`, method: "GET", params, signal }, options);
|
|
90
64
|
};
|
|
91
65
|
var getGetFilesQueryKey = (params) => {
|
|
92
|
-
return [
|
|
66
|
+
return [`/file`, ...params ? [params] : []];
|
|
93
67
|
};
|
|
94
|
-
var
|
|
68
|
+
var useGetFilesQueryOptions = (params, options) => {
|
|
95
69
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
96
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
70
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _ => _.queryKey]), () => ( getGetFilesQueryKey(params)));
|
|
97
71
|
const queryFn = ({ signal }) => getFiles(params, requestOptions, signal);
|
|
98
|
-
|
|
72
|
+
const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
73
|
+
return customOptions;
|
|
99
74
|
};
|
|
100
|
-
function useGetFiles(params, options) {
|
|
101
|
-
const queryOptions =
|
|
102
|
-
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
75
|
+
function useGetFiles(params, options, queryClient) {
|
|
76
|
+
const queryOptions = useGetFilesQueryOptions(params, options);
|
|
77
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
|
|
103
78
|
query.queryKey = queryOptions.queryKey;
|
|
104
79
|
return query;
|
|
105
80
|
}
|
|
106
|
-
var
|
|
81
|
+
var useGetFilesSuspenseQueryOptions = (params, options) => {
|
|
107
82
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
108
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
83
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _2 => _2.queryKey]), () => ( getGetFilesQueryKey(params)));
|
|
109
84
|
const queryFn = ({ signal }) => getFiles(params, requestOptions, signal);
|
|
110
|
-
|
|
85
|
+
const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
86
|
+
return customOptions;
|
|
111
87
|
};
|
|
112
|
-
function useGetFilesSuspense(params, options) {
|
|
113
|
-
const queryOptions =
|
|
114
|
-
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
88
|
+
function useGetFilesSuspense(params, options, queryClient) {
|
|
89
|
+
const queryOptions = useGetFilesSuspenseQueryOptions(params, options);
|
|
90
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
|
|
115
91
|
query.queryKey = queryOptions.queryKey;
|
|
116
92
|
return query;
|
|
117
93
|
}
|
|
118
94
|
var attachFile = (filePostBodyBody, options, signal) => {
|
|
119
95
|
const formUrlEncoded = new URLSearchParams();
|
|
120
|
-
formUrlEncoded.append(
|
|
121
|
-
formUrlEncoded.append(
|
|
122
|
-
formUrlEncoded.append(
|
|
123
|
-
formUrlEncoded.append(
|
|
96
|
+
formUrlEncoded.append(`dataset_id`, filePostBodyBody.dataset_id);
|
|
97
|
+
formUrlEncoded.append(`dataset_version`, filePostBodyBody.dataset_version.toString());
|
|
98
|
+
formUrlEncoded.append(`project_id`, filePostBodyBody.project_id);
|
|
99
|
+
formUrlEncoded.append(`as_type`, filePostBodyBody.as_type);
|
|
124
100
|
if (filePostBodyBody.path !== void 0) {
|
|
125
|
-
formUrlEncoded.append(
|
|
101
|
+
formUrlEncoded.append(`path`, filePostBodyBody.path);
|
|
126
102
|
}
|
|
127
103
|
if (filePostBodyBody.compress !== void 0) {
|
|
128
|
-
formUrlEncoded.append(
|
|
104
|
+
formUrlEncoded.append(`compress`, filePostBodyBody.compress.toString());
|
|
129
105
|
}
|
|
130
106
|
if (filePostBodyBody.immutable !== void 0) {
|
|
131
|
-
formUrlEncoded.append(
|
|
107
|
+
formUrlEncoded.append(`immutable`, filePostBodyBody.immutable.toString());
|
|
132
108
|
}
|
|
133
|
-
return
|
|
109
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0,
|
|
134
110
|
{
|
|
135
111
|
url: `/file`,
|
|
136
112
|
method: "POST",
|
|
@@ -141,121 +117,100 @@ var attachFile = (filePostBodyBody, options, signal) => {
|
|
|
141
117
|
options
|
|
142
118
|
);
|
|
143
119
|
};
|
|
144
|
-
var
|
|
120
|
+
var useAttachFileMutationOptions = (options) => {
|
|
145
121
|
const mutationKey = ["attachFile"];
|
|
146
122
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
147
123
|
const mutationFn = (props) => {
|
|
148
124
|
const { data } = _nullishCoalesce(props, () => ( {}));
|
|
149
125
|
return attachFile(data, requestOptions);
|
|
150
126
|
};
|
|
151
|
-
|
|
127
|
+
const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
128
|
+
return customOptions;
|
|
152
129
|
};
|
|
153
|
-
var useAttachFile = (options) => {
|
|
154
|
-
const mutationOptions =
|
|
155
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
130
|
+
var useAttachFile = (options, queryClient) => {
|
|
131
|
+
const mutationOptions = useAttachFileMutationOptions(options);
|
|
132
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
156
133
|
};
|
|
157
134
|
var deleteUnmanagedFile = (params, options) => {
|
|
158
|
-
return
|
|
159
|
-
{
|
|
160
|
-
url: `/file`,
|
|
161
|
-
method: "DELETE",
|
|
162
|
-
params
|
|
163
|
-
},
|
|
164
|
-
options
|
|
165
|
-
);
|
|
135
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file`, method: "DELETE", params }, options);
|
|
166
136
|
};
|
|
167
|
-
var
|
|
137
|
+
var useDeleteUnmanagedFileMutationOptions = (options) => {
|
|
168
138
|
const mutationKey = ["deleteUnmanagedFile"];
|
|
169
139
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
170
140
|
const mutationFn = (props) => {
|
|
171
141
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
172
142
|
return deleteUnmanagedFile(params, requestOptions);
|
|
173
143
|
};
|
|
174
|
-
|
|
144
|
+
const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
145
|
+
return customOptions;
|
|
175
146
|
};
|
|
176
|
-
var useDeleteUnmanagedFile = (options) => {
|
|
177
|
-
const mutationOptions =
|
|
178
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
147
|
+
var useDeleteUnmanagedFile = (options, queryClient) => {
|
|
148
|
+
const mutationOptions = useDeleteUnmanagedFileMutationOptions(options);
|
|
149
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
179
150
|
};
|
|
180
151
|
var moveFileInProject = (params, options) => {
|
|
181
|
-
return
|
|
182
|
-
{
|
|
183
|
-
url: `/file/move`,
|
|
184
|
-
method: "PUT",
|
|
185
|
-
params
|
|
186
|
-
},
|
|
187
|
-
options
|
|
188
|
-
);
|
|
152
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file/move`, method: "PUT", params }, options);
|
|
189
153
|
};
|
|
190
|
-
var
|
|
154
|
+
var useMoveFileInProjectMutationOptions = (options) => {
|
|
191
155
|
const mutationKey = ["moveFileInProject"];
|
|
192
156
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
193
157
|
const mutationFn = (props) => {
|
|
194
158
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
195
159
|
return moveFileInProject(params, requestOptions);
|
|
196
160
|
};
|
|
197
|
-
|
|
161
|
+
const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
162
|
+
return customOptions;
|
|
198
163
|
};
|
|
199
|
-
var useMoveFileInProject = (options) => {
|
|
200
|
-
const mutationOptions =
|
|
201
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
164
|
+
var useMoveFileInProject = (options, queryClient) => {
|
|
165
|
+
const mutationOptions = useMoveFileInProjectMutationOptions(options);
|
|
166
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
202
167
|
};
|
|
203
168
|
var deleteFile = (fileId, options) => {
|
|
204
|
-
return
|
|
205
|
-
{
|
|
206
|
-
url: `/file/${fileId}`,
|
|
207
|
-
method: "DELETE"
|
|
208
|
-
},
|
|
209
|
-
options
|
|
210
|
-
);
|
|
169
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file/${fileId}`, method: "DELETE" }, options);
|
|
211
170
|
};
|
|
212
|
-
var
|
|
171
|
+
var useDeleteFileMutationOptions = (options) => {
|
|
213
172
|
const mutationKey = ["deleteFile"];
|
|
214
173
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
215
174
|
const mutationFn = (props) => {
|
|
216
175
|
const { fileId } = _nullishCoalesce(props, () => ( {}));
|
|
217
176
|
return deleteFile(fileId, requestOptions);
|
|
218
177
|
};
|
|
219
|
-
|
|
178
|
+
const customOptions = _chunkZLY5XEOQcjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
179
|
+
return customOptions;
|
|
220
180
|
};
|
|
221
|
-
var useDeleteFile = (options) => {
|
|
222
|
-
const mutationOptions =
|
|
223
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
181
|
+
var useDeleteFile = (options, queryClient) => {
|
|
182
|
+
const mutationOptions = useDeleteFileMutationOptions(options);
|
|
183
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
224
184
|
};
|
|
225
185
|
var downloadFile = (fileId, options, signal) => {
|
|
226
|
-
return
|
|
227
|
-
{
|
|
228
|
-
url: `/file/${fileId}`,
|
|
229
|
-
method: "GET",
|
|
230
|
-
signal
|
|
231
|
-
},
|
|
232
|
-
options
|
|
233
|
-
);
|
|
186
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file/${fileId}`, method: "GET", signal }, options);
|
|
234
187
|
};
|
|
235
188
|
var getDownloadFileQueryKey = (fileId) => {
|
|
236
|
-
return [
|
|
189
|
+
return [`/file/${fileId}`];
|
|
237
190
|
};
|
|
238
|
-
var
|
|
191
|
+
var useDownloadFileQueryOptions = (fileId, options) => {
|
|
239
192
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
240
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
193
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _3 => _3.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
|
|
241
194
|
const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
|
|
242
|
-
|
|
195
|
+
const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
196
|
+
return customOptions;
|
|
243
197
|
};
|
|
244
|
-
function useDownloadFile(fileId, options) {
|
|
245
|
-
const queryOptions =
|
|
246
|
-
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
198
|
+
function useDownloadFile(fileId, options, queryClient) {
|
|
199
|
+
const queryOptions = useDownloadFileQueryOptions(fileId, options);
|
|
200
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
|
|
247
201
|
query.queryKey = queryOptions.queryKey;
|
|
248
202
|
return query;
|
|
249
203
|
}
|
|
250
|
-
var
|
|
204
|
+
var useDownloadFileSuspenseQueryOptions = (fileId, options) => {
|
|
251
205
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
252
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
206
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _4 => _4.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
|
|
253
207
|
const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
|
|
254
|
-
|
|
208
|
+
const customOptions = _chunkZLY5XEOQcjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
209
|
+
return customOptions;
|
|
255
210
|
};
|
|
256
|
-
function useDownloadFileSuspense(fileId, options) {
|
|
257
|
-
const queryOptions =
|
|
258
|
-
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
211
|
+
function useDownloadFileSuspense(fileId, options, queryClient) {
|
|
212
|
+
const queryOptions = useDownloadFileSuspenseQueryOptions(fileId, options);
|
|
213
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
|
|
259
214
|
query.queryKey = queryOptions.queryKey;
|
|
260
215
|
return query;
|
|
261
216
|
}
|
|
@@ -293,5 +248,5 @@ function useDownloadFileSuspense(fileId, options) {
|
|
|
293
248
|
|
|
294
249
|
|
|
295
250
|
|
|
296
|
-
exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.
|
|
251
|
+
exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.getDownloadFileQueryKey = getDownloadFileQueryKey; exports.getFiles = getFiles; exports.getGetFilesQueryKey = getGetFilesQueryKey; exports.moveFileInProject = moveFileInProject; exports.movePath = movePath; exports.useAttachFile = useAttachFile; exports.useAttachFileMutationOptions = useAttachFileMutationOptions; exports.useCreatePath = useCreatePath; exports.useCreatePathMutationOptions = useCreatePathMutationOptions; exports.useDeleteFile = useDeleteFile; exports.useDeleteFileMutationOptions = useDeleteFileMutationOptions; exports.useDeletePath = useDeletePath; exports.useDeletePathMutationOptions = useDeletePathMutationOptions; exports.useDeleteUnmanagedFile = useDeleteUnmanagedFile; exports.useDeleteUnmanagedFileMutationOptions = useDeleteUnmanagedFileMutationOptions; exports.useDownloadFile = useDownloadFile; exports.useDownloadFileQueryOptions = useDownloadFileQueryOptions; exports.useDownloadFileSuspense = useDownloadFileSuspense; exports.useDownloadFileSuspenseQueryOptions = useDownloadFileSuspenseQueryOptions; exports.useGetFiles = useGetFiles; exports.useGetFilesQueryOptions = useGetFilesQueryOptions; exports.useGetFilesSuspense = useGetFilesSuspense; exports.useGetFilesSuspenseQueryOptions = useGetFilesSuspenseQueryOptions; exports.useMoveFileInProject = useMoveFileInProject; exports.useMoveFileInProjectMutationOptions = useMoveFileInProjectMutationOptions; exports.useMovePath = useMovePath; exports.useMovePathMutationOptions = useMovePathMutationOptions;
|
|
297
252
|
//# sourceMappingURL=file-and-path.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","../../src/file-and-path/file-and-path.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AA0CA,IAAM,WAAA,EAAa,CACtB,MAAA,EACH,OAAA,EAAA,GAAsD;AAGjD,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,KAAA,CAAA;AAAA,MAAS,MAAA,EAAQ,KAAA;AAAA,MACrB;AAAA,IACJ,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAIG,IAAM,6BAAA,EAA+B,CACpB,OAAA,EAAA,GACnB;AACL,EAAA,MAAM,YAAA,EAAc,CAAC,YAAY,CAAA;AACjC,EAAA,MAAM,EAAC,QAAA,EAAU,eAAA,EAAiB,OAAA,EAAS,eAAc,EAAA,E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AAY,MAAA;AAAO,MAAA;AAC1C,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAGS;AACD,EAAA;AACR;AAGS;AAGC,EAAA;AAEM,EAAA;AAI4D,EAAA;AAMzD,EAAA;AACvB;AAmCC;AAIsB,EAAA;AAEE,EAAA;AAEN,EAAA;AAEV,EAAA;AACT;AAIa;AAGC,EAAA;AAEM,EAAA;AAI4D,EAAA;AAMzD,EAAA;AACvB;AAsBgB;AAKO,EAAA;AAEP,EAAA;AAEG,EAAA;AAEV,EAAA;AACT;ADxiB2B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.4.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.\n\n * OpenAPI spec version: 4.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams,\n MoveFileInProjectParams,\n MovePathParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.\n\nOnly Project editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getCreatePathMutationOptions = <TData = Awaited<ReturnType<typeof createPath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['createPath'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPath>>, {params: CreatePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return createPath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: CreatePathParams}, TContext>}\n\n export type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>\n \n export type CreatePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TData = Awaited<ReturnType<typeof createPath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: CreatePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: CreatePathParams},\n TContext\n > => {\n\n const mutationOptions = getCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in the contents of the Path also being deleted. If there are files in Path or sub-directories, they will all be deleted.\n\nOnly Project editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeletePathMutationOptions = <TData = Awaited<ReturnType<typeof deletePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['deletePath'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePath>>, {params: DeletePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return deletePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: DeletePathParams}, TContext>}\n\n export type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>\n \n export type DeletePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TData = Awaited<ReturnType<typeof deletePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeletePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: DeletePathParams},\n TContext\n > => {\n\n const mutationOptions = getDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Moves and existing Path within a Project. The path will belong to the User and Project. Any ProjectFile instances on the path will be moved to the new path.\n\nOnly Project editors can move Paths.\n\n * @summary Move a Project Path\n */\nexport const movePath = (\n params: MovePathParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/path/move`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getMovePathMutationOptions = <TData = Awaited<ReturnType<typeof movePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MovePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['movePath'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof movePath>>, {params: MovePathParams}> = (props) => {\n const {params} = props ?? {};\n\n return movePath(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: MovePathParams}, TContext>}\n\n export type MovePathMutationResult = NonNullable<Awaited<ReturnType<typeof movePath>>>\n \n export type MovePathMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Move a Project Path\n */\nexport const useMovePath = <TData = Awaited<ReturnType<typeof movePath>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MovePathParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: MovePathParams},\n TContext\n > => {\n\n const mutationOptions = getMovePathMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params: GetFilesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<FilesGetResponse>(\n {url: `/file`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetFilesQueryKey = (params: GetFilesParams,) => {\n return [\"data-manager-api\", `/file`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetFilesQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesQueryError = ErrorType<void | DmError>\n\n\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFiles<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetFilesQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetFilesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) => getFiles(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetFilesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>\nexport type GetFilesSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFilesSuspense<TData = Awaited<ReturnType<typeof getFiles>>, TError = ErrorType<void | DmError>>(\n params: GetFilesParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetFilesSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **File**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the `/task` endpoint to determine when the file is available to the project.\n\nOnly Datasets attached to projects are available through the Project API. A Dataset that you upload is only available to others (who are not already `editors` of the data) when the Dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` of the Project to attach a Dataset to a project. Being an `editor` of the Dataset you are attaching does not give you the ability to detach it from the Project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n const formUrlEncoded = new URLSearchParams();\nformUrlEncoded.append('dataset_id', filePostBodyBody.dataset_id)\nformUrlEncoded.append('dataset_version', filePostBodyBody.dataset_version.toString())\nformUrlEncoded.append('project_id', filePostBodyBody.project_id)\nformUrlEncoded.append('as_type', filePostBodyBody.as_type)\nif(filePostBodyBody.path !== undefined) {\n formUrlEncoded.append('path', filePostBodyBody.path)\n }\nif(filePostBodyBody.compress !== undefined) {\n formUrlEncoded.append('compress', filePostBodyBody.compress.toString())\n }\nif(filePostBodyBody.immutable !== undefined) {\n formUrlEncoded.append('immutable', filePostBodyBody.immutable.toString())\n }\n\n return customInstance<FilePostResponse>(\n {url: `/file`, method: 'POST',\n headers: {'Content-Type': 'application/x-www-form-urlencoded', },\n data: formUrlEncoded, signal\n },\n options);\n }\n \n\n\nexport const getAttachFileMutationOptions = <TData = Awaited<ReturnType<typeof attachFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['attachFile'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachFile>>, {data: FilePostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return attachFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{data: FilePostBodyBody}, TContext>}\n\n export type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>\n export type AttachFileMutationBody = FilePostBodyBody\n export type AttachFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TData = Awaited<ReturnType<typeof attachFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{data: FilePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {data: FilePostBodyBody},\n TContext\n > => {\n\n const mutationOptions = getAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` of the Project to delete a file from a Project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file`, method: 'DELETE',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteUnmanagedFileMutationOptions = <TData = Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['deleteUnmanagedFile'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteUnmanagedFile>>, {params: DeleteUnmanagedFileParams}> = (props) => {\n const {params} = props ?? {};\n\n return deleteUnmanagedFile(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: DeleteUnmanagedFileParams}, TContext>}\n\n export type DeleteUnmanagedFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteUnmanagedFile>>>\n \n export type DeleteUnmanagedFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TData = Awaited<ReturnType<typeof deleteUnmanagedFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: DeleteUnmanagedFileParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: DeleteUnmanagedFileParams},\n TContext\n > => {\n\n const mutationOptions = getDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Move an **Unmanaged** file, optionally renaming it, to a new path.\n\nYou must be an `editor` of the project\n\n * @summary Move an unmanaged file in a Project\n */\nexport const moveFileInProject = (\n params: MoveFileInProjectParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/move`, method: 'PUT',\n params\n },\n options);\n }\n \n\n\nexport const getMoveFileInProjectMutationOptions = <TData = Awaited<ReturnType<typeof moveFileInProject>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MoveFileInProjectParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['moveFileInProject'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof moveFileInProject>>, {params: MoveFileInProjectParams}> = (props) => {\n const {params} = props ?? {};\n\n return moveFileInProject(params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{params: MoveFileInProjectParams}, TContext>}\n\n export type MoveFileInProjectMutationResult = NonNullable<Awaited<ReturnType<typeof moveFileInProject>>>\n \n export type MoveFileInProjectMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Move an unmanaged file in a Project\n */\nexport const useMoveFileInProject = <TData = Awaited<ReturnType<typeof moveFileInProject>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{params: MoveFileInProjectParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {params: MoveFileInProjectParams},\n TContext\n > => {\n\n const mutationOptions = getMoveFileInProjectMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be removed from the Project it's attached to.\n\nYou must be an `editor` of the project to delete a file from a Project. Being an `editor` of the original Dataset does not give you the ability to detach it from the Project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a Project)\n */\nexport const deleteFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteFileMutationOptions = <TData = Awaited<ReturnType<typeof deleteFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\nconst mutationKey = ['deleteFile'];\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, {fileId: string}> = (props) => {\n const {fileId} = props ?? {};\n\n return deleteFile(fileId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions } as UseMutationOptions<TData, TError,{fileId: string}, TContext>}\n\n export type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>\n \n export type DeleteFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TData = Awaited<ReturnType<typeof deleteFile>>, TError = ErrorType<void | DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<TData, TError,{fileId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n TData,\n TError,\n {fileId: string},\n TContext\n > => {\n\n const mutationOptions = getDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/file/${fileId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getDownloadFileQueryKey = (fileId: string,) => {\n return [\"data-manager-api\", `/file/${fileId}`] as const;\n }\n\n \nexport const getDownloadFileQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(fileId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileQueryError = ErrorType<void | DmError>\n\n\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFile<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getDownloadFileQueryOptions(fileId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getDownloadFileSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) => downloadFile(fileId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type DownloadFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>\nexport type DownloadFileSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downloadFile>>, TError = ErrorType<void | DmError>>(\n fileId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getDownloadFileSuspenseQueryOptions(fileId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","../../src/file-and-path/file-and-path.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,yDAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACA;ACEA,mDAAwD;AA6CjD,IAAM,WAAA,EAAa,CACxB,MAAA,EACA,OAAA,EAAA,GACG;AACH,EAAA,OAAO,8CAAA,EAAuB,GAAA,EAAK,CAAA,KAAA,CAAA,EAAS,MAAA,EAAQ,KAAA,EAAO,OAAO,CAAA,EAAG,OAAO,CAAA;AAC9E,CAAA;AAEO,IAAM,6BAAA,EAA+B,CAG1C,OAAA,EAAA,GAaG;AACH,EAAA,MAAM,YAAA,EAAc,CAAC,YAAY,CAAA;AACjC,EAAA,MAAM,EAAE,QAAA,EAAU,eAAA,EAAiB,OAAA,EAAS,eAAe,EAAA,EAAI,QAAA,EAC3D,OAAA,CAAQ,SAAA,GAAY,cAAA,GAAiB,OAAA,CAAQ,SAAA,GAAY,OAAA,CAAQ,QAAA,CAAS,YAAA,EACxE,QAAA,EACA,EAAE,GAAG,OAAA,EAAS,QAAA,EAAU,EAAE,GAAG,OAAA,CAAQ,QAAA,EAAU,YAAY,EAAE,EAAA,EAC/D,EAAE,QAA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EyB,EAAA;AAEjC,EAAA;AAKT;AAmEE;AAEqB,EAAA;AAEgB,EAAA;AAIP,EAAA;AAEvB,EAAA;AACT;AAME;AAQsC,EAAA;AAEK,EAAA;AAG5B,EAAA;AAEyB,EAAA;AAEjC,EAAA;AAKT;AAqDE;AAQqB,EAAA;AAEwB,EAAA;AAKf,EAAA;AAEvB,EAAA;AACT;ADr1B+C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-data-manager-js-client/squonk2-data-manager-js-client/dist/file-and-path/file-and-path.cjs","sourcesContent":[null,"/**\n * Generated by orval v7.10.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.\n\n * OpenAPI spec version: 4.1\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n CreatePathParams,\n DeletePathParams,\n DeleteUnmanagedFileParams,\n DmError,\n FilePostBodyBody,\n FilePostResponse,\n FilesGetResponse,\n GetFilesParams,\n MoveFileInProjectParams,\n MovePathParams,\n} from \"../data-manager-api.schemas\";\n\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { mutationMutator } from \".././options-mutator\";\nimport { queryMutator } from \".././options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Creates a new Path within a Project. Every directory in the Path will be created. The path will belong to the User and Project.\n\nOnly Project editors can create Paths.\n\n * @summary Create a new Project Path\n */\nexport const createPath = (\n params: CreatePathParams,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/path`, method: \"PUT\", params }, options);\n};\n\nexport const useCreatePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n> => {\n const mutationKey = [\"createPath\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPath>>,\n { params: CreatePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return createPath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type CreatePathMutationResult = NonNullable<Awaited<ReturnType<typeof createPath>>>;\n\nexport type CreatePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Create a new Project Path\n */\nexport const useCreatePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createPath>>,\n TError,\n { params: CreatePathParams },\n TContext\n> => {\n const mutationOptions = useCreatePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Deletes a Path within the Project. Be aware that the deletion of a Path will result in the contents of the Path also being deleted. If there are files in Path or sub-directories, they will all be deleted.\n\nOnly Project editors can delete Paths.\n\n * @summary Delete a Project Path\n */\nexport const deletePath = (\n params: DeletePathParams,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/path`, method: \"DELETE\", params }, options);\n};\n\nexport const useDeletePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n> => {\n const mutationKey = [\"deletePath\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deletePath>>,\n { params: DeletePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return deletePath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeletePathMutationResult = NonNullable<Awaited<ReturnType<typeof deletePath>>>;\n\nexport type DeletePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete a Project Path\n */\nexport const useDeletePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deletePath>>,\n TError,\n { params: DeletePathParams },\n TContext\n> => {\n const mutationOptions = useDeletePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Moves and existing Path within a Project. The path will belong to the User and Project. Any ProjectFile instances on the path will be moved to the new path.\n\nOnly Project editors can move Paths.\n\n * @summary Move a Project Path\n */\nexport const movePath = (\n params: MovePathParams,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/path/move`, method: \"PUT\", params }, options);\n};\n\nexport const useMovePathMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n> => {\n const mutationKey = [\"movePath\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof movePath>>,\n { params: MovePathParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return movePath(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type MovePathMutationResult = NonNullable<Awaited<ReturnType<typeof movePath>>>;\n\nexport type MovePathMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Move a Project Path\n */\nexport const useMovePath = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof movePath>>,\n TError,\n { params: MovePathParams },\n TContext\n> => {\n const mutationOptions = useMovePathMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).\n\n * @summary Gets the Files on a Project Path\n */\nexport const getFiles = (\n params: GetFilesParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<FilesGetResponse>({ url: `/file`, method: \"GET\", params, signal }, options);\n};\n\nexport const getGetFilesQueryKey = (params: GetFilesParams) => {\n return [`/file`, ...(params ? [params] : [])] as const;\n};\n\nexport const useGetFilesQueryOptions = <\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) =>\n getFiles(params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n};\n\nexport type GetFilesQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>;\nexport type GetFilesQueryError = ErrorType<void | DmError>;\n\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n Awaited<ReturnType<typeof getFiles>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n Awaited<ReturnType<typeof getFiles>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFiles<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetFilesQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetFilesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFilesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFiles>>> = ({ signal }) =>\n getFiles(params, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getFiles>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetFilesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFiles>>>;\nexport type GetFilesSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the Files on a Project Path\n */\n\nexport function useGetFilesSuspense<\n TData = Awaited<ReturnType<typeof getFiles>>,\n TError = ErrorType<void | DmError>,\n>(\n params: GetFilesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFiles>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetFilesSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Given a Project and a Dataset the Dataset will be attached (added) to the project as a File using the format provided. When attached the Dataset is referred to as a Project **File**. As format conversion may take some time the file may not be immediately available. You should use the `task_id` you're presented with on the `/task` endpoint to determine when the file is available to the project.\n\nOnly Datasets attached to projects are available through the Project API. A Dataset that you upload is only available to others (who are not already `editors` of the data) when the Dataset is attached to a project.\n\nAn `editor` of a **dataset** is not automatically and `editor` of the **project** it's attached to.\n\nYou must be an `editor` of the Project to attach a Dataset to a project. Being an `editor` of the Dataset you are attaching does not give you the ability to detach it from the Project.\n\nYou cannot add a Dataset to a Project until its upload is complete.\n\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const attachFile = (\n filePostBodyBody: FilePostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n const formUrlEncoded = new URLSearchParams();\n formUrlEncoded.append(`dataset_id`, filePostBodyBody.dataset_id);\n formUrlEncoded.append(`dataset_version`, filePostBodyBody.dataset_version.toString());\n formUrlEncoded.append(`project_id`, filePostBodyBody.project_id);\n formUrlEncoded.append(`as_type`, filePostBodyBody.as_type);\n if (filePostBodyBody.path !== undefined) {\n formUrlEncoded.append(`path`, filePostBodyBody.path);\n }\n if (filePostBodyBody.compress !== undefined) {\n formUrlEncoded.append(`compress`, filePostBodyBody.compress.toString());\n }\n if (filePostBodyBody.immutable !== undefined) {\n formUrlEncoded.append(`immutable`, filePostBodyBody.immutable.toString());\n }\n\n return customInstance<FilePostResponse>(\n {\n url: `/file`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\n data: formUrlEncoded,\n signal,\n },\n options,\n );\n};\n\nexport const useAttachFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n> => {\n const mutationKey = [\"attachFile\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof attachFile>>,\n { data: FilePostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return attachFile(data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type AttachFileMutationResult = NonNullable<Awaited<ReturnType<typeof attachFile>>>;\nexport type AttachFileMutationBody = FilePostBodyBody;\nexport type AttachFileMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Attach a Dataset, as a File, to a Project\n */\nexport const useAttachFile = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof attachFile>>,\n TError,\n { data: FilePostBodyBody },\n TContext\n> => {\n const mutationOptions = useAttachFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Removes an unmanaged file from a Project. You cannot use this endpoint to delete managed project files.\n\nYou must be an `editor` of the Project to delete a file from a Project.\n\n * @summary Delete an unmanaged Project File\n */\nexport const deleteUnmanagedFile = (\n params: DeleteUnmanagedFileParams,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/file`, method: \"DELETE\", params }, options);\n};\n\nexport const useDeleteUnmanagedFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n> => {\n const mutationKey = [\"deleteUnmanagedFile\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n { params: DeleteUnmanagedFileParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return deleteUnmanagedFile(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteUnmanagedFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>\n>;\n\nexport type DeleteUnmanagedFileMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete an unmanaged Project File\n */\nexport const useDeleteUnmanagedFile = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteUnmanagedFile>>,\n TError,\n { params: DeleteUnmanagedFileParams },\n TContext\n> => {\n const mutationOptions = useDeleteUnmanagedFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Move an **Unmanaged** file, optionally renaming it, to a new path.\n\nYou must be an `editor` of the project\n\n * @summary Move an unmanaged file in a Project\n */\nexport const moveFileInProject = (\n params: MoveFileInProjectParams,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/file/move`, method: \"PUT\", params }, options);\n};\n\nexport const useMoveFileInProjectMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n> => {\n const mutationKey = [\"moveFileInProject\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof moveFileInProject>>,\n { params: MoveFileInProjectParams }\n > = (props) => {\n const { params } = props ?? {};\n\n return moveFileInProject(params, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type MoveFileInProjectMutationResult = NonNullable<\n Awaited<ReturnType<typeof moveFileInProject>>\n>;\n\nexport type MoveFileInProjectMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Move an unmanaged file in a Project\n */\nexport const useMoveFileInProject = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof moveFileInProject>>,\n TError,\n { params: MoveFileInProjectParams },\n TContext\n> => {\n const mutationOptions = useMoveFileInProjectMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Given a `file_id` the file will be removed from the Project it's attached to.\n\nYou must be an `editor` of the project to delete a file from a Project. Being an `editor` of the original Dataset does not give you the ability to detach it from the Project.\n\nYou cannot delete a Project File until the attach is complete.\n\n * @summary Delete/detach a File (from a Project)\n */\nexport const deleteFile = (fileId: string, options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/file/${fileId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteFileMutationOptions = <\n TError = ErrorType<void | DmError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n> => {\n const mutationKey = [\"deleteFile\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteFile>>, { fileId: string }> = (\n props,\n ) => {\n const { fileId } = props ?? {};\n\n return deleteFile(fileId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteFile>>>;\n\nexport type DeleteFileMutationError = ErrorType<void | DmError>;\n\n/**\n * @summary Delete/detach a File (from a Project)\n */\nexport const useDeleteFile = <TError = ErrorType<void | DmError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteFile>>,\n TError,\n { fileId: string },\n TContext\n> => {\n const mutationOptions = useDeleteFileMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Given a `file_id` the file will be returned if available.\n\nYou cannot get a Project File until the attach is complete.\n\n * @summary Download a File (from a project)\n */\nexport const downloadFile = (\n fileId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<void>({ url: `/file/${fileId}`, method: \"GET\", signal }, options);\n};\n\nexport const getDownloadFileQueryKey = (fileId: string) => {\n return [`/file/${fileId}`] as const;\n};\n\nexport const useDownloadFileQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) =>\n downloadFile(fileId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type DownloadFileQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>;\nexport type DownloadFileQueryError = ErrorType<void | DmError>;\n\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n Awaited<ReturnType<typeof downloadFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n Awaited<ReturnType<typeof downloadFile>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFile<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useDownloadFileQueryOptions(fileId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useDownloadFileSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadFileQueryKey(fileId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadFile>>> = ({ signal }) =>\n downloadFile(fileId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof downloadFile>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type DownloadFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof downloadFile>>>;\nexport type DownloadFileSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Download a File (from a project)\n */\n\nexport function useDownloadFileSuspense<\n TData = Awaited<ReturnType<typeof downloadFile>>,\n TError = ErrorType<void | DmError>,\n>(\n fileId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof downloadFile>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useDownloadFileSuspenseQueryOptions(fileId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"]}
|