@squonk/data-manager-client 1.2.3-rc.2 → 1.2.4-rc.1

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 (112) hide show
  1. package/accounting/accounting.cjs +31 -13
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +77 -0
  4. package/accounting/accounting.d.ts +10 -1
  5. package/accounting/accounting.js +29 -11
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +67 -27
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +324 -0
  10. package/admin/admin.d.ts +55 -22
  11. package/admin/admin.js +57 -17
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +23 -13
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +57 -0
  16. package/application/application.d.ts +7 -1
  17. package/application/application.js +22 -12
  18. package/application/application.js.map +1 -1
  19. package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
  20. package/chunk-J22A7LHX.cjs.map +1 -0
  21. package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
  22. package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
  23. package/configuration/configuration.cjs +13 -7
  24. package/configuration/configuration.cjs.map +1 -1
  25. package/configuration/configuration.d.cts +29 -0
  26. package/configuration/configuration.d.ts +4 -1
  27. package/configuration/configuration.js +13 -7
  28. package/configuration/configuration.js.map +1 -1
  29. package/{custom-instance-50c9dd5d.d.ts → custom-instance-a2110e78.d.ts} +825 -825
  30. package/dataset/dataset.cjs +71 -72
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +315 -0
  33. package/dataset/dataset.d.ts +46 -16
  34. package/dataset/dataset.js +62 -63
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +43 -32
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +180 -0
  39. package/exchange-rate/exchange-rate.d.ts +25 -7
  40. package/exchange-rate/exchange-rate.js +38 -27
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file/file.cjs +38 -22
  43. package/file/file.cjs.map +1 -1
  44. package/file/file.d.cts +154 -0
  45. package/file/file.d.ts +25 -10
  46. package/file/file.js +34 -18
  47. package/file/file.js.map +1 -1
  48. package/index.cjs +10 -10
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2 -0
  51. package/index.d.ts +1 -1
  52. package/index.js +9 -9
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +47 -37
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +215 -0
  57. package/instance/instance.d.ts +33 -12
  58. package/instance/instance.js +41 -31
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +36 -19
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +85 -0
  63. package/job/job.d.ts +10 -1
  64. package/job/job.js +34 -17
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +23 -26
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +132 -0
  69. package/metadata/metadata.d.ts +19 -7
  70. package/metadata/metadata.js +20 -23
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +12 -12
  73. package/project/project.cjs +70 -48
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +377 -0
  76. package/project/project.d.ts +61 -25
  77. package/project/project.js +59 -37
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +179 -194
  80. package/src/admin/admin.ts +590 -735
  81. package/src/application/application.ts +125 -141
  82. package/src/configuration/configuration.ts +72 -60
  83. package/src/data-manager-api.schemas.ts +940 -941
  84. package/src/dataset/dataset.ts +591 -770
  85. package/src/exchange-rate/exchange-rate.ts +362 -478
  86. package/src/file/file.ts +292 -357
  87. package/src/instance/instance.ts +427 -533
  88. package/src/job/job.ts +187 -198
  89. package/src/metadata/metadata.ts +247 -339
  90. package/src/project/project.ts +669 -860
  91. package/src/task/task.ts +181 -202
  92. package/src/type/type.ts +72 -68
  93. package/src/user/user.ts +248 -286
  94. package/task/task.cjs +31 -15
  95. package/task/task.cjs.map +1 -1
  96. package/task/task.d.cts +103 -0
  97. package/task/task.d.ts +10 -1
  98. package/task/task.js +29 -13
  99. package/task/task.js.map +1 -1
  100. package/type/type.cjs +13 -7
  101. package/type/type.cjs.map +1 -1
  102. package/type/type.d.cts +31 -0
  103. package/type/type.d.ts +4 -1
  104. package/type/type.js +13 -7
  105. package/type/type.js.map +1 -1
  106. package/user/user.cjs +39 -28
  107. package/user/user.cjs.map +1 -1
  108. package/user/user.d.cts +104 -0
  109. package/user/user.d.ts +16 -4
  110. package/user/user.js +36 -25
  111. package/user/user.js.map +1 -1
  112. package/chunk-UZTHSGDT.cjs.map +0 -1
package/src/task/task.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.15.0 🍺
2
+ * Generated by orval v6.20.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -8,108 +8,102 @@ A service that allows *registered* users to make **Datasets** and associated **M
8
8
 
9
9
  * OpenAPI spec version: 1.2
10
10
  */
11
- import { useQuery, useMutation } from "@tanstack/react-query";
11
+ import {
12
+ useMutation,
13
+ useQuery
14
+ } from '@tanstack/react-query'
12
15
  import type {
13
- UseQueryOptions,
14
- UseMutationOptions,
15
- QueryFunction,
16
16
  MutationFunction,
17
- UseQueryResult,
17
+ QueryFunction,
18
18
  QueryKey,
19
- } from "@tanstack/react-query";
19
+ UseMutationOptions,
20
+ UseQueryOptions,
21
+ UseQueryResult
22
+ } from '@tanstack/react-query'
20
23
  import type {
21
- TasksGetResponse,
22
24
  DmError,
25
+ GetTaskParams,
23
26
  GetTasksParams,
24
27
  TaskGetResponse,
25
- GetTaskParams,
26
- } from "../data-manager-api.schemas";
27
- import { customInstance } from ".././custom-instance";
28
- import type { ErrorType } from ".././custom-instance";
28
+ TasksGetResponse
29
+ } from '../data-manager-api.schemas'
30
+ import { customInstance } from '.././custom-instance';
31
+ import type { ErrorType } from '.././custom-instance';
32
+
29
33
 
30
34
  // eslint-disable-next-line
31
- type SecondParameter<T extends (...args: any) => any> = T extends (
35
+ type SecondParameter<T extends (...args: any) => any> = T extends (
32
36
  config: any,
33
- args: infer P
37
+ args: infer P,
34
38
  ) => any
35
39
  ? P
36
40
  : never;
37
41
 
42
+
38
43
  /**
39
44
  * Returns a list of Tasks that you have access to.
40
45
 
41
46
  * @summary Returns a list of Tasks
42
47
  */
43
48
  export const getTasks = (
44
- params?: GetTasksParams,
45
- options?: SecondParameter<typeof customInstance>,
46
- signal?: AbortSignal
49
+ params?: GetTasksParams,
50
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
47
51
  ) => {
48
- return customInstance<TasksGetResponse>(
49
- { url: `/task`, method: "get", params, signal },
50
- options
51
- );
52
- };
53
-
54
- export const getGetTasksQueryKey = (params?: GetTasksParams) =>
55
- ["data-manager-api", `/task`, ...(params ? [params] : [])] as const;
56
-
57
- export const getGetTasksQueryOptions = <
58
- TData = Awaited<ReturnType<typeof getTasks>>,
59
- TError = ErrorType<void | DmError>
60
- >(
61
- params?: GetTasksParams,
62
- options?: {
63
- query?: UseQueryOptions<
64
- Awaited<ReturnType<typeof getTasks>>,
65
- TError,
66
- TData
67
- >;
68
- request?: SecondParameter<typeof customInstance>;
69
- }
70
- ): UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData> & {
71
- queryKey: QueryKey;
72
- } => {
73
- const { query: queryOptions, request: requestOptions } = options ?? {};
74
-
75
- const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);
76
-
77
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({
78
- signal,
79
- }) => getTasks(params, requestOptions, signal);
80
-
81
- return { queryKey, queryFn, ...queryOptions };
82
- };
83
-
84
- export type GetTasksQueryResult = NonNullable<
85
- Awaited<ReturnType<typeof getTasks>>
86
- >;
87
- export type GetTasksQueryError = ErrorType<void | DmError>;
88
-
89
- export const useGetTasks = <
90
- TData = Awaited<ReturnType<typeof getTasks>>,
91
- TError = ErrorType<void | DmError>
92
- >(
93
- params?: GetTasksParams,
94
- options?: {
95
- query?: UseQueryOptions<
96
- Awaited<ReturnType<typeof getTasks>>,
97
- TError,
98
- TData
99
- >;
100
- request?: SecondParameter<typeof customInstance>;
101
- }
102
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
103
- const queryOptions = getGetTasksQueryOptions(params, options);
104
-
105
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
106
- queryKey: QueryKey;
107
- };
108
-
109
- query.queryKey = queryOptions.queryKey;
52
+
53
+
54
+ return customInstance<TasksGetResponse>(
55
+ {url: `/task`, method: 'get',
56
+ params, signal
57
+ },
58
+ options);
59
+ }
60
+
61
+
62
+ export const getGetTasksQueryKey = (params?: GetTasksParams,) => {
63
+
64
+ return ["data-manager-api", `/task`, ...(params ? [params]: [])] as const;
65
+ }
66
+
67
+
68
+ export const getGetTasksQueryOptions = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
69
+ ) => {
70
+
71
+ const {query: queryOptions, request: requestOptions} = options ?? {};
72
+
73
+ const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);
74
+
75
+
76
+
77
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({ signal }) => getTasks(params, requestOptions, signal);
78
+
79
+
80
+
81
+
82
+
83
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData> & { queryKey: QueryKey }
84
+ }
85
+
86
+ export type GetTasksQueryResult = NonNullable<Awaited<ReturnType<typeof getTasks>>>
87
+ export type GetTasksQueryError = ErrorType<void | DmError>
88
+
89
+ /**
90
+ * @summary Returns a list of Tasks
91
+ */
92
+ export const useGetTasks = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(
93
+ params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
94
+
95
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
96
+
97
+ const queryOptions = getGetTasksQueryOptions(params,options)
98
+
99
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
100
+
101
+ query.queryKey = queryOptions.queryKey ;
110
102
 
111
103
  return query;
112
- };
104
+ }
105
+
106
+
113
107
 
114
108
  /**
115
109
  * Returns Task information including its states and events.
@@ -133,70 +127,68 @@ For Application **Instance** Tasks, where the Task `purpose` is `INSTANCE`, you
133
127
  * @summary Returns Task information
134
128
  */
135
129
  export const getTask = (
136
- taskId: string,
137
- params?: GetTaskParams,
138
- options?: SecondParameter<typeof customInstance>,
139
- signal?: AbortSignal
130
+ taskId: string,
131
+ params?: GetTaskParams,
132
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
133
+ ) => {
134
+
135
+
136
+ return customInstance<TaskGetResponse>(
137
+ {url: `/task/${taskId}`, method: 'get',
138
+ params, signal
139
+ },
140
+ options);
141
+ }
142
+
143
+
144
+ export const getGetTaskQueryKey = (taskId: string,
145
+ params?: GetTaskParams,) => {
146
+
147
+ return ["data-manager-api", `/task/${taskId}`, ...(params ? [params]: [])] as const;
148
+ }
149
+
150
+
151
+ export const getGetTaskQueryOptions = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(taskId: string,
152
+ params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
140
153
  ) => {
141
- return customInstance<TaskGetResponse>(
142
- { url: `/task/${taskId}`, method: "get", params, signal },
143
- options
144
- );
145
- };
146
-
147
- export const getGetTaskQueryKey = (taskId: string, params?: GetTaskParams) =>
148
- ["data-manager-api", `/task/${taskId}`, ...(params ? [params] : [])] as const;
149
-
150
- export const getGetTaskQueryOptions = <
151
- TData = Awaited<ReturnType<typeof getTask>>,
152
- TError = ErrorType<void | DmError>
153
- >(
154
- taskId: string,
155
- params?: GetTaskParams,
156
- options?: {
157
- query?: UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>;
158
- request?: SecondParameter<typeof customInstance>;
159
- }
160
- ): UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData> & {
161
- queryKey: QueryKey;
162
- } => {
163
- const { query: queryOptions, request: requestOptions } = options ?? {};
164
-
165
- const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);
166
-
167
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({
168
- signal,
169
- }) => getTask(taskId, params, requestOptions, signal);
170
-
171
- return { queryKey, queryFn, enabled: !!taskId, ...queryOptions };
172
- };
173
-
174
- export type GetTaskQueryResult = NonNullable<
175
- Awaited<ReturnType<typeof getTask>>
176
- >;
177
- export type GetTaskQueryError = ErrorType<void | DmError>;
178
-
179
- export const useGetTask = <
180
- TData = Awaited<ReturnType<typeof getTask>>,
181
- TError = ErrorType<void | DmError>
182
- >(
183
- taskId: string,
184
- params?: GetTaskParams,
185
- options?: {
186
- query?: UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>;
187
- request?: SecondParameter<typeof customInstance>;
188
- }
189
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
190
- const queryOptions = getGetTaskQueryOptions(taskId, params, options);
191
-
192
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
193
- queryKey: QueryKey;
194
- };
195
-
196
- query.queryKey = queryOptions.queryKey;
154
+
155
+ const {query: queryOptions, request: requestOptions} = options ?? {};
156
+
157
+ const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId,params);
158
+
159
+
160
+
161
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({ signal }) => getTask(taskId,params, requestOptions, signal);
162
+
163
+
164
+
165
+
166
+
167
+ return { queryKey, queryFn, enabled: !!(taskId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData> & { queryKey: QueryKey }
168
+ }
169
+
170
+ export type GetTaskQueryResult = NonNullable<Awaited<ReturnType<typeof getTask>>>
171
+ export type GetTaskQueryError = ErrorType<void | DmError>
172
+
173
+ /**
174
+ * @summary Returns Task information
175
+ */
176
+ export const useGetTask = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(
177
+ taskId: string,
178
+ params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
179
+
180
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
181
+
182
+ const queryOptions = getGetTaskQueryOptions(taskId,params,options)
183
+
184
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
185
+
186
+ query.queryKey = queryOptions.queryKey ;
197
187
 
198
188
  return query;
199
- };
189
+ }
190
+
191
+
200
192
 
201
193
  /**
202
194
  * Given a `task_id` the Task will be removed.
@@ -208,65 +200,52 @@ You must be an `owner` of the Task to delete it. For example you must be the `ow
208
200
  * @summary Delete a Task entry
209
201
  */
210
202
  export const deleteTask = (
211
- taskId: string,
212
- options?: SecondParameter<typeof customInstance>
203
+ taskId: string,
204
+ options?: SecondParameter<typeof customInstance>,) => {
205
+
206
+
207
+ return customInstance<void>(
208
+ {url: `/task/${taskId}`, method: 'delete'
209
+ },
210
+ options);
211
+ }
212
+
213
+
214
+
215
+ export const getDeleteTaskMutationOptions = <TError = ErrorType<DmError>,
216
+
217
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
218
+ ): UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext> => {
219
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
220
+
221
+
222
+
223
+
224
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteTask>>, {taskId: string}> = (props) => {
225
+ const {taskId} = props ?? {};
226
+
227
+ return deleteTask(taskId,requestOptions)
228
+ }
229
+
230
+
231
+
232
+
233
+ return { mutationFn, ...mutationOptions }}
234
+
235
+ export type DeleteTaskMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTask>>>
236
+
237
+ export type DeleteTaskMutationError = ErrorType<DmError>
238
+
239
+ /**
240
+ * @summary Delete a Task entry
241
+ */
242
+ export const useDeleteTask = <TError = ErrorType<DmError>,
243
+
244
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
213
245
  ) => {
214
- return customInstance<void>(
215
- { url: `/task/${taskId}`, method: "delete" },
216
- options
217
- );
218
- };
219
-
220
- export const getDeleteTaskMutationOptions = <
221
- TError = ErrorType<DmError>,
222
- TContext = unknown
223
- >(options?: {
224
- mutation?: UseMutationOptions<
225
- Awaited<ReturnType<typeof deleteTask>>,
226
- TError,
227
- { taskId: string },
228
- TContext
229
- >;
230
- request?: SecondParameter<typeof customInstance>;
231
- }): UseMutationOptions<
232
- Awaited<ReturnType<typeof deleteTask>>,
233
- TError,
234
- { taskId: string },
235
- TContext
236
- > => {
237
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
238
-
239
- const mutationFn: MutationFunction<
240
- Awaited<ReturnType<typeof deleteTask>>,
241
- { taskId: string }
242
- > = (props) => {
243
- const { taskId } = props ?? {};
244
-
245
- return deleteTask(taskId, requestOptions);
246
- };
247
-
248
- return { mutationFn, ...mutationOptions };
249
- };
250
-
251
- export type DeleteTaskMutationResult = NonNullable<
252
- Awaited<ReturnType<typeof deleteTask>>
253
- >;
254
-
255
- export type DeleteTaskMutationError = ErrorType<DmError>;
256
-
257
- export const useDeleteTask = <
258
- TError = ErrorType<DmError>,
259
- TContext = unknown
260
- >(options?: {
261
- mutation?: UseMutationOptions<
262
- Awaited<ReturnType<typeof deleteTask>>,
263
- TError,
264
- { taskId: string },
265
- TContext
266
- >;
267
- request?: SecondParameter<typeof customInstance>;
268
- }) => {
269
- const mutationOptions = getDeleteTaskMutationOptions(options);
270
-
271
- return useMutation(mutationOptions);
272
- };
246
+
247
+ const mutationOptions = getDeleteTaskMutationOptions(options);
248
+
249
+ return useMutation(mutationOptions);
250
+ }
251
+
package/src/type/type.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.15.0 🍺
2
+ * Generated by orval v6.20.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -8,89 +8,93 @@ A service that allows *registered* users to make **Datasets** and associated **M
8
8
 
9
9
  * OpenAPI spec version: 1.2
10
10
  */
11
- import { useQuery } from "@tanstack/react-query";
11
+ import {
12
+ useQuery
13
+ } from '@tanstack/react-query'
12
14
  import type {
13
- UseQueryOptions,
14
15
  QueryFunction,
15
- UseQueryResult,
16
16
  QueryKey,
17
- } from "@tanstack/react-query";
18
- import type { TypesGetResponse, DmError } from "../data-manager-api.schemas";
19
- import { customInstance } from ".././custom-instance";
20
- import type { ErrorType } from ".././custom-instance";
17
+ UseQueryOptions,
18
+ UseQueryResult
19
+ } from '@tanstack/react-query'
20
+ import type {
21
+ DmError,
22
+ TypesGetResponse
23
+ } from '../data-manager-api.schemas'
24
+ import { customInstance } from '.././custom-instance';
25
+ import type { ErrorType } from '.././custom-instance';
26
+
21
27
 
22
28
  // eslint-disable-next-line
23
- type SecondParameter<T extends (...args: any) => any> = T extends (
29
+ type SecondParameter<T extends (...args: any) => any> = T extends (
24
30
  config: any,
25
- args: infer P
31
+ args: infer P,
26
32
  ) => any
27
33
  ? P
28
34
  : never;
29
35
 
36
+
30
37
  /**
31
38
  * Returns the supported Dataset and File (MIME) Types
32
39
 
33
40
  * @summary Get the supported File Types
34
41
  */
35
42
  export const getFileTypes = (
36
- options?: SecondParameter<typeof customInstance>,
37
- signal?: AbortSignal
43
+
44
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
45
+ ) => {
46
+
47
+
48
+ return customInstance<TypesGetResponse>(
49
+ {url: `/type`, method: 'get', signal
50
+ },
51
+ options);
52
+ }
53
+
54
+
55
+ export const getGetFileTypesQueryKey = () => {
56
+
57
+ return ["data-manager-api", `/type`] as const;
58
+ }
59
+
60
+
61
+ export const getGetFileTypesQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
38
62
  ) => {
39
- return customInstance<TypesGetResponse>(
40
- { url: `/type`, method: "get", signal },
41
- options
42
- );
43
- };
44
-
45
- export const getGetFileTypesQueryKey = () => ["data-manager-api", `/type`] as const;
46
-
47
- export const getGetFileTypesQueryOptions = <
48
- TData = Awaited<ReturnType<typeof getFileTypes>>,
49
- TError = ErrorType<void | DmError>
50
- >(options?: {
51
- query?: UseQueryOptions<
52
- Awaited<ReturnType<typeof getFileTypes>>,
53
- TError,
54
- TData
55
- >;
56
- request?: SecondParameter<typeof customInstance>;
57
- }): UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & {
58
- queryKey: QueryKey;
59
- } => {
60
- const { query: queryOptions, request: requestOptions } = options ?? {};
61
-
62
- const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();
63
-
64
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({
65
- signal,
66
- }) => getFileTypes(requestOptions, signal);
67
-
68
- return { queryKey, queryFn, ...queryOptions };
69
- };
70
-
71
- export type GetFileTypesQueryResult = NonNullable<
72
- Awaited<ReturnType<typeof getFileTypes>>
73
- >;
74
- export type GetFileTypesQueryError = ErrorType<void | DmError>;
75
-
76
- export const useGetFileTypes = <
77
- TData = Awaited<ReturnType<typeof getFileTypes>>,
78
- TError = ErrorType<void | DmError>
79
- >(options?: {
80
- query?: UseQueryOptions<
81
- Awaited<ReturnType<typeof getFileTypes>>,
82
- TError,
83
- TData
84
- >;
85
- request?: SecondParameter<typeof customInstance>;
86
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
87
- const queryOptions = getGetFileTypesQueryOptions(options);
88
-
89
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
90
- queryKey: QueryKey;
91
- };
92
-
93
- query.queryKey = queryOptions.queryKey;
63
+
64
+ const {query: queryOptions, request: requestOptions} = options ?? {};
65
+
66
+ const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();
67
+
68
+
69
+
70
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);
71
+
72
+
73
+
74
+
75
+
76
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: QueryKey }
77
+ }
78
+
79
+ export type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>
80
+ export type GetFileTypesQueryError = ErrorType<void | DmError>
81
+
82
+ /**
83
+ * @summary Get the supported File Types
84
+ */
85
+ export const useGetFileTypes = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
86
+ options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
87
+
88
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
89
+
90
+ const queryOptions = getGetFileTypesQueryOptions(options)
91
+
92
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
93
+
94
+ query.queryKey = queryOptions.queryKey ;
94
95
 
95
96
  return query;
96
- };
97
+ }
98
+
99
+
100
+