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

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-3d66fe97.d.ts} +826 -826
  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 +941 -942
  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
@@ -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,37 +8,42 @@ 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
- InstancePostResponse,
22
24
  DmError,
23
- InstancePostBodyBody,
24
- InstancesGetResponse,
25
25
  GetInstancesParams,
26
26
  InstanceDryRunPostResponse,
27
27
  InstanceGetResponse,
28
- InstanceDeleteResponse,
28
+ InstancePostBodyBody,
29
+ InstancePostResponse,
30
+ InstancesGetResponse,
29
31
  PatchInstanceParams,
30
- } from "../data-manager-api.schemas";
31
- import { customInstance } from ".././custom-instance";
32
- import type { ErrorType } from ".././custom-instance";
32
+ TaskIdentity
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;
41
45
 
46
+
42
47
  /**
43
48
  * Launches a new Application or Job instance, returning an Instance and Task ID. The Task ID should be used against the `/task` endpoint to determine the availability of the the running instance.
44
49
 
@@ -51,180 +56,145 @@ A Job instance typically runs to completion, reaching the **TaskState** _SUCCESS
51
56
  * @summary Creates a new Job or Application instance
52
57
  */
53
58
  export const createInstance = (
54
- instancePostBodyBody: InstancePostBodyBody,
55
- options?: SecondParameter<typeof customInstance>
56
- ) => {
57
- const formData = new FormData();
58
- formData.append("application_id", instancePostBodyBody.application_id);
59
- if (instancePostBodyBody.application_version !== undefined) {
60
- formData.append(
61
- "application_version",
62
- instancePostBodyBody.application_version
63
- );
64
- }
65
- formData.append("project_id", instancePostBodyBody.project_id);
66
- formData.append("as_name", instancePostBodyBody.as_name);
67
- if (instancePostBodyBody.callback_url !== undefined) {
68
- formData.append("callback_url", instancePostBodyBody.callback_url);
69
- }
70
- if (instancePostBodyBody.callback_context !== undefined) {
71
- formData.append("callback_context", instancePostBodyBody.callback_context);
72
- }
73
- if (instancePostBodyBody.generate_callback_token !== undefined) {
74
- formData.append(
75
- "generate_callback_token",
76
- instancePostBodyBody.generate_callback_token.toString()
77
- );
78
- }
79
- if (instancePostBodyBody.callback_token !== undefined) {
80
- formData.append("callback_token", instancePostBodyBody.callback_token);
81
- }
82
- if (instancePostBodyBody.debug !== undefined) {
83
- formData.append("debug", instancePostBodyBody.debug);
84
- }
85
- if (instancePostBodyBody.specification !== undefined) {
86
- formData.append("specification", instancePostBodyBody.specification);
87
- }
88
-
89
- return customInstance<InstancePostResponse>(
90
- {
91
- url: `/instance`,
92
- method: "post",
93
- headers: { "Content-Type": "multipart/form-data" },
94
- data: formData,
59
+ instancePostBodyBody: InstancePostBodyBody,
60
+ options?: SecondParameter<typeof customInstance>,) => {
61
+
62
+ const formData = new FormData();
63
+ formData.append('application_id', instancePostBodyBody.application_id)
64
+ if(instancePostBodyBody.application_version !== undefined) {
65
+ formData.append('application_version', instancePostBodyBody.application_version)
66
+ }
67
+ formData.append('project_id', instancePostBodyBody.project_id)
68
+ formData.append('as_name', instancePostBodyBody.as_name)
69
+ if(instancePostBodyBody.callback_url !== undefined) {
70
+ formData.append('callback_url', instancePostBodyBody.callback_url)
71
+ }
72
+ if(instancePostBodyBody.callback_context !== undefined) {
73
+ formData.append('callback_context', instancePostBodyBody.callback_context)
74
+ }
75
+ if(instancePostBodyBody.generate_callback_token !== undefined) {
76
+ formData.append('generate_callback_token', instancePostBodyBody.generate_callback_token.toString())
77
+ }
78
+ if(instancePostBodyBody.callback_token !== undefined) {
79
+ formData.append('callback_token', instancePostBodyBody.callback_token)
80
+ }
81
+ if(instancePostBodyBody.debug !== undefined) {
82
+ formData.append('debug', instancePostBodyBody.debug)
83
+ }
84
+ if(instancePostBodyBody.specification !== undefined) {
85
+ formData.append('specification', instancePostBodyBody.specification)
86
+ }
87
+
88
+ return customInstance<InstancePostResponse>(
89
+ {url: `/instance`, method: 'post',
90
+ headers: {'Content-Type': 'multipart/form-data', },
91
+ data: formData
95
92
  },
96
- options
97
- );
98
- };
99
-
100
- export const getCreateInstanceMutationOptions = <
101
- TError = ErrorType<void | DmError>,
102
- TContext = unknown
103
- >(options?: {
104
- mutation?: UseMutationOptions<
105
- Awaited<ReturnType<typeof createInstance>>,
106
- TError,
107
- { data: InstancePostBodyBody },
108
- TContext
109
- >;
110
- request?: SecondParameter<typeof customInstance>;
111
- }): UseMutationOptions<
112
- Awaited<ReturnType<typeof createInstance>>,
113
- TError,
114
- { data: InstancePostBodyBody },
115
- TContext
116
- > => {
117
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
118
-
119
- const mutationFn: MutationFunction<
120
- Awaited<ReturnType<typeof createInstance>>,
121
- { data: InstancePostBodyBody }
122
- > = (props) => {
123
- const { data } = props ?? {};
124
-
125
- return createInstance(data, requestOptions);
126
- };
127
-
128
- return { mutationFn, ...mutationOptions };
129
- };
130
-
131
- export type CreateInstanceMutationResult = NonNullable<
132
- Awaited<ReturnType<typeof createInstance>>
133
- >;
134
- export type CreateInstanceMutationBody = InstancePostBodyBody;
135
- export type CreateInstanceMutationError = ErrorType<void | DmError>;
136
-
137
- export const useCreateInstance = <
138
- TError = ErrorType<void | DmError>,
139
- TContext = unknown
140
- >(options?: {
141
- mutation?: UseMutationOptions<
142
- Awaited<ReturnType<typeof createInstance>>,
143
- TError,
144
- { data: InstancePostBodyBody },
145
- TContext
146
- >;
147
- request?: SecondParameter<typeof customInstance>;
148
- }) => {
149
- const mutationOptions = getCreateInstanceMutationOptions(options);
150
-
151
- return useMutation(mutationOptions);
152
- };
153
- /**
93
+ options);
94
+ }
95
+
96
+
97
+
98
+ export const getCreateInstanceMutationOptions = <TError = ErrorType<void | DmError>,
99
+
100
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createInstance>>, TError,{data: InstancePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
101
+ ): UseMutationOptions<Awaited<ReturnType<typeof createInstance>>, TError,{data: InstancePostBodyBody}, TContext> => {
102
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
103
+
104
+
105
+
106
+
107
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof createInstance>>, {data: InstancePostBodyBody}> = (props) => {
108
+ const {data} = props ?? {};
109
+
110
+ return createInstance(data,requestOptions)
111
+ }
112
+
113
+
114
+
115
+
116
+ return { mutationFn, ...mutationOptions }}
117
+
118
+ export type CreateInstanceMutationResult = NonNullable<Awaited<ReturnType<typeof createInstance>>>
119
+ export type CreateInstanceMutationBody = InstancePostBodyBody
120
+ export type CreateInstanceMutationError = ErrorType<void | DmError>
121
+
122
+ /**
123
+ * @summary Creates a new Job or Application instance
124
+ */
125
+ export const useCreateInstance = <TError = ErrorType<void | DmError>,
126
+
127
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createInstance>>, TError,{data: InstancePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
128
+ ) => {
129
+
130
+ const mutationOptions = getCreateInstanceMutationOptions(options);
131
+
132
+ return useMutation(mutationOptions);
133
+ }
134
+ /**
154
135
  * Returns a summary of all running instances. Instances can be running as an Application or as a Job. The response will contain an `application_type` field that is either `job` or `application`
155
136
 
156
137
  * @summary Get summary information about all Job and Application instances
157
138
  */
158
139
  export const getInstances = (
159
- params?: GetInstancesParams,
160
- options?: SecondParameter<typeof customInstance>,
161
- signal?: AbortSignal
140
+ params?: GetInstancesParams,
141
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
142
+ ) => {
143
+
144
+
145
+ return customInstance<InstancesGetResponse>(
146
+ {url: `/instance`, method: 'get',
147
+ params, signal
148
+ },
149
+ options);
150
+ }
151
+
152
+
153
+ export const getGetInstancesQueryKey = (params?: GetInstancesParams,) => {
154
+
155
+ return ["data-manager-api", `/instance`, ...(params ? [params]: [])] as const;
156
+ }
157
+
158
+
159
+ export const getGetInstancesQueryOptions = <TData = Awaited<ReturnType<typeof getInstances>>, TError = ErrorType<void | DmError>>(params?: GetInstancesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getInstances>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
162
160
  ) => {
163
- return customInstance<InstancesGetResponse>(
164
- { url: `/instance`, method: "get", params, signal },
165
- options
166
- );
167
- };
168
-
169
- export const getGetInstancesQueryKey = (params?: GetInstancesParams) =>
170
- ["data-manager-api", `/instance`, ...(params ? [params] : [])] as const;
171
-
172
- export const getGetInstancesQueryOptions = <
173
- TData = Awaited<ReturnType<typeof getInstances>>,
174
- TError = ErrorType<void | DmError>
175
- >(
176
- params?: GetInstancesParams,
177
- options?: {
178
- query?: UseQueryOptions<
179
- Awaited<ReturnType<typeof getInstances>>,
180
- TError,
181
- TData
182
- >;
183
- request?: SecondParameter<typeof customInstance>;
184
- }
185
- ): UseQueryOptions<Awaited<ReturnType<typeof getInstances>>, TError, TData> & {
186
- queryKey: QueryKey;
187
- } => {
188
- const { query: queryOptions, request: requestOptions } = options ?? {};
189
-
190
- const queryKey = queryOptions?.queryKey ?? getGetInstancesQueryKey(params);
191
-
192
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getInstances>>> = ({
193
- signal,
194
- }) => getInstances(params, requestOptions, signal);
195
-
196
- return { queryKey, queryFn, ...queryOptions };
197
- };
198
-
199
- export type GetInstancesQueryResult = NonNullable<
200
- Awaited<ReturnType<typeof getInstances>>
201
- >;
202
- export type GetInstancesQueryError = ErrorType<void | DmError>;
203
-
204
- export const useGetInstances = <
205
- TData = Awaited<ReturnType<typeof getInstances>>,
206
- TError = ErrorType<void | DmError>
207
- >(
208
- params?: GetInstancesParams,
209
- options?: {
210
- query?: UseQueryOptions<
211
- Awaited<ReturnType<typeof getInstances>>,
212
- TError,
213
- TData
214
- >;
215
- request?: SecondParameter<typeof customInstance>;
216
- }
217
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
218
- const queryOptions = getGetInstancesQueryOptions(params, options);
219
-
220
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
221
- queryKey: QueryKey;
222
- };
223
-
224
- query.queryKey = queryOptions.queryKey;
161
+
162
+ const {query: queryOptions, request: requestOptions} = options ?? {};
163
+
164
+ const queryKey = queryOptions?.queryKey ?? getGetInstancesQueryKey(params);
165
+
166
+
167
+
168
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getInstances>>> = ({ signal }) => getInstances(params, requestOptions, signal);
169
+
170
+
171
+
172
+
173
+
174
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getInstances>>, TError, TData> & { queryKey: QueryKey }
175
+ }
176
+
177
+ export type GetInstancesQueryResult = NonNullable<Awaited<ReturnType<typeof getInstances>>>
178
+ export type GetInstancesQueryError = ErrorType<void | DmError>
179
+
180
+ /**
181
+ * @summary Get summary information about all Job and Application instances
182
+ */
183
+ export const useGetInstances = <TData = Awaited<ReturnType<typeof getInstances>>, TError = ErrorType<void | DmError>>(
184
+ params?: GetInstancesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getInstances>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
185
+
186
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
187
+
188
+ const queryOptions = getGetInstancesQueryOptions(params,options)
189
+
190
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
191
+
192
+ query.queryKey = queryOptions.queryKey ;
225
193
 
226
194
  return query;
227
- };
195
+ }
196
+
197
+
228
198
 
229
199
  /**
230
200
  * Similar to the `/instance [POST]` endpoint this one is used to check whether a new **Application** or **Job** instance can be launched. Rather than returning an **Instance** (or **Task**) ID this endpoint is simply used to ensure that the Job/Application is runnable while also returning the compiled `command` (if the Instance is a Job).
@@ -234,178 +204,142 @@ The test result is only valid at the time of the call, whether an actual instanc
234
204
  * @summary Used to check the execution of new Job or Application instance
235
205
  */
236
206
  export const dryRunInstance = (
237
- instancePostBodyBody: InstancePostBodyBody,
238
- options?: SecondParameter<typeof customInstance>
239
- ) => {
240
- const formData = new FormData();
241
- formData.append("application_id", instancePostBodyBody.application_id);
242
- if (instancePostBodyBody.application_version !== undefined) {
243
- formData.append(
244
- "application_version",
245
- instancePostBodyBody.application_version
246
- );
247
- }
248
- formData.append("project_id", instancePostBodyBody.project_id);
249
- formData.append("as_name", instancePostBodyBody.as_name);
250
- if (instancePostBodyBody.callback_url !== undefined) {
251
- formData.append("callback_url", instancePostBodyBody.callback_url);
252
- }
253
- if (instancePostBodyBody.callback_context !== undefined) {
254
- formData.append("callback_context", instancePostBodyBody.callback_context);
255
- }
256
- if (instancePostBodyBody.generate_callback_token !== undefined) {
257
- formData.append(
258
- "generate_callback_token",
259
- instancePostBodyBody.generate_callback_token.toString()
260
- );
261
- }
262
- if (instancePostBodyBody.callback_token !== undefined) {
263
- formData.append("callback_token", instancePostBodyBody.callback_token);
264
- }
265
- if (instancePostBodyBody.debug !== undefined) {
266
- formData.append("debug", instancePostBodyBody.debug);
267
- }
268
- if (instancePostBodyBody.specification !== undefined) {
269
- formData.append("specification", instancePostBodyBody.specification);
270
- }
271
-
272
- return customInstance<InstanceDryRunPostResponse>(
273
- {
274
- url: `/instance/dry-run`,
275
- method: "post",
276
- headers: { "Content-Type": "multipart/form-data" },
277
- data: formData,
207
+ instancePostBodyBody: InstancePostBodyBody,
208
+ options?: SecondParameter<typeof customInstance>,) => {
209
+
210
+ const formData = new FormData();
211
+ formData.append('application_id', instancePostBodyBody.application_id)
212
+ if(instancePostBodyBody.application_version !== undefined) {
213
+ formData.append('application_version', instancePostBodyBody.application_version)
214
+ }
215
+ formData.append('project_id', instancePostBodyBody.project_id)
216
+ formData.append('as_name', instancePostBodyBody.as_name)
217
+ if(instancePostBodyBody.callback_url !== undefined) {
218
+ formData.append('callback_url', instancePostBodyBody.callback_url)
219
+ }
220
+ if(instancePostBodyBody.callback_context !== undefined) {
221
+ formData.append('callback_context', instancePostBodyBody.callback_context)
222
+ }
223
+ if(instancePostBodyBody.generate_callback_token !== undefined) {
224
+ formData.append('generate_callback_token', instancePostBodyBody.generate_callback_token.toString())
225
+ }
226
+ if(instancePostBodyBody.callback_token !== undefined) {
227
+ formData.append('callback_token', instancePostBodyBody.callback_token)
228
+ }
229
+ if(instancePostBodyBody.debug !== undefined) {
230
+ formData.append('debug', instancePostBodyBody.debug)
231
+ }
232
+ if(instancePostBodyBody.specification !== undefined) {
233
+ formData.append('specification', instancePostBodyBody.specification)
234
+ }
235
+
236
+ return customInstance<InstanceDryRunPostResponse>(
237
+ {url: `/instance/dry-run`, method: 'post',
238
+ headers: {'Content-Type': 'multipart/form-data', },
239
+ data: formData
278
240
  },
279
- options
280
- );
281
- };
282
-
283
- export const getDryRunInstanceMutationOptions = <
284
- TError = ErrorType<void | DmError>,
285
- TContext = unknown
286
- >(options?: {
287
- mutation?: UseMutationOptions<
288
- Awaited<ReturnType<typeof dryRunInstance>>,
289
- TError,
290
- { data: InstancePostBodyBody },
291
- TContext
292
- >;
293
- request?: SecondParameter<typeof customInstance>;
294
- }): UseMutationOptions<
295
- Awaited<ReturnType<typeof dryRunInstance>>,
296
- TError,
297
- { data: InstancePostBodyBody },
298
- TContext
299
- > => {
300
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
301
-
302
- const mutationFn: MutationFunction<
303
- Awaited<ReturnType<typeof dryRunInstance>>,
304
- { data: InstancePostBodyBody }
305
- > = (props) => {
306
- const { data } = props ?? {};
307
-
308
- return dryRunInstance(data, requestOptions);
309
- };
310
-
311
- return { mutationFn, ...mutationOptions };
312
- };
313
-
314
- export type DryRunInstanceMutationResult = NonNullable<
315
- Awaited<ReturnType<typeof dryRunInstance>>
316
- >;
317
- export type DryRunInstanceMutationBody = InstancePostBodyBody;
318
- export type DryRunInstanceMutationError = ErrorType<void | DmError>;
319
-
320
- export const useDryRunInstance = <
321
- TError = ErrorType<void | DmError>,
322
- TContext = unknown
323
- >(options?: {
324
- mutation?: UseMutationOptions<
325
- Awaited<ReturnType<typeof dryRunInstance>>,
326
- TError,
327
- { data: InstancePostBodyBody },
328
- TContext
329
- >;
330
- request?: SecondParameter<typeof customInstance>;
331
- }) => {
332
- const mutationOptions = getDryRunInstanceMutationOptions(options);
333
-
334
- return useMutation(mutationOptions);
335
- };
336
- /**
241
+ options);
242
+ }
243
+
244
+
245
+
246
+ export const getDryRunInstanceMutationOptions = <TError = ErrorType<void | DmError>,
247
+
248
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dryRunInstance>>, TError,{data: InstancePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
249
+ ): UseMutationOptions<Awaited<ReturnType<typeof dryRunInstance>>, TError,{data: InstancePostBodyBody}, TContext> => {
250
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
251
+
252
+
253
+
254
+
255
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof dryRunInstance>>, {data: InstancePostBodyBody}> = (props) => {
256
+ const {data} = props ?? {};
257
+
258
+ return dryRunInstance(data,requestOptions)
259
+ }
260
+
261
+
262
+
263
+
264
+ return { mutationFn, ...mutationOptions }}
265
+
266
+ export type DryRunInstanceMutationResult = NonNullable<Awaited<ReturnType<typeof dryRunInstance>>>
267
+ export type DryRunInstanceMutationBody = InstancePostBodyBody
268
+ export type DryRunInstanceMutationError = ErrorType<void | DmError>
269
+
270
+ /**
271
+ * @summary Used to check the execution of new Job or Application instance
272
+ */
273
+ export const useDryRunInstance = <TError = ErrorType<void | DmError>,
274
+
275
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dryRunInstance>>, TError,{data: InstancePostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
276
+ ) => {
277
+
278
+ const mutationOptions = getDryRunInstanceMutationOptions(options);
279
+
280
+ return useMutation(mutationOptions);
281
+ }
282
+ /**
337
283
  * @summary Get detailed information about an Instance
338
284
  */
339
285
  export const getInstance = (
340
- instanceId: string,
341
- options?: SecondParameter<typeof customInstance>,
342
- signal?: AbortSignal
286
+ instanceId: string,
287
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
343
288
  ) => {
344
- return customInstance<InstanceGetResponse>(
345
- { url: `/instance/${instanceId}`, method: "get", signal },
346
- options
347
- );
348
- };
349
-
350
- export const getGetInstanceQueryKey = (instanceId: string) =>
351
- ["data-manager-api", `/instance/${instanceId}`] as const;
352
-
353
- export const getGetInstanceQueryOptions = <
354
- TData = Awaited<ReturnType<typeof getInstance>>,
355
- TError = ErrorType<void | DmError>
356
- >(
357
- instanceId: string,
358
- options?: {
359
- query?: UseQueryOptions<
360
- Awaited<ReturnType<typeof getInstance>>,
361
- TError,
362
- TData
363
- >;
364
- request?: SecondParameter<typeof customInstance>;
365
- }
366
- ): UseQueryOptions<Awaited<ReturnType<typeof getInstance>>, TError, TData> & {
367
- queryKey: QueryKey;
368
- } => {
369
- const { query: queryOptions, request: requestOptions } = options ?? {};
370
-
371
- const queryKey = queryOptions?.queryKey ?? getGetInstanceQueryKey(instanceId);
372
-
373
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getInstance>>> = ({
374
- signal,
375
- }) => getInstance(instanceId, requestOptions, signal);
376
-
377
- return { queryKey, queryFn, enabled: !!instanceId, ...queryOptions };
378
- };
379
-
380
- export type GetInstanceQueryResult = NonNullable<
381
- Awaited<ReturnType<typeof getInstance>>
382
- >;
383
- export type GetInstanceQueryError = ErrorType<void | DmError>;
384
-
385
- export const useGetInstance = <
386
- TData = Awaited<ReturnType<typeof getInstance>>,
387
- TError = ErrorType<void | DmError>
388
- >(
389
- instanceId: string,
390
- options?: {
391
- query?: UseQueryOptions<
392
- Awaited<ReturnType<typeof getInstance>>,
393
- TError,
394
- TData
395
- >;
396
- request?: SecondParameter<typeof customInstance>;
397
- }
398
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
399
- const queryOptions = getGetInstanceQueryOptions(instanceId, options);
400
-
401
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
402
- queryKey: QueryKey;
403
- };
404
-
405
- query.queryKey = queryOptions.queryKey;
289
+
290
+
291
+ return customInstance<InstanceGetResponse>(
292
+ {url: `/instance/${instanceId}`, method: 'get', signal
293
+ },
294
+ options);
295
+ }
296
+
297
+
298
+ export const getGetInstanceQueryKey = (instanceId: string,) => {
299
+
300
+ return ["data-manager-api", `/instance/${instanceId}`] as const;
301
+ }
302
+
303
+
304
+ export const getGetInstanceQueryOptions = <TData = Awaited<ReturnType<typeof getInstance>>, TError = ErrorType<void | DmError>>(instanceId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getInstance>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
305
+ ) => {
306
+
307
+ const {query: queryOptions, request: requestOptions} = options ?? {};
308
+
309
+ const queryKey = queryOptions?.queryKey ?? getGetInstanceQueryKey(instanceId);
310
+
311
+
312
+
313
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getInstance>>> = ({ signal }) => getInstance(instanceId, requestOptions, signal);
314
+
315
+
316
+
317
+
318
+
319
+ return { queryKey, queryFn, enabled: !!(instanceId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getInstance>>, TError, TData> & { queryKey: QueryKey }
320
+ }
321
+
322
+ export type GetInstanceQueryResult = NonNullable<Awaited<ReturnType<typeof getInstance>>>
323
+ export type GetInstanceQueryError = ErrorType<void | DmError>
324
+
325
+ /**
326
+ * @summary Get detailed information about an Instance
327
+ */
328
+ export const useGetInstance = <TData = Awaited<ReturnType<typeof getInstance>>, TError = ErrorType<void | DmError>>(
329
+ instanceId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getInstance>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
330
+
331
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
332
+
333
+ const queryOptions = getGetInstanceQueryOptions(instanceId,options)
334
+
335
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
336
+
337
+ query.queryKey = queryOptions.queryKey ;
406
338
 
407
339
  return query;
408
- };
340
+ }
341
+
342
+
409
343
 
410
344
  /**
411
345
  * The Application or Job Instance is terminated.
@@ -415,69 +349,55 @@ You must be the `owner` or an `editor` of the Instance to delete it
415
349
  * @summary Delete a Job or Application Instance
416
350
  */
417
351
  export const terminateInstance = (
418
- instanceId: string,
419
- options?: SecondParameter<typeof customInstance>
352
+ instanceId: string,
353
+ options?: SecondParameter<typeof customInstance>,) => {
354
+
355
+
356
+ return customInstance<TaskIdentity>(
357
+ {url: `/instance/${instanceId}`, method: 'delete'
358
+ },
359
+ options);
360
+ }
361
+
362
+
363
+
364
+ export const getTerminateInstanceMutationOptions = <TError = ErrorType<void | DmError>,
365
+
366
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof terminateInstance>>, TError,{instanceId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
367
+ ): UseMutationOptions<Awaited<ReturnType<typeof terminateInstance>>, TError,{instanceId: string}, TContext> => {
368
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
369
+
370
+
371
+
372
+
373
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof terminateInstance>>, {instanceId: string}> = (props) => {
374
+ const {instanceId} = props ?? {};
375
+
376
+ return terminateInstance(instanceId,requestOptions)
377
+ }
378
+
379
+
380
+
381
+
382
+ return { mutationFn, ...mutationOptions }}
383
+
384
+ export type TerminateInstanceMutationResult = NonNullable<Awaited<ReturnType<typeof terminateInstance>>>
385
+
386
+ export type TerminateInstanceMutationError = ErrorType<void | DmError>
387
+
388
+ /**
389
+ * @summary Delete a Job or Application Instance
390
+ */
391
+ export const useTerminateInstance = <TError = ErrorType<void | DmError>,
392
+
393
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof terminateInstance>>, TError,{instanceId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
420
394
  ) => {
421
- return customInstance<InstanceDeleteResponse>(
422
- { url: `/instance/${instanceId}`, method: "delete" },
423
- options
424
- );
425
- };
426
-
427
- export const getTerminateInstanceMutationOptions = <
428
- TError = ErrorType<void | DmError>,
429
- TContext = unknown
430
- >(options?: {
431
- mutation?: UseMutationOptions<
432
- Awaited<ReturnType<typeof terminateInstance>>,
433
- TError,
434
- { instanceId: string },
435
- TContext
436
- >;
437
- request?: SecondParameter<typeof customInstance>;
438
- }): UseMutationOptions<
439
- Awaited<ReturnType<typeof terminateInstance>>,
440
- TError,
441
- { instanceId: string },
442
- TContext
443
- > => {
444
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
445
-
446
- const mutationFn: MutationFunction<
447
- Awaited<ReturnType<typeof terminateInstance>>,
448
- { instanceId: string }
449
- > = (props) => {
450
- const { instanceId } = props ?? {};
451
-
452
- return terminateInstance(instanceId, requestOptions);
453
- };
454
-
455
- return { mutationFn, ...mutationOptions };
456
- };
457
-
458
- export type TerminateInstanceMutationResult = NonNullable<
459
- Awaited<ReturnType<typeof terminateInstance>>
460
- >;
461
-
462
- export type TerminateInstanceMutationError = ErrorType<void | DmError>;
463
-
464
- export const useTerminateInstance = <
465
- TError = ErrorType<void | DmError>,
466
- TContext = unknown
467
- >(options?: {
468
- mutation?: UseMutationOptions<
469
- Awaited<ReturnType<typeof terminateInstance>>,
470
- TError,
471
- { instanceId: string },
472
- TContext
473
- >;
474
- request?: SecondParameter<typeof customInstance>;
475
- }) => {
476
- const mutationOptions = getTerminateInstanceMutationOptions(options);
477
-
478
- return useMutation(mutationOptions);
479
- };
480
- /**
395
+
396
+ const mutationOptions = getTerminateInstanceMutationOptions(options);
397
+
398
+ return useMutation(mutationOptions);
399
+ }
400
+ /**
481
401
  * The Application or Job Instance is updated according to the patch parameters.
482
402
 
483
403
  You must be the `owner` or an `editor` of the Instance to patch it
@@ -485,70 +405,57 @@ You must be the `owner` or an `editor` of the Instance to patch it
485
405
  * @summary Update a Job or Application Instance
486
406
  */
487
407
  export const patchInstance = (
488
- instanceId: string,
489
- params?: PatchInstanceParams,
490
- options?: SecondParameter<typeof customInstance>
408
+ instanceId: string,
409
+ params?: PatchInstanceParams,
410
+ options?: SecondParameter<typeof customInstance>,) => {
411
+
412
+
413
+ return customInstance<void>(
414
+ {url: `/instance/${instanceId}`, method: 'patch',
415
+ params
416
+ },
417
+ options);
418
+ }
419
+
420
+
421
+
422
+ export const getPatchInstanceMutationOptions = <TError = ErrorType<DmError>,
423
+
424
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchInstance>>, TError,{instanceId: string;params?: PatchInstanceParams}, TContext>, request?: SecondParameter<typeof customInstance>}
425
+ ): UseMutationOptions<Awaited<ReturnType<typeof patchInstance>>, TError,{instanceId: string;params?: PatchInstanceParams}, TContext> => {
426
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
427
+
428
+
429
+
430
+
431
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchInstance>>, {instanceId: string;params?: PatchInstanceParams}> = (props) => {
432
+ const {instanceId,params} = props ?? {};
433
+
434
+ return patchInstance(instanceId,params,requestOptions)
435
+ }
436
+
437
+
438
+
439
+
440
+ return { mutationFn, ...mutationOptions }}
441
+
442
+ export type PatchInstanceMutationResult = NonNullable<Awaited<ReturnType<typeof patchInstance>>>
443
+
444
+ export type PatchInstanceMutationError = ErrorType<DmError>
445
+
446
+ /**
447
+ * @summary Update a Job or Application Instance
448
+ */
449
+ export const usePatchInstance = <TError = ErrorType<DmError>,
450
+
451
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchInstance>>, TError,{instanceId: string;params?: PatchInstanceParams}, TContext>, request?: SecondParameter<typeof customInstance>}
491
452
  ) => {
492
- return customInstance<void>(
493
- { url: `/instance/${instanceId}`, method: "patch", params },
494
- options
495
- );
496
- };
497
-
498
- export const getPatchInstanceMutationOptions = <
499
- TError = ErrorType<DmError>,
500
- TContext = unknown
501
- >(options?: {
502
- mutation?: UseMutationOptions<
503
- Awaited<ReturnType<typeof patchInstance>>,
504
- TError,
505
- { instanceId: string; params?: PatchInstanceParams },
506
- TContext
507
- >;
508
- request?: SecondParameter<typeof customInstance>;
509
- }): UseMutationOptions<
510
- Awaited<ReturnType<typeof patchInstance>>,
511
- TError,
512
- { instanceId: string; params?: PatchInstanceParams },
513
- TContext
514
- > => {
515
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
516
-
517
- const mutationFn: MutationFunction<
518
- Awaited<ReturnType<typeof patchInstance>>,
519
- { instanceId: string; params?: PatchInstanceParams }
520
- > = (props) => {
521
- const { instanceId, params } = props ?? {};
522
-
523
- return patchInstance(instanceId, params, requestOptions);
524
- };
525
-
526
- return { mutationFn, ...mutationOptions };
527
- };
528
-
529
- export type PatchInstanceMutationResult = NonNullable<
530
- Awaited<ReturnType<typeof patchInstance>>
531
- >;
532
-
533
- export type PatchInstanceMutationError = ErrorType<DmError>;
534
-
535
- export const usePatchInstance = <
536
- TError = ErrorType<DmError>,
537
- TContext = unknown
538
- >(options?: {
539
- mutation?: UseMutationOptions<
540
- Awaited<ReturnType<typeof patchInstance>>,
541
- TError,
542
- { instanceId: string; params?: PatchInstanceParams },
543
- TContext
544
- >;
545
- request?: SecondParameter<typeof customInstance>;
546
- }) => {
547
- const mutationOptions = getPatchInstanceMutationOptions(options);
548
-
549
- return useMutation(mutationOptions);
550
- };
551
- /**
453
+
454
+ const mutationOptions = getPatchInstanceMutationOptions(options);
455
+
456
+ return useMutation(mutationOptions);
457
+ }
458
+ /**
552
459
  * This revokes the instance **Token**, which was optionally generated when the instance was launched. No authentication is required to use this endpoint, which is typically used by a remote system driven by instance callbacks.
553
460
 
554
461
  Tokens automatically expire after a period of time but can be revoked instantly with this endpoint.
@@ -558,66 +465,53 @@ The remote system will revoke the token when it's finished with it
558
465
  * @summary Delete (revoke) the Instance Token
559
466
  */
560
467
  export const deleteInstanceToken = (
561
- instanceId: string,
562
- token: string,
563
- options?: SecondParameter<typeof customInstance>
468
+ instanceId: string,
469
+ token: string,
470
+ options?: SecondParameter<typeof customInstance>,) => {
471
+
472
+
473
+ return customInstance<void>(
474
+ {url: `/instance/${instanceId}/token/${token}`, method: 'delete'
475
+ },
476
+ options);
477
+ }
478
+
479
+
480
+
481
+ export const getDeleteInstanceTokenMutationOptions = <TError = ErrorType<DmError>,
482
+
483
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteInstanceToken>>, TError,{instanceId: string;token: string}, TContext>, request?: SecondParameter<typeof customInstance>}
484
+ ): UseMutationOptions<Awaited<ReturnType<typeof deleteInstanceToken>>, TError,{instanceId: string;token: string}, TContext> => {
485
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
486
+
487
+
488
+
489
+
490
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteInstanceToken>>, {instanceId: string;token: string}> = (props) => {
491
+ const {instanceId,token} = props ?? {};
492
+
493
+ return deleteInstanceToken(instanceId,token,requestOptions)
494
+ }
495
+
496
+
497
+
498
+
499
+ return { mutationFn, ...mutationOptions }}
500
+
501
+ export type DeleteInstanceTokenMutationResult = NonNullable<Awaited<ReturnType<typeof deleteInstanceToken>>>
502
+
503
+ export type DeleteInstanceTokenMutationError = ErrorType<DmError>
504
+
505
+ /**
506
+ * @summary Delete (revoke) the Instance Token
507
+ */
508
+ export const useDeleteInstanceToken = <TError = ErrorType<DmError>,
509
+
510
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteInstanceToken>>, TError,{instanceId: string;token: string}, TContext>, request?: SecondParameter<typeof customInstance>}
564
511
  ) => {
565
- return customInstance<void>(
566
- { url: `/instance/${instanceId}/token/${token}`, method: "delete" },
567
- options
568
- );
569
- };
570
-
571
- export const getDeleteInstanceTokenMutationOptions = <
572
- TError = ErrorType<DmError>,
573
- TContext = unknown
574
- >(options?: {
575
- mutation?: UseMutationOptions<
576
- Awaited<ReturnType<typeof deleteInstanceToken>>,
577
- TError,
578
- { instanceId: string; token: string },
579
- TContext
580
- >;
581
- request?: SecondParameter<typeof customInstance>;
582
- }): UseMutationOptions<
583
- Awaited<ReturnType<typeof deleteInstanceToken>>,
584
- TError,
585
- { instanceId: string; token: string },
586
- TContext
587
- > => {
588
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
589
-
590
- const mutationFn: MutationFunction<
591
- Awaited<ReturnType<typeof deleteInstanceToken>>,
592
- { instanceId: string; token: string }
593
- > = (props) => {
594
- const { instanceId, token } = props ?? {};
595
-
596
- return deleteInstanceToken(instanceId, token, requestOptions);
597
- };
598
-
599
- return { mutationFn, ...mutationOptions };
600
- };
601
-
602
- export type DeleteInstanceTokenMutationResult = NonNullable<
603
- Awaited<ReturnType<typeof deleteInstanceToken>>
604
- >;
605
-
606
- export type DeleteInstanceTokenMutationError = ErrorType<DmError>;
607
-
608
- export const useDeleteInstanceToken = <
609
- TError = ErrorType<DmError>,
610
- TContext = unknown
611
- >(options?: {
612
- mutation?: UseMutationOptions<
613
- Awaited<ReturnType<typeof deleteInstanceToken>>,
614
- TError,
615
- { instanceId: string; token: string },
616
- TContext
617
- >;
618
- request?: SecondParameter<typeof customInstance>;
619
- }) => {
620
- const mutationOptions = getDeleteInstanceTokenMutationOptions(options);
621
-
622
- return useMutation(mutationOptions);
623
- };
512
+
513
+ const mutationOptions = getDeleteInstanceTokenMutationOptions(options);
514
+
515
+ return useMutation(mutationOptions);
516
+ }
517
+