@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/type/type.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,32 +8,28 @@ 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'
28
- import type {
29
- DmError,
30
- TypesGetResponse
31
- } from '../data-manager-api.schemas'
32
- import { customInstance } from '.././custom-instance';
33
- import type { ErrorType } from '.././custom-instance';
23
+ UseSuspenseQueryResult,
24
+ } from "@tanstack/react-query";
34
25
 
26
+ import type { DmError, TypesGetResponse } from "../data-manager-api.schemas";
35
27
 
36
- type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
28
+ import { customInstance } from ".././custom-instance";
29
+ import type { ErrorType } from ".././custom-instance";
30
+ import { queryMutator } from ".././options-mutator";
37
31
 
32
+ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
38
33
 
39
34
  /**
40
35
  * Returns the supported Dataset and File (MIME) Types
@@ -42,140 +37,199 @@ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
42
37
  * @summary Get the supported File Types
43
38
  */
44
39
  export const getFileTypes = (
45
-
46
- options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
40
+ options?: SecondParameter<typeof customInstance>,
41
+ signal?: AbortSignal,
47
42
  ) => {
48
-
49
-
50
- return customInstance<TypesGetResponse>(
51
- {url: `/type`, method: 'GET', signal
52
- },
53
- options);
54
- }
55
-
43
+ return customInstance<TypesGetResponse>({ url: `/type`, method: "GET", signal }, options);
44
+ };
56
45
 
57
46
  export const getGetFileTypesQueryKey = () => {
58
- return ["data-manager-api", `/type`] as const;
59
- }
60
-
61
-
62
- export const getGetFileTypesQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
63
- ) => {
64
-
65
- const {query: queryOptions, request: requestOptions} = options ?? {};
66
-
67
- const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();
68
-
69
-
70
-
71
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);
72
-
73
-
74
-
75
-
76
-
77
- return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
78
- }
79
-
80
- export type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>
81
- export type GetFileTypesQueryError = ErrorType<void | DmError>
82
-
83
-
84
- export function useGetFileTypes<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
85
- options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>> & Pick<
47
+ return [`/type`] as const;
48
+ };
49
+
50
+ export const useGetFileTypesQueryOptions = <
51
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
52
+ TError = ErrorType<void | DmError>,
53
+ >(options?: {
54
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>;
55
+ request?: SecondParameter<typeof customInstance>;
56
+ }) => {
57
+ const { query: queryOptions, request: requestOptions } = options ?? {};
58
+
59
+ const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();
60
+
61
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) =>
62
+ getFileTypes(requestOptions, signal);
63
+
64
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
65
+
66
+ return customOptions as UseQueryOptions<
67
+ Awaited<ReturnType<typeof getFileTypes>>,
68
+ TError,
69
+ TData
70
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
71
+ };
72
+
73
+ export type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>;
74
+ export type GetFileTypesQueryError = ErrorType<void | DmError>;
75
+
76
+ export function useGetFileTypes<
77
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
78
+ TError = ErrorType<void | DmError>,
79
+ >(
80
+ options: {
81
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>> &
82
+ Pick<
86
83
  DefinedInitialDataOptions<
87
84
  Awaited<ReturnType<typeof getFileTypes>>,
88
85
  TError,
89
- TData
90
- > , 'initialData'
91
- >, request?: SecondParameter<typeof customInstance>}
92
-
93
- ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
94
- export function useGetFileTypes<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
95
- options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>> & Pick<
86
+ Awaited<ReturnType<typeof getFileTypes>>
87
+ >,
88
+ "initialData"
89
+ >;
90
+ request?: SecondParameter<typeof customInstance>;
91
+ },
92
+ queryClient?: QueryClient,
93
+ ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
94
+ export function useGetFileTypes<
95
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
96
+ TError = ErrorType<void | DmError>,
97
+ >(
98
+ options?: {
99
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>> &
100
+ Pick<
96
101
  UndefinedInitialDataOptions<
97
102
  Awaited<ReturnType<typeof getFileTypes>>,
98
103
  TError,
99
- TData
100
- > , 'initialData'
101
- >, request?: SecondParameter<typeof customInstance>}
102
-
103
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
104
- export function useGetFileTypes<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
105
- options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
106
-
107
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
104
+ Awaited<ReturnType<typeof getFileTypes>>
105
+ >,
106
+ "initialData"
107
+ >;
108
+ request?: SecondParameter<typeof customInstance>;
109
+ },
110
+ queryClient?: QueryClient,
111
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
112
+ export function useGetFileTypes<
113
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
114
+ TError = ErrorType<void | DmError>,
115
+ >(
116
+ options?: {
117
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>;
118
+ request?: SecondParameter<typeof customInstance>;
119
+ },
120
+ queryClient?: QueryClient,
121
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
108
122
  /**
109
123
  * @summary Get the supported File Types
110
124
  */
111
125
 
112
- export function useGetFileTypes<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
113
- options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
126
+ export function useGetFileTypes<
127
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
128
+ TError = ErrorType<void | DmError>,
129
+ >(
130
+ options?: {
131
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>;
132
+ request?: SecondParameter<typeof customInstance>;
133
+ },
134
+ queryClient?: QueryClient,
135
+ ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
136
+ const queryOptions = useGetFileTypesQueryOptions(options);
114
137
 
115
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
138
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
139
+ queryKey: DataTag<QueryKey, TData, TError>;
140
+ };
116
141
 
117
- const queryOptions = getGetFileTypesQueryOptions(options)
118
-
119
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
120
-
121
- query.queryKey = queryOptions.queryKey ;
142
+ query.queryKey = queryOptions.queryKey;
122
143
 
123
144
  return query;
124
145
  }
125
146
 
126
-
127
-
128
- export const getGetFileTypesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
129
- ) => {
130
-
131
- const {query: queryOptions, request: requestOptions} = options ?? {};
132
-
133
- const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();
134
-
135
-
136
-
137
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);
138
-
139
-
140
-
141
-
142
-
143
- return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
144
- }
145
-
146
- export type GetFileTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>
147
- export type GetFileTypesSuspenseQueryError = ErrorType<void | DmError>
148
-
149
-
150
- export function useGetFileTypesSuspense<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
151
- options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
152
-
153
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
154
- export function useGetFileTypesSuspense<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
155
- options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
156
-
157
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
158
- export function useGetFileTypesSuspense<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
159
- options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
160
-
161
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
147
+ export const useGetFileTypesSuspenseQueryOptions = <
148
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
149
+ TError = ErrorType<void | DmError>,
150
+ >(options?: {
151
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>;
152
+ request?: SecondParameter<typeof customInstance>;
153
+ }) => {
154
+ const { query: queryOptions, request: requestOptions } = options ?? {};
155
+
156
+ const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();
157
+
158
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) =>
159
+ getFileTypes(requestOptions, signal);
160
+
161
+ const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
162
+
163
+ return customOptions as UseSuspenseQueryOptions<
164
+ Awaited<ReturnType<typeof getFileTypes>>,
165
+ TError,
166
+ TData
167
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
168
+ };
169
+
170
+ export type GetFileTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>;
171
+ export type GetFileTypesSuspenseQueryError = ErrorType<void | DmError>;
172
+
173
+ export function useGetFileTypesSuspense<
174
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
175
+ TError = ErrorType<void | DmError>,
176
+ >(
177
+ options: {
178
+ query: Partial<
179
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>
180
+ >;
181
+ request?: SecondParameter<typeof customInstance>;
182
+ },
183
+ queryClient?: QueryClient,
184
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
185
+ export function useGetFileTypesSuspense<
186
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
187
+ TError = ErrorType<void | DmError>,
188
+ >(
189
+ options?: {
190
+ query?: Partial<
191
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>
192
+ >;
193
+ request?: SecondParameter<typeof customInstance>;
194
+ },
195
+ queryClient?: QueryClient,
196
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
197
+ export function useGetFileTypesSuspense<
198
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
199
+ TError = ErrorType<void | DmError>,
200
+ >(
201
+ options?: {
202
+ query?: Partial<
203
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>
204
+ >;
205
+ request?: SecondParameter<typeof customInstance>;
206
+ },
207
+ queryClient?: QueryClient,
208
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
162
209
  /**
163
210
  * @summary Get the supported File Types
164
211
  */
165
212
 
166
- export function useGetFileTypesSuspense<TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(
167
- options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
168
-
169
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
170
-
171
- const queryOptions = getGetFileTypesSuspenseQueryOptions(options)
172
-
173
- const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
174
-
175
- query.queryKey = queryOptions.queryKey ;
213
+ export function useGetFileTypesSuspense<
214
+ TData = Awaited<ReturnType<typeof getFileTypes>>,
215
+ TError = ErrorType<void | DmError>,
216
+ >(
217
+ options?: {
218
+ query?: Partial<
219
+ UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>
220
+ >;
221
+ request?: SecondParameter<typeof customInstance>;
222
+ },
223
+ queryClient?: QueryClient,
224
+ ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
225
+ const queryOptions = useGetFileTypesSuspenseQueryOptions(options);
226
+
227
+ const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
228
+ TData,
229
+ TError
230
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
231
+
232
+ query.queryKey = queryOptions.queryKey;
176
233
 
177
234
  return query;
178
235
  }
179
-
180
-
181
-