@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/user/user.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,334 +8,296 @@ 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
- UsersGetResponse,
22
24
  DmError,
23
- UserAccountGetResponse,
24
25
  GetUserAccountParams,
26
+ GetUserApiLogParams,
27
+ UserAccountDetail,
25
28
  UserAccountPatchBodyBody,
26
29
  UserApiLogGetResponse,
27
- GetUserApiLogParams,
28
- } from "../data-manager-api.schemas";
29
- import { customInstance } from ".././custom-instance";
30
- import type { ErrorType } from ".././custom-instance";
30
+ UsersGetResponse
31
+ } from '../data-manager-api.schemas'
32
+ import { customInstance } from '.././custom-instance';
33
+ import type { ErrorType } from '.././custom-instance';
34
+
31
35
 
32
36
  // eslint-disable-next-line
33
- type SecondParameter<T extends (...args: any) => any> = T extends (
37
+ type SecondParameter<T extends (...args: any) => any> = T extends (
34
38
  config: any,
35
- args: infer P
39
+ args: infer P,
36
40
  ) => any
37
41
  ? P
38
42
  : never;
39
43
 
44
+
40
45
  /**
41
46
  * Returns a summary of all users that have accessed the Data Manager API and where the account is not `private`. Users can set their accounts to be private and therefore will not show up in methods like this
42
47
 
43
48
  * @summary Get information about all known Users
44
49
  */
45
50
  export const getUsers = (
46
- options?: SecondParameter<typeof customInstance>,
47
- signal?: AbortSignal
51
+
52
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
53
+ ) => {
54
+
55
+
56
+ return customInstance<UsersGetResponse>(
57
+ {url: `/user`, method: 'get', signal
58
+ },
59
+ options);
60
+ }
61
+
62
+
63
+ export const getGetUsersQueryKey = () => {
64
+
65
+ return ["data-manager-api", `/user`] as const;
66
+ }
67
+
68
+
69
+ export const getGetUsersQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
48
70
  ) => {
49
- return customInstance<UsersGetResponse>(
50
- { url: `/user`, method: "get", signal },
51
- options
52
- );
53
- };
54
-
55
- export const getGetUsersQueryKey = () => ["data-manager-api", `/user`] as const;
56
-
57
- export const getGetUsersQueryOptions = <
58
- TData = Awaited<ReturnType<typeof getUsers>>,
59
- TError = ErrorType<void | DmError>
60
- >(options?: {
61
- query?: UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>;
62
- request?: SecondParameter<typeof customInstance>;
63
- }): UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & {
64
- queryKey: QueryKey;
65
- } => {
66
- const { query: queryOptions, request: requestOptions } = options ?? {};
67
-
68
- const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();
69
-
70
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({
71
- signal,
72
- }) => getUsers(requestOptions, signal);
73
-
74
- return { queryKey, queryFn, ...queryOptions };
75
- };
76
-
77
- export type GetUsersQueryResult = NonNullable<
78
- Awaited<ReturnType<typeof getUsers>>
79
- >;
80
- export type GetUsersQueryError = ErrorType<void | DmError>;
81
-
82
- export const useGetUsers = <
83
- TData = Awaited<ReturnType<typeof getUsers>>,
84
- TError = ErrorType<void | DmError>
85
- >(options?: {
86
- query?: UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>;
87
- request?: SecondParameter<typeof customInstance>;
88
- }): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
89
- const queryOptions = getGetUsersQueryOptions(options);
90
-
91
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
92
- queryKey: QueryKey;
93
- };
94
-
95
- query.queryKey = queryOptions.queryKey;
71
+
72
+ const {query: queryOptions, request: requestOptions} = options ?? {};
73
+
74
+ const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();
75
+
76
+
77
+
78
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({ signal }) => getUsers(requestOptions, signal);
79
+
80
+
81
+
82
+
83
+
84
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & { queryKey: QueryKey }
85
+ }
86
+
87
+ export type GetUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>
88
+ export type GetUsersQueryError = ErrorType<void | DmError>
89
+
90
+ /**
91
+ * @summary Get information about all known Users
92
+ */
93
+ export const useGetUsers = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>(
94
+ options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
95
+
96
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
97
+
98
+ const queryOptions = getGetUsersQueryOptions(options)
99
+
100
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
101
+
102
+ query.queryKey = queryOptions.queryKey ;
96
103
 
97
104
  return query;
98
- };
105
+ }
106
+
107
+
99
108
 
100
109
  /**
101
110
  * @summary Get information about your account
102
111
  */
103
112
  export const getUserAccount = (
104
- params?: GetUserAccountParams,
105
- options?: SecondParameter<typeof customInstance>,
106
- signal?: AbortSignal
113
+ params?: GetUserAccountParams,
114
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
115
+ ) => {
116
+
117
+
118
+ return customInstance<UserAccountDetail>(
119
+ {url: `/user/account`, method: 'get',
120
+ params, signal
121
+ },
122
+ options);
123
+ }
124
+
125
+
126
+ export const getGetUserAccountQueryKey = (params?: GetUserAccountParams,) => {
127
+
128
+ return ["data-manager-api", `/user/account`, ...(params ? [params]: [])] as const;
129
+ }
130
+
131
+
132
+ export const getGetUserAccountQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
107
133
  ) => {
108
- return customInstance<UserAccountGetResponse>(
109
- { url: `/user/account`, method: "get", params, signal },
110
- options
111
- );
112
- };
113
-
114
- export const getGetUserAccountQueryKey = (params?: GetUserAccountParams) =>
115
- ["data-manager-api", `/user/account`, ...(params ? [params] : [])] as const;
116
-
117
- export const getGetUserAccountQueryOptions = <
118
- TData = Awaited<ReturnType<typeof getUserAccount>>,
119
- TError = ErrorType<void | DmError>
120
- >(
121
- params?: GetUserAccountParams,
122
- options?: {
123
- query?: UseQueryOptions<
124
- Awaited<ReturnType<typeof getUserAccount>>,
125
- TError,
126
- TData
127
- >;
128
- request?: SecondParameter<typeof customInstance>;
129
- }
130
- ): UseQueryOptions<
131
- Awaited<ReturnType<typeof getUserAccount>>,
132
- TError,
133
- TData
134
- > & { queryKey: QueryKey } => {
135
- const { query: queryOptions, request: requestOptions } = options ?? {};
136
-
137
- const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);
138
-
139
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({
140
- signal,
141
- }) => getUserAccount(params, requestOptions, signal);
142
-
143
- return { queryKey, queryFn, ...queryOptions };
144
- };
145
-
146
- export type GetUserAccountQueryResult = NonNullable<
147
- Awaited<ReturnType<typeof getUserAccount>>
148
- >;
149
- export type GetUserAccountQueryError = ErrorType<void | DmError>;
150
-
151
- export const useGetUserAccount = <
152
- TData = Awaited<ReturnType<typeof getUserAccount>>,
153
- TError = ErrorType<void | DmError>
154
- >(
155
- params?: GetUserAccountParams,
156
- options?: {
157
- query?: UseQueryOptions<
158
- Awaited<ReturnType<typeof getUserAccount>>,
159
- TError,
160
- TData
161
- >;
162
- request?: SecondParameter<typeof customInstance>;
163
- }
164
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
165
- const queryOptions = getGetUserAccountQueryOptions(params, options);
166
-
167
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
168
- queryKey: QueryKey;
169
- };
170
-
171
- query.queryKey = queryOptions.queryKey;
134
+
135
+ const {query: queryOptions, request: requestOptions} = options ?? {};
136
+
137
+ const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);
138
+
139
+
140
+
141
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(params, requestOptions, signal);
142
+
143
+
144
+
145
+
146
+
147
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData> & { queryKey: QueryKey }
148
+ }
149
+
150
+ export type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>
151
+ export type GetUserAccountQueryError = ErrorType<void | DmError>
152
+
153
+ /**
154
+ * @summary Get information about your account
155
+ */
156
+ export const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(
157
+ params?: GetUserAccountParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
158
+
159
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
160
+
161
+ const queryOptions = getGetUserAccountQueryOptions(params,options)
162
+
163
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
164
+
165
+ query.queryKey = queryOptions.queryKey ;
172
166
 
173
167
  return query;
174
- };
168
+ }
169
+
170
+
175
171
 
176
172
  /**
177
173
  * @summary Patch your account
178
174
  */
179
175
  export const patchUserAccount = (
180
- userAccountPatchBodyBody: UserAccountPatchBodyBody,
181
- options?: SecondParameter<typeof customInstance>
182
- ) => {
183
- const formData = new FormData();
184
- if (userAccountPatchBodyBody.private !== undefined) {
185
- formData.append("private", userAccountPatchBodyBody.private.toString());
186
- }
187
- if (userAccountPatchBodyBody.become_admin !== undefined) {
188
- formData.append(
189
- "become_admin",
190
- userAccountPatchBodyBody.become_admin.toString()
191
- );
192
- }
193
- if (userAccountPatchBodyBody.impersonate !== undefined) {
194
- formData.append("impersonate", userAccountPatchBodyBody.impersonate);
195
- }
196
- if (userAccountPatchBodyBody.use_impersonation !== undefined) {
197
- formData.append(
198
- "use_impersonation",
199
- userAccountPatchBodyBody.use_impersonation.toString()
200
- );
201
- }
202
-
203
- return customInstance<void>(
204
- {
205
- url: `/user/account`,
206
- method: "patch",
207
- headers: { "Content-Type": "multipart/form-data" },
208
- data: formData,
176
+ userAccountPatchBodyBody: UserAccountPatchBodyBody,
177
+ options?: SecondParameter<typeof customInstance>,) => {
178
+
179
+ const formData = new FormData();
180
+ if(userAccountPatchBodyBody.private !== undefined) {
181
+ formData.append('private', userAccountPatchBodyBody.private.toString())
182
+ }
183
+ if(userAccountPatchBodyBody.become_admin !== undefined) {
184
+ formData.append('become_admin', userAccountPatchBodyBody.become_admin.toString())
185
+ }
186
+ if(userAccountPatchBodyBody.impersonate !== undefined) {
187
+ formData.append('impersonate', userAccountPatchBodyBody.impersonate)
188
+ }
189
+ if(userAccountPatchBodyBody.use_impersonation !== undefined) {
190
+ formData.append('use_impersonation', userAccountPatchBodyBody.use_impersonation.toString())
191
+ }
192
+
193
+ return customInstance<void>(
194
+ {url: `/user/account`, method: 'patch',
195
+ headers: {'Content-Type': 'multipart/form-data', },
196
+ data: formData
209
197
  },
210
- options
211
- );
212
- };
213
-
214
- export const getPatchUserAccountMutationOptions = <
215
- TError = ErrorType<DmError>,
216
- TContext = unknown
217
- >(options?: {
218
- mutation?: UseMutationOptions<
219
- Awaited<ReturnType<typeof patchUserAccount>>,
220
- TError,
221
- { data: UserAccountPatchBodyBody },
222
- TContext
223
- >;
224
- request?: SecondParameter<typeof customInstance>;
225
- }): UseMutationOptions<
226
- Awaited<ReturnType<typeof patchUserAccount>>,
227
- TError,
228
- { data: UserAccountPatchBodyBody },
229
- TContext
230
- > => {
231
- const { mutation: mutationOptions, request: requestOptions } = options ?? {};
232
-
233
- const mutationFn: MutationFunction<
234
- Awaited<ReturnType<typeof patchUserAccount>>,
235
- { data: UserAccountPatchBodyBody }
236
- > = (props) => {
237
- const { data } = props ?? {};
238
-
239
- return patchUserAccount(data, requestOptions);
240
- };
241
-
242
- return { mutationFn, ...mutationOptions };
243
- };
244
-
245
- export type PatchUserAccountMutationResult = NonNullable<
246
- Awaited<ReturnType<typeof patchUserAccount>>
247
- >;
248
- export type PatchUserAccountMutationBody = UserAccountPatchBodyBody;
249
- export type PatchUserAccountMutationError = ErrorType<DmError>;
250
-
251
- export const usePatchUserAccount = <
252
- TError = ErrorType<DmError>,
253
- TContext = unknown
254
- >(options?: {
255
- mutation?: UseMutationOptions<
256
- Awaited<ReturnType<typeof patchUserAccount>>,
257
- TError,
258
- { data: UserAccountPatchBodyBody },
259
- TContext
260
- >;
261
- request?: SecondParameter<typeof customInstance>;
262
- }) => {
263
- const mutationOptions = getPatchUserAccountMutationOptions(options);
264
-
265
- return useMutation(mutationOptions);
266
- };
267
- /**
198
+ options);
199
+ }
200
+
201
+
202
+
203
+ export const getPatchUserAccountMutationOptions = <TError = ErrorType<DmError>,
204
+
205
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
206
+ ): UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext> => {
207
+ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
208
+
209
+
210
+
211
+
212
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchUserAccount>>, {data: UserAccountPatchBodyBody}> = (props) => {
213
+ const {data} = props ?? {};
214
+
215
+ return patchUserAccount(data,requestOptions)
216
+ }
217
+
218
+
219
+
220
+
221
+ return { mutationFn, ...mutationOptions }}
222
+
223
+ export type PatchUserAccountMutationResult = NonNullable<Awaited<ReturnType<typeof patchUserAccount>>>
224
+ export type PatchUserAccountMutationBody = UserAccountPatchBodyBody
225
+ export type PatchUserAccountMutationError = ErrorType<DmError>
226
+
227
+ /**
228
+ * @summary Patch your account
229
+ */
230
+ export const usePatchUserAccount = <TError = ErrorType<DmError>,
231
+
232
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
233
+ ) => {
234
+
235
+ const mutationOptions = getPatchUserAccountMutationOptions(options);
236
+
237
+ return useMutation(mutationOptions);
238
+ }
239
+ /**
268
240
  * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account
269
241
 
270
242
  * @summary Get the API call log recorded against your account
271
243
  */
272
244
  export const getUserApiLog = (
273
- params?: GetUserApiLogParams,
274
- options?: SecondParameter<typeof customInstance>,
275
- signal?: AbortSignal
245
+ params?: GetUserApiLogParams,
246
+ options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
276
247
  ) => {
277
- return customInstance<UserApiLogGetResponse>(
278
- { url: `/user/api-log`, method: "get", params, signal },
279
- options
280
- );
281
- };
282
-
283
- export const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) =>
284
- ["data-manager-api", `/user/api-log`, ...(params ? [params] : [])] as const;
285
-
286
- export const getGetUserApiLogQueryOptions = <
287
- TData = Awaited<ReturnType<typeof getUserApiLog>>,
288
- TError = ErrorType<void>
289
- >(
290
- params?: GetUserApiLogParams,
291
- options?: {
292
- query?: UseQueryOptions<
293
- Awaited<ReturnType<typeof getUserApiLog>>,
294
- TError,
295
- TData
296
- >;
297
- request?: SecondParameter<typeof customInstance>;
298
- }
299
- ): UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & {
300
- queryKey: QueryKey;
301
- } => {
302
- const { query: queryOptions, request: requestOptions } = options ?? {};
303
-
304
- const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);
305
-
306
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({
307
- signal,
308
- }) => getUserApiLog(params, requestOptions, signal);
309
-
310
- return { queryKey, queryFn, ...queryOptions };
311
- };
312
-
313
- export type GetUserApiLogQueryResult = NonNullable<
314
- Awaited<ReturnType<typeof getUserApiLog>>
315
- >;
316
- export type GetUserApiLogQueryError = ErrorType<void>;
317
-
318
- export const useGetUserApiLog = <
319
- TData = Awaited<ReturnType<typeof getUserApiLog>>,
320
- TError = ErrorType<void>
321
- >(
322
- params?: GetUserApiLogParams,
323
- options?: {
324
- query?: UseQueryOptions<
325
- Awaited<ReturnType<typeof getUserApiLog>>,
326
- TError,
327
- TData
328
- >;
329
- request?: SecondParameter<typeof customInstance>;
330
- }
331
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
332
- const queryOptions = getGetUserApiLogQueryOptions(params, options);
333
-
334
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
335
- queryKey: QueryKey;
336
- };
337
-
338
- query.queryKey = queryOptions.queryKey;
248
+
249
+
250
+ return customInstance<UserApiLogGetResponse>(
251
+ {url: `/user/api-log`, method: 'get',
252
+ params, signal
253
+ },
254
+ options);
255
+ }
256
+
257
+
258
+ export const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams,) => {
259
+
260
+ return ["data-manager-api", `/user/api-log`, ...(params ? [params]: [])] as const;
261
+ }
262
+
263
+
264
+ export const getGetUserApiLogQueryOptions = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
265
+ ) => {
266
+
267
+ const {query: queryOptions, request: requestOptions} = options ?? {};
268
+
269
+ const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);
270
+
271
+
272
+
273
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({ signal }) => getUserApiLog(params, requestOptions, signal);
274
+
275
+
276
+
277
+
278
+
279
+ return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & { queryKey: QueryKey }
280
+ }
281
+
282
+ export type GetUserApiLogQueryResult = NonNullable<Awaited<ReturnType<typeof getUserApiLog>>>
283
+ export type GetUserApiLogQueryError = ErrorType<void>
284
+
285
+ /**
286
+ * @summary Get the API call log recorded against your account
287
+ */
288
+ export const useGetUserApiLog = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(
289
+ params?: GetUserApiLogParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
290
+
291
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
292
+
293
+ const queryOptions = getGetUserApiLogQueryOptions(params,options)
294
+
295
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
296
+
297
+ query.queryKey = queryOptions.queryKey ;
339
298
 
340
299
  return query;
341
- };
300
+ }
301
+
302
+
303
+
package/task/task.cjs CHANGED
@@ -1,22 +1,30 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
3
+ var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
4
4
 
5
5
  // src/task/task.ts
6
+
7
+
8
+
6
9
  var _reactquery = require('@tanstack/react-query');
7
10
  var getTasks = (params, options, signal) => {
8
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
9
- { url: `/task`, method: "get", params, signal },
11
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
12
+ {
13
+ url: `/task`,
14
+ method: "get",
15
+ params,
16
+ signal
17
+ },
10
18
  options
11
19
  );
12
20
  };
13
- var getGetTasksQueryKey = (params) => ["data-manager-api", `/task`, ...params ? [params] : []];
21
+ var getGetTasksQueryKey = (params) => {
22
+ return ["data-manager-api", `/task`, ...params ? [params] : []];
23
+ };
14
24
  var getGetTasksQueryOptions = (params, options) => {
15
25
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
16
26
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetTasksQueryKey(params)));
17
- const queryFn = ({
18
- signal
19
- }) => getTasks(params, requestOptions, signal);
27
+ const queryFn = ({ signal }) => getTasks(params, requestOptions, signal);
20
28
  return { queryKey, queryFn, ...queryOptions };
21
29
  };
22
30
  var useGetTasks = (params, options) => {
@@ -26,18 +34,23 @@ var useGetTasks = (params, options) => {
26
34
  return query;
27
35
  };
28
36
  var getTask = (taskId, params, options, signal) => {
29
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
30
- { url: `/task/${taskId}`, method: "get", params, signal },
37
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
38
+ {
39
+ url: `/task/${taskId}`,
40
+ method: "get",
41
+ params,
42
+ signal
43
+ },
31
44
  options
32
45
  );
33
46
  };
34
- var getGetTaskQueryKey = (taskId, params) => ["data-manager-api", `/task/${taskId}`, ...params ? [params] : []];
47
+ var getGetTaskQueryKey = (taskId, params) => {
48
+ return ["data-manager-api", `/task/${taskId}`, ...params ? [params] : []];
49
+ };
35
50
  var getGetTaskQueryOptions = (taskId, params, options) => {
36
51
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
37
52
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetTaskQueryKey(taskId, params)));
38
- const queryFn = ({
39
- signal
40
- }) => getTask(taskId, params, requestOptions, signal);
53
+ const queryFn = ({ signal }) => getTask(taskId, params, requestOptions, signal);
41
54
  return { queryKey, queryFn, enabled: !!taskId, ...queryOptions };
42
55
  };
43
56
  var useGetTask = (taskId, params, options) => {
@@ -47,8 +60,11 @@ var useGetTask = (taskId, params, options) => {
47
60
  return query;
48
61
  };
49
62
  var deleteTask = (taskId, options) => {
50
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
51
- { url: `/task/${taskId}`, method: "delete" },
63
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
64
+ {
65
+ url: `/task/${taskId}`,
66
+ method: "delete"
67
+ },
52
68
  options
53
69
  );
54
70
  };