@squonk/data-manager-client 1.0.6-rc.2 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/accounting/accounting.cjs +21 -17
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +1 -1
  4. package/accounting/accounting.js +22 -18
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +30 -6
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +19 -19
  9. package/admin/admin.js +31 -7
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +16 -15
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +1 -1
  14. package/application/application.js +17 -16
  15. package/application/application.js.map +1 -1
  16. package/{custom-instance-c4af1ee9.d.ts → custom-instance-9e5c9e19.d.ts} +299 -299
  17. package/dataset/dataset.cjs +47 -58
  18. package/dataset/dataset.cjs.map +1 -1
  19. package/dataset/dataset.d.ts +16 -16
  20. package/dataset/dataset.js +48 -59
  21. package/dataset/dataset.js.map +1 -1
  22. package/exchange-rate/exchange-rate.cjs +23 -11
  23. package/exchange-rate/exchange-rate.cjs.map +1 -1
  24. package/exchange-rate/exchange-rate.d.ts +7 -7
  25. package/exchange-rate/exchange-rate.js +24 -12
  26. package/exchange-rate/exchange-rate.js.map +1 -1
  27. package/file/file.cjs +29 -27
  28. package/file/file.cjs.map +1 -1
  29. package/file/file.d.ts +10 -10
  30. package/file/file.js +30 -28
  31. package/file/file.js.map +1 -1
  32. package/index.cjs.map +1 -1
  33. package/index.d.ts +1 -1
  34. package/index.js.map +1 -1
  35. package/instance/instance.cjs +34 -30
  36. package/instance/instance.cjs.map +1 -1
  37. package/instance/instance.d.ts +10 -10
  38. package/instance/instance.js +35 -31
  39. package/instance/instance.js.map +1 -1
  40. package/job/job.cjs +24 -26
  41. package/job/job.cjs.map +1 -1
  42. package/job/job.d.ts +1 -1
  43. package/job/job.js +25 -27
  44. package/job/job.js.map +1 -1
  45. package/metadata/metadata.cjs +13 -19
  46. package/metadata/metadata.cjs.map +1 -1
  47. package/metadata/metadata.d.ts +7 -7
  48. package/metadata/metadata.js +14 -20
  49. package/metadata/metadata.js.map +1 -1
  50. package/package.json +1 -1
  51. package/project/project.cjs +38 -31
  52. package/project/project.cjs.map +1 -1
  53. package/project/project.d.ts +19 -19
  54. package/project/project.js +39 -32
  55. package/project/project.js.map +1 -1
  56. package/src/accounting/accounting.ts +96 -132
  57. package/src/admin/admin.ts +307 -442
  58. package/src/application/application.ts +66 -94
  59. package/src/data-manager-api.schemas.ts +425 -470
  60. package/src/dataset/dataset.ts +367 -554
  61. package/src/exchange-rate/exchange-rate.ts +221 -339
  62. package/src/file/file.ts +177 -253
  63. package/src/instance/instance.ts +217 -314
  64. package/src/job/job.ts +88 -116
  65. package/src/metadata/metadata.ts +154 -245
  66. package/src/project/project.ts +347 -511
  67. package/src/task/task.ts +105 -141
  68. package/src/type/type.ts +38 -43
  69. package/src/user/user.ts +136 -197
  70. package/task/task.cjs +25 -27
  71. package/task/task.cjs.map +1 -1
  72. package/task/task.d.ts +1 -1
  73. package/task/task.js +26 -28
  74. package/task/task.js.map +1 -1
  75. package/type/type.cjs +8 -4
  76. package/type/type.cjs.map +1 -1
  77. package/type/type.d.ts +1 -1
  78. package/type/type.js +9 -5
  79. package/type/type.js.map +1 -1
  80. package/user/user.cjs +28 -33
  81. package/user/user.cjs.map +1 -1
  82. package/user/user.d.ts +4 -4
  83. package/user/user.js +29 -34
  84. package/user/user.js.map +1 -1
package/src/user/user.ts CHANGED
@@ -8,15 +8,18 @@ A service that allows *registered* users to make **Datasets** and associated **M
8
8
 
9
9
  * OpenAPI spec version: 1.0
10
10
  */
11
- import { useQuery, useMutation } from "react-query";
11
+ import {
12
+ useQuery,
13
+ useMutation
14
+ } from 'react-query'
12
15
  import type {
13
16
  UseQueryOptions,
14
17
  UseMutationOptions,
15
18
  QueryFunction,
16
19
  MutationFunction,
17
20
  UseQueryResult,
18
- QueryKey,
19
- } from "react-query";
21
+ QueryKey
22
+ } from 'react-query'
20
23
  import type {
21
24
  UsersGetResponse,
22
25
  DmError,
@@ -24,15 +27,16 @@ import type {
24
27
  GetUserAccountParams,
25
28
  UserAccountPatchBodyBody,
26
29
  UserApiLogGetResponse,
27
- GetUserApiLogParams,
28
- } from "../data-manager-api.schemas";
29
- import { customInstance } from ".././custom-instance";
30
- import type { ErrorType } from ".././custom-instance";
30
+ GetUserApiLogParams
31
+ } from '../data-manager-api.schemas'
32
+ import { customInstance } from '.././custom-instance'
33
+ import type { ErrorType } from '.././custom-instance'
34
+
31
35
 
32
36
  // eslint-disable-next-line
33
- type SecondParameter<T extends (...args: any) => any> = T extends (
37
+ type SecondParameter<T extends (...args: any) => any> = T extends (
34
38
  config: any,
35
- args: infer P
39
+ args: infer P,
36
40
  ) => any
37
41
  ? P
38
42
  : never;
@@ -43,47 +47,41 @@ type SecondParameter<T extends (...args: any) => any> = T extends (
43
47
  * @summary Get information about all known users
44
48
  */
45
49
  export const getUsers = (
46
- options?: SecondParameter<typeof customInstance>,
47
- signal?: AbortSignal
50
+
51
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
48
52
  ) => {
49
- return customInstance<UsersGetResponse>(
50
- { url: `/user`, method: "get", signal },
51
- options
52
- );
53
- };
53
+ return customInstance<UsersGetResponse>(
54
+ {url: `/user`, method: 'get', signal
55
+ },
56
+ options);
57
+ }
58
+
54
59
 
55
60
  export const getGetUsersQueryKey = () => [`/user`];
56
61
 
57
- export type GetUsersQueryResult = NonNullable<
58
- Awaited<ReturnType<typeof getUsers>>
59
- >;
60
- export type GetUsersQueryError = ErrorType<void | DmError>;
62
+
63
+ export type GetUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>
64
+ export type GetUsersQueryError = ErrorType<void | DmError>
65
+
66
+ export const useGetUsers = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>(
67
+ options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
68
+
69
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
61
70
 
62
- export const useGetUsers = <
63
- TData = Awaited<ReturnType<typeof getUsers>>,
64
- TError = ErrorType<void | DmError>
65
- >(options?: {
66
- query?: UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>;
67
- request?: SecondParameter<typeof customInstance>;
68
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
69
- const { query: queryOptions, request: requestOptions } = options ?? {};
71
+ const {query: queryOptions, request: requestOptions} = options ?? {}
70
72
 
71
73
  const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();
72
74
 
73
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({
74
- signal,
75
- }) => getUsers(requestOptions, signal);
75
+
76
76
 
77
- const query = useQuery<Awaited<ReturnType<typeof getUsers>>, TError, TData>(
78
- queryKey,
79
- queryFn,
80
- queryOptions
81
- ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
77
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({ signal }) => getUsers(requestOptions, signal);
78
+
79
+ const query = useQuery<Awaited<ReturnType<typeof getUsers>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
82
80
 
83
81
  query.queryKey = queryKey;
84
82
 
85
83
  return query;
86
- };
84
+ }
87
85
 
88
86
  /**
89
87
  * Returns a summary of your account
@@ -91,60 +89,42 @@ export const useGetUsers = <
91
89
  * @summary Get information about your account
92
90
  */
93
91
  export const getUserAccount = (
94
- params?: GetUserAccountParams,
95
- options?: SecondParameter<typeof customInstance>,
96
- signal?: AbortSignal
92
+ params?: GetUserAccountParams,
93
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
97
94
  ) => {
98
- return customInstance<UserAccountGetResponse>(
99
- { url: `/user/account`, method: "get", params, signal },
100
- options
101
- );
102
- };
103
-
104
- export const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [
105
- `/user/account`,
106
- ...(params ? [params] : []),
107
- ];
108
-
109
- export type GetUserAccountQueryResult = NonNullable<
110
- Awaited<ReturnType<typeof getUserAccount>>
111
- >;
112
- export type GetUserAccountQueryError = ErrorType<void | DmError>;
113
-
114
- export const useGetUserAccount = <
115
- TData = Awaited<ReturnType<typeof getUserAccount>>,
116
- TError = ErrorType<void | DmError>
117
- >(
118
- params?: GetUserAccountParams,
119
- options?: {
120
- query?: UseQueryOptions<
121
- Awaited<ReturnType<typeof getUserAccount>>,
122
- TError,
123
- TData
124
- >;
125
- request?: SecondParameter<typeof customInstance>;
126
- }
127
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
128
- const { query: queryOptions, request: requestOptions } = options ?? {};
95
+ return customInstance<UserAccountGetResponse>(
96
+ {url: `/user/account`, method: 'get',
97
+ params, signal
98
+ },
99
+ options);
100
+ }
101
+
102
+
103
+ export const getGetUserAccountQueryKey = (params?: GetUserAccountParams,) => [`/user/account`, ...(params ? [params]: [])];
104
+
105
+
106
+ export type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>
107
+ export type GetUserAccountQueryError = ErrorType<void | DmError>
108
+
109
+ export const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(
110
+ params?: GetUserAccountParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
111
+
112
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
113
+
114
+ const {query: queryOptions, request: requestOptions} = options ?? {}
129
115
 
130
116
  const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);
131
117
 
132
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({
133
- signal,
134
- }) => getUserAccount(params, requestOptions, signal);
118
+
119
+
120
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(params, requestOptions, signal);
135
121
 
136
- const query = useQuery<
137
- Awaited<ReturnType<typeof getUserAccount>>,
138
- TError,
139
- TData
140
- >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {
141
- queryKey: QueryKey;
142
- };
122
+ const query = useQuery<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
143
123
 
144
124
  query.queryKey = queryKey;
145
125
 
146
126
  return query;
147
- };
127
+ }
148
128
 
149
129
  /**
150
130
  * Make changes to your user account
@@ -152,133 +132,92 @@ export const useGetUserAccount = <
152
132
  * @summary Patch your account
153
133
  */
154
134
  export const patchUserAccount = (
155
- userAccountPatchBodyBody: UserAccountPatchBodyBody,
156
- options?: SecondParameter<typeof customInstance>
157
- ) => {
158
- const formData = new FormData();
159
- if (userAccountPatchBodyBody.private !== undefined) {
160
- formData.append("private", userAccountPatchBodyBody.private.toString());
161
- }
162
- if (userAccountPatchBodyBody.become_admin !== undefined) {
163
- formData.append(
164
- "become_admin",
165
- userAccountPatchBodyBody.become_admin.toString()
166
- );
167
- }
168
- if (userAccountPatchBodyBody.impersonate !== undefined) {
169
- formData.append("impersonate", userAccountPatchBodyBody.impersonate);
170
- }
171
- if (userAccountPatchBodyBody.use_impersonation !== undefined) {
172
- formData.append(
173
- "use_impersonation",
174
- userAccountPatchBodyBody.use_impersonation.toString()
175
- );
176
- }
177
-
178
- return customInstance<void>(
179
- {
180
- url: `/user/account`,
181
- method: "patch",
182
- headers: { "Content-Type": "multipart/form-data" },
183
- data: formData,
135
+ userAccountPatchBodyBody: UserAccountPatchBodyBody,
136
+ options?: SecondParameter<typeof customInstance>,) => {const formData = new FormData();
137
+ if(userAccountPatchBodyBody.private !== undefined) {
138
+ formData.append('private', userAccountPatchBodyBody.private.toString())
139
+ }
140
+ if(userAccountPatchBodyBody.become_admin !== undefined) {
141
+ formData.append('become_admin', userAccountPatchBodyBody.become_admin.toString())
142
+ }
143
+ if(userAccountPatchBodyBody.impersonate !== undefined) {
144
+ formData.append('impersonate', userAccountPatchBodyBody.impersonate)
145
+ }
146
+ if(userAccountPatchBodyBody.use_impersonation !== undefined) {
147
+ formData.append('use_impersonation', userAccountPatchBodyBody.use_impersonation.toString())
148
+ }
149
+
150
+ return customInstance<void>(
151
+ {url: `/user/account`, method: 'patch',
152
+ headers: {'Content-Type': 'multipart/form-data', },
153
+ data: formData
184
154
  },
185
- options
186
- );
187
- };
188
-
189
- export type PatchUserAccountMutationResult = NonNullable<
190
- Awaited<ReturnType<typeof patchUserAccount>>
191
- >;
192
- export type PatchUserAccountMutationBody = UserAccountPatchBodyBody;
193
- export type PatchUserAccountMutationError = ErrorType<DmError>;
194
-
195
- export const usePatchUserAccount = <
196
- TError = ErrorType<DmError>,
197
- TContext = unknown
198
- >(options?: {
199
- mutation?: UseMutationOptions<
200
- Awaited<ReturnType<typeof patchUserAccount>>,
201
- TError,
202
- { data: UserAccountPatchBodyBody },
203
- TContext
204
- >;
205
- request?: SecondParameter<typeof customInstance>;
206
- }) => {
207
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
208
-
209
- const mutationFn: MutationFunction<
210
- Awaited<ReturnType<typeof patchUserAccount>>,
211
- { data: UserAccountPatchBodyBody }
212
- > = (props) => {
213
- const { data } = props ?? {};
214
-
215
- return patchUserAccount(data, requestOptions);
216
- };
217
-
218
- return useMutation<
219
- Awaited<ReturnType<typeof patchUserAccount>>,
220
- TError,
221
- { data: UserAccountPatchBodyBody },
222
- TContext
223
- >(mutationFn, mutationOptions);
224
- };
225
- /**
155
+ options);
156
+ }
157
+
158
+
159
+
160
+ export type PatchUserAccountMutationResult = NonNullable<Awaited<ReturnType<typeof patchUserAccount>>>
161
+ export type PatchUserAccountMutationBody = UserAccountPatchBodyBody
162
+ export type PatchUserAccountMutationError = ErrorType<DmError>
163
+
164
+ export const usePatchUserAccount = <TError = ErrorType<DmError>,
165
+
166
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
167
+ ) => {
168
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
169
+
170
+
171
+
172
+
173
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchUserAccount>>, {data: UserAccountPatchBodyBody}> = (props) => {
174
+ const {data} = props ?? {};
175
+
176
+ return patchUserAccount(data,requestOptions)
177
+ }
178
+
179
+ return useMutation<Awaited<ReturnType<typeof patchUserAccount>>, TError, {data: UserAccountPatchBodyBody}, TContext>(mutationFn, mutationOptions)
180
+ }
181
+ /**
226
182
  * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account
227
183
 
228
184
  * @summary Get the API call log recorded against your account
229
185
  */
230
186
  export const getUserApiLog = (
231
- params?: GetUserApiLogParams,
232
- options?: SecondParameter<typeof customInstance>,
233
- signal?: AbortSignal
187
+ params?: GetUserApiLogParams,
188
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
234
189
  ) => {
235
- return customInstance<UserApiLogGetResponse>(
236
- { url: `/user/api-log`, method: "get", params, signal },
237
- options
238
- );
239
- };
240
-
241
- export const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [
242
- `/user/api-log`,
243
- ...(params ? [params] : []),
244
- ];
245
-
246
- export type GetUserApiLogQueryResult = NonNullable<
247
- Awaited<ReturnType<typeof getUserApiLog>>
248
- >;
249
- export type GetUserApiLogQueryError = ErrorType<void>;
250
-
251
- export const useGetUserApiLog = <
252
- TData = Awaited<ReturnType<typeof getUserApiLog>>,
253
- TError = ErrorType<void>
254
- >(
255
- params?: GetUserApiLogParams,
256
- options?: {
257
- query?: UseQueryOptions<
258
- Awaited<ReturnType<typeof getUserApiLog>>,
259
- TError,
260
- TData
261
- >;
262
- request?: SecondParameter<typeof customInstance>;
263
- }
264
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
265
- const { query: queryOptions, request: requestOptions } = options ?? {};
190
+ return customInstance<UserApiLogGetResponse>(
191
+ {url: `/user/api-log`, method: 'get',
192
+ params, signal
193
+ },
194
+ options);
195
+ }
196
+
197
+
198
+ export const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams,) => [`/user/api-log`, ...(params ? [params]: [])];
199
+
200
+
201
+ export type GetUserApiLogQueryResult = NonNullable<Awaited<ReturnType<typeof getUserApiLog>>>
202
+ export type GetUserApiLogQueryError = ErrorType<void>
203
+
204
+ export const useGetUserApiLog = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(
205
+ params?: GetUserApiLogParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
206
+
207
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
208
+
209
+ const {query: queryOptions, request: requestOptions} = options ?? {}
266
210
 
267
211
  const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);
268
212
 
269
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({
270
- signal,
271
- }) => getUserApiLog(params, requestOptions, signal);
213
+
214
+
215
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({ signal }) => getUserApiLog(params, requestOptions, signal);
272
216
 
273
- const query = useQuery<
274
- Awaited<ReturnType<typeof getUserApiLog>>,
275
- TError,
276
- TData
277
- >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {
278
- queryKey: QueryKey;
279
- };
217
+ const query = useQuery<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
280
218
 
281
219
  query.queryKey = queryKey;
282
220
 
283
221
  return query;
284
- };
222
+ }
223
+
package/task/task.cjs CHANGED
@@ -3,58 +3,56 @@
3
3
  var _chunkIUEU2LYCcjs = require('../chunk-IUEU2LYC.cjs');
4
4
 
5
5
  // src/task/task.ts
6
+
7
+
8
+
6
9
  var _reactquery = require('react-query');
7
10
  var getTasks = (params, options, signal) => {
8
11
  return _chunkIUEU2LYCcjs.customInstance.call(void 0,
9
- { url: `/task`, method: "get", params, signal },
12
+ {
13
+ url: `/task`,
14
+ method: "get",
15
+ params,
16
+ signal
17
+ },
10
18
  options
11
19
  );
12
20
  };
13
- var getGetTasksQueryKey = (params) => [
14
- `/task`,
15
- ...params ? [params] : []
16
- ];
21
+ var getGetTasksQueryKey = (params) => [`/task`, ...params ? [params] : []];
17
22
  var useGetTasks = (params, options) => {
18
23
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
19
24
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetTasksQueryKey(params)));
20
- const queryFn = ({
21
- signal
22
- }) => getTasks(params, requestOptions, signal);
23
- const query = _reactquery.useQuery.call(void 0,
24
- queryKey,
25
- queryFn,
26
- queryOptions
27
- );
25
+ const queryFn = ({ signal }) => getTasks(params, requestOptions, signal);
26
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
28
27
  query.queryKey = queryKey;
29
28
  return query;
30
29
  };
31
30
  var getTask = (taskId, params, options, signal) => {
32
31
  return _chunkIUEU2LYCcjs.customInstance.call(void 0,
33
- { url: `/task/${taskId}`, method: "get", params, signal },
32
+ {
33
+ url: `/task/${taskId}`,
34
+ method: "get",
35
+ params,
36
+ signal
37
+ },
34
38
  options
35
39
  );
36
40
  };
37
- var getGetTaskQueryKey = (taskId, params) => [
38
- `/task/${taskId}`,
39
- ...params ? [params] : []
40
- ];
41
+ var getGetTaskQueryKey = (taskId, params) => [`/task/${taskId}`, ...params ? [params] : []];
41
42
  var useGetTask = (taskId, params, options) => {
42
43
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
43
44
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetTaskQueryKey(taskId, params)));
44
- const queryFn = ({
45
- signal
46
- }) => getTask(taskId, params, requestOptions, signal);
47
- const query = _reactquery.useQuery.call(void 0,
48
- queryKey,
49
- queryFn,
50
- { enabled: !!taskId, ...queryOptions }
51
- );
45
+ const queryFn = ({ signal }) => getTask(taskId, params, requestOptions, signal);
46
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, { enabled: !!taskId, ...queryOptions });
52
47
  query.queryKey = queryKey;
53
48
  return query;
54
49
  };
55
50
  var deleteTask = (taskId, options) => {
56
51
  return _chunkIUEU2LYCcjs.customInstance.call(void 0,
57
- { url: `/task/${taskId}`, method: "delete" },
52
+ {
53
+ url: `/task/${taskId}`,
54
+ method: "delete"
55
+ },
58
56
  options
59
57
  );
60
58
  };
package/task/task.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/task/task.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AAgC/B,IAAM,WAAW,CACtB,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,QAAQ,OAAO;AAAA,IAC9C;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,cAAc,CAIzB,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,oBAAoB,MAAM;AAErE,QAAM,UAA+D,CAAC;AAAA,IACpE;AAAA,EACF,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAE7C,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT;AAuBO,IAAM,UAAU,CACrB,QACA,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACxD;AAAA,EACF;AACF;AAEO,IAAM,qBAAqB,CAAC,QAAgB,WAA2B;AAAA,EAC5E,SAAS;AAAA,EACT,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,aAAa,CAIxB,QACA,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,mBAAmB,QAAQ,MAAM;AAE5E,QAAM,UAA8D,CAAC;AAAA,IACnE;AAAA,EACF,MAAM,QAAQ,QAAQ,QAAQ,gBAAgB,MAAM;AAEpD,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA,EAAE,SAAS,CAAC,CAAC,QAAQ,GAAG,aAAa;AAAA,EACvC;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT;AAWO,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAAS;AAAA,IAC3C;AAAA,EACF;AACF;AAQO,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,eAAe,IAAI,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,OAAO,IAAI,SAAS,CAAC;AAE7B,WAAO,WAAW,QAAQ,cAAc;AAAA,EAC1C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B","sourcesContent":["/**\n * Generated by orval v6.9.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** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of Tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TasksGetResponse>(\n { url: `/task`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetTasksQueryKey = (params?: GetTasksParams) => [\n `/task`,\n ...(params ? [params] : []),\n];\n\nexport type GetTasksQueryResult = NonNullable<\n Awaited<ReturnType<typeof getTasks>>\n>;\nexport type GetTasksQueryError = ErrorType<void | DmError>;\n\nexport const useGetTasks = <\n TData = Awaited<ReturnType<typeof getTasks>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetTasksParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getTasks>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({\n signal,\n }) => getTasks(params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTasks>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns Task information\n */\nexport const getTask = (\n taskId: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TaskGetResponse>(\n { url: `/task/${taskId}`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetTaskQueryKey = (taskId: string, params?: GetTaskParams) => [\n `/task/${taskId}`,\n ...(params ? [params] : []),\n];\n\nexport type GetTaskQueryResult = NonNullable<\n Awaited<ReturnType<typeof getTask>>\n>;\nexport type GetTaskQueryError = ErrorType<void | DmError>;\n\nexport const useGetTask = <\n TData = Awaited<ReturnType<typeof getTask>>,\n TError = ErrorType<void | DmError>\n>(\n taskId: string,\n params?: GetTaskParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({\n signal,\n }) => getTask(taskId, params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTask>>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!taskId, ...queryOptions }\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/task/${taskId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteTaskMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteTask>>\n>;\n\nexport type DeleteTaskMutationError = ErrorType<DmError>;\n\nexport const useDeleteTask = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteTask>>,\n TError,\n { taskId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteTask>>,\n { taskId: string }\n > = (props) => {\n const { taskId } = props ?? {};\n\n return deleteTask(taskId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof deleteTask>>,\n TError,\n { taskId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
1
+ {"version":3,"sources":["../../src/task/task.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAiCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AACC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B,CAAC,SAAS,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAM9F,IAAM,cAAc,CAC1B,QAAyB,YAEsC;AAE9D,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEnE,QAAM,YAAW,6CAAc,aAAY,oBAAoB,MAAM;AAIrE,QAAM,UAA+D,CAAC,EAAE,OAAO,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAE5H,QAAM,QAAQ,SAA8D,UAAU,SAAS,YAAY;AAE3G,QAAM,WAAW;AAEjB,SAAO;AACT;AAuBO,IAAM,UAAU,CACnB,QACA,QACH,SAAiD,WAC7C;AACC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS;AAAA,MAAU,QAAQ;AAAA,MAC/B;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,CAAC,QAC/B,WAA4B,CAAC,SAAS,UAAU,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAMvE,IAAM,aAAa,CACzB,QACG,QAAwB,YAEoC;AAE9D,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEnE,QAAM,YAAW,6CAAc,aAAY,mBAAmB,QAAO,MAAM;AAI3E,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,QAAO,QAAQ,gBAAgB,MAAM;AAEjI,QAAM,QAAQ,SAA6D,UAAU,SAAS,EAAC,SAAS,CAAC,CAAE,QAAS,GAAG,aAAY,CAAC;AAEpI,QAAM,WAAW;AAEjB,SAAO;AACT;AAWO,IAAM,aAAa,CACtB,QACH,YAAsD;AACjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS;AAAA,MAAU,QAAQ;AAAA,IACnC;AAAA,IACE;AAAA,EAAO;AACT;AAQO,IAAM,gBAAgB,CAET,YACnB;AACC,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKzE,QAAM,aAAyF,CAAC,UAAU;AACtG,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QAAO,cAAc;AAAA,EAC1C;AAEF,SAAO,YAAwF,YAAY,eAAe;AAC5H","sourcesContent":["/**\n * Generated by orval v6.9.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** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport {\n useQuery,\n useMutation\n} from 'react-query'\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey\n} from 'react-query'\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance'\nimport type { ErrorType } from '.././custom-instance'\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n/**\n * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of Tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<TasksGetResponse>(\n {url: `/task`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetTasksQueryKey = (params?: GetTasksParams,) => [`/task`, ...(params ? [params]: [])];\n\n \nexport type GetTasksQueryResult = NonNullable<Awaited<ReturnType<typeof getTasks>>>\nexport type GetTasksQueryError = ErrorType<void | DmError>\n\nexport const useGetTasks = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(\n params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({ signal }) => getTasks(params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTasks>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns Task information\n */\nexport const getTask = (\n taskId: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<TaskGetResponse>(\n {url: `/task/${taskId}`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetTaskQueryKey = (taskId: string,\n params?: GetTaskParams,) => [`/task/${taskId}`, ...(params ? [params]: [])];\n\n \nexport type GetTaskQueryResult = NonNullable<Awaited<ReturnType<typeof getTask>>>\nexport type GetTaskQueryError = ErrorType<void | DmError>\n\nexport const useGetTask = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(\n taskId: string,\n params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({ signal }) => getTask(taskId,params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTask>>, TError, TData>(queryKey, queryFn, {enabled: !!(taskId), ...queryOptions}) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n return customInstance<void>(\n {url: `/task/${taskId}`, method: 'delete'\n },\n options);\n }\n \n\n\n export type DeleteTaskMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTask>>>\n \n export type DeleteTaskMutationError = ErrorType<DmError>\n\n export const useDeleteTask = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {}\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteTask>>, {taskId: string}> = (props) => {\n const {taskId} = props ?? {};\n\n return deleteTask(taskId,requestOptions)\n }\n\n return useMutation<Awaited<ReturnType<typeof deleteTask>>, TError, {taskId: string}, TContext>(mutationFn, mutationOptions)\n }\n "]}
package/task/task.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { i as GetTasksParams, bC as customInstance, aV as TasksGetResponse, bD as ErrorType, by as DmError, h as GetTaskParams, aX as TaskGetResponse } from '../custom-instance-c4af1ee9.js';
3
+ import { i as GetTasksParams, bC as customInstance, aV as TasksGetResponse, bD as ErrorType, by as DmError, h as GetTaskParams, aX as TaskGetResponse } from '../custom-instance-9e5c9e19.js';
4
4
  import 'axios';
5
5
 
6
6
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
package/task/task.js CHANGED
@@ -3,58 +3,56 @@ import {
3
3
  } from "../chunk-3O5KIRV4.js";
4
4
 
5
5
  // src/task/task.ts
6
- import { useQuery, useMutation } from "react-query";
6
+ import {
7
+ useQuery,
8
+ useMutation
9
+ } from "react-query";
7
10
  var getTasks = (params, options, signal) => {
8
11
  return customInstance(
9
- { url: `/task`, method: "get", params, signal },
12
+ {
13
+ url: `/task`,
14
+ method: "get",
15
+ params,
16
+ signal
17
+ },
10
18
  options
11
19
  );
12
20
  };
13
- var getGetTasksQueryKey = (params) => [
14
- `/task`,
15
- ...params ? [params] : []
16
- ];
21
+ var getGetTasksQueryKey = (params) => [`/task`, ...params ? [params] : []];
17
22
  var useGetTasks = (params, options) => {
18
23
  const { query: queryOptions, request: requestOptions } = options ?? {};
19
24
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetTasksQueryKey(params);
20
- const queryFn = ({
21
- signal
22
- }) => getTasks(params, requestOptions, signal);
23
- const query = useQuery(
24
- queryKey,
25
- queryFn,
26
- queryOptions
27
- );
25
+ const queryFn = ({ signal }) => getTasks(params, requestOptions, signal);
26
+ const query = useQuery(queryKey, queryFn, queryOptions);
28
27
  query.queryKey = queryKey;
29
28
  return query;
30
29
  };
31
30
  var getTask = (taskId, params, options, signal) => {
32
31
  return customInstance(
33
- { url: `/task/${taskId}`, method: "get", params, signal },
32
+ {
33
+ url: `/task/${taskId}`,
34
+ method: "get",
35
+ params,
36
+ signal
37
+ },
34
38
  options
35
39
  );
36
40
  };
37
- var getGetTaskQueryKey = (taskId, params) => [
38
- `/task/${taskId}`,
39
- ...params ? [params] : []
40
- ];
41
+ var getGetTaskQueryKey = (taskId, params) => [`/task/${taskId}`, ...params ? [params] : []];
41
42
  var useGetTask = (taskId, params, options) => {
42
43
  const { query: queryOptions, request: requestOptions } = options ?? {};
43
44
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetTaskQueryKey(taskId, params);
44
- const queryFn = ({
45
- signal
46
- }) => getTask(taskId, params, requestOptions, signal);
47
- const query = useQuery(
48
- queryKey,
49
- queryFn,
50
- { enabled: !!taskId, ...queryOptions }
51
- );
45
+ const queryFn = ({ signal }) => getTask(taskId, params, requestOptions, signal);
46
+ const query = useQuery(queryKey, queryFn, { enabled: !!taskId, ...queryOptions });
52
47
  query.queryKey = queryKey;
53
48
  return query;
54
49
  };
55
50
  var deleteTask = (taskId, options) => {
56
51
  return customInstance(
57
- { url: `/task/${taskId}`, method: "delete" },
52
+ {
53
+ url: `/task/${taskId}`,
54
+ method: "delete"
55
+ },
58
56
  options
59
57
  );
60
58
  };