@squonk/data-manager-client 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/accounting/accounting.cjs +96 -95
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +47 -47
  4. package/accounting/accounting.d.ts +47 -47
  5. package/accounting/accounting.js +102 -101
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +120 -145
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +121 -121
  10. package/admin/admin.d.ts +121 -121
  11. package/admin/admin.js +127 -152
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +39 -43
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +25 -25
  16. package/application/application.d.ts +25 -25
  17. package/application/application.js +42 -46
  18. package/application/application.js.map +1 -1
  19. package/chunk-OYRETEBZ.js +25 -0
  20. package/chunk-OYRETEBZ.js.map +1 -0
  21. package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
  22. package/chunk-RB2KVIEK.cjs.map +1 -0
  23. package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
  24. package/chunk-XYDLYMQ2.js.map +1 -0
  25. package/chunk-ZLY5XEOQ.cjs +25 -0
  26. package/chunk-ZLY5XEOQ.cjs.map +1 -0
  27. package/configuration/configuration.cjs +38 -45
  28. package/configuration/configuration.cjs.map +1 -1
  29. package/configuration/configuration.d.cts +25 -25
  30. package/configuration/configuration.d.ts +25 -25
  31. package/configuration/configuration.js +42 -49
  32. package/configuration/configuration.js.map +1 -1
  33. package/dataset/dataset.cjs +126 -141
  34. package/dataset/dataset.cjs.map +1 -1
  35. package/dataset/dataset.d.cts +102 -102
  36. package/dataset/dataset.d.ts +102 -102
  37. package/dataset/dataset.js +132 -147
  38. package/dataset/dataset.js.map +1 -1
  39. package/digest/digest.cjs +22 -24
  40. package/digest/digest.cjs.map +1 -1
  41. package/digest/digest.d.cts +14 -14
  42. package/digest/digest.d.ts +14 -14
  43. package/digest/digest.js +24 -26
  44. package/digest/digest.js.map +1 -1
  45. package/exchange-rate/exchange-rate.cjs +111 -109
  46. package/exchange-rate/exchange-rate.cjs.map +1 -1
  47. package/exchange-rate/exchange-rate.d.cts +69 -69
  48. package/exchange-rate/exchange-rate.d.ts +69 -69
  49. package/exchange-rate/exchange-rate.js +117 -115
  50. package/exchange-rate/exchange-rate.js.map +1 -1
  51. package/file-and-path/file-and-path.cjs +93 -138
  52. package/file-and-path/file-and-path.cjs.map +1 -1
  53. package/file-and-path/file-and-path.d.cts +102 -102
  54. package/file-and-path/file-and-path.d.ts +102 -102
  55. package/file-and-path/file-and-path.js +105 -150
  56. package/file-and-path/file-and-path.js.map +1 -1
  57. package/index.cjs +80 -102
  58. package/index.cjs.map +1 -1
  59. package/index.d.cts +2401 -2326
  60. package/index.d.ts +2401 -2326
  61. package/index.js +79 -101
  62. package/index.js.map +1 -1
  63. package/instance/instance.cjs +100 -107
  64. package/instance/instance.cjs.map +1 -1
  65. package/instance/instance.d.cts +76 -76
  66. package/instance/instance.d.ts +76 -76
  67. package/instance/instance.js +105 -112
  68. package/instance/instance.js.map +1 -1
  69. package/inventory/inventory.cjs +22 -25
  70. package/inventory/inventory.cjs.map +1 -1
  71. package/inventory/inventory.d.cts +14 -14
  72. package/inventory/inventory.d.ts +14 -14
  73. package/inventory/inventory.js +24 -27
  74. package/inventory/inventory.js.map +1 -1
  75. package/job/job.cjs +55 -67
  76. package/job/job.cjs.map +1 -1
  77. package/job/job.d.cts +36 -36
  78. package/job/job.d.ts +36 -36
  79. package/job/job.js +60 -72
  80. package/job/job.js.map +1 -1
  81. package/metadata/metadata.cjs +61 -59
  82. package/metadata/metadata.cjs.map +1 -1
  83. package/metadata/metadata.d.cts +47 -47
  84. package/metadata/metadata.d.ts +47 -47
  85. package/metadata/metadata.js +65 -63
  86. package/metadata/metadata.js.map +1 -1
  87. package/package.json +13 -16
  88. package/project/project.cjs +165 -186
  89. package/project/project.cjs.map +1 -1
  90. package/project/project.d.cts +157 -157
  91. package/project/project.d.ts +157 -157
  92. package/project/project.js +172 -193
  93. package/project/project.js.map +1 -1
  94. package/src/accounting/accounting.ts +767 -461
  95. package/src/admin/admin.ts +1187 -787
  96. package/src/application/application.ts +377 -231
  97. package/src/configuration/configuration.ts +348 -237
  98. package/src/custom-instance.ts +3 -3
  99. package/src/data-manager-api.schemas.ts +2538 -2492
  100. package/src/dataset/dataset.ts +1199 -792
  101. package/src/digest/digest.ts +198 -122
  102. package/src/exchange-rate/exchange-rate.ts +1088 -612
  103. package/src/file-and-path/file-and-path.ts +869 -616
  104. package/src/index.ts +2 -2
  105. package/src/instance/instance.ts +804 -539
  106. package/src/inventory/inventory.ts +200 -122
  107. package/src/job/job.ts +556 -348
  108. package/src/metadata/metadata.ts +587 -371
  109. package/src/options-mutator.ts +27 -0
  110. package/src/project/project.ts +1576 -1034
  111. package/src/task/task.ts +434 -295
  112. package/src/type/type.ts +180 -126
  113. package/src/user/user.ts +846 -398
  114. package/src/workflow/workflow.ts +1750 -1089
  115. package/task/task.cjs +45 -59
  116. package/task/task.cjs.map +1 -1
  117. package/task/task.d.cts +33 -33
  118. package/task/task.d.ts +33 -33
  119. package/task/task.js +51 -65
  120. package/task/task.js.map +1 -1
  121. package/type/type.cjs +21 -26
  122. package/type/type.cjs.map +1 -1
  123. package/type/type.d.cts +14 -14
  124. package/type/type.d.ts +14 -14
  125. package/type/type.js +24 -29
  126. package/type/type.js.map +1 -1
  127. package/user/user.cjs +114 -80
  128. package/user/user.cjs.map +1 -1
  129. package/user/user.d.cts +107 -48
  130. package/user/user.d.ts +107 -48
  131. package/user/user.js +120 -86
  132. package/user/user.js.map +1 -1
  133. package/workflow/workflow.cjs +179 -193
  134. package/workflow/workflow.cjs.map +1 -1
  135. package/workflow/workflow.d.cts +146 -146
  136. package/workflow/workflow.d.ts +146 -146
  137. package/workflow/workflow.js +187 -201
  138. package/workflow/workflow.js.map +1 -1
  139. package/chunk-EBOQPVLG.js.map +0 -1
  140. package/chunk-TKLTUR4R.cjs.map +0 -1
package/src/job/job.ts CHANGED
@@ -1,6 +1,5 @@
1
- // @ts-nocheck
2
1
  /**
3
- * Generated by orval v7.4.1 🍺
2
+ * Generated by orval v7.10.0 🍺
4
3
  * Do not edit manually.
5
4
  * Dataset Manager API
6
5
  * The Dataset Manager API service.
@@ -9,36 +8,35 @@ A service that allows *registered* users to make **Datasets** and associated **M
9
8
 
10
9
  * OpenAPI spec version: 4.1
11
10
  */
12
- import {
13
- useQuery,
14
- useSuspenseQuery
15
- } from '@tanstack/react-query'
11
+ import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
16
12
  import type {
17
13
  DataTag,
18
14
  DefinedInitialDataOptions,
19
15
  DefinedUseQueryResult,
16
+ QueryClient,
20
17
  QueryFunction,
21
18
  QueryKey,
22
19
  UndefinedInitialDataOptions,
23
20
  UseQueryOptions,
24
21
  UseQueryResult,
25
22
  UseSuspenseQueryOptions,
26
- UseSuspenseQueryResult
27
- } from '@tanstack/react-query'
23
+ UseSuspenseQueryResult,
24
+ } from "@tanstack/react-query";
25
+
28
26
  import type {
29
27
  DmError,
30
28
  GetJobByVersionParams,
31
29
  GetJobParams,
32
30
  GetJobsParams,
33
31
  JobGetResponse,
34
- JobsGetResponse
35
- } from '../data-manager-api.schemas'
36
- import { customInstance } from '.././custom-instance';
37
- import type { ErrorType } from '.././custom-instance';
38
-
32
+ JobsGetResponse,
33
+ } from "../data-manager-api.schemas";
39
34
 
40
- type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
35
+ import { customInstance } from ".././custom-instance";
36
+ import type { ErrorType } from ".././custom-instance";
37
+ import { queryMutator } from ".././options-mutator";
41
38
 
39
+ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
42
40
 
43
41
  /**
44
42
  * Get a list of all Jobs available to you that can be instantiated via the `/instance` endpoint.
@@ -48,144 +46,208 @@ Job availability will vary as Jobs are added to the service.
48
46
  * @summary Get all Jobs available to you
49
47
  */
50
48
  export const getJobs = (
51
- params?: GetJobsParams,
52
- options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
49
+ params?: GetJobsParams,
50
+ options?: SecondParameter<typeof customInstance>,
51
+ signal?: AbortSignal,
53
52
  ) => {
54
-
55
-
56
- return customInstance<JobsGetResponse>(
57
- {url: `/job`, method: 'GET',
58
- params, signal
59
- },
60
- options);
61
- }
62
-
63
-
64
- export const getGetJobsQueryKey = (params?: GetJobsParams,) => {
65
- return ["data-manager-api", `/job`, ...(params ? [params]: [])] as const;
66
- }
67
-
68
-
69
- export const getGetJobsQueryOptions = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
53
+ return customInstance<JobsGetResponse>({ url: `/job`, method: "GET", params, signal }, options);
54
+ };
55
+
56
+ export const getGetJobsQueryKey = (params?: GetJobsParams) => {
57
+ return [`/job`, ...(params ? [params] : [])] as const;
58
+ };
59
+
60
+ export const useGetJobsQueryOptions = <
61
+ TData = Awaited<ReturnType<typeof getJobs>>,
62
+ TError = ErrorType<DmError>,
63
+ >(
64
+ params?: GetJobsParams,
65
+ options?: {
66
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
67
+ request?: SecondParameter<typeof customInstance>;
68
+ },
70
69
  ) => {
70
+ const { query: queryOptions, request: requestOptions } = options ?? {};
71
71
 
72
- const {query: queryOptions, request: requestOptions} = options ?? {};
73
-
74
- const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);
75
-
76
-
72
+ const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);
77
73
 
78
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) => getJobs(params, requestOptions, signal);
74
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) =>
75
+ getJobs(params, requestOptions, signal);
79
76
 
80
-
81
-
82
-
83
-
84
- return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
85
- }
77
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
86
78
 
87
- export type GetJobsQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>
88
- export type GetJobsQueryError = ErrorType<DmError>
79
+ return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & {
80
+ queryKey: DataTag<QueryKey, TData, TError>;
81
+ };
82
+ };
89
83
 
84
+ export type GetJobsQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>;
85
+ export type GetJobsQueryError = ErrorType<DmError>;
90
86
 
91
- export function useGetJobs<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
92
- params: undefined | GetJobsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>> & Pick<
87
+ export function useGetJobs<
88
+ TData = Awaited<ReturnType<typeof getJobs>>,
89
+ TError = ErrorType<DmError>,
90
+ >(
91
+ params: undefined | GetJobsParams,
92
+ options: {
93
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>> &
94
+ Pick<
93
95
  DefinedInitialDataOptions<
94
96
  Awaited<ReturnType<typeof getJobs>>,
95
97
  TError,
96
- TData
97
- > , 'initialData'
98
- >, request?: SecondParameter<typeof customInstance>}
99
-
100
- ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
101
- export function useGetJobs<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
102
- params?: GetJobsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>> & Pick<
98
+ Awaited<ReturnType<typeof getJobs>>
99
+ >,
100
+ "initialData"
101
+ >;
102
+ request?: SecondParameter<typeof customInstance>;
103
+ },
104
+ queryClient?: QueryClient,
105
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
106
+ export function useGetJobs<
107
+ TData = Awaited<ReturnType<typeof getJobs>>,
108
+ TError = ErrorType<DmError>,
109
+ >(
110
+ params?: GetJobsParams,
111
+ options?: {
112
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>> &
113
+ Pick<
103
114
  UndefinedInitialDataOptions<
104
115
  Awaited<ReturnType<typeof getJobs>>,
105
116
  TError,
106
- TData
107
- > , 'initialData'
108
- >, request?: SecondParameter<typeof customInstance>}
109
-
110
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
111
- export function useGetJobs<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
112
- params?: GetJobsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
113
-
114
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
117
+ Awaited<ReturnType<typeof getJobs>>
118
+ >,
119
+ "initialData"
120
+ >;
121
+ request?: SecondParameter<typeof customInstance>;
122
+ },
123
+ queryClient?: QueryClient,
124
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
125
+ export function useGetJobs<
126
+ TData = Awaited<ReturnType<typeof getJobs>>,
127
+ TError = ErrorType<DmError>,
128
+ >(
129
+ params?: GetJobsParams,
130
+ options?: {
131
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
132
+ request?: SecondParameter<typeof customInstance>;
133
+ },
134
+ queryClient?: QueryClient,
135
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
115
136
  /**
116
137
  * @summary Get all Jobs available to you
117
138
  */
118
139
 
119
- export function useGetJobs<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
120
- params?: GetJobsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
121
-
122
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
123
-
124
- const queryOptions = getGetJobsQueryOptions(params,options)
125
-
126
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
127
-
128
- query.queryKey = queryOptions.queryKey ;
140
+ export function useGetJobs<
141
+ TData = Awaited<ReturnType<typeof getJobs>>,
142
+ TError = ErrorType<DmError>,
143
+ >(
144
+ params?: GetJobsParams,
145
+ options?: {
146
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
147
+ request?: SecondParameter<typeof customInstance>;
148
+ },
149
+ queryClient?: QueryClient,
150
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
151
+ const queryOptions = useGetJobsQueryOptions(params, options);
152
+
153
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
154
+ queryKey: DataTag<QueryKey, TData, TError>;
155
+ };
156
+
157
+ query.queryKey = queryOptions.queryKey;
129
158
 
130
159
  return query;
131
160
  }
132
161
 
133
-
134
-
135
- export const getGetJobsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
162
+ export const useGetJobsSuspenseQueryOptions = <
163
+ TData = Awaited<ReturnType<typeof getJobs>>,
164
+ TError = ErrorType<DmError>,
165
+ >(
166
+ params?: GetJobsParams,
167
+ options?: {
168
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
169
+ request?: SecondParameter<typeof customInstance>;
170
+ },
136
171
  ) => {
137
-
138
- const {query: queryOptions, request: requestOptions} = options ?? {};
139
-
140
- const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);
141
-
142
-
143
-
144
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) => getJobs(params, requestOptions, signal);
145
-
146
-
147
-
148
-
149
-
150
- return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
151
- }
152
-
153
- export type GetJobsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>
154
- export type GetJobsSuspenseQueryError = ErrorType<DmError>
155
-
156
-
157
- export function useGetJobsSuspense<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
158
- params: undefined | GetJobsParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
159
-
160
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
161
- export function useGetJobsSuspense<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
162
- params?: GetJobsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
163
-
164
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
165
- export function useGetJobsSuspense<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
166
- params?: GetJobsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
167
-
168
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
172
+ const { query: queryOptions, request: requestOptions } = options ?? {};
173
+
174
+ const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);
175
+
176
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) =>
177
+ getJobs(params, requestOptions, signal);
178
+
179
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
180
+
181
+ return customOptions as UseSuspenseQueryOptions<
182
+ Awaited<ReturnType<typeof getJobs>>,
183
+ TError,
184
+ TData
185
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
186
+ };
187
+
188
+ export type GetJobsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>;
189
+ export type GetJobsSuspenseQueryError = ErrorType<DmError>;
190
+
191
+ export function useGetJobsSuspense<
192
+ TData = Awaited<ReturnType<typeof getJobs>>,
193
+ TError = ErrorType<DmError>,
194
+ >(
195
+ params: undefined | GetJobsParams,
196
+ options: {
197
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
198
+ request?: SecondParameter<typeof customInstance>;
199
+ },
200
+ queryClient?: QueryClient,
201
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
202
+ export function useGetJobsSuspense<
203
+ TData = Awaited<ReturnType<typeof getJobs>>,
204
+ TError = ErrorType<DmError>,
205
+ >(
206
+ params?: GetJobsParams,
207
+ options?: {
208
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
209
+ request?: SecondParameter<typeof customInstance>;
210
+ },
211
+ queryClient?: QueryClient,
212
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
213
+ export function useGetJobsSuspense<
214
+ TData = Awaited<ReturnType<typeof getJobs>>,
215
+ TError = ErrorType<DmError>,
216
+ >(
217
+ params?: GetJobsParams,
218
+ options?: {
219
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
220
+ request?: SecondParameter<typeof customInstance>;
221
+ },
222
+ queryClient?: QueryClient,
223
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
169
224
  /**
170
225
  * @summary Get all Jobs available to you
171
226
  */
172
227
 
173
- export function useGetJobsSuspense<TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
174
- params?: GetJobsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
175
-
176
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
177
-
178
- const queryOptions = getGetJobsSuspenseQueryOptions(params,options)
179
-
180
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
181
-
182
- query.queryKey = queryOptions.queryKey ;
228
+ export function useGetJobsSuspense<
229
+ TData = Awaited<ReturnType<typeof getJobs>>,
230
+ TError = ErrorType<DmError>,
231
+ >(
232
+ params?: GetJobsParams,
233
+ options?: {
234
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>>;
235
+ request?: SecondParameter<typeof customInstance>;
236
+ },
237
+ queryClient?: QueryClient,
238
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
239
+ const queryOptions = useGetJobsSuspenseQueryOptions(params, options);
240
+
241
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
242
+ TData,
243
+ TError
244
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
245
+
246
+ query.queryKey = queryOptions.queryKey;
183
247
 
184
248
  return query;
185
249
  }
186
250
 
187
-
188
-
189
251
  /**
190
252
  * Gets a Job based on its **collection**, **job** and **version**.
191
253
 
@@ -194,144 +256,225 @@ Job availability will vary as Jobs are added to the service. Jobs that have been
194
256
  * @summary Get a Job by its version
195
257
  */
196
258
  export const getJobByVersion = (
197
- params: GetJobByVersionParams,
198
- options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
259
+ params: GetJobByVersionParams,
260
+ options?: SecondParameter<typeof customInstance>,
261
+ signal?: AbortSignal,
199
262
  ) => {
200
-
201
-
202
- return customInstance<JobGetResponse>(
203
- {url: `/job/get-by-version`, method: 'GET',
204
- params, signal
205
- },
206
- options);
207
- }
208
-
209
-
210
- export const getGetJobByVersionQueryKey = (params: GetJobByVersionParams,) => {
211
- return ["data-manager-api", `/job/get-by-version`, ...(params ? [params]: [])] as const;
212
- }
213
-
214
-
215
- export const getGetJobByVersionQueryOptions = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
263
+ return customInstance<JobGetResponse>(
264
+ { url: `/job/get-by-version`, method: "GET", params, signal },
265
+ options,
266
+ );
267
+ };
268
+
269
+ export const getGetJobByVersionQueryKey = (params: GetJobByVersionParams) => {
270
+ return [`/job/get-by-version`, ...(params ? [params] : [])] as const;
271
+ };
272
+
273
+ export const useGetJobByVersionQueryOptions = <
274
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
275
+ TError = ErrorType<DmError>,
276
+ >(
277
+ params: GetJobByVersionParams,
278
+ options?: {
279
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>;
280
+ request?: SecondParameter<typeof customInstance>;
281
+ },
216
282
  ) => {
283
+ const { query: queryOptions, request: requestOptions } = options ?? {};
217
284
 
218
- const {query: queryOptions, request: requestOptions} = options ?? {};
219
-
220
- const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);
221
-
222
-
223
-
224
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) => getJobByVersion(params, requestOptions, signal);
285
+ const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);
225
286
 
226
-
287
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) =>
288
+ getJobByVersion(params, requestOptions, signal);
227
289
 
228
-
290
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
229
291
 
230
- return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
231
- }
232
-
233
- export type GetJobByVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>
234
- export type GetJobByVersionQueryError = ErrorType<DmError>
292
+ return customOptions as UseQueryOptions<
293
+ Awaited<ReturnType<typeof getJobByVersion>>,
294
+ TError,
295
+ TData
296
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
297
+ };
235
298
 
299
+ export type GetJobByVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>;
300
+ export type GetJobByVersionQueryError = ErrorType<DmError>;
236
301
 
237
- export function useGetJobByVersion<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
238
- params: GetJobByVersionParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>> & Pick<
302
+ export function useGetJobByVersion<
303
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
304
+ TError = ErrorType<DmError>,
305
+ >(
306
+ params: GetJobByVersionParams,
307
+ options: {
308
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>> &
309
+ Pick<
239
310
  DefinedInitialDataOptions<
240
311
  Awaited<ReturnType<typeof getJobByVersion>>,
241
312
  TError,
242
- TData
243
- > , 'initialData'
244
- >, request?: SecondParameter<typeof customInstance>}
245
-
246
- ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
247
- export function useGetJobByVersion<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
248
- params: GetJobByVersionParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>> & Pick<
313
+ Awaited<ReturnType<typeof getJobByVersion>>
314
+ >,
315
+ "initialData"
316
+ >;
317
+ request?: SecondParameter<typeof customInstance>;
318
+ },
319
+ queryClient?: QueryClient,
320
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
321
+ export function useGetJobByVersion<
322
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
323
+ TError = ErrorType<DmError>,
324
+ >(
325
+ params: GetJobByVersionParams,
326
+ options?: {
327
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>> &
328
+ Pick<
249
329
  UndefinedInitialDataOptions<
250
330
  Awaited<ReturnType<typeof getJobByVersion>>,
251
331
  TError,
252
- TData
253
- > , 'initialData'
254
- >, request?: SecondParameter<typeof customInstance>}
255
-
256
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
257
- export function useGetJobByVersion<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
258
- params: GetJobByVersionParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
259
-
260
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
332
+ Awaited<ReturnType<typeof getJobByVersion>>
333
+ >,
334
+ "initialData"
335
+ >;
336
+ request?: SecondParameter<typeof customInstance>;
337
+ },
338
+ queryClient?: QueryClient,
339
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
340
+ export function useGetJobByVersion<
341
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
342
+ TError = ErrorType<DmError>,
343
+ >(
344
+ params: GetJobByVersionParams,
345
+ options?: {
346
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>;
347
+ request?: SecondParameter<typeof customInstance>;
348
+ },
349
+ queryClient?: QueryClient,
350
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
261
351
  /**
262
352
  * @summary Get a Job by its version
263
353
  */
264
354
 
265
- export function useGetJobByVersion<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
266
- params: GetJobByVersionParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
267
-
268
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
269
-
270
- const queryOptions = getGetJobByVersionQueryOptions(params,options)
271
-
272
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
273
-
274
- query.queryKey = queryOptions.queryKey ;
355
+ export function useGetJobByVersion<
356
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
357
+ TError = ErrorType<DmError>,
358
+ >(
359
+ params: GetJobByVersionParams,
360
+ options?: {
361
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>;
362
+ request?: SecondParameter<typeof customInstance>;
363
+ },
364
+ queryClient?: QueryClient,
365
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
366
+ const queryOptions = useGetJobByVersionQueryOptions(params, options);
367
+
368
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
369
+ queryKey: DataTag<QueryKey, TData, TError>;
370
+ };
371
+
372
+ query.queryKey = queryOptions.queryKey;
275
373
 
276
374
  return query;
277
375
  }
278
376
 
279
-
280
-
281
- export const getGetJobByVersionSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
377
+ export const useGetJobByVersionSuspenseQueryOptions = <
378
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
379
+ TError = ErrorType<DmError>,
380
+ >(
381
+ params: GetJobByVersionParams,
382
+ options?: {
383
+ query?: Partial<
384
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>
385
+ >;
386
+ request?: SecondParameter<typeof customInstance>;
387
+ },
282
388
  ) => {
283
-
284
- const {query: queryOptions, request: requestOptions} = options ?? {};
285
-
286
- const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);
287
-
288
-
289
-
290
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) => getJobByVersion(params, requestOptions, signal);
291
-
292
-
293
-
294
-
295
-
296
- return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
297
- }
298
-
299
- export type GetJobByVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>
300
- export type GetJobByVersionSuspenseQueryError = ErrorType<DmError>
301
-
302
-
303
- export function useGetJobByVersionSuspense<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
304
- params: GetJobByVersionParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
305
-
306
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
307
- export function useGetJobByVersionSuspense<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
308
- params: GetJobByVersionParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
309
-
310
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
311
- export function useGetJobByVersionSuspense<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
312
- params: GetJobByVersionParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
313
-
314
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
389
+ const { query: queryOptions, request: requestOptions } = options ?? {};
390
+
391
+ const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);
392
+
393
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) =>
394
+ getJobByVersion(params, requestOptions, signal);
395
+
396
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
397
+
398
+ return customOptions as UseSuspenseQueryOptions<
399
+ Awaited<ReturnType<typeof getJobByVersion>>,
400
+ TError,
401
+ TData
402
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
403
+ };
404
+
405
+ export type GetJobByVersionSuspenseQueryResult = NonNullable<
406
+ Awaited<ReturnType<typeof getJobByVersion>>
407
+ >;
408
+ export type GetJobByVersionSuspenseQueryError = ErrorType<DmError>;
409
+
410
+ export function useGetJobByVersionSuspense<
411
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
412
+ TError = ErrorType<DmError>,
413
+ >(
414
+ params: GetJobByVersionParams,
415
+ options: {
416
+ query: Partial<
417
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>
418
+ >;
419
+ request?: SecondParameter<typeof customInstance>;
420
+ },
421
+ queryClient?: QueryClient,
422
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
423
+ export function useGetJobByVersionSuspense<
424
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
425
+ TError = ErrorType<DmError>,
426
+ >(
427
+ params: GetJobByVersionParams,
428
+ options?: {
429
+ query?: Partial<
430
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>
431
+ >;
432
+ request?: SecondParameter<typeof customInstance>;
433
+ },
434
+ queryClient?: QueryClient,
435
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
436
+ export function useGetJobByVersionSuspense<
437
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
438
+ TError = ErrorType<DmError>,
439
+ >(
440
+ params: GetJobByVersionParams,
441
+ options?: {
442
+ query?: Partial<
443
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>
444
+ >;
445
+ request?: SecondParameter<typeof customInstance>;
446
+ },
447
+ queryClient?: QueryClient,
448
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
315
449
  /**
316
450
  * @summary Get a Job by its version
317
451
  */
318
452
 
319
- export function useGetJobByVersionSuspense<TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
320
- params: GetJobByVersionParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
321
-
322
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
323
-
324
- const queryOptions = getGetJobByVersionSuspenseQueryOptions(params,options)
325
-
326
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
327
-
328
- query.queryKey = queryOptions.queryKey ;
453
+ export function useGetJobByVersionSuspense<
454
+ TData = Awaited<ReturnType<typeof getJobByVersion>>,
455
+ TError = ErrorType<DmError>,
456
+ >(
457
+ params: GetJobByVersionParams,
458
+ options?: {
459
+ query?: Partial<
460
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>
461
+ >;
462
+ request?: SecondParameter<typeof customInstance>;
463
+ },
464
+ queryClient?: QueryClient,
465
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
466
+ const queryOptions = useGetJobByVersionSuspenseQueryOptions(params, options);
467
+
468
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
469
+ TData,
470
+ TError
471
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
472
+
473
+ query.queryKey = queryOptions.queryKey;
329
474
 
330
475
  return query;
331
476
  }
332
477
 
333
-
334
-
335
478
  /**
336
479
  * Get details of a specific Job available to you that can be instantiated.
337
480
 
@@ -340,153 +483,218 @@ To run a job you need to use the `/instance` endpoint. The Job is controlled thr
340
483
  * @summary Get details of a specific Job
341
484
  */
342
485
  export const getJob = (
343
- jobId: number,
344
- params?: GetJobParams,
345
- options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
486
+ jobId: number,
487
+ params?: GetJobParams,
488
+ options?: SecondParameter<typeof customInstance>,
489
+ signal?: AbortSignal,
346
490
  ) => {
347
-
348
-
349
- return customInstance<JobGetResponse>(
350
- {url: `/job/${jobId}`, method: 'GET',
351
- params, signal
352
- },
353
- options);
354
- }
355
-
356
-
357
- export const getGetJobQueryKey = (jobId: number,
358
- params?: GetJobParams,) => {
359
- return ["data-manager-api", `/job/${jobId}`, ...(params ? [params]: [])] as const;
360
- }
361
-
362
-
363
- export const getGetJobQueryOptions = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(jobId: number,
364
- params?: GetJobParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
491
+ return customInstance<JobGetResponse>(
492
+ { url: `/job/${jobId}`, method: "GET", params, signal },
493
+ options,
494
+ );
495
+ };
496
+
497
+ export const getGetJobQueryKey = (jobId: number, params?: GetJobParams) => {
498
+ return [`/job/${jobId}`, ...(params ? [params] : [])] as const;
499
+ };
500
+
501
+ export const useGetJobQueryOptions = <
502
+ TData = Awaited<ReturnType<typeof getJob>>,
503
+ TError = ErrorType<void | DmError>,
504
+ >(
505
+ jobId: number,
506
+ params?: GetJobParams,
507
+ options?: {
508
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
509
+ request?: SecondParameter<typeof customInstance>;
510
+ },
365
511
  ) => {
512
+ const { query: queryOptions, request: requestOptions } = options ?? {};
366
513
 
367
- const {query: queryOptions, request: requestOptions} = options ?? {};
368
-
369
- const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId,params);
514
+ const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId, params);
370
515
 
371
-
516
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) =>
517
+ getJob(jobId, params, requestOptions, signal);
372
518
 
373
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) => getJob(jobId,params, requestOptions, signal);
519
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
374
520
 
375
-
521
+ return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & {
522
+ queryKey: DataTag<QueryKey, TData, TError>;
523
+ };
524
+ };
376
525
 
377
-
526
+ export type GetJobQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>;
527
+ export type GetJobQueryError = ErrorType<void | DmError>;
378
528
 
379
- return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
380
- }
381
-
382
- export type GetJobQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>
383
- export type GetJobQueryError = ErrorType<void | DmError>
384
-
385
-
386
- export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
387
- jobId: number,
388
- params: undefined | GetJobParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>> & Pick<
529
+ export function useGetJob<
530
+ TData = Awaited<ReturnType<typeof getJob>>,
531
+ TError = ErrorType<void | DmError>,
532
+ >(
533
+ jobId: number,
534
+ params: undefined | GetJobParams,
535
+ options: {
536
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>> &
537
+ Pick<
389
538
  DefinedInitialDataOptions<
390
539
  Awaited<ReturnType<typeof getJob>>,
391
540
  TError,
392
- TData
393
- > , 'initialData'
394
- >, request?: SecondParameter<typeof customInstance>}
395
-
396
- ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
397
- export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
398
- jobId: number,
399
- params?: GetJobParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>> & Pick<
541
+ Awaited<ReturnType<typeof getJob>>
542
+ >,
543
+ "initialData"
544
+ >;
545
+ request?: SecondParameter<typeof customInstance>;
546
+ },
547
+ queryClient?: QueryClient,
548
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
549
+ export function useGetJob<
550
+ TData = Awaited<ReturnType<typeof getJob>>,
551
+ TError = ErrorType<void | DmError>,
552
+ >(
553
+ jobId: number,
554
+ params?: GetJobParams,
555
+ options?: {
556
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>> &
557
+ Pick<
400
558
  UndefinedInitialDataOptions<
401
559
  Awaited<ReturnType<typeof getJob>>,
402
560
  TError,
403
- TData
404
- > , 'initialData'
405
- >, request?: SecondParameter<typeof customInstance>}
406
-
407
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
408
- export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
409
- jobId: number,
410
- params?: GetJobParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
411
-
412
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
561
+ Awaited<ReturnType<typeof getJob>>
562
+ >,
563
+ "initialData"
564
+ >;
565
+ request?: SecondParameter<typeof customInstance>;
566
+ },
567
+ queryClient?: QueryClient,
568
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
569
+ export function useGetJob<
570
+ TData = Awaited<ReturnType<typeof getJob>>,
571
+ TError = ErrorType<void | DmError>,
572
+ >(
573
+ jobId: number,
574
+ params?: GetJobParams,
575
+ options?: {
576
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
577
+ request?: SecondParameter<typeof customInstance>;
578
+ },
579
+ queryClient?: QueryClient,
580
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
413
581
  /**
414
582
  * @summary Get details of a specific Job
415
583
  */
416
584
 
417
- export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
418
- jobId: number,
419
- params?: GetJobParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
420
-
421
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
422
-
423
- const queryOptions = getGetJobQueryOptions(jobId,params,options)
424
-
425
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
426
-
427
- query.queryKey = queryOptions.queryKey ;
585
+ export function useGetJob<
586
+ TData = Awaited<ReturnType<typeof getJob>>,
587
+ TError = ErrorType<void | DmError>,
588
+ >(
589
+ jobId: number,
590
+ params?: GetJobParams,
591
+ options?: {
592
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
593
+ request?: SecondParameter<typeof customInstance>;
594
+ },
595
+ queryClient?: QueryClient,
596
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
597
+ const queryOptions = useGetJobQueryOptions(jobId, params, options);
598
+
599
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
600
+ queryKey: DataTag<QueryKey, TData, TError>;
601
+ };
602
+
603
+ query.queryKey = queryOptions.queryKey;
428
604
 
429
605
  return query;
430
606
  }
431
607
 
432
-
433
-
434
- export const getGetJobSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(jobId: number,
435
- params?: GetJobParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
608
+ export const useGetJobSuspenseQueryOptions = <
609
+ TData = Awaited<ReturnType<typeof getJob>>,
610
+ TError = ErrorType<void | DmError>,
611
+ >(
612
+ jobId: number,
613
+ params?: GetJobParams,
614
+ options?: {
615
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
616
+ request?: SecondParameter<typeof customInstance>;
617
+ },
436
618
  ) => {
437
-
438
- const {query: queryOptions, request: requestOptions} = options ?? {};
439
-
440
- const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId,params);
441
-
442
-
443
-
444
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) => getJob(jobId,params, requestOptions, signal);
445
-
446
-
447
-
448
-
449
-
450
- return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
451
- }
452
-
453
- export type GetJobSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>
454
- export type GetJobSuspenseQueryError = ErrorType<void | DmError>
455
-
456
-
457
- export function useGetJobSuspense<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
458
- jobId: number,
459
- params: undefined | GetJobParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
460
-
461
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
462
- export function useGetJobSuspense<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
463
- jobId: number,
464
- params?: GetJobParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
465
-
466
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
467
- export function useGetJobSuspense<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
468
- jobId: number,
469
- params?: GetJobParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
470
-
471
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
619
+ const { query: queryOptions, request: requestOptions } = options ?? {};
620
+
621
+ const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId, params);
622
+
623
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) =>
624
+ getJob(jobId, params, requestOptions, signal);
625
+
626
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
627
+
628
+ return customOptions as UseSuspenseQueryOptions<
629
+ Awaited<ReturnType<typeof getJob>>,
630
+ TError,
631
+ TData
632
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
633
+ };
634
+
635
+ export type GetJobSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>;
636
+ export type GetJobSuspenseQueryError = ErrorType<void | DmError>;
637
+
638
+ export function useGetJobSuspense<
639
+ TData = Awaited<ReturnType<typeof getJob>>,
640
+ TError = ErrorType<void | DmError>,
641
+ >(
642
+ jobId: number,
643
+ params: undefined | GetJobParams,
644
+ options: {
645
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
646
+ request?: SecondParameter<typeof customInstance>;
647
+ },
648
+ queryClient?: QueryClient,
649
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
650
+ export function useGetJobSuspense<
651
+ TData = Awaited<ReturnType<typeof getJob>>,
652
+ TError = ErrorType<void | DmError>,
653
+ >(
654
+ jobId: number,
655
+ params?: GetJobParams,
656
+ options?: {
657
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
658
+ request?: SecondParameter<typeof customInstance>;
659
+ },
660
+ queryClient?: QueryClient,
661
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
662
+ export function useGetJobSuspense<
663
+ TData = Awaited<ReturnType<typeof getJob>>,
664
+ TError = ErrorType<void | DmError>,
665
+ >(
666
+ jobId: number,
667
+ params?: GetJobParams,
668
+ options?: {
669
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
670
+ request?: SecondParameter<typeof customInstance>;
671
+ },
672
+ queryClient?: QueryClient,
673
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
472
674
  /**
473
675
  * @summary Get details of a specific Job
474
676
  */
475
677
 
476
- export function useGetJobSuspense<TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
477
- jobId: number,
478
- params?: GetJobParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
479
-
480
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
481
-
482
- const queryOptions = getGetJobSuspenseQueryOptions(jobId,params,options)
483
-
484
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
485
-
486
- query.queryKey = queryOptions.queryKey ;
678
+ export function useGetJobSuspense<
679
+ TData = Awaited<ReturnType<typeof getJob>>,
680
+ TError = ErrorType<void | DmError>,
681
+ >(
682
+ jobId: number,
683
+ params?: GetJobParams,
684
+ options?: {
685
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>;
686
+ request?: SecondParameter<typeof customInstance>;
687
+ },
688
+ queryClient?: QueryClient,
689
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
690
+ const queryOptions = useGetJobSuspenseQueryOptions(jobId, params, options);
691
+
692
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
693
+ TData,
694
+ TError
695
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
696
+
697
+ query.queryKey = queryOptions.queryKey;
487
698
 
488
699
  return query;
489
700
  }
490
-
491
-
492
-