@squonk/account-server-client 3.1.0-alpha.3 → 4.0.0-beta.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.
- package/asset/asset.cjs +24 -24
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +137 -102
- package/asset/asset.d.ts +137 -102
- package/asset/asset.js +24 -24
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +16 -16
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +137 -65
- package/charges/charges.d.ts +137 -65
- package/charges/charges.js +16 -16
- package/charges/charges.js.map +1 -1
- package/chunk-TKLTUR4R.cjs.map +1 -1
- package/event-stream/event-stream.cjs +8 -8
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +82 -47
- package/event-stream/event-stream.d.ts +82 -47
- package/event-stream/event-stream.js +8 -8
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +62 -14
- package/index.d.ts +62 -14
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +8 -8
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +69 -33
- package/merchant/merchant.d.ts +69 -33
- package/merchant/merchant.js +8 -8
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +14 -14
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +128 -75
- package/organisation/organisation.d.ts +128 -75
- package/organisation/organisation.js +14 -14
- package/organisation/organisation.js.map +1 -1
- package/package.json +7 -7
- package/product/product.cjs +24 -24
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +229 -122
- package/product/product.d.ts +229 -122
- package/product/product.js +24 -24
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +63 -14
- package/src/asset/asset.ts +185 -65
- package/src/charges/charges.ts +200 -18
- package/src/event-stream/event-stream.ts +114 -19
- package/src/merchant/merchant.ts +94 -10
- package/src/organisation/organisation.ts +171 -31
- package/src/product/product.ts +301 -41
- package/src/state/state.ts +50 -6
- package/src/unit/unit.ts +188 -38
- package/src/user/user.ts +183 -38
- package/state/state.cjs +4 -4
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +35 -17
- package/state/state.d.ts +35 -17
- package/state/state.js +4 -4
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +12 -12
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +140 -87
- package/unit/unit.d.ts +140 -87
- package/unit/unit.js +12 -12
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +12 -12
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +139 -86
- package/user/user.d.ts +139 -86
- package/user/user.js +12 -12
- package/user/user.js.map +1 -1
package/src/merchant/merchant.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
/**
|
|
2
|
-
* Generated by orval
|
|
3
|
+
* Generated by orval v7.2.0 🍺
|
|
3
4
|
* Do not edit manually.
|
|
4
5
|
* Account Server API
|
|
5
6
|
* The Informatics Matters Account Server API.
|
|
6
7
|
|
|
7
8
|
A service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.
|
|
8
9
|
|
|
9
|
-
* OpenAPI spec version:
|
|
10
|
+
* OpenAPI spec version: 4.0
|
|
10
11
|
*/
|
|
11
12
|
import {
|
|
12
13
|
useQuery,
|
|
13
14
|
useSuspenseQuery
|
|
14
15
|
} from '@tanstack/react-query'
|
|
15
16
|
import type {
|
|
17
|
+
DefinedInitialDataOptions,
|
|
18
|
+
DefinedUseQueryResult,
|
|
16
19
|
QueryFunction,
|
|
17
20
|
QueryKey,
|
|
21
|
+
UndefinedInitialDataOptions,
|
|
18
22
|
UseQueryOptions,
|
|
19
23
|
UseQueryResult,
|
|
20
24
|
UseSuspenseQueryOptions,
|
|
@@ -78,13 +82,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
78
82
|
export type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>
|
|
79
83
|
export type GetMerchantsQueryError = ErrorType<AsError | void>
|
|
80
84
|
|
|
85
|
+
|
|
86
|
+
export function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
87
|
+
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<
|
|
88
|
+
DefinedInitialDataOptions<
|
|
89
|
+
Awaited<ReturnType<typeof getMerchants>>,
|
|
90
|
+
TError,
|
|
91
|
+
TData
|
|
92
|
+
> , 'initialData'
|
|
93
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
94
|
+
|
|
95
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
96
|
+
export function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
97
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<
|
|
98
|
+
UndefinedInitialDataOptions<
|
|
99
|
+
Awaited<ReturnType<typeof getMerchants>>,
|
|
100
|
+
TError,
|
|
101
|
+
TData
|
|
102
|
+
> , 'initialData'
|
|
103
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
104
|
+
|
|
105
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
106
|
+
export function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
107
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
108
|
+
|
|
109
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
81
110
|
/**
|
|
82
111
|
* @summary Gets all Merchants
|
|
83
112
|
*/
|
|
84
|
-
|
|
113
|
+
|
|
114
|
+
export function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
85
115
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
86
116
|
|
|
87
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
117
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
88
118
|
|
|
89
119
|
const queryOptions = getGetMerchantsQueryOptions(options)
|
|
90
120
|
|
|
@@ -118,13 +148,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
118
148
|
export type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>
|
|
119
149
|
export type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>
|
|
120
150
|
|
|
151
|
+
|
|
152
|
+
export function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
153
|
+
options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
154
|
+
|
|
155
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
156
|
+
export function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
157
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
158
|
+
|
|
159
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
160
|
+
export function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
161
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
162
|
+
|
|
163
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
121
164
|
/**
|
|
122
165
|
* @summary Gets all Merchants
|
|
123
166
|
*/
|
|
124
|
-
|
|
167
|
+
|
|
168
|
+
export function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(
|
|
125
169
|
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
126
170
|
|
|
127
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
171
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
128
172
|
|
|
129
173
|
const queryOptions = getGetMerchantsSuspenseQueryOptions(options)
|
|
130
174
|
|
|
@@ -181,13 +225,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
181
225
|
export type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>
|
|
182
226
|
export type GetServiceQueryError = ErrorType<AsError | void>
|
|
183
227
|
|
|
228
|
+
|
|
229
|
+
export function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
230
|
+
mId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<
|
|
231
|
+
DefinedInitialDataOptions<
|
|
232
|
+
Awaited<ReturnType<typeof getService>>,
|
|
233
|
+
TError,
|
|
234
|
+
TData
|
|
235
|
+
> , 'initialData'
|
|
236
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
237
|
+
|
|
238
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
239
|
+
export function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
240
|
+
mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<
|
|
241
|
+
UndefinedInitialDataOptions<
|
|
242
|
+
Awaited<ReturnType<typeof getService>>,
|
|
243
|
+
TError,
|
|
244
|
+
TData
|
|
245
|
+
> , 'initialData'
|
|
246
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
247
|
+
|
|
248
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
249
|
+
export function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
250
|
+
mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
251
|
+
|
|
252
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
184
253
|
/**
|
|
185
254
|
* @summary Gets a specific Merchant
|
|
186
255
|
*/
|
|
187
|
-
|
|
256
|
+
|
|
257
|
+
export function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
188
258
|
mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
189
259
|
|
|
190
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
260
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
191
261
|
|
|
192
262
|
const queryOptions = getGetServiceQueryOptions(mId,options)
|
|
193
263
|
|
|
@@ -221,13 +291,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
221
291
|
export type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>
|
|
222
292
|
export type GetServiceSuspenseQueryError = ErrorType<AsError | void>
|
|
223
293
|
|
|
294
|
+
|
|
295
|
+
export function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
296
|
+
mId: number, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
297
|
+
|
|
298
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
299
|
+
export function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
300
|
+
mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
301
|
+
|
|
302
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
303
|
+
export function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
304
|
+
mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
305
|
+
|
|
306
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
224
307
|
/**
|
|
225
308
|
* @summary Gets a specific Merchant
|
|
226
309
|
*/
|
|
227
|
-
|
|
310
|
+
|
|
311
|
+
export function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(
|
|
228
312
|
mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
229
313
|
|
|
230
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
314
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
231
315
|
|
|
232
316
|
const queryOptions = getGetServiceSuspenseQueryOptions(mId,options)
|
|
233
317
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
/**
|
|
2
|
-
* Generated by orval
|
|
3
|
+
* Generated by orval v7.2.0 🍺
|
|
3
4
|
* Do not edit manually.
|
|
4
5
|
* Account Server API
|
|
5
6
|
* The Informatics Matters Account Server API.
|
|
6
7
|
|
|
7
8
|
A service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.
|
|
8
9
|
|
|
9
|
-
* OpenAPI spec version:
|
|
10
|
+
* OpenAPI spec version: 4.0
|
|
10
11
|
*/
|
|
11
12
|
import {
|
|
12
13
|
useMutation,
|
|
@@ -14,10 +15,14 @@ import {
|
|
|
14
15
|
useSuspenseQuery
|
|
15
16
|
} from '@tanstack/react-query'
|
|
16
17
|
import type {
|
|
18
|
+
DefinedInitialDataOptions,
|
|
19
|
+
DefinedUseQueryResult,
|
|
17
20
|
MutationFunction,
|
|
18
21
|
QueryFunction,
|
|
19
22
|
QueryKey,
|
|
23
|
+
UndefinedInitialDataOptions,
|
|
20
24
|
UseMutationOptions,
|
|
25
|
+
UseMutationResult,
|
|
21
26
|
UseQueryOptions,
|
|
22
27
|
UseQueryResult,
|
|
23
28
|
UseSuspenseQueryOptions,
|
|
@@ -85,13 +90,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
85
90
|
export type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>
|
|
86
91
|
export type GetOrganisationsQueryError = ErrorType<void | AsError>
|
|
87
92
|
|
|
93
|
+
|
|
94
|
+
export function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
95
|
+
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<
|
|
96
|
+
DefinedInitialDataOptions<
|
|
97
|
+
Awaited<ReturnType<typeof getOrganisations>>,
|
|
98
|
+
TError,
|
|
99
|
+
TData
|
|
100
|
+
> , 'initialData'
|
|
101
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
102
|
+
|
|
103
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
104
|
+
export function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
105
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<
|
|
106
|
+
UndefinedInitialDataOptions<
|
|
107
|
+
Awaited<ReturnType<typeof getOrganisations>>,
|
|
108
|
+
TError,
|
|
109
|
+
TData
|
|
110
|
+
> , 'initialData'
|
|
111
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
112
|
+
|
|
113
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
114
|
+
export function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
115
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
116
|
+
|
|
117
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
88
118
|
/**
|
|
89
119
|
* @summary Gets Organisations
|
|
90
120
|
*/
|
|
91
|
-
|
|
121
|
+
|
|
122
|
+
export function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
92
123
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
93
124
|
|
|
94
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
125
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
95
126
|
|
|
96
127
|
const queryOptions = getGetOrganisationsQueryOptions(options)
|
|
97
128
|
|
|
@@ -125,13 +156,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
125
156
|
export type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>
|
|
126
157
|
export type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>
|
|
127
158
|
|
|
159
|
+
|
|
160
|
+
export function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
161
|
+
options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
162
|
+
|
|
163
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
164
|
+
export function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
165
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
166
|
+
|
|
167
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
168
|
+
export function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
169
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
170
|
+
|
|
171
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
128
172
|
/**
|
|
129
173
|
* @summary Gets Organisations
|
|
130
174
|
*/
|
|
131
|
-
|
|
175
|
+
|
|
176
|
+
export function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(
|
|
132
177
|
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
133
178
|
|
|
134
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
179
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
135
180
|
|
|
136
181
|
const queryOptions = getGetOrganisationsSuspenseQueryOptions(options)
|
|
137
182
|
|
|
@@ -171,7 +216,7 @@ export const createOrganisation = (
|
|
|
171
216
|
export const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError | void>,
|
|
172
217
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
173
218
|
): UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext> => {
|
|
174
|
-
|
|
219
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
175
220
|
|
|
176
221
|
|
|
177
222
|
|
|
@@ -185,7 +230,7 @@ export const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError
|
|
|
185
230
|
|
|
186
231
|
|
|
187
232
|
|
|
188
|
-
|
|
233
|
+
return { mutationFn, ...mutationOptions }}
|
|
189
234
|
|
|
190
235
|
export type CreateOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisation>>>
|
|
191
236
|
export type CreateOrganisationMutationBody = OrganisationPostBodyBody
|
|
@@ -196,7 +241,12 @@ export const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError
|
|
|
196
241
|
*/
|
|
197
242
|
export const useCreateOrganisation = <TError = ErrorType<AsError | void>,
|
|
198
243
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
199
|
-
)
|
|
244
|
+
): UseMutationResult<
|
|
245
|
+
Awaited<ReturnType<typeof createOrganisation>>,
|
|
246
|
+
TError,
|
|
247
|
+
{data: OrganisationPostBodyBody},
|
|
248
|
+
TContext
|
|
249
|
+
> => {
|
|
200
250
|
|
|
201
251
|
const mutationOptions = getCreateOrganisationMutationOptions(options);
|
|
202
252
|
|
|
@@ -248,13 +298,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
248
298
|
export type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>
|
|
249
299
|
export type GetOrganisationQueryError = ErrorType<void | AsError>
|
|
250
300
|
|
|
301
|
+
|
|
302
|
+
export function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
303
|
+
orgId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<
|
|
304
|
+
DefinedInitialDataOptions<
|
|
305
|
+
Awaited<ReturnType<typeof getOrganisation>>,
|
|
306
|
+
TError,
|
|
307
|
+
TData
|
|
308
|
+
> , 'initialData'
|
|
309
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
310
|
+
|
|
311
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
312
|
+
export function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
313
|
+
orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<
|
|
314
|
+
UndefinedInitialDataOptions<
|
|
315
|
+
Awaited<ReturnType<typeof getOrganisation>>,
|
|
316
|
+
TError,
|
|
317
|
+
TData
|
|
318
|
+
> , 'initialData'
|
|
319
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
320
|
+
|
|
321
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
322
|
+
export function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
323
|
+
orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
324
|
+
|
|
325
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
251
326
|
/**
|
|
252
327
|
* @summary Gets an Organisation
|
|
253
328
|
*/
|
|
254
|
-
|
|
329
|
+
|
|
330
|
+
export function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
255
331
|
orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
256
332
|
|
|
257
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
333
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
258
334
|
|
|
259
335
|
const queryOptions = getGetOrganisationQueryOptions(orgId,options)
|
|
260
336
|
|
|
@@ -288,13 +364,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
288
364
|
export type GetOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>
|
|
289
365
|
export type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>
|
|
290
366
|
|
|
367
|
+
|
|
368
|
+
export function useGetOrganisationSuspense<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
369
|
+
orgId: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
370
|
+
|
|
371
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
372
|
+
export function useGetOrganisationSuspense<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
373
|
+
orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
374
|
+
|
|
375
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
376
|
+
export function useGetOrganisationSuspense<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
377
|
+
orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
378
|
+
|
|
379
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
291
380
|
/**
|
|
292
381
|
* @summary Gets an Organisation
|
|
293
382
|
*/
|
|
294
|
-
|
|
383
|
+
|
|
384
|
+
export function useGetOrganisationSuspense<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
295
385
|
orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
296
386
|
|
|
297
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
387
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
298
388
|
|
|
299
389
|
const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId,options)
|
|
300
390
|
|
|
@@ -330,10 +420,10 @@ export const patchOrganisation = (
|
|
|
330
420
|
|
|
331
421
|
|
|
332
422
|
|
|
333
|
-
export const getPatchOrganisationMutationOptions = <TError = ErrorType<AsError>,
|
|
423
|
+
export const getPatchOrganisationMutationOptions = <TError = ErrorType<void | AsError>,
|
|
334
424
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
335
425
|
): UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext> => {
|
|
336
|
-
|
|
426
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
337
427
|
|
|
338
428
|
|
|
339
429
|
|
|
@@ -347,18 +437,23 @@ export const getPatchOrganisationMutationOptions = <TError = ErrorType<AsError>,
|
|
|
347
437
|
|
|
348
438
|
|
|
349
439
|
|
|
350
|
-
|
|
440
|
+
return { mutationFn, ...mutationOptions }}
|
|
351
441
|
|
|
352
442
|
export type PatchOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof patchOrganisation>>>
|
|
353
443
|
export type PatchOrganisationMutationBody = OrganisationPatchBodyBody
|
|
354
|
-
export type PatchOrganisationMutationError = ErrorType<AsError>
|
|
444
|
+
export type PatchOrganisationMutationError = ErrorType<void | AsError>
|
|
355
445
|
|
|
356
446
|
/**
|
|
357
447
|
* @summary Adjust an existing Organisation
|
|
358
448
|
*/
|
|
359
|
-
export const usePatchOrganisation = <TError = ErrorType<AsError>,
|
|
449
|
+
export const usePatchOrganisation = <TError = ErrorType<void | AsError>,
|
|
360
450
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
361
|
-
)
|
|
451
|
+
): UseMutationResult<
|
|
452
|
+
Awaited<ReturnType<typeof patchOrganisation>>,
|
|
453
|
+
TError,
|
|
454
|
+
{orgId: string;data: OrganisationPatchBodyBody},
|
|
455
|
+
TContext
|
|
456
|
+
> => {
|
|
362
457
|
|
|
363
458
|
const mutationOptions = getPatchOrganisationMutationOptions(options);
|
|
364
459
|
|
|
@@ -384,10 +479,10 @@ export const deleteOrganisation = (
|
|
|
384
479
|
|
|
385
480
|
|
|
386
481
|
|
|
387
|
-
export const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError>,
|
|
482
|
+
export const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError | void>,
|
|
388
483
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
389
484
|
): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext> => {
|
|
390
|
-
|
|
485
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
391
486
|
|
|
392
487
|
|
|
393
488
|
|
|
@@ -401,18 +496,23 @@ export const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError>
|
|
|
401
496
|
|
|
402
497
|
|
|
403
498
|
|
|
404
|
-
|
|
499
|
+
return { mutationFn, ...mutationOptions }}
|
|
405
500
|
|
|
406
501
|
export type DeleteOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisation>>>
|
|
407
502
|
|
|
408
|
-
export type DeleteOrganisationMutationError = ErrorType<AsError>
|
|
503
|
+
export type DeleteOrganisationMutationError = ErrorType<AsError | void>
|
|
409
504
|
|
|
410
505
|
/**
|
|
411
506
|
* @summary Deletes an Organisation
|
|
412
507
|
*/
|
|
413
|
-
export const useDeleteOrganisation = <TError = ErrorType<AsError>,
|
|
508
|
+
export const useDeleteOrganisation = <TError = ErrorType<AsError | void>,
|
|
414
509
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
415
|
-
)
|
|
510
|
+
): UseMutationResult<
|
|
511
|
+
Awaited<ReturnType<typeof deleteOrganisation>>,
|
|
512
|
+
TError,
|
|
513
|
+
{orgId: string},
|
|
514
|
+
TContext
|
|
515
|
+
> => {
|
|
416
516
|
|
|
417
517
|
const mutationOptions = getDeleteOrganisationMutationOptions(options);
|
|
418
518
|
|
|
@@ -432,14 +532,14 @@ export const getDefaultOrganisation = (
|
|
|
432
532
|
|
|
433
533
|
|
|
434
534
|
return customInstance<OrganisationGetDefaultResponse>(
|
|
435
|
-
{url: `/organisation
|
|
535
|
+
{url: `/default/organisation`, method: 'GET', signal
|
|
436
536
|
},
|
|
437
537
|
options);
|
|
438
538
|
}
|
|
439
539
|
|
|
440
540
|
|
|
441
541
|
export const getGetDefaultOrganisationQueryKey = () => {
|
|
442
|
-
return ["account-server-api", `/organisation
|
|
542
|
+
return ["account-server-api", `/default/organisation`] as const;
|
|
443
543
|
}
|
|
444
544
|
|
|
445
545
|
|
|
@@ -464,13 +564,39 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
464
564
|
export type GetDefaultOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>
|
|
465
565
|
export type GetDefaultOrganisationQueryError = ErrorType<void | AsError>
|
|
466
566
|
|
|
567
|
+
|
|
568
|
+
export function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
569
|
+
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<
|
|
570
|
+
DefinedInitialDataOptions<
|
|
571
|
+
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
572
|
+
TError,
|
|
573
|
+
TData
|
|
574
|
+
> , 'initialData'
|
|
575
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
576
|
+
|
|
577
|
+
): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
578
|
+
export function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
579
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<
|
|
580
|
+
UndefinedInitialDataOptions<
|
|
581
|
+
Awaited<ReturnType<typeof getDefaultOrganisation>>,
|
|
582
|
+
TError,
|
|
583
|
+
TData
|
|
584
|
+
> , 'initialData'
|
|
585
|
+
>, request?: SecondParameter<typeof customInstance>}
|
|
586
|
+
|
|
587
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
588
|
+
export function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
589
|
+
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
590
|
+
|
|
591
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
467
592
|
/**
|
|
468
593
|
* @summary Gets the Default Organisation
|
|
469
594
|
*/
|
|
470
|
-
|
|
595
|
+
|
|
596
|
+
export function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
471
597
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
472
598
|
|
|
473
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
599
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
474
600
|
|
|
475
601
|
const queryOptions = getGetDefaultOrganisationQueryOptions(options)
|
|
476
602
|
|
|
@@ -504,13 +630,27 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
|
504
630
|
export type GetDefaultOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>
|
|
505
631
|
export type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>
|
|
506
632
|
|
|
633
|
+
|
|
634
|
+
export function useGetDefaultOrganisationSuspense<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
635
|
+
options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
636
|
+
|
|
637
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
638
|
+
export function useGetDefaultOrganisationSuspense<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
639
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
640
|
+
|
|
641
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
642
|
+
export function useGetDefaultOrganisationSuspense<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
643
|
+
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
644
|
+
|
|
645
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
507
646
|
/**
|
|
508
647
|
* @summary Gets the Default Organisation
|
|
509
648
|
*/
|
|
510
|
-
|
|
649
|
+
|
|
650
|
+
export function useGetDefaultOrganisationSuspense<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(
|
|
511
651
|
options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
512
652
|
|
|
513
|
-
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }
|
|
653
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
514
654
|
|
|
515
655
|
const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options)
|
|
516
656
|
|