@squonk/account-server-client 4.4.0-4-4.2197069952 → 4.4.0-4-4.2199390673
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 +4 -4
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +35 -17
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +35 -17
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.cjs +4 -4
- package/dist/api/actions/actions.fetch.cjs.map +1 -1
- package/dist/api/actions/actions.fetch.d.cts +35 -17
- package/dist/api/actions/actions.fetch.d.cts.map +1 -1
- package/dist/api/actions/actions.fetch.d.ts +35 -17
- package/dist/api/actions/actions.fetch.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.js +4 -4
- package/dist/api/actions/actions.fetch.js.map +1 -1
- package/dist/api/actions/actions.js +4 -4
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/asset/asset.cjs +22 -22
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +76 -40
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +76 -40
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.cjs +22 -22
- package/dist/api/asset/asset.fetch.cjs.map +1 -1
- package/dist/api/asset/asset.fetch.d.cts +76 -40
- package/dist/api/asset/asset.fetch.d.cts.map +1 -1
- package/dist/api/asset/asset.fetch.d.ts +76 -40
- package/dist/api/asset/asset.fetch.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.js +22 -22
- package/dist/api/asset/asset.fetch.js.map +1 -1
- package/dist/api/asset/asset.js +22 -22
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +16 -16
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +137 -65
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +137 -65
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.cjs +16 -16
- package/dist/api/charges/charges.fetch.cjs.map +1 -1
- package/dist/api/charges/charges.fetch.d.cts +137 -65
- package/dist/api/charges/charges.fetch.d.cts.map +1 -1
- package/dist/api/charges/charges.fetch.d.ts +137 -65
- package/dist/api/charges/charges.fetch.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.js +16 -16
- package/dist/api/charges/charges.fetch.js.map +1 -1
- package/dist/api/charges/charges.js +16 -16
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +12 -12
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +71 -35
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +71 -35
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
- package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.js +12 -12
- package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
- package/dist/api/event-stream/event-stream.js +12 -12
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +8 -8
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +69 -33
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +69 -33
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.cjs +8 -8
- package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.cts +69 -33
- package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.ts +69 -33
- package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.js +8 -8
- package/dist/api/merchant/merchant.fetch.js.map +1 -1
- package/dist/api/merchant/merchant.js +8 -8
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +18 -18
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +106 -52
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +106 -52
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.cjs +18 -18
- package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.cts +106 -52
- package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.ts +106 -52
- package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.js +18 -18
- package/dist/api/organisation/organisation.fetch.js.map +1 -1
- package/dist/api/organisation/organisation.js +18 -18
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +30 -30
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +208 -100
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +208 -100
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.fetch.cjs +30 -30
- package/dist/api/product/product.fetch.cjs.map +1 -1
- package/dist/api/product/product.fetch.d.cts +208 -100
- package/dist/api/product/product.fetch.d.cts.map +1 -1
- package/dist/api/product/product.fetch.d.ts +208 -100
- package/dist/api/product/product.fetch.d.ts.map +1 -1
- package/dist/api/product/product.fetch.js +30 -30
- package/dist/api/product/product.fetch.js.map +1 -1
- package/dist/api/product/product.js +30 -30
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +4 -4
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +35 -17
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +35 -17
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.fetch.cjs +4 -4
- package/dist/api/state/state.fetch.cjs.map +1 -1
- package/dist/api/state/state.fetch.d.cts +35 -17
- package/dist/api/state/state.fetch.d.cts.map +1 -1
- package/dist/api/state/state.fetch.d.ts +35 -17
- package/dist/api/state/state.fetch.d.ts.map +1 -1
- package/dist/api/state/state.fetch.js +4 -4
- package/dist/api/state/state.fetch.js.map +1 -1
- package/dist/api/state/state.js +4 -4
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +30 -30
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +144 -72
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +144 -72
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.cjs +30 -30
- package/dist/api/unit/unit.fetch.cjs.map +1 -1
- package/dist/api/unit/unit.fetch.d.cts +144 -72
- package/dist/api/unit/unit.fetch.d.cts.map +1 -1
- package/dist/api/unit/unit.fetch.d.ts +144 -72
- package/dist/api/unit/unit.fetch.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.js +30 -30
- package/dist/api/unit/unit.fetch.js.map +1 -1
- package/dist/api/unit/unit.js +30 -30
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +20 -20
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +107 -53
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +107 -53
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.fetch.cjs +20 -20
- package/dist/api/user/user.fetch.cjs.map +1 -1
- package/dist/api/user/user.fetch.d.cts +107 -53
- package/dist/api/user/user.fetch.d.cts.map +1 -1
- package/dist/api/user/user.fetch.d.ts +107 -53
- package/dist/api/user/user.fetch.d.ts.map +1 -1
- package/dist/api/user/user.fetch.js +20 -20
- package/dist/api/user/user.fetch.js.map +1 -1
- package/dist/api/user/user.js +20 -20
- package/dist/api/user/user.js.map +1 -1
- package/package.json +7 -5
- package/src/api/actions/actions.fetch.ts +103 -12
- package/src/api/actions/actions.ts +103 -12
- package/src/api/asset/asset.fetch.ts +303 -94
- package/src/api/asset/asset.ts +303 -94
- package/src/api/charges/charges.fetch.ts +456 -54
- package/src/api/charges/charges.ts +456 -54
- package/src/api/event-stream/event-stream.fetch.ts +262 -58
- package/src/api/event-stream/event-stream.ts +262 -58
- package/src/api/merchant/merchant.fetch.ts +212 -28
- package/src/api/merchant/merchant.ts +212 -28
- package/src/api/organisation/organisation.fetch.ts +381 -86
- package/src/api/organisation/organisation.ts +381 -86
- package/src/api/product/product.fetch.ts +724 -130
- package/src/api/product/product.ts +724 -130
- package/src/api/state/state.fetch.ts +105 -16
- package/src/api/state/state.ts +105 -16
- package/src/api/unit/unit.fetch.ts +521 -146
- package/src/api/unit/unit.ts +521 -146
- package/src/api/user/user.fetch.ts +401 -101
- package/src/api/user/user.ts +401 -101
- package/tests/README.md +98 -0
- package/tests/component.test.tsx +191 -0
- package/tests/tsconfig.json +7 -0
- package/tests/type-tests.tsx +196 -0
package/dist/api/unit/unit.cjs
CHANGED
|
@@ -47,9 +47,9 @@ const getGetOrganisationUnitsQueryOptions = (orgId, options) => {
|
|
|
47
47
|
/**
|
|
48
48
|
* @summary Gets Organisational Units
|
|
49
49
|
*/
|
|
50
|
-
function useGetOrganisationUnits(orgId, options) {
|
|
50
|
+
function useGetOrganisationUnits(orgId, options, queryClient) {
|
|
51
51
|
const queryOptions = getGetOrganisationUnitsQueryOptions(orgId, options);
|
|
52
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
52
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
|
|
53
53
|
query.queryKey = queryOptions.queryKey;
|
|
54
54
|
return query;
|
|
55
55
|
}
|
|
@@ -73,9 +73,9 @@ const getGetOrganisationUnitsSuspenseQueryOptions = (orgId, options) => {
|
|
|
73
73
|
/**
|
|
74
74
|
* @summary Gets Organisational Units
|
|
75
75
|
*/
|
|
76
|
-
function useGetOrganisationUnitsSuspense(orgId, options) {
|
|
76
|
+
function useGetOrganisationUnitsSuspense(orgId, options, queryClient) {
|
|
77
77
|
const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);
|
|
78
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
78
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
|
|
79
79
|
query.queryKey = queryOptions.queryKey;
|
|
80
80
|
return query;
|
|
81
81
|
}
|
|
@@ -121,8 +121,8 @@ const getCreateOrganisationUnitMutationOptions = (options) => {
|
|
|
121
121
|
/**
|
|
122
122
|
* @summary Create a new Organisational Unit
|
|
123
123
|
*/
|
|
124
|
-
const useCreateOrganisationUnit = (options) => {
|
|
125
|
-
return (0, __tanstack_react_query.useMutation)(getCreateOrganisationUnitMutationOptions(options));
|
|
124
|
+
const useCreateOrganisationUnit = (options, queryClient) => {
|
|
125
|
+
return (0, __tanstack_react_query.useMutation)(getCreateOrganisationUnitMutationOptions(options), queryClient);
|
|
126
126
|
};
|
|
127
127
|
/**
|
|
128
128
|
* Gets a Unit. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.
|
|
@@ -157,9 +157,9 @@ const getGetUnitQueryOptions = (unitId, options) => {
|
|
|
157
157
|
/**
|
|
158
158
|
* @summary Gets an Organisational Unit
|
|
159
159
|
*/
|
|
160
|
-
function useGetUnit(unitId, options) {
|
|
160
|
+
function useGetUnit(unitId, options, queryClient) {
|
|
161
161
|
const queryOptions = getGetUnitQueryOptions(unitId, options);
|
|
162
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
162
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
|
|
163
163
|
query.queryKey = queryOptions.queryKey;
|
|
164
164
|
return query;
|
|
165
165
|
}
|
|
@@ -183,9 +183,9 @@ const getGetUnitSuspenseQueryOptions = (unitId, options) => {
|
|
|
183
183
|
/**
|
|
184
184
|
* @summary Gets an Organisational Unit
|
|
185
185
|
*/
|
|
186
|
-
function useGetUnitSuspense(unitId, options) {
|
|
186
|
+
function useGetUnitSuspense(unitId, options, queryClient) {
|
|
187
187
|
const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);
|
|
188
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
188
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
|
|
189
189
|
query.queryKey = queryOptions.queryKey;
|
|
190
190
|
return query;
|
|
191
191
|
}
|
|
@@ -228,8 +228,8 @@ const getPatchUnitMutationOptions = (options) => {
|
|
|
228
228
|
/**
|
|
229
229
|
* @summary Adjust an existing Unit
|
|
230
230
|
*/
|
|
231
|
-
const usePatchUnit = (options) => {
|
|
232
|
-
return (0, __tanstack_react_query.useMutation)(getPatchUnitMutationOptions(options));
|
|
231
|
+
const usePatchUnit = (options, queryClient) => {
|
|
232
|
+
return (0, __tanstack_react_query.useMutation)(getPatchUnitMutationOptions(options), queryClient);
|
|
233
233
|
};
|
|
234
234
|
/**
|
|
235
235
|
* Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.
|
|
@@ -270,8 +270,8 @@ const getDeleteOrganisationUnitMutationOptions = (options) => {
|
|
|
270
270
|
/**
|
|
271
271
|
* @summary Deletes an Organisational Unit
|
|
272
272
|
*/
|
|
273
|
-
const useDeleteOrganisationUnit = (options) => {
|
|
274
|
-
return (0, __tanstack_react_query.useMutation)(getDeleteOrganisationUnitMutationOptions(options));
|
|
273
|
+
const useDeleteOrganisationUnit = (options, queryClient) => {
|
|
274
|
+
return (0, __tanstack_react_query.useMutation)(getDeleteOrganisationUnitMutationOptions(options), queryClient);
|
|
275
275
|
};
|
|
276
276
|
/**
|
|
277
277
|
* @summary Gets your Personal Unit (if you have one)
|
|
@@ -299,9 +299,9 @@ const getGetPersonalUnitQueryOptions = (options) => {
|
|
|
299
299
|
/**
|
|
300
300
|
* @summary Gets your Personal Unit (if you have one)
|
|
301
301
|
*/
|
|
302
|
-
function useGetPersonalUnit(options) {
|
|
302
|
+
function useGetPersonalUnit(options, queryClient) {
|
|
303
303
|
const queryOptions = getGetPersonalUnitQueryOptions(options);
|
|
304
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
304
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
|
|
305
305
|
query.queryKey = queryOptions.queryKey;
|
|
306
306
|
return query;
|
|
307
307
|
}
|
|
@@ -325,9 +325,9 @@ const getGetPersonalUnitSuspenseQueryOptions = (options) => {
|
|
|
325
325
|
/**
|
|
326
326
|
* @summary Gets your Personal Unit (if you have one)
|
|
327
327
|
*/
|
|
328
|
-
function useGetPersonalUnitSuspense(options) {
|
|
328
|
+
function useGetPersonalUnitSuspense(options, queryClient) {
|
|
329
329
|
const queryOptions = getGetPersonalUnitSuspenseQueryOptions(options);
|
|
330
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
330
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
|
|
331
331
|
query.queryKey = queryOptions.queryKey;
|
|
332
332
|
return query;
|
|
333
333
|
}
|
|
@@ -370,8 +370,8 @@ const getCreatePersonalUnitMutationOptions = (options) => {
|
|
|
370
370
|
/**
|
|
371
371
|
* @summary Create a new Personal Unit
|
|
372
372
|
*/
|
|
373
|
-
const useCreatePersonalUnit = (options) => {
|
|
374
|
-
return (0, __tanstack_react_query.useMutation)(getCreatePersonalUnitMutationOptions(options));
|
|
373
|
+
const useCreatePersonalUnit = (options, queryClient) => {
|
|
374
|
+
return (0, __tanstack_react_query.useMutation)(getCreatePersonalUnitMutationOptions(options), queryClient);
|
|
375
375
|
};
|
|
376
376
|
/**
|
|
377
377
|
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
@@ -407,8 +407,8 @@ const getDeletePersonalUnitMutationOptions = (options) => {
|
|
|
407
407
|
/**
|
|
408
408
|
* @summary Deletes a Personal Unit
|
|
409
409
|
*/
|
|
410
|
-
const useDeletePersonalUnit = (options) => {
|
|
411
|
-
return (0, __tanstack_react_query.useMutation)(getDeletePersonalUnitMutationOptions(options));
|
|
410
|
+
const useDeletePersonalUnit = (options, queryClient) => {
|
|
411
|
+
return (0, __tanstack_react_query.useMutation)(getDeletePersonalUnitMutationOptions(options), queryClient);
|
|
412
412
|
};
|
|
413
413
|
/**
|
|
414
414
|
* Gets all the Units that you are a member of, or a specific Unit by name.
|
|
@@ -445,9 +445,9 @@ const getGetUnitsQueryOptions = (params, options) => {
|
|
|
445
445
|
/**
|
|
446
446
|
* @summary Gets Units
|
|
447
447
|
*/
|
|
448
|
-
function useGetUnits(params, options) {
|
|
448
|
+
function useGetUnits(params, options, queryClient) {
|
|
449
449
|
const queryOptions = getGetUnitsQueryOptions(params, options);
|
|
450
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
450
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
|
|
451
451
|
query.queryKey = queryOptions.queryKey;
|
|
452
452
|
return query;
|
|
453
453
|
}
|
|
@@ -471,9 +471,9 @@ const getGetUnitsSuspenseQueryOptions = (params, options) => {
|
|
|
471
471
|
/**
|
|
472
472
|
* @summary Gets Units
|
|
473
473
|
*/
|
|
474
|
-
function useGetUnitsSuspense(params, options) {
|
|
474
|
+
function useGetUnitsSuspense(params, options, queryClient) {
|
|
475
475
|
const queryOptions = getGetUnitsSuspenseQueryOptions(params, options);
|
|
476
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
476
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
|
|
477
477
|
query.queryKey = queryOptions.queryKey;
|
|
478
478
|
return query;
|
|
479
479
|
}
|
|
@@ -518,8 +518,8 @@ const getCreateDefaultUnitMutationOptions = (options) => {
|
|
|
518
518
|
/**
|
|
519
519
|
* @summary Create a new Personal Unit
|
|
520
520
|
*/
|
|
521
|
-
const useCreateDefaultUnit = (options) => {
|
|
522
|
-
return (0, __tanstack_react_query.useMutation)(getCreateDefaultUnitMutationOptions(options));
|
|
521
|
+
const useCreateDefaultUnit = (options, queryClient) => {
|
|
522
|
+
return (0, __tanstack_react_query.useMutation)(getCreateDefaultUnitMutationOptions(options), queryClient);
|
|
523
523
|
};
|
|
524
524
|
/**
|
|
525
525
|
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
@@ -557,8 +557,8 @@ const getDeleteDefaultUnitMutationOptions = (options) => {
|
|
|
557
557
|
/**
|
|
558
558
|
* @summary Deletes a Personal Unit
|
|
559
559
|
*/
|
|
560
|
-
const useDeleteDefaultUnit = (options) => {
|
|
561
|
-
return (0, __tanstack_react_query.useMutation)(getDeleteDefaultUnitMutationOptions(options));
|
|
560
|
+
const useDeleteDefaultUnit = (options, queryClient) => {
|
|
561
|
+
return (0, __tanstack_react_query.useMutation)(getDeleteDefaultUnitMutationOptions(options), queryClient);
|
|
562
562
|
};
|
|
563
563
|
|
|
564
564
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit.cjs","names":["customInstance","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n { orgId: string; data: OrganisationUnitPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUnit>>,\n { unitId: string; data: UnitPatchBodyBody }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n { unitId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n { data: PersonalUnitPutBodyBody }\n >","mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePersonalUnit>>, void>","queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n { data: PersonalUnitPutBodyBody }\n >","mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, void>"],"sources":["../../../src/api/unit/unit.ts"],"sourcesContent":["/**\n * Generated by orval v7.17.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n InvalidateOptions,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n GetUnitsParams,\n OrganisationUnitPostBodyBody,\n OrganisationUnitPostResponse,\n OrganisationUnitsGetResponse,\n PersonalUnitPutBodyBody,\n PersonalUnitPutResponse,\n UnitAllDetail,\n UnitPatchBodyBody,\n UnitsGetResponse,\n} from \".././api-schemas\";\n\nimport { customInstance } from \"../../custom-axios\";\nimport type { ErrorType } from \"../../custom-axios\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Organisational Units you have access to or that are public\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitsGetResponse>(\n { url: `/organisation/${orgId}/unit`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUnitsQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId, \"unit\"] as const;\n};\n\nexport const getGetOrganisationUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUnitsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationUnitsQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Organisational Units\n */\nexport const invalidateGetOrganisationUnits = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetOrganisationUnitsQueryKey(orgId) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetOrganisationUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUnitsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a new Organisation Unit.\n\nThe **User** who creates the Unit becomes the **Owner** of the Unit. They are considered a *Member* (**User**) of the Unit but are not present in the list of users, which a separate list of users explicitly added to the Unit by a member of the Organisation or another member of the Unit.\n\nYou need to be a member of the **Organisation** or have administration rights to use this endpoint\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitPostResponse>(\n {\n url: `/organisation/${orgId}/unit`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationUnitPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const getCreateOrganisationUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n { orgId: string; data: OrganisationUnitPostBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return createOrganisationUnit(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisationUnit>>\n>;\nexport type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody;\nexport type CreateOrganisationUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Organisational Unit\n */\nexport const useCreateOrganisationUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets a Unit. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.\n\n * @summary Gets an Organisational Unit\n */\nexport const getUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/unit/${unitId}`, method: \"GET\", signal }, options);\n};\n\nexport const getGetUnitQueryKey = (unitId?: string) => {\n return [\"account-server\", \"unit\", unitId] as const;\n};\n\nexport const getGetUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets an Organisational Unit\n */\nexport const invalidateGetUnit = async (\n queryClient: QueryClient,\n unitId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitQueryKey(unitId) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Used to update existing Unit. You can change a Unit's **name** or its **default_product_privacy** (as long as the new privacy does not conflict with the Organisation's value).\n\nYou have to be a member of the **Unit**, a member of its **Organisation**, or an administrator to patch a Unit.\n\n * @summary Adjust an existing Unit\n */\nexport const patchUnit = (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/unit/${unitId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: unitPatchBodyBody,\n },\n options,\n );\n};\n\nexport const getPatchUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUnit>>,\n { unitId: string; data: UnitPatchBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return patchUnit(unitId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>;\nexport type PatchUnitMutationBody = UnitPatchBodyBody;\nexport type PatchUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Unit\n */\nexport const usePatchUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.\n\nYou cannot delete Units in the **Default Organisation**. These Units are **Personal Units** and need to be deleted using the `DELETE /unit` endpoint.\n\nYou cannot delete a Unit that contains undeleted **Products**\n\n * @summary Deletes an Organisational Unit\n */\nexport const deleteOrganisationUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteOrganisationUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n { unitId: string }\n > = (props) => {\n const { unitId } = props ?? {};\n\n return deleteOrganisationUnit(unitId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>\n>;\n\nexport type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an Organisational Unit\n */\nexport const useDeleteOrganisationUnit = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const getPersonalUnit = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/personal-unit`, method: \"GET\", signal }, options);\n};\n\nexport const getGetPersonalUnitQueryKey = () => {\n return [\"account-server\", \"personal-unit\"] as const;\n};\n\nexport const getGetPersonalUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetPersonalUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;\nexport type GetPersonalUnitQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetPersonalUnitQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const invalidateGetPersonalUnit = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetPersonalUnitQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetPersonalUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetPersonalUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getPersonalUnit>>\n>;\nexport type GetPersonalUnitSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetPersonalUnitSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\n * @summary Create a new Personal Unit\n */\nexport const createPersonalUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/personal-unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreatePersonalUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createPersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createPersonalUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreatePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createPersonalUnit>>\n>;\nexport type CreatePersonalUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreatePersonalUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreatePersonalUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreatePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\n * @summary Deletes a Personal Unit\n */\nexport const deletePersonalUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/personal-unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeletePersonalUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deletePersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePersonalUnit>>, void> = () => {\n return deletePersonalUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeletePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deletePersonalUnit>>\n>;\n\nexport type DeletePersonalUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeletePersonalUnit = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeletePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets all the Units that you are a member of, or a specific Unit by name.\n\nYou can see a Unit if you are a member of it, the owner (creator) of it, or a member or creator of the Unit's Organisation, or if you are an admin user.\n\n * @summary Gets Units\n */\nexport const getUnits = (\n params?: GetUnitsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitsGetResponse>({ url: `/unit`, method: \"GET\", params, signal }, options);\n};\n\nexport const getGetUnitsQueryKey = (params?: GetUnitsParams) => {\n return [\"account-server\", \"unit\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitsQueryOptions(params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Units\n */\nexport const invalidateGetUnits = async (\n queryClient: QueryClient,\n params?: GetUnitsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitsSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **PUT** at `/personal-unit`.\n\n * @summary Create a new Personal Unit\n */\nexport const createDefaultUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreateDefaultUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDefaultUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDefaultUnit>>\n>;\nexport type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreateDefaultUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreateDefaultUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **DELETE** at `/personal-unit`.\n\n * @summary Deletes a Personal Unit\n */\nexport const deleteDefaultUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteDefaultUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deleteDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, void> = () => {\n return deleteDefaultUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDefaultUnit>>\n>;\n\nexport type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeleteDefaultUnit = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,wBACX,OACA,SACA,WACG;AACH,QAAOA,oCACL;EAAE,KAAK,iBAAiB,MAAM;EAAQ,QAAQ;EAAO;EAAQ,EAC7D,QACD;;AAGH,MAAa,mCAAmC,UAAmB;AACjE,QAAO;EAAC;EAAkB;EAAgB;EAAO;EAAO;;AAG1D,MAAa,uCAIX,OACA,YAIG;CACH,MAAM,EAAE,OAAO,c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AAU,iBAAiB,SAAS,mBAAmB,UAC3D,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cACxE,UACA;EAAE,GAAG;EAAS,UAAU;GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMU,cAGD,UAAU;EACb,MAAM,EAAE,SAAS,SAAS,EAAE;AAE5B,SAAO,kBAAkB,MAAM,eAAe;;AAGhD,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAY3C,MAAa,wBAGX,YAaG;AAGH,gDAFwB,oCAAoC,QAAQ,CAEjC;;;;;;;;;AASrC,MAAa,qBAAqB,YAAqD;AACrF,QAAOV,oCAAqB;EAAE,KAAK;EAAS,QAAQ;EAAU,EAAE,QAAQ;;AAG1E,MAAa,uCAGX,YAQ+F;CAC/F,MAAM,cAAc,CAAC,oBAAoB;CACzC,MAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,UAC3D,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cACxE,UACA;EAAE,GAAG;EAAS,UAAU;GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMW,mBAA0F;AAC9F,SAAO,kBAAkB,eAAe;;AAG1C,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAY3C,MAAa,wBAGX,YAQ8F;AAG9F,gDAFwB,oCAAoC,QAAQ,CAEjC"}
|
|
1
|
+
{"version":3,"file":"unit.cjs","names":["customInstance","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n { orgId: string; data: OrganisationUnitPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUnit>>,\n { unitId: string; data: UnitPatchBodyBody }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n { unitId: string }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n { data: PersonalUnitPutBodyBody }\n >","mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePersonalUnit>>, void>","queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n { data: PersonalUnitPutBodyBody }\n >","mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, void>"],"sources":["../../../src/api/unit/unit.ts"],"sourcesContent":["/**\n * Generated by orval v7.17.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n InvalidateOptions,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n GetUnitsParams,\n OrganisationUnitPostBodyBody,\n OrganisationUnitPostResponse,\n OrganisationUnitsGetResponse,\n PersonalUnitPutBodyBody,\n PersonalUnitPutResponse,\n UnitAllDetail,\n UnitPatchBodyBody,\n UnitsGetResponse,\n} from \".././api-schemas\";\n\nimport { customInstance } from \"../../custom-axios\";\nimport type { ErrorType } from \"../../custom-axios\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Organisational Units you have access to or that are public\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitsGetResponse>(\n { url: `/organisation/${orgId}/unit`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUnitsQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId, \"unit\"] as const;\n};\n\nexport const getGetOrganisationUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationUnitsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationUnitsQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Organisational Units\n */\nexport const invalidateGetOrganisationUnits = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetOrganisationUnitsQueryKey(orgId) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetOrganisationUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationUnitsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a new Organisation Unit.\n\nThe **User** who creates the Unit becomes the **Owner** of the Unit. They are considered a *Member* (**User**) of the Unit but are not present in the list of users, which a separate list of users explicitly added to the Unit by a member of the Organisation or another member of the Unit.\n\nYou need to be a member of the **Organisation** or have administration rights to use this endpoint\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitPostResponse>(\n {\n url: `/organisation/${orgId}/unit`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationUnitPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const getCreateOrganisationUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n { orgId: string; data: OrganisationUnitPostBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return createOrganisationUnit(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisationUnit>>\n>;\nexport type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody;\nexport type CreateOrganisationUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Organisational Unit\n */\nexport const useCreateOrganisationUnit = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets a Unit. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.\n\n * @summary Gets an Organisational Unit\n */\nexport const getUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/unit/${unitId}`, method: \"GET\", signal }, options);\n};\n\nexport const getGetUnitQueryKey = (unitId?: string) => {\n return [\"account-server\", \"unit\", unitId] as const;\n};\n\nexport const getGetUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n Awaited<ReturnType<typeof getUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n Awaited<ReturnType<typeof getUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets an Organisational Unit\n */\nexport const invalidateGetUnit = async (\n queryClient: QueryClient,\n unitId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitQueryKey(unitId) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Used to update existing Unit. You can change a Unit's **name** or its **default_product_privacy** (as long as the new privacy does not conflict with the Organisation's value).\n\nYou have to be a member of the **Unit**, a member of its **Organisation**, or an administrator to patch a Unit.\n\n * @summary Adjust an existing Unit\n */\nexport const patchUnit = (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/unit/${unitId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: unitPatchBodyBody,\n },\n options,\n );\n};\n\nexport const getPatchUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUnit>>,\n { unitId: string; data: UnitPatchBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return patchUnit(unitId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>;\nexport type PatchUnitMutationBody = UnitPatchBodyBody;\nexport type PatchUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Unit\n */\nexport const usePatchUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.\n\nYou cannot delete Units in the **Default Organisation**. These Units are **Personal Units** and need to be deleted using the `DELETE /unit` endpoint.\n\nYou cannot delete a Unit that contains undeleted **Products**\n\n * @summary Deletes an Organisational Unit\n */\nexport const deleteOrganisationUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteOrganisationUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n { unitId: string }\n > = (props) => {\n const { unitId } = props ?? {};\n\n return deleteOrganisationUnit(unitId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>\n>;\n\nexport type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an Organisational Unit\n */\nexport const useDeleteOrganisationUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const getPersonalUnit = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/personal-unit`, method: \"GET\", signal }, options);\n};\n\nexport const getGetPersonalUnitQueryKey = () => {\n return [\"account-server\", \"personal-unit\"] as const;\n};\n\nexport const getGetPersonalUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetPersonalUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;\nexport type GetPersonalUnitQueryError = ErrorType<void | AsError>;\n\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n Awaited<ReturnType<typeof getPersonalUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n Awaited<ReturnType<typeof getPersonalUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetPersonalUnitQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const invalidateGetPersonalUnit = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetPersonalUnitQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetPersonalUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetPersonalUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getPersonalUnit>>\n>;\nexport type GetPersonalUnitSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetPersonalUnitSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\n * @summary Create a new Personal Unit\n */\nexport const createPersonalUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/personal-unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreatePersonalUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createPersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createPersonalUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreatePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createPersonalUnit>>\n>;\nexport type CreatePersonalUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreatePersonalUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreatePersonalUnit = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreatePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\n * @summary Deletes a Personal Unit\n */\nexport const deletePersonalUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/personal-unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeletePersonalUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deletePersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePersonalUnit>>, void> = () => {\n return deletePersonalUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeletePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deletePersonalUnit>>\n>;\n\nexport type DeletePersonalUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeletePersonalUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeletePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets all the Units that you are a member of, or a specific Unit by name.\n\nYou can see a Unit if you are a member of it, the owner (creator) of it, or a member or creator of the Unit's Organisation, or if you are an admin user.\n\n * @summary Gets Units\n */\nexport const getUnits = (\n params?: GetUnitsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitsGetResponse>({ url: `/unit`, method: \"GET\", params, signal }, options);\n};\n\nexport const getGetUnitsQueryKey = (params?: GetUnitsParams) => {\n return [\"account-server\", \"unit\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetUnitsParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n Awaited<ReturnType<typeof getUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n Awaited<ReturnType<typeof getUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitsQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Units\n */\nexport const invalidateGetUnits = async (\n queryClient: QueryClient,\n params?: GetUnitsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetUnitsParams,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitsSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **PUT** at `/personal-unit`.\n\n * @summary Create a new Personal Unit\n */\nexport const createDefaultUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreateDefaultUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDefaultUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDefaultUnit>>\n>;\nexport type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreateDefaultUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreateDefaultUnit = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **DELETE** at `/personal-unit`.\n\n * @summary Deletes a Personal Unit\n */\nexport const deleteDefaultUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteDefaultUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deleteDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, void> = () => {\n return deleteDefaultUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDefaultUnit>>\n>;\n\nexport type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeleteDefaultUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoDA,MAAa,wBACX,OACA,SACA,WACG;AACH,QAAOA,oCACL;EAAE,KAAK,iBAAiB,MAAM;EAAQ,QAAQ;EAAO;EAAQ,EAC7D,QACD;;AAGH,MAAa,mCAAmC,UAAmB;AACjE,QAAO;EAAC;EAAkB;EAAgB;EAAO;EAAO;;AAG1D,MAAa,uCAIX,OACA,YAMG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,gCAAgC,MAAM;CAEjF,MAAMC,WAA4E,EAAE,aAClF,qBAAqB,OAAO,gBAAgB,OAAO;AAErD,QAAO;EAAE;EAAU;EAAS,SAAS,CAAC,CAAC;EAAO,GAAG;EAAc;;;;;AAuEjE,SAAgB,wBAId,OACA,SAMA,aACwE;CACxE,MAAM,eAAe,oCAAoC,OAAO,QAAQ;CAExE,MAAM,6CAAiB,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,iCAAiC,OAC5C,aACA,OACA,YACyB;AACzB,OAAM,YAAY,kBAChB,EAAE,UAAU,gCAAgC,MAAM,EAAE,EACpD,QACD;AAED,QAAO;;AAGT,MAAa,+CAIX,OACA,YAMG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,gCAAgC,MAAM;CAEjF,MAAMA,WAA4E,EAAE,aAClF,qBAAqB,OAAO,gBAAgB,OAAO;AAErD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AAuD/C,SAAgB,gCAId,OACA,SAMA,aACgF;CAChF,MAAM,eAAe,4CAA4C,OAAO,QAAQ;C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