@squonk/account-server-client 4.4.0-4-4.2174798239 → 4.4.0-4-4.2194834412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/actions/actions.cjs +5 -5
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +17 -35
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +17 -35
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.js +5 -5
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/api.schemas.cjs.map +1 -1
- package/dist/api/api.schemas.d.cts +1 -1
- package/dist/api/api.schemas.d.ts +1 -1
- package/dist/api/api.schemas.js.map +1 -1
- package/dist/api/asset/asset.cjs +23 -23
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +40 -76
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +40 -76
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.js +23 -23
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +17 -17
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +65 -137
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +65 -137
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.js +17 -17
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +13 -13
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +35 -71
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +35 -71
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.js +13 -13
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +9 -9
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +33 -69
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +33 -69
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.js +9 -9
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +19 -19
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +52 -106
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +52 -106
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.js +19 -19
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +31 -31
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +100 -208
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +100 -208
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.js +31 -31
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +5 -5
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +17 -35
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +17 -35
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.js +5 -5
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +31 -31
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +72 -144
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +72 -144
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.js +31 -31
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +21 -21
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +53 -107
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +53 -107
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.js +21 -21
- package/dist/api/user/user.js.map +1 -1
- package/package.json +4 -7
- package/pnpm-workspace.yaml +1 -3
- package/src/api/actions/actions.ts +13 -105
- package/src/api/api.schemas.ts +1 -1
- package/src/api/asset/asset.ts +95 -305
- package/src/api/charges/charges.ts +55 -458
- package/src/api/event-stream/event-stream.ts +59 -264
- package/src/api/merchant/merchant.ts +29 -214
- package/src/api/organisation/organisation.ts +87 -383
- package/src/api/product/product.ts +131 -726
- package/src/api/state/state.ts +17 -107
- package/src/api/unit/unit.ts +147 -523
- package/src/api/user/user.ts +102 -403
package/dist/api/unit/unit.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
|
4
4
|
|
|
5
5
|
//#region src/api/unit/unit.ts
|
|
6
6
|
/**
|
|
7
|
-
* Generated by orval v7.
|
|
7
|
+
* Generated by orval v7.17.0 🍺
|
|
8
8
|
* Do not edit manually.
|
|
9
9
|
* Account Server API
|
|
10
10
|
* The Informatics Matters Account Server API.
|
|
@@ -41,9 +41,9 @@ const useGetOrganisationUnitsQueryOptions = (orgId, options) => {
|
|
|
41
41
|
/**
|
|
42
42
|
* @summary Gets Organisational Units
|
|
43
43
|
*/
|
|
44
|
-
function useGetOrganisationUnits(orgId, options
|
|
44
|
+
function useGetOrganisationUnits(orgId, options) {
|
|
45
45
|
const queryOptions = useGetOrganisationUnitsQueryOptions(orgId, options);
|
|
46
|
-
const query = useQuery(queryOptions
|
|
46
|
+
const query = useQuery(queryOptions);
|
|
47
47
|
query.queryKey = queryOptions.queryKey;
|
|
48
48
|
return query;
|
|
49
49
|
}
|
|
@@ -60,9 +60,9 @@ const useGetOrganisationUnitsSuspenseQueryOptions = (orgId, options) => {
|
|
|
60
60
|
/**
|
|
61
61
|
* @summary Gets Organisational Units
|
|
62
62
|
*/
|
|
63
|
-
function useGetOrganisationUnitsSuspense(orgId, options
|
|
63
|
+
function useGetOrganisationUnitsSuspense(orgId, options) {
|
|
64
64
|
const queryOptions = useGetOrganisationUnitsSuspenseQueryOptions(orgId, options);
|
|
65
|
-
const query = useSuspenseQuery(queryOptions
|
|
65
|
+
const query = useSuspenseQuery(queryOptions);
|
|
66
66
|
query.queryKey = queryOptions.queryKey;
|
|
67
67
|
return query;
|
|
68
68
|
}
|
|
@@ -108,8 +108,8 @@ const useCreateOrganisationUnitMutationOptions = (options) => {
|
|
|
108
108
|
/**
|
|
109
109
|
* @summary Create a new Organisational Unit
|
|
110
110
|
*/
|
|
111
|
-
const useCreateOrganisationUnit = (options
|
|
112
|
-
return useMutation(useCreateOrganisationUnitMutationOptions(options)
|
|
111
|
+
const useCreateOrganisationUnit = (options) => {
|
|
112
|
+
return useMutation(useCreateOrganisationUnitMutationOptions(options));
|
|
113
113
|
};
|
|
114
114
|
/**
|
|
115
115
|
* 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.
|
|
@@ -139,9 +139,9 @@ const useGetUnitQueryOptions = (unitId, options) => {
|
|
|
139
139
|
/**
|
|
140
140
|
* @summary Gets an Organisational Unit
|
|
141
141
|
*/
|
|
142
|
-
function useGetUnit(unitId, options
|
|
142
|
+
function useGetUnit(unitId, options) {
|
|
143
143
|
const queryOptions = useGetUnitQueryOptions(unitId, options);
|
|
144
|
-
const query = useQuery(queryOptions
|
|
144
|
+
const query = useQuery(queryOptions);
|
|
145
145
|
query.queryKey = queryOptions.queryKey;
|
|
146
146
|
return query;
|
|
147
147
|
}
|
|
@@ -158,9 +158,9 @@ const useGetUnitSuspenseQueryOptions = (unitId, options) => {
|
|
|
158
158
|
/**
|
|
159
159
|
* @summary Gets an Organisational Unit
|
|
160
160
|
*/
|
|
161
|
-
function useGetUnitSuspense(unitId, options
|
|
161
|
+
function useGetUnitSuspense(unitId, options) {
|
|
162
162
|
const queryOptions = useGetUnitSuspenseQueryOptions(unitId, options);
|
|
163
|
-
const query = useSuspenseQuery(queryOptions
|
|
163
|
+
const query = useSuspenseQuery(queryOptions);
|
|
164
164
|
query.queryKey = queryOptions.queryKey;
|
|
165
165
|
return query;
|
|
166
166
|
}
|
|
@@ -203,8 +203,8 @@ const usePatchUnitMutationOptions = (options) => {
|
|
|
203
203
|
/**
|
|
204
204
|
* @summary Adjust an existing Unit
|
|
205
205
|
*/
|
|
206
|
-
const usePatchUnit = (options
|
|
207
|
-
return useMutation(usePatchUnitMutationOptions(options)
|
|
206
|
+
const usePatchUnit = (options) => {
|
|
207
|
+
return useMutation(usePatchUnitMutationOptions(options));
|
|
208
208
|
};
|
|
209
209
|
/**
|
|
210
210
|
* Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.
|
|
@@ -245,8 +245,8 @@ const useDeleteOrganisationUnitMutationOptions = (options) => {
|
|
|
245
245
|
/**
|
|
246
246
|
* @summary Deletes an Organisational Unit
|
|
247
247
|
*/
|
|
248
|
-
const useDeleteOrganisationUnit = (options
|
|
249
|
-
return useMutation(useDeleteOrganisationUnitMutationOptions(options)
|
|
248
|
+
const useDeleteOrganisationUnit = (options) => {
|
|
249
|
+
return useMutation(useDeleteOrganisationUnitMutationOptions(options));
|
|
250
250
|
};
|
|
251
251
|
/**
|
|
252
252
|
* @summary Gets your Personal Unit (if you have one)
|
|
@@ -274,9 +274,9 @@ const useGetPersonalUnitQueryOptions = (options) => {
|
|
|
274
274
|
/**
|
|
275
275
|
* @summary Gets your Personal Unit (if you have one)
|
|
276
276
|
*/
|
|
277
|
-
function useGetPersonalUnit(options
|
|
277
|
+
function useGetPersonalUnit(options) {
|
|
278
278
|
const queryOptions = useGetPersonalUnitQueryOptions(options);
|
|
279
|
-
const query = useQuery(queryOptions
|
|
279
|
+
const query = useQuery(queryOptions);
|
|
280
280
|
query.queryKey = queryOptions.queryKey;
|
|
281
281
|
return query;
|
|
282
282
|
}
|
|
@@ -293,9 +293,9 @@ const useGetPersonalUnitSuspenseQueryOptions = (options) => {
|
|
|
293
293
|
/**
|
|
294
294
|
* @summary Gets your Personal Unit (if you have one)
|
|
295
295
|
*/
|
|
296
|
-
function useGetPersonalUnitSuspense(options
|
|
296
|
+
function useGetPersonalUnitSuspense(options) {
|
|
297
297
|
const queryOptions = useGetPersonalUnitSuspenseQueryOptions(options);
|
|
298
|
-
const query = useSuspenseQuery(queryOptions
|
|
298
|
+
const query = useSuspenseQuery(queryOptions);
|
|
299
299
|
query.queryKey = queryOptions.queryKey;
|
|
300
300
|
return query;
|
|
301
301
|
}
|
|
@@ -338,8 +338,8 @@ const useCreatePersonalUnitMutationOptions = (options) => {
|
|
|
338
338
|
/**
|
|
339
339
|
* @summary Create a new Personal Unit
|
|
340
340
|
*/
|
|
341
|
-
const useCreatePersonalUnit = (options
|
|
342
|
-
return useMutation(useCreatePersonalUnitMutationOptions(options)
|
|
341
|
+
const useCreatePersonalUnit = (options) => {
|
|
342
|
+
return useMutation(useCreatePersonalUnitMutationOptions(options));
|
|
343
343
|
};
|
|
344
344
|
/**
|
|
345
345
|
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
@@ -375,8 +375,8 @@ const useDeletePersonalUnitMutationOptions = (options) => {
|
|
|
375
375
|
/**
|
|
376
376
|
* @summary Deletes a Personal Unit
|
|
377
377
|
*/
|
|
378
|
-
const useDeletePersonalUnit = (options
|
|
379
|
-
return useMutation(useDeletePersonalUnitMutationOptions(options)
|
|
378
|
+
const useDeletePersonalUnit = (options) => {
|
|
379
|
+
return useMutation(useDeletePersonalUnitMutationOptions(options));
|
|
380
380
|
};
|
|
381
381
|
/**
|
|
382
382
|
* Gets all the Units that you are a member of, or a specific Unit by name.
|
|
@@ -409,9 +409,9 @@ const useGetUnitsQueryOptions = (params, options) => {
|
|
|
409
409
|
/**
|
|
410
410
|
* @summary Gets Units
|
|
411
411
|
*/
|
|
412
|
-
function useGetUnits(params, options
|
|
412
|
+
function useGetUnits(params, options) {
|
|
413
413
|
const queryOptions = useGetUnitsQueryOptions(params, options);
|
|
414
|
-
const query = useQuery(queryOptions
|
|
414
|
+
const query = useQuery(queryOptions);
|
|
415
415
|
query.queryKey = queryOptions.queryKey;
|
|
416
416
|
return query;
|
|
417
417
|
}
|
|
@@ -428,9 +428,9 @@ const useGetUnitsSuspenseQueryOptions = (params, options) => {
|
|
|
428
428
|
/**
|
|
429
429
|
* @summary Gets Units
|
|
430
430
|
*/
|
|
431
|
-
function useGetUnitsSuspense(params, options
|
|
431
|
+
function useGetUnitsSuspense(params, options) {
|
|
432
432
|
const queryOptions = useGetUnitsSuspenseQueryOptions(params, options);
|
|
433
|
-
const query = useSuspenseQuery(queryOptions
|
|
433
|
+
const query = useSuspenseQuery(queryOptions);
|
|
434
434
|
query.queryKey = queryOptions.queryKey;
|
|
435
435
|
return query;
|
|
436
436
|
}
|
|
@@ -475,8 +475,8 @@ const useCreateDefaultUnitMutationOptions = (options) => {
|
|
|
475
475
|
/**
|
|
476
476
|
* @summary Create a new Personal Unit
|
|
477
477
|
*/
|
|
478
|
-
const useCreateDefaultUnit = (options
|
|
479
|
-
return useMutation(useCreateDefaultUnitMutationOptions(options)
|
|
478
|
+
const useCreateDefaultUnit = (options) => {
|
|
479
|
+
return useMutation(useCreateDefaultUnitMutationOptions(options));
|
|
480
480
|
};
|
|
481
481
|
/**
|
|
482
482
|
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
@@ -514,8 +514,8 @@ const useDeleteDefaultUnitMutationOptions = (options) => {
|
|
|
514
514
|
/**
|
|
515
515
|
* @summary Deletes a Personal Unit
|
|
516
516
|
*/
|
|
517
|
-
const useDeleteDefaultUnit = (options
|
|
518
|
-
return useMutation(useDeleteDefaultUnitMutationOptions(options)
|
|
517
|
+
const useDeleteDefaultUnit = (options) => {
|
|
518
|
+
return useMutation(useDeleteDefaultUnitMutationOptions(options));
|
|
519
519
|
};
|
|
520
520
|
|
|
521
521
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit.js","names":["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.16.1 🍺\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 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-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\nimport { mutationMutator } from \"../../options-mutator\";\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 [`/organisation/${orgId}/unit`] as const;\n};\n\nexport const useGetOrganisationUnitsQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetOrganisationUnitsQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetOrganisationUnitsSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetOrganisationUnitsSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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 useCreateOrganisationUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useCreateOrganisationUnitMutationOptions(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 [`/unit/${unitId}`] as const;\n};\n\nexport const useGetUnitQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetUnitSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetUnitSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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 usePatchUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = usePatchUnitMutationOptions(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 useDeleteOrganisationUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useDeleteOrganisationUnitMutationOptions(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 [`/personal-unit`] as const;\n};\n\nexport const useGetPersonalUnitQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetPersonalUnitQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetPersonalUnitSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetPersonalUnitSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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 useCreatePersonalUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useCreatePersonalUnitMutationOptions(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 useDeletePersonalUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useDeletePersonalUnitMutationOptions(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 [`/unit`, ...(params ? [params] : [])] as const;\n};\n\nexport const useGetUnitsQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetUnitsQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetUnitsSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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, TError> };\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, TError> };\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, TError> };\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, TError> } {\n const queryOptions = useGetUnitsSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\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 useCreateDefaultUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useCreateDefaultUnitMutationOptions(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 useDeleteDefaultUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqDA,MAAa,wBACX,OACA,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK,iBAAiB,MAAM;EAAQ,QAAQ;EAAO;EAAQ,EAC7D,QACD;;AAGH,MAAa,mCAAmC,UAAmB;AACjE,QAAO,CAAC,iBAAiB,MAAM,OAAO;;AAGxC,MAAa,uCAIX,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;AAIrD,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAyE5E,SAAgB,wBAId,OACA,SAMA,aACgF;CAChF,MAAM,eAAe,oCAAoC,OAAO,QAAQ;CAExE,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,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;AAIrD,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAyD5E,SAAgB,gCAId,OACA,SAMA,aACwF;CACxF,MAAM,eAAe,4CAA4C,OAAO,QAAQ;CAEhF,MAAM,QAAQ,iBAAiB,cA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;;;AAc3E,MAAa,wBACX,SASA,gBAC6F;AAG7F,QAAO,YAFiB,oCAAoC,QAAQ,EAEhC,YAAY"}
|
|
1
|
+
{"version":3,"file":"unit.js","names":["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 MutationFunction,\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-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\nimport { mutationMutator } from \"../../options-mutator\";\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 [`/organisation/${orgId}/unit`] as const;\n};\n\nexport const useGetOrganisationUnitsQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions 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 = useGetOrganisationUnitsQueryOptions(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\nexport const useGetOrganisationUnitsSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions 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 = useGetOrganisationUnitsSuspenseQueryOptions(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 useCreateOrganisationUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useCreateOrganisationUnitMutationOptions(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 [`/unit/${unitId}`] as const;\n};\n\nexport const useGetUnitQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & {\n queryKey: QueryKey;\n };\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 = useGetUnitQueryOptions(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\nexport const useGetUnitSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions 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 = useGetUnitSuspenseQueryOptions(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 usePatchUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = usePatchUnitMutationOptions(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 useDeleteOrganisationUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useDeleteOrganisationUnitMutationOptions(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 [`/personal-unit`] as const;\n};\n\nexport const useGetPersonalUnitQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions 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 = useGetPersonalUnitQueryOptions(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\nexport const useGetPersonalUnitSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions 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 = useGetPersonalUnitSuspenseQueryOptions(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 useCreatePersonalUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useCreatePersonalUnitMutationOptions(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 useDeletePersonalUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useDeletePersonalUnitMutationOptions(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 [`/unit`, ...(params ? [params] : [])] as const;\n};\n\nexport const useGetUnitsQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {\n queryKey: QueryKey;\n };\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 = useGetUnitsQueryOptions(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\nexport const useGetUnitsSuspenseQueryOptions = <\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 const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions 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 = useGetUnitsSuspenseQueryOptions(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 useCreateDefaultUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useCreateDefaultUnitMutationOptions(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 useDeleteDefaultUnitMutationOptions = <\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 const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\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 = useDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,wBACX,OACA,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK,iBAAiB,MAAM;EAAQ,QAAQ;EAAO;EAAQ,EAC7D,QACD;;AAGH,MAAa,mCAAmC,UAAmB;AACjE,QAAO,CAAC,iBAAiB,MAAM,OAAO;;AAGxC,MAAa,uCAIX,OACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,gCAAgC,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,CAEjC;;;;;;;;;AASrC,MAAa,qBAAqB,YAAqD;AACrF,QAAO,eAAqB;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,MAAMC,mBAA0F;AAC9F,SAAO,kBAAkB,eAAe;;AAK1C,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAc3E,MAAa,wBAGX,YAQ8F;AAG9F,QAAO,YAFiB,oCAAoC,QAAQ,CAEjC"}
|
package/dist/api/user/user.cjs
CHANGED
|
@@ -5,7 +5,7 @@ let __tanstack_react_query = require("@tanstack/react-query");
|
|
|
5
5
|
|
|
6
6
|
//#region src/api/user/user.ts
|
|
7
7
|
/**
|
|
8
|
-
* Generated by orval v7.
|
|
8
|
+
* Generated by orval v7.17.0 🍺
|
|
9
9
|
* Do not edit manually.
|
|
10
10
|
* Account Server API
|
|
11
11
|
* The Informatics Matters Account Server API.
|
|
@@ -42,9 +42,9 @@ const useGetUserAccountQueryOptions = (options) => {
|
|
|
42
42
|
/**
|
|
43
43
|
* @summary Get information about your account
|
|
44
44
|
*/
|
|
45
|
-
function useGetUserAccount(options
|
|
45
|
+
function useGetUserAccount(options) {
|
|
46
46
|
const queryOptions = useGetUserAccountQueryOptions(options);
|
|
47
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions
|
|
47
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
48
48
|
query.queryKey = queryOptions.queryKey;
|
|
49
49
|
return query;
|
|
50
50
|
}
|
|
@@ -61,9 +61,9 @@ const useGetUserAccountSuspenseQueryOptions = (options) => {
|
|
|
61
61
|
/**
|
|
62
62
|
* @summary Get information about your account
|
|
63
63
|
*/
|
|
64
|
-
function useGetUserAccountSuspense(options
|
|
64
|
+
function useGetUserAccountSuspense(options) {
|
|
65
65
|
const queryOptions = useGetUserAccountSuspenseQueryOptions(options);
|
|
66
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions
|
|
66
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
67
67
|
query.queryKey = queryOptions.queryKey;
|
|
68
68
|
return query;
|
|
69
69
|
}
|
|
@@ -99,9 +99,9 @@ const useGetOrganisationUsersQueryOptions = (orgId, options) => {
|
|
|
99
99
|
/**
|
|
100
100
|
* @summary Gets users in an Organisation
|
|
101
101
|
*/
|
|
102
|
-
function useGetOrganisationUsers(orgId, options
|
|
102
|
+
function useGetOrganisationUsers(orgId, options) {
|
|
103
103
|
const queryOptions = useGetOrganisationUsersQueryOptions(orgId, options);
|
|
104
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions
|
|
104
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
105
105
|
query.queryKey = queryOptions.queryKey;
|
|
106
106
|
return query;
|
|
107
107
|
}
|
|
@@ -118,9 +118,9 @@ const useGetOrganisationUsersSuspenseQueryOptions = (orgId, options) => {
|
|
|
118
118
|
/**
|
|
119
119
|
* @summary Gets users in an Organisation
|
|
120
120
|
*/
|
|
121
|
-
function useGetOrganisationUsersSuspense(orgId, options
|
|
121
|
+
function useGetOrganisationUsersSuspense(orgId, options) {
|
|
122
122
|
const queryOptions = useGetOrganisationUsersSuspenseQueryOptions(orgId, options);
|
|
123
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions
|
|
123
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
124
124
|
query.queryKey = queryOptions.queryKey;
|
|
125
125
|
return query;
|
|
126
126
|
}
|
|
@@ -161,8 +161,8 @@ const useAddOrganisationUserMutationOptions = (options) => {
|
|
|
161
161
|
/**
|
|
162
162
|
* @summary Adds a User to an Organisation
|
|
163
163
|
*/
|
|
164
|
-
const useAddOrganisationUser = (options
|
|
165
|
-
return (0, __tanstack_react_query.useMutation)(useAddOrganisationUserMutationOptions(options)
|
|
164
|
+
const useAddOrganisationUser = (options) => {
|
|
165
|
+
return (0, __tanstack_react_query.useMutation)(useAddOrganisationUserMutationOptions(options));
|
|
166
166
|
};
|
|
167
167
|
/**
|
|
168
168
|
* Removes a User from an **Organisation**.
|
|
@@ -201,8 +201,8 @@ const useDeleteOrganisationUserMutationOptions = (options) => {
|
|
|
201
201
|
/**
|
|
202
202
|
* @summary Deletes a User from an Organisation
|
|
203
203
|
*/
|
|
204
|
-
const useDeleteOrganisationUser = (options
|
|
205
|
-
return (0, __tanstack_react_query.useMutation)(useDeleteOrganisationUserMutationOptions(options)
|
|
204
|
+
const useDeleteOrganisationUser = (options) => {
|
|
205
|
+
return (0, __tanstack_react_query.useMutation)(useDeleteOrganisationUserMutationOptions(options));
|
|
206
206
|
};
|
|
207
207
|
/**
|
|
208
208
|
* Gets users in an Organisational Unit.
|
|
@@ -236,9 +236,9 @@ const useGetOrganisationUnitUsersQueryOptions = (unitId, options) => {
|
|
|
236
236
|
/**
|
|
237
237
|
* @summary Gets users in an Organisational Unit
|
|
238
238
|
*/
|
|
239
|
-
function useGetOrganisationUnitUsers(unitId, options
|
|
239
|
+
function useGetOrganisationUnitUsers(unitId, options) {
|
|
240
240
|
const queryOptions = useGetOrganisationUnitUsersQueryOptions(unitId, options);
|
|
241
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions
|
|
241
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
242
242
|
query.queryKey = queryOptions.queryKey;
|
|
243
243
|
return query;
|
|
244
244
|
}
|
|
@@ -255,9 +255,9 @@ const useGetOrganisationUnitUsersSuspenseQueryOptions = (unitId, options) => {
|
|
|
255
255
|
/**
|
|
256
256
|
* @summary Gets users in an Organisational Unit
|
|
257
257
|
*/
|
|
258
|
-
function useGetOrganisationUnitUsersSuspense(unitId, options
|
|
258
|
+
function useGetOrganisationUnitUsersSuspense(unitId, options) {
|
|
259
259
|
const queryOptions = useGetOrganisationUnitUsersSuspenseQueryOptions(unitId, options);
|
|
260
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions
|
|
260
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
261
261
|
query.queryKey = queryOptions.queryKey;
|
|
262
262
|
return query;
|
|
263
263
|
}
|
|
@@ -300,8 +300,8 @@ const useAddOrganisationUnitUserMutationOptions = (options) => {
|
|
|
300
300
|
/**
|
|
301
301
|
* @summary Adds a user to an Organisational Unit
|
|
302
302
|
*/
|
|
303
|
-
const useAddOrganisationUnitUser = (options
|
|
304
|
-
return (0, __tanstack_react_query.useMutation)(useAddOrganisationUnitUserMutationOptions(options)
|
|
303
|
+
const useAddOrganisationUnitUser = (options) => {
|
|
304
|
+
return (0, __tanstack_react_query.useMutation)(useAddOrganisationUnitUserMutationOptions(options));
|
|
305
305
|
};
|
|
306
306
|
/**
|
|
307
307
|
* Removes a User from an Organisational Unit.
|
|
@@ -342,8 +342,8 @@ const useDeleteOrganisationUnitUserMutationOptions = (options) => {
|
|
|
342
342
|
/**
|
|
343
343
|
* @summary Deletes a User from an Organisational Unit
|
|
344
344
|
*/
|
|
345
|
-
const useDeleteOrganisationUnitUser = (options
|
|
346
|
-
return (0, __tanstack_react_query.useMutation)(useDeleteOrganisationUnitUserMutationOptions(options)
|
|
345
|
+
const useDeleteOrganisationUnitUser = (options) => {
|
|
346
|
+
return (0, __tanstack_react_query.useMutation)(useDeleteOrganisationUnitUserMutationOptions(options));
|
|
347
347
|
};
|
|
348
348
|
|
|
349
349
|
//#endregion
|