@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
@@ -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
  ServiceErrorsGetResponse,
22
25
  DmError,
@@ -26,15 +29,16 @@ import type {
26
29
  AdminJobManifestGetResponse,
27
30
  AdminJobManifestLoadPutResponse,
28
31
  JobManifestPutBodyBody,
29
- JobManifestLoadPutBodyBody,
30
- } from "../data-manager-api.schemas";
31
- import { customInstance } from ".././custom-instance";
32
- import type { ErrorType } from ".././custom-instance";
32
+ JobManifestLoadPutBodyBody
33
+ } from '../data-manager-api.schemas'
34
+ import { customInstance } from '.././custom-instance'
35
+ import type { ErrorType } from '.././custom-instance'
36
+
33
37
 
34
38
  // eslint-disable-next-line
35
- type SecondParameter<T extends (...args: any) => any> = T extends (
39
+ type SecondParameter<T extends (...args: any) => any> = T extends (
36
40
  config: any,
37
- args: infer P
41
+ args: infer P,
38
42
  ) => any
39
43
  ? P
40
44
  : never;
@@ -47,60 +51,42 @@ You will need **admin** rights to use this endpoint
47
51
  * @summary Gets Service Errors
48
52
  */
49
53
  export const adminGetServiceErrors = (
50
- params?: AdminGetServiceErrorsParams,
51
- options?: SecondParameter<typeof customInstance>,
52
- signal?: AbortSignal
54
+ params?: AdminGetServiceErrorsParams,
55
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
53
56
  ) => {
54
- return customInstance<ServiceErrorsGetResponse>(
55
- { url: `/admin/service-error`, method: "get", params, signal },
56
- options
57
- );
58
- };
59
-
60
- export const getAdminGetServiceErrorsQueryKey = (
61
- params?: AdminGetServiceErrorsParams
62
- ) => [`/admin/service-error`, ...(params ? [params] : [])];
63
-
64
- export type AdminGetServiceErrorsQueryResult = NonNullable<
65
- Awaited<ReturnType<typeof adminGetServiceErrors>>
66
- >;
67
- export type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>;
68
-
69
- export const useAdminGetServiceErrors = <
70
- TData = Awaited<ReturnType<typeof adminGetServiceErrors>>,
71
- TError = ErrorType<void | DmError>
72
- >(
73
- params?: AdminGetServiceErrorsParams,
74
- options?: {
75
- query?: UseQueryOptions<
76
- Awaited<ReturnType<typeof adminGetServiceErrors>>,
77
- TError,
78
- TData
79
- >;
80
- request?: SecondParameter<typeof customInstance>;
81
- }
82
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
83
- const { query: queryOptions, request: requestOptions } = options ?? {};
84
-
85
- const queryKey =
86
- queryOptions?.queryKey ?? getAdminGetServiceErrorsQueryKey(params);
87
-
88
- const queryFn: QueryFunction<
89
- Awaited<ReturnType<typeof adminGetServiceErrors>>
90
- > = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
91
-
92
- const query = useQuery<
93
- Awaited<ReturnType<typeof adminGetServiceErrors>>,
94
- TError,
95
- TData
96
- >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {
97
- queryKey: QueryKey;
98
- };
57
+ return customInstance<ServiceErrorsGetResponse>(
58
+ {url: `/admin/service-error`, method: 'get',
59
+ params, signal
60
+ },
61
+ options);
62
+ }
63
+
64
+
65
+ export const getAdminGetServiceErrorsQueryKey = (params?: AdminGetServiceErrorsParams,) => [`/admin/service-error`, ...(params ? [params]: [])];
66
+
67
+
68
+ export type AdminGetServiceErrorsQueryResult = NonNullable<Awaited<ReturnType<typeof adminGetServiceErrors>>>
69
+ export type AdminGetServiceErrorsQueryError = ErrorType<void | DmError>
70
+
71
+ export const useAdminGetServiceErrors = <TData = Awaited<ReturnType<typeof adminGetServiceErrors>>, TError = ErrorType<void | DmError>>(
72
+ params?: AdminGetServiceErrorsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof adminGetServiceErrors>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
73
+
74
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
75
+
76
+ const {query: queryOptions, request: requestOptions} = options ?? {}
77
+
78
+ const queryKey = queryOptions?.queryKey ?? getAdminGetServiceErrorsQueryKey(params);
79
+
80
+
81
+
82
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof adminGetServiceErrors>>> = ({ signal }) => adminGetServiceErrors(params, requestOptions, signal);
83
+
84
+ const query = useQuery<Awaited<ReturnType<typeof adminGetServiceErrors>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
99
85
 
100
86
  query.queryKey = queryKey;
101
87
 
102
88
  return query;
103
- };
89
+ }
104
90
 
105
91
  /**
106
92
  * Used primarily to 'Acknowledge' but not delete a Service Error.
@@ -110,52 +96,38 @@ You will need **admin** rights to use this endpoint
110
96
  * @summary Patches a Service Error
111
97
  */
112
98
  export const adminPatchServiceError = (
113
- errorId: number,
114
- options?: SecondParameter<typeof customInstance>
99
+ errorId: number,
100
+ options?: SecondParameter<typeof customInstance>,) => {
101
+ return customInstance<void>(
102
+ {url: `/admin/service-error/${errorId}`, method: 'patch'
103
+ },
104
+ options);
105
+ }
106
+
107
+
108
+
109
+ export type AdminPatchServiceErrorMutationResult = NonNullable<Awaited<ReturnType<typeof adminPatchServiceError>>>
110
+
111
+ export type AdminPatchServiceErrorMutationError = ErrorType<DmError>
112
+
113
+ export const useAdminPatchServiceError = <TError = ErrorType<DmError>,
114
+
115
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof adminPatchServiceError>>, TError,{errorId: number}, TContext>, request?: SecondParameter<typeof customInstance>}
115
116
  ) => {
116
- return customInstance<void>(
117
- { url: `/admin/service-error/${errorId}`, method: "patch" },
118
- options
119
- );
120
- };
121
-
122
- export type AdminPatchServiceErrorMutationResult = NonNullable<
123
- Awaited<ReturnType<typeof adminPatchServiceError>>
124
- >;
125
-
126
- export type AdminPatchServiceErrorMutationError = ErrorType<DmError>;
127
-
128
- export const useAdminPatchServiceError = <
129
- TError = ErrorType<DmError>,
130
- TContext = unknown
131
- >(options?: {
132
- mutation?: UseMutationOptions<
133
- Awaited<ReturnType<typeof adminPatchServiceError>>,
134
- TError,
135
- { errorId: number },
136
- TContext
137
- >;
138
- request?: SecondParameter<typeof customInstance>;
139
- }) => {
140
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
141
-
142
- const mutationFn: MutationFunction<
143
- Awaited<ReturnType<typeof adminPatchServiceError>>,
144
- { errorId: number }
145
- > = (props) => {
146
- const { errorId } = props ?? {};
147
-
148
- return adminPatchServiceError(errorId, requestOptions);
149
- };
150
-
151
- return useMutation<
152
- Awaited<ReturnType<typeof adminPatchServiceError>>,
153
- TError,
154
- { errorId: number },
155
- TContext
156
- >(mutationFn, mutationOptions);
157
- };
158
- /**
117
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
118
+
119
+
120
+
121
+
122
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof adminPatchServiceError>>, {errorId: number}> = (props) => {
123
+ const {errorId} = props ?? {};
124
+
125
+ return adminPatchServiceError(errorId,requestOptions)
126
+ }
127
+
128
+ return useMutation<Awaited<ReturnType<typeof adminPatchServiceError>>, TError, {errorId: number}, TContext>(mutationFn, mutationOptions)
129
+ }
130
+ /**
159
131
  * Deletes an existing Service Error.
160
132
 
161
133
  You will need **admin** rights to use this endpoint
@@ -163,52 +135,38 @@ You will need **admin** rights to use this endpoint
163
135
  * @summary Deletes a Service Error
164
136
  */
165
137
  export const adminDeleteServiceError = (
166
- errorId: number,
167
- options?: SecondParameter<typeof customInstance>
138
+ errorId: number,
139
+ options?: SecondParameter<typeof customInstance>,) => {
140
+ return customInstance<void>(
141
+ {url: `/admin/service-error/${errorId}`, method: 'delete'
142
+ },
143
+ options);
144
+ }
145
+
146
+
147
+
148
+ export type AdminDeleteServiceErrorMutationResult = NonNullable<Awaited<ReturnType<typeof adminDeleteServiceError>>>
149
+
150
+ export type AdminDeleteServiceErrorMutationError = ErrorType<DmError>
151
+
152
+ export const useAdminDeleteServiceError = <TError = ErrorType<DmError>,
153
+
154
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof adminDeleteServiceError>>, TError,{errorId: number}, TContext>, request?: SecondParameter<typeof customInstance>}
168
155
  ) => {
169
- return customInstance<void>(
170
- { url: `/admin/service-error/${errorId}`, method: "delete" },
171
- options
172
- );
173
- };
174
-
175
- export type AdminDeleteServiceErrorMutationResult = NonNullable<
176
- Awaited<ReturnType<typeof adminDeleteServiceError>>
177
- >;
178
-
179
- export type AdminDeleteServiceErrorMutationError = ErrorType<DmError>;
180
-
181
- export const useAdminDeleteServiceError = <
182
- TError = ErrorType<DmError>,
183
- TContext = unknown
184
- >(options?: {
185
- mutation?: UseMutationOptions<
186
- Awaited<ReturnType<typeof adminDeleteServiceError>>,
187
- TError,
188
- { errorId: number },
189
- TContext
190
- >;
191
- request?: SecondParameter<typeof customInstance>;
192
- }) => {
193
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
194
-
195
- const mutationFn: MutationFunction<
196
- Awaited<ReturnType<typeof adminDeleteServiceError>>,
197
- { errorId: number }
198
- > = (props) => {
199
- const { errorId } = props ?? {};
200
-
201
- return adminDeleteServiceError(errorId, requestOptions);
202
- };
203
-
204
- return useMutation<
205
- Awaited<ReturnType<typeof adminDeleteServiceError>>,
206
- TError,
207
- { errorId: number },
208
- TContext
209
- >(mutationFn, mutationOptions);
210
- };
211
- /**
156
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
157
+
158
+
159
+
160
+
161
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof adminDeleteServiceError>>, {errorId: number}> = (props) => {
162
+ const {errorId} = props ?? {};
163
+
164
+ return adminDeleteServiceError(errorId,requestOptions)
165
+ }
166
+
167
+ return useMutation<Awaited<ReturnType<typeof adminDeleteServiceError>>, TError, {errorId: number}, TContext>(mutationFn, mutationOptions)
168
+ }
169
+ /**
212
170
  * This method adds a user to the Data Manager service. The user is authenticated via a keycloak server but will need an initialised account before they can create Datasets or Projects.
213
171
 
214
172
  You will need **admin** rights to use this endpoint
@@ -216,52 +174,38 @@ You will need **admin** rights to use this endpoint
216
174
  * @summary Prepares a user account in the Data Manager service
217
175
  */
218
176
  export const adminPutUser = (
219
- userId: string,
220
- options?: SecondParameter<typeof customInstance>
177
+ userId: string,
178
+ options?: SecondParameter<typeof customInstance>,) => {
179
+ return customInstance<AdminUserPutResponse>(
180
+ {url: `/admin/user/${userId}`, method: 'put'
181
+ },
182
+ options);
183
+ }
184
+
185
+
186
+
187
+ export type AdminPutUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminPutUser>>>
188
+
189
+ export type AdminPutUserMutationError = ErrorType<void | DmError>
190
+
191
+ export const useAdminPutUser = <TError = ErrorType<void | DmError>,
192
+
193
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof adminPutUser>>, TError,{userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
221
194
  ) => {
222
- return customInstance<AdminUserPutResponse>(
223
- { url: `/admin/user/${userId}`, method: "put" },
224
- options
225
- );
226
- };
227
-
228
- export type AdminPutUserMutationResult = NonNullable<
229
- Awaited<ReturnType<typeof adminPutUser>>
230
- >;
231
-
232
- export type AdminPutUserMutationError = ErrorType<void | DmError>;
233
-
234
- export const useAdminPutUser = <
235
- TError = ErrorType<void | DmError>,
236
- TContext = unknown
237
- >(options?: {
238
- mutation?: UseMutationOptions<
239
- Awaited<ReturnType<typeof adminPutUser>>,
240
- TError,
241
- { userId: string },
242
- TContext
243
- >;
244
- request?: SecondParameter<typeof customInstance>;
245
- }) => {
246
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
247
-
248
- const mutationFn: MutationFunction<
249
- Awaited<ReturnType<typeof adminPutUser>>,
250
- { userId: string }
251
- > = (props) => {
252
- const { userId } = props ?? {};
253
-
254
- return adminPutUser(userId, requestOptions);
255
- };
256
-
257
- return useMutation<
258
- Awaited<ReturnType<typeof adminPutUser>>,
259
- TError,
260
- { userId: string },
261
- TContext
262
- >(mutationFn, mutationOptions);
263
- };
264
- /**
195
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
196
+
197
+
198
+
199
+
200
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof adminPutUser>>, {userId: string}> = (props) => {
201
+ const {userId} = props ?? {};
202
+
203
+ return adminPutUser(userId,requestOptions)
204
+ }
205
+
206
+ return useMutation<Awaited<ReturnType<typeof adminPutUser>>, TError, {userId: string}, TContext>(mutationFn, mutationOptions)
207
+ }
208
+ /**
265
209
  * Deletes a user account, along with all the user's Datasets
266
210
 
267
211
  You will need **admin** rights to use this endpoint
@@ -269,52 +213,38 @@ You will need **admin** rights to use this endpoint
269
213
  * @summary Deletes a user account
270
214
  */
271
215
  export const adminDeleteUser = (
272
- userId: string,
273
- options?: SecondParameter<typeof customInstance>
216
+ userId: string,
217
+ options?: SecondParameter<typeof customInstance>,) => {
218
+ return customInstance<void>(
219
+ {url: `/admin/user/${userId}`, method: 'delete'
220
+ },
221
+ options);
222
+ }
223
+
224
+
225
+
226
+ export type AdminDeleteUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminDeleteUser>>>
227
+
228
+ export type AdminDeleteUserMutationError = ErrorType<DmError>
229
+
230
+ export const useAdminDeleteUser = <TError = ErrorType<DmError>,
231
+
232
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof adminDeleteUser>>, TError,{userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
274
233
  ) => {
275
- return customInstance<void>(
276
- { url: `/admin/user/${userId}`, method: "delete" },
277
- options
278
- );
279
- };
280
-
281
- export type AdminDeleteUserMutationResult = NonNullable<
282
- Awaited<ReturnType<typeof adminDeleteUser>>
283
- >;
284
-
285
- export type AdminDeleteUserMutationError = ErrorType<DmError>;
286
-
287
- export const useAdminDeleteUser = <
288
- TError = ErrorType<DmError>,
289
- TContext = unknown
290
- >(options?: {
291
- mutation?: UseMutationOptions<
292
- Awaited<ReturnType<typeof adminDeleteUser>>,
293
- TError,
294
- { userId: string },
295
- TContext
296
- >;
297
- request?: SecondParameter<typeof customInstance>;
298
- }) => {
299
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
300
-
301
- const mutationFn: MutationFunction<
302
- Awaited<ReturnType<typeof adminDeleteUser>>,
303
- { userId: string }
304
- > = (props) => {
305
- const { userId } = props ?? {};
306
-
307
- return adminDeleteUser(userId, requestOptions);
308
- };
309
-
310
- return useMutation<
311
- Awaited<ReturnType<typeof adminDeleteUser>>,
312
- TError,
313
- { userId: string },
314
- TContext
315
- >(mutationFn, mutationOptions);
316
- };
317
- /**
234
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
235
+
236
+
237
+
238
+
239
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof adminDeleteUser>>, {userId: string}> = (props) => {
240
+ const {userId} = props ?? {};
241
+
242
+ return adminDeleteUser(userId,requestOptions)
243
+ }
244
+
245
+ return useMutation<Awaited<ReturnType<typeof adminDeleteUser>>, TError, {userId: string}, TContext>(mutationFn, mutationOptions)
246
+ }
247
+ /**
318
248
  * Patches a user record, typically to suspend or re-enable a user account
319
249
 
320
250
  You will need **admin** rights to use this endpoint
@@ -322,63 +252,45 @@ You will need **admin** rights to use this endpoint
322
252
  * @summary Patch a given user
323
253
  */
324
254
  export const adminPatchUser = (
325
- userId: string,
326
- userPatchBodyBody: UserPatchBodyBody,
327
- options?: SecondParameter<typeof customInstance>
328
- ) => {
329
- const formData = new FormData();
330
- if (userPatchBodyBody.suspend_message !== undefined) {
331
- formData.append("suspend_message", userPatchBodyBody.suspend_message);
332
- }
333
-
334
- return customInstance<void>(
335
- {
336
- url: `/admin/user/${userId}`,
337
- method: "patch",
338
- headers: { "Content-Type": "multipart/form-data" },
339
- data: formData,
255
+ userId: string,
256
+ userPatchBodyBody: UserPatchBodyBody,
257
+ options?: SecondParameter<typeof customInstance>,) => {const formData = new FormData();
258
+ if(userPatchBodyBody.suspend_message !== undefined) {
259
+ formData.append('suspend_message', userPatchBodyBody.suspend_message)
260
+ }
261
+
262
+ return customInstance<void>(
263
+ {url: `/admin/user/${userId}`, method: 'patch',
264
+ headers: {'Content-Type': 'multipart/form-data', },
265
+ data: formData
340
266
  },
341
- options
342
- );
343
- };
344
-
345
- export type AdminPatchUserMutationResult = NonNullable<
346
- Awaited<ReturnType<typeof adminPatchUser>>
347
- >;
348
- export type AdminPatchUserMutationBody = UserPatchBodyBody;
349
- export type AdminPatchUserMutationError = ErrorType<DmError>;
350
-
351
- export const useAdminPatchUser = <
352
- TError = ErrorType<DmError>,
353
- TContext = unknown
354
- >(options?: {
355
- mutation?: UseMutationOptions<
356
- Awaited<ReturnType<typeof adminPatchUser>>,
357
- TError,
358
- { userId: string; data: UserPatchBodyBody },
359
- TContext
360
- >;
361
- request?: SecondParameter<typeof customInstance>;
362
- }) => {
363
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
364
-
365
- const mutationFn: MutationFunction<
366
- Awaited<ReturnType<typeof adminPatchUser>>,
367
- { userId: string; data: UserPatchBodyBody }
368
- > = (props) => {
369
- const { userId, data } = props ?? {};
370
-
371
- return adminPatchUser(userId, data, requestOptions);
372
- };
373
-
374
- return useMutation<
375
- Awaited<ReturnType<typeof adminPatchUser>>,
376
- TError,
377
- { userId: string; data: UserPatchBodyBody },
378
- TContext
379
- >(mutationFn, mutationOptions);
380
- };
381
- /**
267
+ options);
268
+ }
269
+
270
+
271
+
272
+ export type AdminPatchUserMutationResult = NonNullable<Awaited<ReturnType<typeof adminPatchUser>>>
273
+ export type AdminPatchUserMutationBody = UserPatchBodyBody
274
+ export type AdminPatchUserMutationError = ErrorType<DmError>
275
+
276
+ export const useAdminPatchUser = <TError = ErrorType<DmError>,
277
+
278
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof adminPatchUser>>, TError,{userId: string;data: UserPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
279
+ ) => {
280
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
281
+
282
+
283
+
284
+
285
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof adminPatchUser>>, {userId: string;data: UserPatchBodyBody}> = (props) => {
286
+ const {userId,data} = props ?? {};
287
+
288
+ return adminPatchUser(userId,data,requestOptions)
289
+ }
290
+
291
+ return useMutation<Awaited<ReturnType<typeof adminPatchUser>>, TError, {userId: string;data: UserPatchBodyBody}, TContext>(mutationFn, mutationOptions)
292
+ }
293
+ /**
382
294
  * Returns the list of known **Job Manifests** including the time the manifest was last loaded and its load status, a message indicating success or failure.
383
295
 
384
296
  You will need **admin** rights to use this endpoint
@@ -386,53 +298,41 @@ You will need **admin** rights to use this endpoint
386
298
  * @summary Get Job Manifests
387
299
  */
388
300
  export const adminGetJobManifests = (
389
- options?: SecondParameter<typeof customInstance>,
390
- signal?: AbortSignal
301
+
302
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
391
303
  ) => {
392
- return customInstance<AdminJobManifestGetResponse>(
393
- { url: `/admin/job-manifest`, method: "get", signal },
394
- options
395
- );
396
- };
304
+ return customInstance<AdminJobManifestGetResponse>(
305
+ {url: `/admin/job-manifest`, method: 'get', signal
306
+ },
307
+ options);
308
+ }
309
+
397
310
 
398
311
  export const getAdminGetJobManifestsQueryKey = () => [`/admin/job-manifest`];
399
312
 
400
- export type AdminGetJobManifestsQueryResult = NonNullable<
401
- Awaited<ReturnType<typeof adminGetJobManifests>>
402
- >;
403
- export type AdminGetJobManifestsQueryError = ErrorType<void | DmError>;
404
-
405
- export const useAdminGetJobManifests = <
406
- TData = Awaited<ReturnType<typeof adminGetJobManifests>>,
407
- TError = ErrorType<void | DmError>
408
- >(options?: {
409
- query?: UseQueryOptions<
410
- Awaited<ReturnType<typeof adminGetJobManifests>>,
411
- TError,
412
- TData
413
- >;
414
- request?: SecondParameter<typeof customInstance>;
415
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
416
- const { query: queryOptions, request: requestOptions } = options ?? {};
313
+
314
+ export type AdminGetJobManifestsQueryResult = NonNullable<Awaited<ReturnType<typeof adminGetJobManifests>>>
315
+ export type AdminGetJobManifestsQueryError = ErrorType<void | DmError>
316
+
317
+ export const useAdminGetJobManifests = <TData = Awaited<ReturnType<typeof adminGetJobManifests>>, TError = ErrorType<void | DmError>>(
318
+ options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof adminGetJobManifests>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
319
+
320
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
321
+
322
+ const {query: queryOptions, request: requestOptions} = options ?? {}
417
323
 
418
324
  const queryKey = queryOptions?.queryKey ?? getAdminGetJobManifestsQueryKey();
419
325
 
420
- const queryFn: QueryFunction<
421
- Awaited<ReturnType<typeof adminGetJobManifests>>
422
- > = ({ signal }) => adminGetJobManifests(requestOptions, signal);
326
+
423
327
 
424
- const query = useQuery<
425
- Awaited<ReturnType<typeof adminGetJobManifests>>,
426
- TError,
427
- TData
428
- >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {
429
- queryKey: QueryKey;
430
- };
328
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof adminGetJobManifests>>> = ({ signal }) => adminGetJobManifests(requestOptions, signal);
329
+
330
+ const query = useQuery<Awaited<ReturnType<typeof adminGetJobManifests>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
431
331
 
432
332
  query.queryKey = queryKey;
433
333
 
434
334
  return query;
435
- };
335
+ }
436
336
 
437
337
  /**
438
338
  * This endpoint is used to add (or update an existing **Job Manifest**). Manifests are the source of Job definitions. Once added the manifest is inspected and any Jobs it refers to are loaded.
@@ -444,66 +344,48 @@ You will need **admin** rights to use this endpoint
444
344
  * @summary Adds a Job Manifest and triggers the download of its Job Definitions
445
345
  */
446
346
  export const adminJobManifestPut = (
447
- jobManifestPutBodyBody: JobManifestPutBodyBody,
448
- options?: SecondParameter<typeof customInstance>
449
- ) => {
450
- const formData = new FormData();
451
- formData.append("url", jobManifestPutBodyBody.url);
452
- if (jobManifestPutBodyBody.header !== undefined) {
453
- formData.append("header", jobManifestPutBodyBody.header);
454
- }
455
- if (jobManifestPutBodyBody.params !== undefined) {
456
- formData.append("params", jobManifestPutBodyBody.params);
457
- }
458
-
459
- return customInstance<AdminJobManifestLoadPutResponse>(
460
- {
461
- url: `/admin/job-manifest`,
462
- method: "put",
463
- headers: { "Content-Type": "multipart/form-data" },
464
- data: formData,
347
+ jobManifestPutBodyBody: JobManifestPutBodyBody,
348
+ options?: SecondParameter<typeof customInstance>,) => {const formData = new FormData();
349
+ formData.append('url', jobManifestPutBodyBody.url)
350
+ if(jobManifestPutBodyBody.header !== undefined) {
351
+ formData.append('header', jobManifestPutBodyBody.header)
352
+ }
353
+ if(jobManifestPutBodyBody.params !== undefined) {
354
+ formData.append('params', jobManifestPutBodyBody.params)
355
+ }
356
+
357
+ return customInstance<AdminJobManifestLoadPutResponse>(
358
+ {url: `/admin/job-manifest`, method: 'put',
359
+ headers: {'Content-Type': 'multipart/form-data', },
360
+ data: formData
465
361
  },
466
- options
467
- );
468
- };
469
-
470
- export type AdminJobManifestPutMutationResult = NonNullable<
471
- Awaited<ReturnType<typeof adminJobManifestPut>>
472
- >;
473
- export type AdminJobManifestPutMutationBody = JobManifestPutBodyBody;
474
- export type AdminJobManifestPutMutationError = ErrorType<void | DmError>;
475
-
476
- export const useAdminJobManifestPut = <
477
- TError = ErrorType<void | DmError>,
478
- TContext = unknown
479
- >(options?: {
480
- mutation?: UseMutationOptions<
481
- Awaited<ReturnType<typeof adminJobManifestPut>>,
482
- TError,
483
- { data: JobManifestPutBodyBody },
484
- TContext
485
- >;
486
- request?: SecondParameter<typeof customInstance>;
487
- }) => {
488
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
489
-
490
- const mutationFn: MutationFunction<
491
- Awaited<ReturnType<typeof adminJobManifestPut>>,
492
- { data: JobManifestPutBodyBody }
493
- > = (props) => {
494
- const { data } = props ?? {};
495
-
496
- return adminJobManifestPut(data, requestOptions);
497
- };
498
-
499
- return useMutation<
500
- Awaited<ReturnType<typeof adminJobManifestPut>>,
501
- TError,
502
- { data: JobManifestPutBodyBody },
503
- TContext
504
- >(mutationFn, mutationOptions);
505
- };
506
- /**
362
+ options);
363
+ }
364
+
365
+
366
+
367
+ export type AdminJobManifestPutMutationResult = NonNullable<Awaited<ReturnType<typeof adminJobManifestPut>>>
368
+ export type AdminJobManifestPutMutationBody = JobManifestPutBodyBody
369
+ export type AdminJobManifestPutMutationError = ErrorType<void | DmError>
370
+
371
+ export const useAdminJobManifestPut = <TError = ErrorType<void | DmError>,
372
+
373
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof adminJobManifestPut>>, TError,{data: JobManifestPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
374
+ ) => {
375
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
376
+
377
+
378
+
379
+
380
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof adminJobManifestPut>>, {data: JobManifestPutBodyBody}> = (props) => {
381
+ const {data} = props ?? {};
382
+
383
+ return adminJobManifestPut(data,requestOptions)
384
+ }
385
+
386
+ return useMutation<Awaited<ReturnType<typeof adminJobManifestPut>>, TError, {data: JobManifestPutBodyBody}, TContext>(mutationFn, mutationOptions)
387
+ }
388
+ /**
507
389
  * This endpoint is used to trigger the Data Manager to re-inspect the internal **Job Manifest** table and download the manifests and reprocess the related job definitions. This is normally done by an administrator when the Manifest table has been modified or if external job definitions are known to have changed in the referenced repositories.
508
390
 
509
391
  You will need **admin** rights to use this endpoint
@@ -511,58 +393,41 @@ You will need **admin** rights to use this endpoint
511
393
  * @summary Trigger a download of Job Definitions using existing Job Manifests
512
394
  */
513
395
  export const adminJobManifestLoad = (
514
- jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,
515
- options?: SecondParameter<typeof customInstance>
516
- ) => {
517
- const formData = new FormData();
518
- if (jobManifestLoadPutBodyBody.purge !== undefined) {
519
- formData.append("purge", jobManifestLoadPutBodyBody.purge.toString());
520
- }
521
-
522
- return customInstance<AdminJobManifestLoadPutResponse>(
523
- {
524
- url: `/admin/job-manifest/load`,
525
- method: "put",
526
- headers: { "Content-Type": "multipart/form-data" },
527
- data: formData,
396
+ jobManifestLoadPutBodyBody: JobManifestLoadPutBodyBody,
397
+ options?: SecondParameter<typeof customInstance>,) => {const formData = new FormData();
398
+ if(jobManifestLoadPutBodyBody.purge !== undefined) {
399
+ formData.append('purge', jobManifestLoadPutBodyBody.purge.toString())
400
+ }
401
+
402
+ return customInstance<AdminJobManifestLoadPutResponse>(
403
+ {url: `/admin/job-manifest/load`, method: 'put',
404
+ headers: {'Content-Type': 'multipart/form-data', },
405
+ data: formData
528
406
  },
529
- options
530
- );
531
- };
532
-
533
- export type AdminJobManifestLoadMutationResult = NonNullable<
534
- Awaited<ReturnType<typeof adminJobManifestLoad>>
535
- >;
536
- export type AdminJobManifestLoadMutationBody = JobManifestLoadPutBodyBody;
537
- export type AdminJobManifestLoadMutationError = ErrorType<void | DmError>;
538
-
539
- export const useAdminJobManifestLoad = <
540
- TError = ErrorType<void | DmError>,
541
- TContext = unknown
542
- >(options?: {
543
- mutation?: UseMutationOptions<
544
- Awaited<ReturnType<typeof adminJobManifestLoad>>,
545
- TError,
546
- { data: JobManifestLoadPutBodyBody },
547
- TContext
548
- >;
549
- request?: SecondParameter<typeof customInstance>;
550
- }) => {
551
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
552
-
553
- const mutationFn: MutationFunction<
554
- Awaited<ReturnType<typeof adminJobManifestLoad>>,
555
- { data: JobManifestLoadPutBodyBody }
556
- > = (props) => {
557
- const { data } = props ?? {};
558
-
559
- return adminJobManifestLoad(data, requestOptions);
560
- };
561
-
562
- return useMutation<
563
- Awaited<ReturnType<typeof adminJobManifestLoad>>,
564
- TError,
565
- { data: JobManifestLoadPutBodyBody },
566
- TContext
567
- >(mutationFn, mutationOptions);
568
- };
407
+ options);
408
+ }
409
+
410
+
411
+
412
+ export type AdminJobManifestLoadMutationResult = NonNullable<Awaited<ReturnType<typeof adminJobManifestLoad>>>
413
+ export type AdminJobManifestLoadMutationBody = JobManifestLoadPutBodyBody
414
+ export type AdminJobManifestLoadMutationError = ErrorType<void | DmError>
415
+
416
+ export const useAdminJobManifestLoad = <TError = ErrorType<void | DmError>,
417
+
418
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof adminJobManifestLoad>>, TError,{data: JobManifestLoadPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
419
+ ) => {
420
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {}
421
+
422
+
423
+
424
+
425
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof adminJobManifestLoad>>, {data: JobManifestLoadPutBodyBody}> = (props) => {
426
+ const {data} = props ?? {};
427
+
428
+ return adminJobManifestLoad(data,requestOptions)
429
+ }
430
+
431
+ return useMutation<Awaited<ReturnType<typeof adminJobManifestLoad>>, TError, {data: JobManifestLoadPutBodyBody}, TContext>(mutationFn, mutationOptions)
432
+ }
433
+