@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
package/src/job/job.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v6.15.0 🍺
2
+ * Generated by orval v6.20.0 🍺
3
3
  * Do not edit manually.
4
4
  * Dataset Manager API
5
5
  * The Dataset Manager API service.
@@ -8,32 +8,36 @@ A service that allows *registered* users to make **Datasets** and associated **M
8
8
 
9
9
  * OpenAPI spec version: 1.2
10
10
  */
11
- import { useQuery } from "@tanstack/react-query";
11
+ import {
12
+ useQuery
13
+ } from '@tanstack/react-query'
12
14
  import type {
13
- UseQueryOptions,
14
15
  QueryFunction,
15
- UseQueryResult,
16
16
  QueryKey,
17
- } from "@tanstack/react-query";
17
+ UseQueryOptions,
18
+ UseQueryResult
19
+ } from '@tanstack/react-query'
18
20
  import type {
19
- JobsGetResponse,
20
21
  DmError,
21
- GetJobsParams,
22
- JobGetResponse,
23
22
  GetJobByVersionParams,
24
23
  GetJobParams,
25
- } from "../data-manager-api.schemas";
26
- import { customInstance } from ".././custom-instance";
27
- import type { ErrorType } from ".././custom-instance";
24
+ GetJobsParams,
25
+ JobGetResponse,
26
+ JobsGetResponse
27
+ } from '../data-manager-api.schemas'
28
+ import { customInstance } from '.././custom-instance';
29
+ import type { ErrorType } from '.././custom-instance';
30
+
28
31
 
29
32
  // eslint-disable-next-line
30
- type SecondParameter<T extends (...args: any) => any> = T extends (
33
+ type SecondParameter<T extends (...args: any) => any> = T extends (
31
34
  config: any,
32
- args: infer P
35
+ args: infer P,
33
36
  ) => any
34
37
  ? P
35
38
  : never;
36
39
 
40
+
37
41
  /**
38
42
  * Get a list of all Jobs available to you that can be instantiated via the `/instance` endpoint.
39
43
 
@@ -42,67 +46,64 @@ Job availability will vary as Jobs are added to the service.
42
46
  * @summary Get all Jobs available to you
43
47
  */
44
48
  export const getJobs = (
45
- params?: GetJobsParams,
46
- options?: SecondParameter<typeof customInstance>,
47
- signal?: AbortSignal
49
+ params?: GetJobsParams,
50
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
51
+ ) => {
52
+
53
+
54
+ return customInstance<JobsGetResponse>(
55
+ {url: `/job`, method: 'get',
56
+ params, signal
57
+ },
58
+ options);
59
+ }
60
+
61
+
62
+ export const getGetJobsQueryKey = (params?: GetJobsParams,) => {
63
+
64
+ return ["data-manager-api", `/job`, ...(params ? [params]: [])] as const;
65
+ }
66
+
67
+
68
+ export const getGetJobsQueryOptions = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(params?: GetJobsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
48
69
  ) => {
49
- return customInstance<JobsGetResponse>(
50
- { url: `/job`, method: "get", params, signal },
51
- options
52
- );
53
- };
54
-
55
- export const getGetJobsQueryKey = (params?: GetJobsParams) =>
56
- ["data-manager-api", `/job`, ...(params ? [params] : [])] as const;
57
-
58
- export const getGetJobsQueryOptions = <
59
- TData = Awaited<ReturnType<typeof getJobs>>,
60
- TError = ErrorType<DmError>
61
- >(
62
- params?: GetJobsParams,
63
- options?: {
64
- query?: UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>;
65
- request?: SecondParameter<typeof customInstance>;
66
- }
67
- ): UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & {
68
- queryKey: QueryKey;
69
- } => {
70
- const { query: queryOptions, request: requestOptions } = options ?? {};
71
-
72
- const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);
73
-
74
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({
75
- signal,
76
- }) => getJobs(params, requestOptions, signal);
77
-
78
- return { queryKey, queryFn, ...queryOptions };
79
- };
80
-
81
- export type GetJobsQueryResult = NonNullable<
82
- Awaited<ReturnType<typeof getJobs>>
83
- >;
84
- export type GetJobsQueryError = ErrorType<DmError>;
85
-
86
- export const useGetJobs = <
87
- TData = Awaited<ReturnType<typeof getJobs>>,
88
- TError = ErrorType<DmError>
89
- >(
90
- params?: GetJobsParams,
91
- options?: {
92
- query?: UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>;
93
- request?: SecondParameter<typeof customInstance>;
94
- }
95
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
96
- const queryOptions = getGetJobsQueryOptions(params, options);
97
-
98
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
99
- queryKey: QueryKey;
100
- };
101
-
102
- query.queryKey = queryOptions.queryKey;
70
+
71
+ const {query: queryOptions, request: requestOptions} = options ?? {};
72
+
73
+ const queryKey = queryOptions?.queryKey ?? getGetJobsQueryKey(params);
74
+
75
+
76
+
77
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobs>>> = ({ signal }) => getJobs(params, requestOptions, signal);
78
+
79
+
80
+
81
+
82
+
83
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData> & { queryKey: QueryKey }
84
+ }
85
+
86
+ export type GetJobsQueryResult = NonNullable<Awaited<ReturnType<typeof getJobs>>>
87
+ export type GetJobsQueryError = ErrorType<DmError>
88
+
89
+ /**
90
+ * @summary Get all Jobs available to you
91
+ */
92
+ export const useGetJobs = <TData = Awaited<ReturnType<typeof getJobs>>, TError = ErrorType<DmError>>(
93
+ params?: GetJobsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobs>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
94
+
95
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
96
+
97
+ const queryOptions = getGetJobsQueryOptions(params,options)
98
+
99
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
100
+
101
+ query.queryKey = queryOptions.queryKey ;
103
102
 
104
103
  return query;
105
- };
104
+ }
105
+
106
+
106
107
 
107
108
  /**
108
109
  * Gets a Job based on its **collection**, **job** and **version**.
@@ -112,77 +113,64 @@ Job availability will vary as Jobs are added to the service. Jobs that have been
112
113
  * @summary Get a Job by its version
113
114
  */
114
115
  export const getJobByVersion = (
115
- params: GetJobByVersionParams,
116
- options?: SecondParameter<typeof customInstance>,
117
- signal?: AbortSignal
116
+ params: GetJobByVersionParams,
117
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
118
118
  ) => {
119
- return customInstance<JobGetResponse>(
120
- { url: `/job/get-by-version`, method: "get", params, signal },
121
- options
122
- );
123
- };
124
-
125
- export const getGetJobByVersionQueryKey = (params: GetJobByVersionParams) =>
126
- ["data-manager-api", `/job/get-by-version`, ...(params ? [params] : [])] as const;
127
-
128
- export const getGetJobByVersionQueryOptions = <
129
- TData = Awaited<ReturnType<typeof getJobByVersion>>,
130
- TError = ErrorType<DmError>
131
- >(
132
- params: GetJobByVersionParams,
133
- options?: {
134
- query?: UseQueryOptions<
135
- Awaited<ReturnType<typeof getJobByVersion>>,
136
- TError,
137
- TData
138
- >;
139
- request?: SecondParameter<typeof customInstance>;
140
- }
141
- ): UseQueryOptions<
142
- Awaited<ReturnType<typeof getJobByVersion>>,
143
- TError,
144
- TData
145
- > & { queryKey: QueryKey } => {
146
- const { query: queryOptions, request: requestOptions } = options ?? {};
147
-
148
- const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);
149
-
150
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({
151
- signal,
152
- }) => getJobByVersion(params, requestOptions, signal);
153
-
154
- return { queryKey, queryFn, ...queryOptions };
155
- };
156
-
157
- export type GetJobByVersionQueryResult = NonNullable<
158
- Awaited<ReturnType<typeof getJobByVersion>>
159
- >;
160
- export type GetJobByVersionQueryError = ErrorType<DmError>;
161
-
162
- export const useGetJobByVersion = <
163
- TData = Awaited<ReturnType<typeof getJobByVersion>>,
164
- TError = ErrorType<DmError>
165
- >(
166
- params: GetJobByVersionParams,
167
- options?: {
168
- query?: UseQueryOptions<
169
- Awaited<ReturnType<typeof getJobByVersion>>,
170
- TError,
171
- TData
172
- >;
173
- request?: SecondParameter<typeof customInstance>;
174
- }
175
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
176
- const queryOptions = getGetJobByVersionQueryOptions(params, options);
177
-
178
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
179
- queryKey: QueryKey;
180
- };
181
-
182
- query.queryKey = queryOptions.queryKey;
119
+
120
+
121
+ return customInstance<JobGetResponse>(
122
+ {url: `/job/get-by-version`, method: 'get',
123
+ params, signal
124
+ },
125
+ options);
126
+ }
127
+
128
+
129
+ export const getGetJobByVersionQueryKey = (params: GetJobByVersionParams,) => {
130
+
131
+ return ["data-manager-api", `/job/get-by-version`, ...(params ? [params]: [])] as const;
132
+ }
133
+
134
+
135
+ export const getGetJobByVersionQueryOptions = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(params: GetJobByVersionParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
136
+ ) => {
137
+
138
+ const {query: queryOptions, request: requestOptions} = options ?? {};
139
+
140
+ const queryKey = queryOptions?.queryKey ?? getGetJobByVersionQueryKey(params);
141
+
142
+
143
+
144
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByVersion>>> = ({ signal }) => getJobByVersion(params, requestOptions, signal);
145
+
146
+
147
+
148
+
149
+
150
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData> & { queryKey: QueryKey }
151
+ }
152
+
153
+ export type GetJobByVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getJobByVersion>>>
154
+ export type GetJobByVersionQueryError = ErrorType<DmError>
155
+
156
+ /**
157
+ * @summary Get a Job by its version
158
+ */
159
+ export const useGetJobByVersion = <TData = Awaited<ReturnType<typeof getJobByVersion>>, TError = ErrorType<DmError>>(
160
+ params: GetJobByVersionParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJobByVersion>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
161
+
162
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
163
+
164
+ const queryOptions = getGetJobByVersionQueryOptions(params,options)
165
+
166
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
167
+
168
+ query.queryKey = queryOptions.queryKey ;
183
169
 
184
170
  return query;
185
- };
171
+ }
172
+
173
+
186
174
 
187
175
  /**
188
176
  * Get details of a specific Job available to you that can be instantiated.
@@ -192,65 +180,66 @@ To run a job you need to use the `/instance` endpoint. The Job is controlled thr
192
180
  * @summary Get details of a specific Job
193
181
  */
194
182
  export const getJob = (
195
- jobId: number,
196
- params?: GetJobParams,
197
- options?: SecondParameter<typeof customInstance>,
198
- signal?: AbortSignal
183
+ jobId: number,
184
+ params?: GetJobParams,
185
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
199
186
  ) => {
200
- return customInstance<JobGetResponse>(
201
- { url: `/job/${jobId}`, method: "get", params, signal },
202
- options
203
- );
204
- };
205
-
206
- export const getGetJobQueryKey = (jobId: number, params?: GetJobParams) =>
207
- ["data-manager-api", `/job/${jobId}`, ...(params ? [params] : [])] as const;
208
-
209
- export const getGetJobQueryOptions = <
210
- TData = Awaited<ReturnType<typeof getJob>>,
211
- TError = ErrorType<void | DmError>
212
- >(
213
- jobId: number,
214
- params?: GetJobParams,
215
- options?: {
216
- query?: UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>;
217
- request?: SecondParameter<typeof customInstance>;
218
- }
219
- ): UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & {
220
- queryKey: QueryKey;
221
- } => {
222
- const { query: queryOptions, request: requestOptions } = options ?? {};
223
-
224
- const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId, params);
225
-
226
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({
227
- signal,
228
- }) => getJob(jobId, params, requestOptions, signal);
229
-
230
- return { queryKey, queryFn, enabled: !!jobId, ...queryOptions };
231
- };
232
-
233
- export type GetJobQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>;
234
- export type GetJobQueryError = ErrorType<void | DmError>;
235
-
236
- export const useGetJob = <
237
- TData = Awaited<ReturnType<typeof getJob>>,
238
- TError = ErrorType<void | DmError>
239
- >(
240
- jobId: number,
241
- params?: GetJobParams,
242
- options?: {
243
- query?: UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>;
244
- request?: SecondParameter<typeof customInstance>;
245
- }
246
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
247
- const queryOptions = getGetJobQueryOptions(jobId, params, options);
248
-
249
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
250
- queryKey: QueryKey;
251
- };
252
-
253
- query.queryKey = queryOptions.queryKey;
187
+
188
+
189
+ return customInstance<JobGetResponse>(
190
+ {url: `/job/${jobId}`, method: 'get',
191
+ params, signal
192
+ },
193
+ options);
194
+ }
195
+
196
+
197
+ export const getGetJobQueryKey = (jobId: number,
198
+ params?: GetJobParams,) => {
199
+
200
+ return ["data-manager-api", `/job/${jobId}`, ...(params ? [params]: [])] as const;
201
+ }
202
+
203
+
204
+ export const getGetJobQueryOptions = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(jobId: number,
205
+ params?: GetJobParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
206
+ ) => {
207
+
208
+ const {query: queryOptions, request: requestOptions} = options ?? {};
209
+
210
+ const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId,params);
211
+
212
+
213
+
214
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) => getJob(jobId,params, requestOptions, signal);
215
+
216
+
217
+
218
+
219
+
220
+ return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & { queryKey: QueryKey }
221
+ }
222
+
223
+ export type GetJobQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>
224
+ export type GetJobQueryError = ErrorType<void | DmError>
225
+
226
+ /**
227
+ * @summary Get details of a specific Job
228
+ */
229
+ export const useGetJob = <TData = Awaited<ReturnType<typeof getJob>>, TError = ErrorType<void | DmError>>(
230
+ jobId: number,
231
+ params?: GetJobParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
232
+
233
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
234
+
235
+ const queryOptions = getGetJobQueryOptions(jobId,params,options)
236
+
237
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
238
+
239
+ query.queryKey = queryOptions.queryKey ;
254
240
 
255
241
  return query;
256
- };
242
+ }
243
+
244
+
245
+