@squonk/account-server-client 4.4.0-4-4.2175031121 → 4.4.0-4-4.2194834412
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.
- package/dist/api/actions/actions.cjs +5 -5
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +17 -35
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +17 -35
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.js +5 -5
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/api.schemas.cjs.map +1 -1
- package/dist/api/api.schemas.d.cts +1 -1
- package/dist/api/api.schemas.d.ts +1 -1
- package/dist/api/api.schemas.js.map +1 -1
- package/dist/api/asset/asset.cjs +23 -23
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +40 -76
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +40 -76
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.js +23 -23
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +17 -17
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +65 -137
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +65 -137
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.js +17 -17
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +13 -13
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +35 -71
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +35 -71
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.js +13 -13
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +9 -9
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +33 -69
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +33 -69
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.js +9 -9
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +19 -19
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +52 -106
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +52 -106
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.js +19 -19
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +31 -31
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +100 -208
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +100 -208
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.js +31 -31
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +5 -5
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +17 -35
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +17 -35
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.js +5 -5
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +31 -31
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +72 -144
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +72 -144
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.js +31 -31
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +21 -21
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +53 -107
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +53 -107
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.js +21 -21
- package/dist/api/user/user.js.map +1 -1
- package/package.json +4 -7
- package/pnpm-workspace.yaml +1 -3
- package/src/api/actions/actions.ts +13 -105
- package/src/api/api.schemas.ts +1 -1
- package/src/api/asset/asset.ts +95 -305
- package/src/api/charges/charges.ts +55 -458
- package/src/api/event-stream/event-stream.ts +59 -264
- package/src/api/merchant/merchant.ts +29 -214
- package/src/api/organisation/organisation.ts +87 -383
- package/src/api/product/product.ts +131 -726
- package/src/api/state/state.ts +17 -107
- package/src/api/unit/unit.ts +147 -523
- package/src/api/user/user.ts +102 -403
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.17.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Account Server API
|
|
5
5
|
* The Informatics Matters Account Server API.
|
|
@@ -10,14 +10,9 @@ A service that provides access to the Account Server, which gives *registered* u
|
|
|
10
10
|
*/
|
|
11
11
|
import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
12
12
|
import type {
|
|
13
|
-
DataTag,
|
|
14
|
-
DefinedInitialDataOptions,
|
|
15
|
-
DefinedUseQueryResult,
|
|
16
13
|
MutationFunction,
|
|
17
|
-
QueryClient,
|
|
18
14
|
QueryFunction,
|
|
19
15
|
QueryKey,
|
|
20
|
-
UndefinedInitialDataOptions,
|
|
21
16
|
UseMutationOptions,
|
|
22
17
|
UseMutationResult,
|
|
23
18
|
UseQueryOptions,
|
|
@@ -72,7 +67,7 @@ export const useGetOrganisationsQueryOptions = <
|
|
|
72
67
|
>(
|
|
73
68
|
params?: GetOrganisationsParams,
|
|
74
69
|
options?: {
|
|
75
|
-
query?:
|
|
70
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;
|
|
76
71
|
request?: SecondParameter<typeof customInstance>;
|
|
77
72
|
},
|
|
78
73
|
) => {
|
|
@@ -89,61 +84,12 @@ export const useGetOrganisationsQueryOptions = <
|
|
|
89
84
|
Awaited<ReturnType<typeof getOrganisations>>,
|
|
90
85
|
TError,
|
|
91
86
|
TData
|
|
92
|
-
> & { queryKey:
|
|
87
|
+
> & { queryKey: QueryKey };
|
|
93
88
|
};
|
|
94
89
|
|
|
95
90
|
export type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;
|
|
96
91
|
export type GetOrganisationsQueryError = ErrorType<void | AsError>;
|
|
97
92
|
|
|
98
|
-
export function useGetOrganisations<
|
|
99
|
-
TData = Awaited<ReturnType<typeof getOrganisations>>,
|
|
100
|
-
TError = ErrorType<void | AsError>,
|
|
101
|
-
>(
|
|
102
|
-
params: undefined | GetOrganisationsParams,
|
|
103
|
-
options: {
|
|
104
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> &
|
|
105
|
-
Pick<
|
|
106
|
-
DefinedInitialDataOptions<
|
|
107
|
-
Awaited<ReturnType<typeof getOrganisations>>,
|
|
108
|
-
TError,
|
|
109
|
-
Awaited<ReturnType<typeof getOrganisations>>
|
|
110
|
-
>,
|
|
111
|
-
"initialData"
|
|
112
|
-
>;
|
|
113
|
-
request?: SecondParameter<typeof customInstance>;
|
|
114
|
-
},
|
|
115
|
-
queryClient?: QueryClient,
|
|
116
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
117
|
-
export function useGetOrganisations<
|
|
118
|
-
TData = Awaited<ReturnType<typeof getOrganisations>>,
|
|
119
|
-
TError = ErrorType<void | AsError>,
|
|
120
|
-
>(
|
|
121
|
-
params?: GetOrganisationsParams,
|
|
122
|
-
options?: {
|
|
123
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> &
|
|
124
|
-
Pick<
|
|
125
|
-
UndefinedInitialDataOptions<
|
|
126
|
-
Awaited<ReturnType<typeof getOrganisations>>,
|
|
127
|
-
TError,
|
|
128
|
-
Awaited<ReturnType<typeof getOrganisations>>
|
|
129
|
-
>,
|
|
130
|
-
"initialData"
|
|
131
|
-
>;
|
|
132
|
-
request?: SecondParameter<typeof customInstance>;
|
|
133
|
-
},
|
|
134
|
-
queryClient?: QueryClient,
|
|
135
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
136
|
-
export function useGetOrganisations<
|
|
137
|
-
TData = Awaited<ReturnType<typeof getOrganisations>>,
|
|
138
|
-
TError = ErrorType<void | AsError>,
|
|
139
|
-
>(
|
|
140
|
-
params?: GetOrganisationsParams,
|
|
141
|
-
options?: {
|
|
142
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
143
|
-
request?: SecondParameter<typeof customInstance>;
|
|
144
|
-
},
|
|
145
|
-
queryClient?: QueryClient,
|
|
146
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
147
93
|
/**
|
|
148
94
|
* @summary Gets Organisations
|
|
149
95
|
*/
|
|
@@ -154,16 +100,13 @@ export function useGetOrganisations<
|
|
|
154
100
|
>(
|
|
155
101
|
params?: GetOrganisationsParams,
|
|
156
102
|
options?: {
|
|
157
|
-
query?:
|
|
103
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;
|
|
158
104
|
request?: SecondParameter<typeof customInstance>;
|
|
159
105
|
},
|
|
160
|
-
|
|
161
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
106
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
162
107
|
const queryOptions = useGetOrganisationsQueryOptions(params, options);
|
|
163
108
|
|
|
164
|
-
const query = useQuery(queryOptions
|
|
165
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
166
|
-
};
|
|
109
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
167
110
|
|
|
168
111
|
query.queryKey = queryOptions.queryKey;
|
|
169
112
|
|
|
@@ -176,9 +119,7 @@ export const useGetOrganisationsSuspenseQueryOptions = <
|
|
|
176
119
|
>(
|
|
177
120
|
params?: GetOrganisationsParams,
|
|
178
121
|
options?: {
|
|
179
|
-
query?:
|
|
180
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>
|
|
181
|
-
>;
|
|
122
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;
|
|
182
123
|
request?: SecondParameter<typeof customInstance>;
|
|
183
124
|
},
|
|
184
125
|
) => {
|
|
@@ -195,7 +136,7 @@ export const useGetOrganisationsSuspenseQueryOptions = <
|
|
|
195
136
|
Awaited<ReturnType<typeof getOrganisations>>,
|
|
196
137
|
TError,
|
|
197
138
|
TData
|
|
198
|
-
> & { queryKey:
|
|
139
|
+
> & { queryKey: QueryKey };
|
|
199
140
|
};
|
|
200
141
|
|
|
201
142
|
export type GetOrganisationsSuspenseQueryResult = NonNullable<
|
|
@@ -203,45 +144,6 @@ export type GetOrganisationsSuspenseQueryResult = NonNullable<
|
|
|
203
144
|
>;
|
|
204
145
|
export type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;
|
|
205
146
|
|
|
206
|
-
export function useGetOrganisationsSuspense<
|
|
207
|
-
TData = Awaited<ReturnType<typeof getOrganisations>>,
|
|
208
|
-
TError = ErrorType<void | AsError>,
|
|
209
|
-
>(
|
|
210
|
-
params: undefined | GetOrganisationsParams,
|
|
211
|
-
options: {
|
|
212
|
-
query: Partial<
|
|
213
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>
|
|
214
|
-
>;
|
|
215
|
-
request?: SecondParameter<typeof customInstance>;
|
|
216
|
-
},
|
|
217
|
-
queryClient?: QueryClient,
|
|
218
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
219
|
-
export function useGetOrganisationsSuspense<
|
|
220
|
-
TData = Awaited<ReturnType<typeof getOrganisations>>,
|
|
221
|
-
TError = ErrorType<void | AsError>,
|
|
222
|
-
>(
|
|
223
|
-
params?: GetOrganisationsParams,
|
|
224
|
-
options?: {
|
|
225
|
-
query?: Partial<
|
|
226
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>
|
|
227
|
-
>;
|
|
228
|
-
request?: SecondParameter<typeof customInstance>;
|
|
229
|
-
},
|
|
230
|
-
queryClient?: QueryClient,
|
|
231
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
232
|
-
export function useGetOrganisationsSuspense<
|
|
233
|
-
TData = Awaited<ReturnType<typeof getOrganisations>>,
|
|
234
|
-
TError = ErrorType<void | AsError>,
|
|
235
|
-
>(
|
|
236
|
-
params?: GetOrganisationsParams,
|
|
237
|
-
options?: {
|
|
238
|
-
query?: Partial<
|
|
239
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>
|
|
240
|
-
>;
|
|
241
|
-
request?: SecondParameter<typeof customInstance>;
|
|
242
|
-
},
|
|
243
|
-
queryClient?: QueryClient,
|
|
244
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
245
147
|
/**
|
|
246
148
|
* @summary Gets Organisations
|
|
247
149
|
*/
|
|
@@ -252,19 +154,15 @@ export function useGetOrganisationsSuspense<
|
|
|
252
154
|
>(
|
|
253
155
|
params?: GetOrganisationsParams,
|
|
254
156
|
options?: {
|
|
255
|
-
query?:
|
|
256
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>
|
|
257
|
-
>;
|
|
157
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>;
|
|
258
158
|
request?: SecondParameter<typeof customInstance>;
|
|
259
159
|
},
|
|
260
|
-
|
|
261
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
160
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
262
161
|
const queryOptions = useGetOrganisationsSuspenseQueryOptions(params, options);
|
|
263
162
|
|
|
264
|
-
const query = useSuspenseQuery(queryOptions
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
163
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
164
|
+
queryKey: QueryKey;
|
|
165
|
+
};
|
|
268
166
|
|
|
269
167
|
query.queryKey = queryOptions.queryKey;
|
|
270
168
|
|
|
@@ -344,18 +242,18 @@ export type CreateOrganisationMutationError = ErrorType<AsError | void>;
|
|
|
344
242
|
/**
|
|
345
243
|
* @summary Create a new organisation
|
|
346
244
|
*/
|
|
347
|
-
export const useCreateOrganisation = <
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
): UseMutationResult<
|
|
245
|
+
export const useCreateOrganisation = <
|
|
246
|
+
TError = ErrorType<AsError | void>,
|
|
247
|
+
TContext = unknown,
|
|
248
|
+
>(options?: {
|
|
249
|
+
mutation?: UseMutationOptions<
|
|
250
|
+
Awaited<ReturnType<typeof createOrganisation>>,
|
|
251
|
+
TError,
|
|
252
|
+
{ data: OrganisationPostBodyBody },
|
|
253
|
+
TContext
|
|
254
|
+
>;
|
|
255
|
+
request?: SecondParameter<typeof customInstance>;
|
|
256
|
+
}): UseMutationResult<
|
|
359
257
|
Awaited<ReturnType<typeof createOrganisation>>,
|
|
360
258
|
TError,
|
|
361
259
|
{ data: OrganisationPostBodyBody },
|
|
@@ -363,7 +261,7 @@ export const useCreateOrganisation = <TError = ErrorType<AsError | void>, TConte
|
|
|
363
261
|
> => {
|
|
364
262
|
const mutationOptions = useCreateOrganisationMutationOptions(options);
|
|
365
263
|
|
|
366
|
-
return useMutation(mutationOptions
|
|
264
|
+
return useMutation(mutationOptions);
|
|
367
265
|
};
|
|
368
266
|
/**
|
|
369
267
|
* Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.
|
|
@@ -393,7 +291,7 @@ export const useGetOrganisationQueryOptions = <
|
|
|
393
291
|
>(
|
|
394
292
|
orgId: string,
|
|
395
293
|
options?: {
|
|
396
|
-
query?:
|
|
294
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;
|
|
397
295
|
request?: SecondParameter<typeof customInstance>;
|
|
398
296
|
},
|
|
399
297
|
) => {
|
|
@@ -410,61 +308,12 @@ export const useGetOrganisationQueryOptions = <
|
|
|
410
308
|
Awaited<ReturnType<typeof getOrganisation>>,
|
|
411
309
|
TError,
|
|
412
310
|
TData
|
|
413
|
-
> & { queryKey:
|
|
311
|
+
> & { queryKey: QueryKey };
|
|
414
312
|
};
|
|
415
313
|
|
|
416
314
|
export type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>;
|
|
417
315
|
export type GetOrganisationQueryError = ErrorType<void | AsError>;
|
|
418
316
|
|
|
419
|
-
export function useGetOrganisation<
|
|
420
|
-
TData = Awaited<ReturnType<typeof getOrganisation>>,
|
|
421
|
-
TError = ErrorType<void | AsError>,
|
|
422
|
-
>(
|
|
423
|
-
orgId: string,
|
|
424
|
-
options: {
|
|
425
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> &
|
|
426
|
-
Pick<
|
|
427
|
-
DefinedInitialDataOptions<
|
|
428
|
-
Awaited<ReturnType<typeof getOrganisation>>,
|
|
429
|
-
TError,
|
|
430
|
-
Awaited<ReturnType<typeof getOrganisation>>
|
|
431
|
-
>,
|
|
432
|
-
"initialData"
|
|
433
|
-
>;
|
|
434
|
-
request?: SecondParameter<typeof customInstance>;
|
|
435
|
-
},
|
|
436
|
-
queryClient?: QueryClient,
|
|
437
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
438
|
-
export function useGetOrganisation<
|
|
439
|
-
TData = Awaited<ReturnType<typeof getOrganisation>>,
|
|
440
|
-
TError = ErrorType<void | AsError>,
|
|
441
|
-
>(
|
|
442
|
-
orgId: string,
|
|
443
|
-
options?: {
|
|
444
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> &
|
|
445
|
-
Pick<
|
|
446
|
-
UndefinedInitialDataOptions<
|
|
447
|
-
Awaited<ReturnType<typeof getOrganisation>>,
|
|
448
|
-
TError,
|
|
449
|
-
Awaited<ReturnType<typeof getOrganisation>>
|
|
450
|
-
>,
|
|
451
|
-
"initialData"
|
|
452
|
-
>;
|
|
453
|
-
request?: SecondParameter<typeof customInstance>;
|
|
454
|
-
},
|
|
455
|
-
queryClient?: QueryClient,
|
|
456
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
457
|
-
export function useGetOrganisation<
|
|
458
|
-
TData = Awaited<ReturnType<typeof getOrganisation>>,
|
|
459
|
-
TError = ErrorType<void | AsError>,
|
|
460
|
-
>(
|
|
461
|
-
orgId: string,
|
|
462
|
-
options?: {
|
|
463
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;
|
|
464
|
-
request?: SecondParameter<typeof customInstance>;
|
|
465
|
-
},
|
|
466
|
-
queryClient?: QueryClient,
|
|
467
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
468
317
|
/**
|
|
469
318
|
* @summary Gets an Organisation
|
|
470
319
|
*/
|
|
@@ -475,16 +324,13 @@ export function useGetOrganisation<
|
|
|
475
324
|
>(
|
|
476
325
|
orgId: string,
|
|
477
326
|
options?: {
|
|
478
|
-
query?:
|
|
327
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;
|
|
479
328
|
request?: SecondParameter<typeof customInstance>;
|
|
480
329
|
},
|
|
481
|
-
|
|
482
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
330
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
483
331
|
const queryOptions = useGetOrganisationQueryOptions(orgId, options);
|
|
484
332
|
|
|
485
|
-
const query = useQuery(queryOptions
|
|
486
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
487
|
-
};
|
|
333
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
488
334
|
|
|
489
335
|
query.queryKey = queryOptions.queryKey;
|
|
490
336
|
|
|
@@ -497,9 +343,7 @@ export const useGetOrganisationSuspenseQueryOptions = <
|
|
|
497
343
|
>(
|
|
498
344
|
orgId: string,
|
|
499
345
|
options?: {
|
|
500
|
-
query?:
|
|
501
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>
|
|
502
|
-
>;
|
|
346
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;
|
|
503
347
|
request?: SecondParameter<typeof customInstance>;
|
|
504
348
|
},
|
|
505
349
|
) => {
|
|
@@ -516,7 +360,7 @@ export const useGetOrganisationSuspenseQueryOptions = <
|
|
|
516
360
|
Awaited<ReturnType<typeof getOrganisation>>,
|
|
517
361
|
TError,
|
|
518
362
|
TData
|
|
519
|
-
> & { queryKey:
|
|
363
|
+
> & { queryKey: QueryKey };
|
|
520
364
|
};
|
|
521
365
|
|
|
522
366
|
export type GetOrganisationSuspenseQueryResult = NonNullable<
|
|
@@ -524,45 +368,6 @@ export type GetOrganisationSuspenseQueryResult = NonNullable<
|
|
|
524
368
|
>;
|
|
525
369
|
export type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
526
370
|
|
|
527
|
-
export function useGetOrganisationSuspense<
|
|
528
|
-
TData = Awaited<ReturnType<typeof getOrganisation>>,
|
|
529
|
-
TError = ErrorType<void | AsError>,
|
|
530
|
-
>(
|
|
531
|
-
orgId: string,
|
|
532
|
-
options: {
|
|
533
|
-
query: Partial<
|
|
534
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>
|
|
535
|
-
>;
|
|
536
|
-
request?: SecondParameter<typeof customInstance>;
|
|
537
|
-
},
|
|
538
|
-
queryClient?: QueryClient,
|
|
539
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
540
|
-
export function useGetOrganisationSuspense<
|
|
541
|
-
TData = Awaited<ReturnType<typeof getOrganisation>>,
|
|
542
|
-
TError = ErrorType<void | AsError>,
|
|
543
|
-
>(
|
|
544
|
-
orgId: string,
|
|
545
|
-
options?: {
|
|
546
|
-
query?: Partial<
|
|
547
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>
|
|
548
|
-
>;
|
|
549
|
-
request?: SecondParameter<typeof customInstance>;
|
|
550
|
-
},
|
|
551
|
-
queryClient?: QueryClient,
|
|
552
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
553
|
-
export function useGetOrganisationSuspense<
|
|
554
|
-
TData = Awaited<ReturnType<typeof getOrganisation>>,
|
|
555
|
-
TError = ErrorType<void | AsError>,
|
|
556
|
-
>(
|
|
557
|
-
orgId: string,
|
|
558
|
-
options?: {
|
|
559
|
-
query?: Partial<
|
|
560
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>
|
|
561
|
-
>;
|
|
562
|
-
request?: SecondParameter<typeof customInstance>;
|
|
563
|
-
},
|
|
564
|
-
queryClient?: QueryClient,
|
|
565
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
566
371
|
/**
|
|
567
372
|
* @summary Gets an Organisation
|
|
568
373
|
*/
|
|
@@ -573,19 +378,15 @@ export function useGetOrganisationSuspense<
|
|
|
573
378
|
>(
|
|
574
379
|
orgId: string,
|
|
575
380
|
options?: {
|
|
576
|
-
query?:
|
|
577
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>
|
|
578
|
-
>;
|
|
381
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>;
|
|
579
382
|
request?: SecondParameter<typeof customInstance>;
|
|
580
383
|
},
|
|
581
|
-
|
|
582
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
384
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
583
385
|
const queryOptions = useGetOrganisationSuspenseQueryOptions(orgId, options);
|
|
584
386
|
|
|
585
|
-
const query = useSuspenseQuery(queryOptions
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
387
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
388
|
+
queryKey: QueryKey;
|
|
389
|
+
};
|
|
589
390
|
|
|
590
391
|
query.queryKey = queryOptions.queryKey;
|
|
591
392
|
|
|
@@ -664,18 +465,18 @@ export type PatchOrganisationMutationError = ErrorType<void | AsError>;
|
|
|
664
465
|
/**
|
|
665
466
|
* @summary Adjust an existing Organisation
|
|
666
467
|
*/
|
|
667
|
-
export const usePatchOrganisation = <
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
): UseMutationResult<
|
|
468
|
+
export const usePatchOrganisation = <
|
|
469
|
+
TError = ErrorType<void | AsError>,
|
|
470
|
+
TContext = unknown,
|
|
471
|
+
>(options?: {
|
|
472
|
+
mutation?: UseMutationOptions<
|
|
473
|
+
Awaited<ReturnType<typeof patchOrganisation>>,
|
|
474
|
+
TError,
|
|
475
|
+
{ orgId: string; data: OrganisationPatchBodyBody },
|
|
476
|
+
TContext
|
|
477
|
+
>;
|
|
478
|
+
request?: SecondParameter<typeof customInstance>;
|
|
479
|
+
}): UseMutationResult<
|
|
679
480
|
Awaited<ReturnType<typeof patchOrganisation>>,
|
|
680
481
|
TError,
|
|
681
482
|
{ orgId: string; data: OrganisationPatchBodyBody },
|
|
@@ -683,7 +484,7 @@ export const usePatchOrganisation = <TError = ErrorType<void | AsError>, TContex
|
|
|
683
484
|
> => {
|
|
684
485
|
const mutationOptions = usePatchOrganisationMutationOptions(options);
|
|
685
486
|
|
|
686
|
-
return useMutation(mutationOptions
|
|
487
|
+
return useMutation(mutationOptions);
|
|
687
488
|
};
|
|
688
489
|
/**
|
|
689
490
|
* Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.
|
|
@@ -746,18 +547,18 @@ export type DeleteOrganisationMutationError = ErrorType<AsError | void>;
|
|
|
746
547
|
/**
|
|
747
548
|
* @summary Deletes an Organisation
|
|
748
549
|
*/
|
|
749
|
-
export const useDeleteOrganisation = <
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
): UseMutationResult<
|
|
550
|
+
export const useDeleteOrganisation = <
|
|
551
|
+
TError = ErrorType<AsError | void>,
|
|
552
|
+
TContext = unknown,
|
|
553
|
+
>(options?: {
|
|
554
|
+
mutation?: UseMutationOptions<
|
|
555
|
+
Awaited<ReturnType<typeof deleteOrganisation>>,
|
|
556
|
+
TError,
|
|
557
|
+
{ orgId: string },
|
|
558
|
+
TContext
|
|
559
|
+
>;
|
|
560
|
+
request?: SecondParameter<typeof customInstance>;
|
|
561
|
+
}): UseMutationResult<
|
|
761
562
|
Awaited<ReturnType<typeof deleteOrganisation>>,
|
|
762
563
|
TError,
|
|
763
564
|
{ orgId: string },
|
|
@@ -765,7 +566,7 @@ export const useDeleteOrganisation = <TError = ErrorType<AsError | void>, TConte
|
|
|
765
566
|
> => {
|
|
766
567
|
const mutationOptions = useDeleteOrganisationMutationOptions(options);
|
|
767
568
|
|
|
768
|
-
return useMutation(mutationOptions
|
|
569
|
+
return useMutation(mutationOptions);
|
|
769
570
|
};
|
|
770
571
|
/**
|
|
771
572
|
* Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.
|
|
@@ -792,9 +593,7 @@ export const useGetDefaultOrganisationQueryOptions = <
|
|
|
792
593
|
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
793
594
|
TError = ErrorType<void | AsError>,
|
|
794
595
|
>(options?: {
|
|
795
|
-
query?:
|
|
796
|
-
UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>
|
|
797
|
-
>;
|
|
596
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>;
|
|
798
597
|
request?: SecondParameter<typeof customInstance>;
|
|
799
598
|
}) => {
|
|
800
599
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -810,7 +609,7 @@ export const useGetDefaultOrganisationQueryOptions = <
|
|
|
810
609
|
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
811
610
|
TError,
|
|
812
611
|
TData
|
|
813
|
-
> & { queryKey:
|
|
612
|
+
> & { queryKey: QueryKey };
|
|
814
613
|
};
|
|
815
614
|
|
|
816
615
|
export type GetDefaultOrganisationQueryResult = NonNullable<
|
|
@@ -818,58 +617,6 @@ export type GetDefaultOrganisationQueryResult = NonNullable<
|
|
|
818
617
|
>;
|
|
819
618
|
export type GetDefaultOrganisationQueryError = ErrorType<void | AsError>;
|
|
820
619
|
|
|
821
|
-
export function useGetDefaultOrganisation<
|
|
822
|
-
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
823
|
-
TError = ErrorType<void | AsError>,
|
|
824
|
-
>(
|
|
825
|
-
options: {
|
|
826
|
-
query: Partial<
|
|
827
|
-
UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>
|
|
828
|
-
> &
|
|
829
|
-
Pick<
|
|
830
|
-
DefinedInitialDataOptions<
|
|
831
|
-
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
832
|
-
TError,
|
|
833
|
-
Awaited<ReturnType<typeof getDefaultOrganisation>>
|
|
834
|
-
>,
|
|
835
|
-
"initialData"
|
|
836
|
-
>;
|
|
837
|
-
request?: SecondParameter<typeof customInstance>;
|
|
838
|
-
},
|
|
839
|
-
queryClient?: QueryClient,
|
|
840
|
-
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
841
|
-
export function useGetDefaultOrganisation<
|
|
842
|
-
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
843
|
-
TError = ErrorType<void | AsError>,
|
|
844
|
-
>(
|
|
845
|
-
options?: {
|
|
846
|
-
query?: Partial<
|
|
847
|
-
UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>
|
|
848
|
-
> &
|
|
849
|
-
Pick<
|
|
850
|
-
UndefinedInitialDataOptions<
|
|
851
|
-
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
852
|
-
TError,
|
|
853
|
-
Awaited<ReturnType<typeof getDefaultOrganisation>>
|
|
854
|
-
>,
|
|
855
|
-
"initialData"
|
|
856
|
-
>;
|
|
857
|
-
request?: SecondParameter<typeof customInstance>;
|
|
858
|
-
},
|
|
859
|
-
queryClient?: QueryClient,
|
|
860
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
861
|
-
export function useGetDefaultOrganisation<
|
|
862
|
-
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
863
|
-
TError = ErrorType<void | AsError>,
|
|
864
|
-
>(
|
|
865
|
-
options?: {
|
|
866
|
-
query?: Partial<
|
|
867
|
-
UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>
|
|
868
|
-
>;
|
|
869
|
-
request?: SecondParameter<typeof customInstance>;
|
|
870
|
-
},
|
|
871
|
-
queryClient?: QueryClient,
|
|
872
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
873
620
|
/**
|
|
874
621
|
* @summary Gets the Default Organisation
|
|
875
622
|
*/
|
|
@@ -877,20 +624,13 @@ export function useGetDefaultOrganisation<
|
|
|
877
624
|
export function useGetDefaultOrganisation<
|
|
878
625
|
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
879
626
|
TError = ErrorType<void | AsError>,
|
|
880
|
-
>(
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
>;
|
|
885
|
-
request?: SecondParameter<typeof customInstance>;
|
|
886
|
-
},
|
|
887
|
-
queryClient?: QueryClient,
|
|
888
|
-
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
627
|
+
>(options?: {
|
|
628
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>;
|
|
629
|
+
request?: SecondParameter<typeof customInstance>;
|
|
630
|
+
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
889
631
|
const queryOptions = useGetDefaultOrganisationQueryOptions(options);
|
|
890
632
|
|
|
891
|
-
const query = useQuery(queryOptions
|
|
892
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
893
|
-
};
|
|
633
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
894
634
|
|
|
895
635
|
query.queryKey = queryOptions.queryKey;
|
|
896
636
|
|
|
@@ -901,8 +641,10 @@ export const useGetDefaultOrganisationSuspenseQueryOptions = <
|
|
|
901
641
|
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
902
642
|
TError = ErrorType<void | AsError>,
|
|
903
643
|
>(options?: {
|
|
904
|
-
query?:
|
|
905
|
-
|
|
644
|
+
query?: UseSuspenseQueryOptions<
|
|
645
|
+
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
646
|
+
TError,
|
|
647
|
+
TData
|
|
906
648
|
>;
|
|
907
649
|
request?: SecondParameter<typeof customInstance>;
|
|
908
650
|
}) => {
|
|
@@ -919,7 +661,7 @@ export const useGetDefaultOrganisationSuspenseQueryOptions = <
|
|
|
919
661
|
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
920
662
|
TError,
|
|
921
663
|
TData
|
|
922
|
-
> & { queryKey:
|
|
664
|
+
> & { queryKey: QueryKey };
|
|
923
665
|
};
|
|
924
666
|
|
|
925
667
|
export type GetDefaultOrganisationSuspenseQueryResult = NonNullable<
|
|
@@ -927,42 +669,6 @@ export type GetDefaultOrganisationSuspenseQueryResult = NonNullable<
|
|
|
927
669
|
>;
|
|
928
670
|
export type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
929
671
|
|
|
930
|
-
export function useGetDefaultOrganisationSuspense<
|
|
931
|
-
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
932
|
-
TError = ErrorType<void | AsError>,
|
|
933
|
-
>(
|
|
934
|
-
options: {
|
|
935
|
-
query: Partial<
|
|
936
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>
|
|
937
|
-
>;
|
|
938
|
-
request?: SecondParameter<typeof customInstance>;
|
|
939
|
-
},
|
|
940
|
-
queryClient?: QueryClient,
|
|
941
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
942
|
-
export function useGetDefaultOrganisationSuspense<
|
|
943
|
-
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
944
|
-
TError = ErrorType<void | AsError>,
|
|
945
|
-
>(
|
|
946
|
-
options?: {
|
|
947
|
-
query?: Partial<
|
|
948
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>
|
|
949
|
-
>;
|
|
950
|
-
request?: SecondParameter<typeof customInstance>;
|
|
951
|
-
},
|
|
952
|
-
queryClient?: QueryClient,
|
|
953
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
954
|
-
export function useGetDefaultOrganisationSuspense<
|
|
955
|
-
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
956
|
-
TError = ErrorType<void | AsError>,
|
|
957
|
-
>(
|
|
958
|
-
options?: {
|
|
959
|
-
query?: Partial<
|
|
960
|
-
UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>
|
|
961
|
-
>;
|
|
962
|
-
request?: SecondParameter<typeof customInstance>;
|
|
963
|
-
},
|
|
964
|
-
queryClient?: QueryClient,
|
|
965
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
966
672
|
/**
|
|
967
673
|
* @summary Gets the Default Organisation
|
|
968
674
|
*/
|
|
@@ -970,21 +676,19 @@ export function useGetDefaultOrganisationSuspense<
|
|
|
970
676
|
export function useGetDefaultOrganisationSuspense<
|
|
971
677
|
TData = Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
972
678
|
TError = ErrorType<void | AsError>,
|
|
973
|
-
>(
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
|
679
|
+
>(options?: {
|
|
680
|
+
query?: UseSuspenseQueryOptions<
|
|
681
|
+
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
682
|
+
TError,
|
|
683
|
+
TData
|
|
684
|
+
>;
|
|
685
|
+
request?: SecondParameter<typeof customInstance>;
|
|
686
|
+
}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
982
687
|
const queryOptions = useGetDefaultOrganisationSuspenseQueryOptions(options);
|
|
983
688
|
|
|
984
|
-
const query = useSuspenseQuery(queryOptions
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
689
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {
|
|
690
|
+
queryKey: QueryKey;
|
|
691
|
+
};
|
|
988
692
|
|
|
989
693
|
query.queryKey = queryOptions.queryKey;
|
|
990
694
|
|