@squonk/account-server-client 4.4.0-4-4.2197069952 → 4.4.0-4-4.2199390673

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/api/actions/actions.cjs +4 -4
  2. package/dist/api/actions/actions.cjs.map +1 -1
  3. package/dist/api/actions/actions.d.cts +35 -17
  4. package/dist/api/actions/actions.d.cts.map +1 -1
  5. package/dist/api/actions/actions.d.ts +35 -17
  6. package/dist/api/actions/actions.d.ts.map +1 -1
  7. package/dist/api/actions/actions.fetch.cjs +4 -4
  8. package/dist/api/actions/actions.fetch.cjs.map +1 -1
  9. package/dist/api/actions/actions.fetch.d.cts +35 -17
  10. package/dist/api/actions/actions.fetch.d.cts.map +1 -1
  11. package/dist/api/actions/actions.fetch.d.ts +35 -17
  12. package/dist/api/actions/actions.fetch.d.ts.map +1 -1
  13. package/dist/api/actions/actions.fetch.js +4 -4
  14. package/dist/api/actions/actions.fetch.js.map +1 -1
  15. package/dist/api/actions/actions.js +4 -4
  16. package/dist/api/actions/actions.js.map +1 -1
  17. package/dist/api/asset/asset.cjs +22 -22
  18. package/dist/api/asset/asset.cjs.map +1 -1
  19. package/dist/api/asset/asset.d.cts +76 -40
  20. package/dist/api/asset/asset.d.cts.map +1 -1
  21. package/dist/api/asset/asset.d.ts +76 -40
  22. package/dist/api/asset/asset.d.ts.map +1 -1
  23. package/dist/api/asset/asset.fetch.cjs +22 -22
  24. package/dist/api/asset/asset.fetch.cjs.map +1 -1
  25. package/dist/api/asset/asset.fetch.d.cts +76 -40
  26. package/dist/api/asset/asset.fetch.d.cts.map +1 -1
  27. package/dist/api/asset/asset.fetch.d.ts +76 -40
  28. package/dist/api/asset/asset.fetch.d.ts.map +1 -1
  29. package/dist/api/asset/asset.fetch.js +22 -22
  30. package/dist/api/asset/asset.fetch.js.map +1 -1
  31. package/dist/api/asset/asset.js +22 -22
  32. package/dist/api/asset/asset.js.map +1 -1
  33. package/dist/api/charges/charges.cjs +16 -16
  34. package/dist/api/charges/charges.cjs.map +1 -1
  35. package/dist/api/charges/charges.d.cts +137 -65
  36. package/dist/api/charges/charges.d.cts.map +1 -1
  37. package/dist/api/charges/charges.d.ts +137 -65
  38. package/dist/api/charges/charges.d.ts.map +1 -1
  39. package/dist/api/charges/charges.fetch.cjs +16 -16
  40. package/dist/api/charges/charges.fetch.cjs.map +1 -1
  41. package/dist/api/charges/charges.fetch.d.cts +137 -65
  42. package/dist/api/charges/charges.fetch.d.cts.map +1 -1
  43. package/dist/api/charges/charges.fetch.d.ts +137 -65
  44. package/dist/api/charges/charges.fetch.d.ts.map +1 -1
  45. package/dist/api/charges/charges.fetch.js +16 -16
  46. package/dist/api/charges/charges.fetch.js.map +1 -1
  47. package/dist/api/charges/charges.js +16 -16
  48. package/dist/api/charges/charges.js.map +1 -1
  49. package/dist/api/event-stream/event-stream.cjs +12 -12
  50. package/dist/api/event-stream/event-stream.cjs.map +1 -1
  51. package/dist/api/event-stream/event-stream.d.cts +71 -35
  52. package/dist/api/event-stream/event-stream.d.cts.map +1 -1
  53. package/dist/api/event-stream/event-stream.d.ts +71 -35
  54. package/dist/api/event-stream/event-stream.d.ts.map +1 -1
  55. package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
  56. package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
  57. package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
  58. package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
  59. package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
  60. package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
  61. package/dist/api/event-stream/event-stream.fetch.js +12 -12
  62. package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
  63. package/dist/api/event-stream/event-stream.js +12 -12
  64. package/dist/api/event-stream/event-stream.js.map +1 -1
  65. package/dist/api/merchant/merchant.cjs +8 -8
  66. package/dist/api/merchant/merchant.cjs.map +1 -1
  67. package/dist/api/merchant/merchant.d.cts +69 -33
  68. package/dist/api/merchant/merchant.d.cts.map +1 -1
  69. package/dist/api/merchant/merchant.d.ts +69 -33
  70. package/dist/api/merchant/merchant.d.ts.map +1 -1
  71. package/dist/api/merchant/merchant.fetch.cjs +8 -8
  72. package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
  73. package/dist/api/merchant/merchant.fetch.d.cts +69 -33
  74. package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
  75. package/dist/api/merchant/merchant.fetch.d.ts +69 -33
  76. package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
  77. package/dist/api/merchant/merchant.fetch.js +8 -8
  78. package/dist/api/merchant/merchant.fetch.js.map +1 -1
  79. package/dist/api/merchant/merchant.js +8 -8
  80. package/dist/api/merchant/merchant.js.map +1 -1
  81. package/dist/api/organisation/organisation.cjs +18 -18
  82. package/dist/api/organisation/organisation.cjs.map +1 -1
  83. package/dist/api/organisation/organisation.d.cts +106 -52
  84. package/dist/api/organisation/organisation.d.cts.map +1 -1
  85. package/dist/api/organisation/organisation.d.ts +106 -52
  86. package/dist/api/organisation/organisation.d.ts.map +1 -1
  87. package/dist/api/organisation/organisation.fetch.cjs +18 -18
  88. package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
  89. package/dist/api/organisation/organisation.fetch.d.cts +106 -52
  90. package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
  91. package/dist/api/organisation/organisation.fetch.d.ts +106 -52
  92. package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
  93. package/dist/api/organisation/organisation.fetch.js +18 -18
  94. package/dist/api/organisation/organisation.fetch.js.map +1 -1
  95. package/dist/api/organisation/organisation.js +18 -18
  96. package/dist/api/organisation/organisation.js.map +1 -1
  97. package/dist/api/product/product.cjs +30 -30
  98. package/dist/api/product/product.cjs.map +1 -1
  99. package/dist/api/product/product.d.cts +208 -100
  100. package/dist/api/product/product.d.cts.map +1 -1
  101. package/dist/api/product/product.d.ts +208 -100
  102. package/dist/api/product/product.d.ts.map +1 -1
  103. package/dist/api/product/product.fetch.cjs +30 -30
  104. package/dist/api/product/product.fetch.cjs.map +1 -1
  105. package/dist/api/product/product.fetch.d.cts +208 -100
  106. package/dist/api/product/product.fetch.d.cts.map +1 -1
  107. package/dist/api/product/product.fetch.d.ts +208 -100
  108. package/dist/api/product/product.fetch.d.ts.map +1 -1
  109. package/dist/api/product/product.fetch.js +30 -30
  110. package/dist/api/product/product.fetch.js.map +1 -1
  111. package/dist/api/product/product.js +30 -30
  112. package/dist/api/product/product.js.map +1 -1
  113. package/dist/api/state/state.cjs +4 -4
  114. package/dist/api/state/state.cjs.map +1 -1
  115. package/dist/api/state/state.d.cts +35 -17
  116. package/dist/api/state/state.d.cts.map +1 -1
  117. package/dist/api/state/state.d.ts +35 -17
  118. package/dist/api/state/state.d.ts.map +1 -1
  119. package/dist/api/state/state.fetch.cjs +4 -4
  120. package/dist/api/state/state.fetch.cjs.map +1 -1
  121. package/dist/api/state/state.fetch.d.cts +35 -17
  122. package/dist/api/state/state.fetch.d.cts.map +1 -1
  123. package/dist/api/state/state.fetch.d.ts +35 -17
  124. package/dist/api/state/state.fetch.d.ts.map +1 -1
  125. package/dist/api/state/state.fetch.js +4 -4
  126. package/dist/api/state/state.fetch.js.map +1 -1
  127. package/dist/api/state/state.js +4 -4
  128. package/dist/api/state/state.js.map +1 -1
  129. package/dist/api/unit/unit.cjs +30 -30
  130. package/dist/api/unit/unit.cjs.map +1 -1
  131. package/dist/api/unit/unit.d.cts +144 -72
  132. package/dist/api/unit/unit.d.cts.map +1 -1
  133. package/dist/api/unit/unit.d.ts +144 -72
  134. package/dist/api/unit/unit.d.ts.map +1 -1
  135. package/dist/api/unit/unit.fetch.cjs +30 -30
  136. package/dist/api/unit/unit.fetch.cjs.map +1 -1
  137. package/dist/api/unit/unit.fetch.d.cts +144 -72
  138. package/dist/api/unit/unit.fetch.d.cts.map +1 -1
  139. package/dist/api/unit/unit.fetch.d.ts +144 -72
  140. package/dist/api/unit/unit.fetch.d.ts.map +1 -1
  141. package/dist/api/unit/unit.fetch.js +30 -30
  142. package/dist/api/unit/unit.fetch.js.map +1 -1
  143. package/dist/api/unit/unit.js +30 -30
  144. package/dist/api/unit/unit.js.map +1 -1
  145. package/dist/api/user/user.cjs +20 -20
  146. package/dist/api/user/user.cjs.map +1 -1
  147. package/dist/api/user/user.d.cts +107 -53
  148. package/dist/api/user/user.d.cts.map +1 -1
  149. package/dist/api/user/user.d.ts +107 -53
  150. package/dist/api/user/user.d.ts.map +1 -1
  151. package/dist/api/user/user.fetch.cjs +20 -20
  152. package/dist/api/user/user.fetch.cjs.map +1 -1
  153. package/dist/api/user/user.fetch.d.cts +107 -53
  154. package/dist/api/user/user.fetch.d.cts.map +1 -1
  155. package/dist/api/user/user.fetch.d.ts +107 -53
  156. package/dist/api/user/user.fetch.d.ts.map +1 -1
  157. package/dist/api/user/user.fetch.js +20 -20
  158. package/dist/api/user/user.fetch.js.map +1 -1
  159. package/dist/api/user/user.js +20 -20
  160. package/dist/api/user/user.js.map +1 -1
  161. package/package.json +7 -5
  162. package/src/api/actions/actions.fetch.ts +103 -12
  163. package/src/api/actions/actions.ts +103 -12
  164. package/src/api/asset/asset.fetch.ts +303 -94
  165. package/src/api/asset/asset.ts +303 -94
  166. package/src/api/charges/charges.fetch.ts +456 -54
  167. package/src/api/charges/charges.ts +456 -54
  168. package/src/api/event-stream/event-stream.fetch.ts +262 -58
  169. package/src/api/event-stream/event-stream.ts +262 -58
  170. package/src/api/merchant/merchant.fetch.ts +212 -28
  171. package/src/api/merchant/merchant.ts +212 -28
  172. package/src/api/organisation/organisation.fetch.ts +381 -86
  173. package/src/api/organisation/organisation.ts +381 -86
  174. package/src/api/product/product.fetch.ts +724 -130
  175. package/src/api/product/product.ts +724 -130
  176. package/src/api/state/state.fetch.ts +105 -16
  177. package/src/api/state/state.ts +105 -16
  178. package/src/api/unit/unit.fetch.ts +521 -146
  179. package/src/api/unit/unit.ts +521 -146
  180. package/src/api/user/user.fetch.ts +401 -101
  181. package/src/api/user/user.ts +401 -101
  182. package/tests/README.md +98 -0
  183. package/tests/component.test.tsx +191 -0
  184. package/tests/tsconfig.json +7 -0
  185. package/tests/type-tests.tsx +196 -0
@@ -46,9 +46,9 @@ const getGetOrganisationUnitsQueryOptions = (orgId, options) => {
46
46
  /**
47
47
  * @summary Gets Organisational Units
48
48
  */
49
- function useGetOrganisationUnits(orgId, options) {
49
+ function useGetOrganisationUnits(orgId, options, queryClient) {
50
50
  const queryOptions = getGetOrganisationUnitsQueryOptions(orgId, options);
51
- const query = useQuery(queryOptions);
51
+ const query = useQuery(queryOptions, queryClient);
52
52
  query.queryKey = queryOptions.queryKey;
53
53
  return query;
54
54
  }
@@ -72,9 +72,9 @@ const getGetOrganisationUnitsSuspenseQueryOptions = (orgId, options) => {
72
72
  /**
73
73
  * @summary Gets Organisational Units
74
74
  */
75
- function useGetOrganisationUnitsSuspense(orgId, options) {
75
+ function useGetOrganisationUnitsSuspense(orgId, options, queryClient) {
76
76
  const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);
77
- const query = useSuspenseQuery(queryOptions);
77
+ const query = useSuspenseQuery(queryOptions, queryClient);
78
78
  query.queryKey = queryOptions.queryKey;
79
79
  return query;
80
80
  }
@@ -120,8 +120,8 @@ const getCreateOrganisationUnitMutationOptions = (options) => {
120
120
  /**
121
121
  * @summary Create a new Organisational Unit
122
122
  */
123
- const useCreateOrganisationUnit = (options) => {
124
- return useMutation(getCreateOrganisationUnitMutationOptions(options));
123
+ const useCreateOrganisationUnit = (options, queryClient) => {
124
+ return useMutation(getCreateOrganisationUnitMutationOptions(options), queryClient);
125
125
  };
126
126
  /**
127
127
  * 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.
@@ -156,9 +156,9 @@ const getGetUnitQueryOptions = (unitId, options) => {
156
156
  /**
157
157
  * @summary Gets an Organisational Unit
158
158
  */
159
- function useGetUnit(unitId, options) {
159
+ function useGetUnit(unitId, options, queryClient) {
160
160
  const queryOptions = getGetUnitQueryOptions(unitId, options);
161
- const query = useQuery(queryOptions);
161
+ const query = useQuery(queryOptions, queryClient);
162
162
  query.queryKey = queryOptions.queryKey;
163
163
  return query;
164
164
  }
@@ -182,9 +182,9 @@ const getGetUnitSuspenseQueryOptions = (unitId, options) => {
182
182
  /**
183
183
  * @summary Gets an Organisational Unit
184
184
  */
185
- function useGetUnitSuspense(unitId, options) {
185
+ function useGetUnitSuspense(unitId, options, queryClient) {
186
186
  const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);
187
- const query = useSuspenseQuery(queryOptions);
187
+ const query = useSuspenseQuery(queryOptions, queryClient);
188
188
  query.queryKey = queryOptions.queryKey;
189
189
  return query;
190
190
  }
@@ -227,8 +227,8 @@ const getPatchUnitMutationOptions = (options) => {
227
227
  /**
228
228
  * @summary Adjust an existing Unit
229
229
  */
230
- const usePatchUnit = (options) => {
231
- return useMutation(getPatchUnitMutationOptions(options));
230
+ const usePatchUnit = (options, queryClient) => {
231
+ return useMutation(getPatchUnitMutationOptions(options), queryClient);
232
232
  };
233
233
  /**
234
234
  * Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.
@@ -269,8 +269,8 @@ const getDeleteOrganisationUnitMutationOptions = (options) => {
269
269
  /**
270
270
  * @summary Deletes an Organisational Unit
271
271
  */
272
- const useDeleteOrganisationUnit = (options) => {
273
- return useMutation(getDeleteOrganisationUnitMutationOptions(options));
272
+ const useDeleteOrganisationUnit = (options, queryClient) => {
273
+ return useMutation(getDeleteOrganisationUnitMutationOptions(options), queryClient);
274
274
  };
275
275
  /**
276
276
  * @summary Gets your Personal Unit (if you have one)
@@ -298,9 +298,9 @@ const getGetPersonalUnitQueryOptions = (options) => {
298
298
  /**
299
299
  * @summary Gets your Personal Unit (if you have one)
300
300
  */
301
- function useGetPersonalUnit(options) {
301
+ function useGetPersonalUnit(options, queryClient) {
302
302
  const queryOptions = getGetPersonalUnitQueryOptions(options);
303
- const query = useQuery(queryOptions);
303
+ const query = useQuery(queryOptions, queryClient);
304
304
  query.queryKey = queryOptions.queryKey;
305
305
  return query;
306
306
  }
@@ -324,9 +324,9 @@ const getGetPersonalUnitSuspenseQueryOptions = (options) => {
324
324
  /**
325
325
  * @summary Gets your Personal Unit (if you have one)
326
326
  */
327
- function useGetPersonalUnitSuspense(options) {
327
+ function useGetPersonalUnitSuspense(options, queryClient) {
328
328
  const queryOptions = getGetPersonalUnitSuspenseQueryOptions(options);
329
- const query = useSuspenseQuery(queryOptions);
329
+ const query = useSuspenseQuery(queryOptions, queryClient);
330
330
  query.queryKey = queryOptions.queryKey;
331
331
  return query;
332
332
  }
@@ -369,8 +369,8 @@ const getCreatePersonalUnitMutationOptions = (options) => {
369
369
  /**
370
370
  * @summary Create a new Personal Unit
371
371
  */
372
- const useCreatePersonalUnit = (options) => {
373
- return useMutation(getCreatePersonalUnitMutationOptions(options));
372
+ const useCreatePersonalUnit = (options, queryClient) => {
373
+ return useMutation(getCreatePersonalUnitMutationOptions(options), queryClient);
374
374
  };
375
375
  /**
376
376
  * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
@@ -406,8 +406,8 @@ const getDeletePersonalUnitMutationOptions = (options) => {
406
406
  /**
407
407
  * @summary Deletes a Personal Unit
408
408
  */
409
- const useDeletePersonalUnit = (options) => {
410
- return useMutation(getDeletePersonalUnitMutationOptions(options));
409
+ const useDeletePersonalUnit = (options, queryClient) => {
410
+ return useMutation(getDeletePersonalUnitMutationOptions(options), queryClient);
411
411
  };
412
412
  /**
413
413
  * Gets all the Units that you are a member of, or a specific Unit by name.
@@ -444,9 +444,9 @@ const getGetUnitsQueryOptions = (params, options) => {
444
444
  /**
445
445
  * @summary Gets Units
446
446
  */
447
- function useGetUnits(params, options) {
447
+ function useGetUnits(params, options, queryClient) {
448
448
  const queryOptions = getGetUnitsQueryOptions(params, options);
449
- const query = useQuery(queryOptions);
449
+ const query = useQuery(queryOptions, queryClient);
450
450
  query.queryKey = queryOptions.queryKey;
451
451
  return query;
452
452
  }
@@ -470,9 +470,9 @@ const getGetUnitsSuspenseQueryOptions = (params, options) => {
470
470
  /**
471
471
  * @summary Gets Units
472
472
  */
473
- function useGetUnitsSuspense(params, options) {
473
+ function useGetUnitsSuspense(params, options, queryClient) {
474
474
  const queryOptions = getGetUnitsSuspenseQueryOptions(params, options);
475
- const query = useSuspenseQuery(queryOptions);
475
+ const query = useSuspenseQuery(queryOptions, queryClient);
476
476
  query.queryKey = queryOptions.queryKey;
477
477
  return query;
478
478
  }
@@ -517,8 +517,8 @@ const getCreateDefaultUnitMutationOptions = (options) => {
517
517
  /**
518
518
  * @summary Create a new Personal Unit
519
519
  */
520
- const useCreateDefaultUnit = (options) => {
521
- return useMutation(getCreateDefaultUnitMutationOptions(options));
520
+ const useCreateDefaultUnit = (options, queryClient) => {
521
+ return useMutation(getCreateDefaultUnitMutationOptions(options), queryClient);
522
522
  };
523
523
  /**
524
524
  * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
@@ -556,8 +556,8 @@ const getDeleteDefaultUnitMutationOptions = (options) => {
556
556
  /**
557
557
  * @summary Deletes a Personal Unit
558
558
  */
559
- const useDeleteDefaultUnit = (options) => {
560
- return useMutation(getDeleteDefaultUnitMutationOptions(options));
559
+ const useDeleteDefaultUnit = (options, queryClient) => {
560
+ return useMutation(getDeleteDefaultUnitMutationOptions(options), queryClient);
561
561
  };
562
562
 
563
563
  //#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.17.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n InvalidateOptions,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n GetUnitsParams,\n OrganisationUnitPostBodyBody,\n OrganisationUnitPostResponse,\n OrganisationUnitsGetResponse,\n PersonalUnitPutBodyBody,\n PersonalUnitPutResponse,\n UnitAllDetail,\n UnitPatchBodyBody,\n UnitsGetResponse,\n} from \".././api-schemas\";\n\nimport { customInstance } from \"../../custom-axios\";\nimport type { ErrorType } from \"../../custom-axios\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Organisational Units you have access to or that are public\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitsGetResponse>(\n { url: `/organisation/${orgId}/unit`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUnitsQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId, \"unit\"] as const;\n};\n\nexport const getGetOrganisationUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUnitsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationUnitsQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Organisational Units\n */\nexport const invalidateGetOrganisationUnits = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetOrganisationUnitsQueryKey(orgId) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetOrganisationUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationUnitsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a new Organisation Unit.\n\nThe **User** who creates the Unit becomes the **Owner** of the Unit. They are considered a *Member* (**User**) of the Unit but are not present in the list of users, which a separate list of users explicitly added to the Unit by a member of the Organisation or another member of the Unit.\n\nYou need to be a member of the **Organisation** or have administration rights to use this endpoint\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitPostResponse>(\n {\n url: `/organisation/${orgId}/unit`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationUnitPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const getCreateOrganisationUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n { orgId: string; data: OrganisationUnitPostBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return createOrganisationUnit(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisationUnit>>\n>;\nexport type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody;\nexport type CreateOrganisationUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Organisational Unit\n */\nexport const useCreateOrganisationUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets a Unit. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.\n\n * @summary Gets an Organisational Unit\n */\nexport const getUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/unit/${unitId}`, method: \"GET\", signal }, options);\n};\n\nexport const getGetUnitQueryKey = (unitId?: string) => {\n return [\"account-server\", \"unit\", unitId] as const;\n};\n\nexport const getGetUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets an Organisational Unit\n */\nexport const invalidateGetUnit = async (\n queryClient: QueryClient,\n unitId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitQueryKey(unitId) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Used to update existing Unit. You can change a Unit's **name** or its **default_product_privacy** (as long as the new privacy does not conflict with the Organisation's value).\n\nYou have to be a member of the **Unit**, a member of its **Organisation**, or an administrator to patch a Unit.\n\n * @summary Adjust an existing Unit\n */\nexport const patchUnit = (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/unit/${unitId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: unitPatchBodyBody,\n },\n options,\n );\n};\n\nexport const getPatchUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUnit>>,\n { unitId: string; data: UnitPatchBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return patchUnit(unitId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>;\nexport type PatchUnitMutationBody = UnitPatchBodyBody;\nexport type PatchUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Unit\n */\nexport const usePatchUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.\n\nYou cannot delete Units in the **Default Organisation**. These Units are **Personal Units** and need to be deleted using the `DELETE /unit` endpoint.\n\nYou cannot delete a Unit that contains undeleted **Products**\n\n * @summary Deletes an Organisational Unit\n */\nexport const deleteOrganisationUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteOrganisationUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n { unitId: string }\n > = (props) => {\n const { unitId } = props ?? {};\n\n return deleteOrganisationUnit(unitId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>\n>;\n\nexport type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an Organisational Unit\n */\nexport const useDeleteOrganisationUnit = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const getPersonalUnit = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/personal-unit`, method: \"GET\", signal }, options);\n};\n\nexport const getGetPersonalUnitQueryKey = () => {\n return [\"account-server\", \"personal-unit\"] as const;\n};\n\nexport const getGetPersonalUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetPersonalUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;\nexport type GetPersonalUnitQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetPersonalUnitQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const invalidateGetPersonalUnit = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetPersonalUnitQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetPersonalUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetPersonalUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getPersonalUnit>>\n>;\nexport type GetPersonalUnitSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetPersonalUnitSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\n * @summary Create a new Personal Unit\n */\nexport const createPersonalUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/personal-unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreatePersonalUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createPersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createPersonalUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreatePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createPersonalUnit>>\n>;\nexport type CreatePersonalUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreatePersonalUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreatePersonalUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreatePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\n * @summary Deletes a Personal Unit\n */\nexport const deletePersonalUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/personal-unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeletePersonalUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deletePersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePersonalUnit>>, void> = () => {\n return deletePersonalUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeletePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deletePersonalUnit>>\n>;\n\nexport type DeletePersonalUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeletePersonalUnit = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeletePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets all the Units that you are a member of, or a specific Unit by name.\n\nYou can see a Unit if you are a member of it, the owner (creator) of it, or a member or creator of the Unit's Organisation, or if you are an admin user.\n\n * @summary Gets Units\n */\nexport const getUnits = (\n params?: GetUnitsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitsGetResponse>({ url: `/unit`, method: \"GET\", params, signal }, options);\n};\n\nexport const getGetUnitsQueryKey = (params?: GetUnitsParams) => {\n return [\"account-server\", \"unit\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitsQueryOptions(params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Units\n */\nexport const invalidateGetUnits = async (\n queryClient: QueryClient,\n params?: GetUnitsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitsSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **PUT** at `/personal-unit`.\n\n * @summary Create a new Personal Unit\n */\nexport const createDefaultUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreateDefaultUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDefaultUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDefaultUnit>>\n>;\nexport type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreateDefaultUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreateDefaultUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **DELETE** at `/personal-unit`.\n\n * @summary Deletes a Personal Unit\n */\nexport const deleteDefaultUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteDefaultUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deleteDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, void> = () => {\n return deleteDefaultUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDefaultUnit>>\n>;\n\nexport type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeleteDefaultUnit = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgDA,MAAa,wBACX,OACA,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK,iBAAiB,MAAM;EAAQ,QAAQ;EAAO;EAAQ,EAC7D,QACD;;AAGH,MAAa,mCAAmC,UAAmB;AACjE,QAAO;EAAC;EAAkB;EAAgB;EAAO;EAAO;;AAG1D,MAAa,uCAIX,OACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,c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AU,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,cAGD,UAAU;EACb,MAAM,EAAE,SAAS,SAAS,EAAE;AAE5B,SAAO,kBAAkB,MAAM,eAAe;;AAGhD,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAY3C,MAAa,wBAGX,YAaG;AAGH,QAAO,YAFiB,oCAAoC,QAAQ,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;;AAG1C,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAY3C,MAAa,wBAGX,YAQ8F;AAG9F,QAAO,YAFiB,oCAAoC,QAAQ,CAEjC"}
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 DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n InvalidateOptions,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n GetUnitsParams,\n OrganisationUnitPostBodyBody,\n OrganisationUnitPostResponse,\n OrganisationUnitsGetResponse,\n PersonalUnitPutBodyBody,\n PersonalUnitPutResponse,\n UnitAllDetail,\n UnitPatchBodyBody,\n UnitsGetResponse,\n} from \".././api-schemas\";\n\nimport { customInstance } from \"../../custom-axios\";\nimport type { ErrorType } from \"../../custom-axios\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Organisational Units you have access to or that are public\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitsGetResponse>(\n { url: `/organisation/${orgId}/unit`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetOrganisationUnitsQueryKey = (orgId?: string) => {\n return [\"account-server\", \"organisation\", orgId, \"unit\"] as const;\n};\n\nexport const getGetOrganisationUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationUnitsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnits<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationUnitsQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Organisational Units\n */\nexport const invalidateGetOrganisationUnits = async (\n queryClient: QueryClient,\n orgId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetOrganisationUnitsQueryKey(orgId) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetOrganisationUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnits>>> = ({ signal }) =>\n getOrganisationUnits(orgId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationUnitsSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationUnits>>\n>;\nexport type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Organisational Units\n */\n\nexport function useGetOrganisationUnitsSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a new Organisation Unit.\n\nThe **User** who creates the Unit becomes the **Owner** of the Unit. They are considered a *Member* (**User**) of the Unit but are not present in the list of users, which a separate list of users explicitly added to the Unit by a member of the Organisation or another member of the Unit.\n\nYou need to be a member of the **Organisation** or have administration rights to use this endpoint\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<OrganisationUnitPostResponse>(\n {\n url: `/organisation/${orgId}/unit`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: organisationUnitPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const getCreateOrganisationUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n { orgId: string; data: OrganisationUnitPostBodyBody }\n > = (props) => {\n const { orgId, data } = props ?? {};\n\n return createOrganisationUnit(orgId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createOrganisationUnit>>\n>;\nexport type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody;\nexport type CreateOrganisationUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Organisational Unit\n */\nexport const useCreateOrganisationUnit = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisationUnit>>,\n TError,\n { orgId: string; data: OrganisationUnitPostBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets a Unit. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.\n\n * @summary Gets an Organisational Unit\n */\nexport const getUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/unit/${unitId}`, method: \"GET\", signal }, options);\n};\n\nexport const getGetUnitQueryKey = (unitId?: string) => {\n return [\"account-server\", \"unit\", unitId] as const;\n};\n\nexport const getGetUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n Awaited<ReturnType<typeof getUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n Awaited<ReturnType<typeof getUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnit<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets an Organisational Unit\n */\nexport const invalidateGetUnit = async (\n queryClient: QueryClient,\n unitId: string,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitQueryKey(unitId) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnit>>> = ({ signal }) =>\n getUnit(unitId, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;\nexport type GetUnitSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets an Organisational Unit\n */\n\nexport function useGetUnitSuspense<\n TData = Awaited<ReturnType<typeof getUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Used to update existing Unit. You can change a Unit's **name** or its **default_product_privacy** (as long as the new privacy does not conflict with the Organisation's value).\n\nYou have to be a member of the **Unit**, a member of its **Organisation**, or an administrator to patch a Unit.\n\n * @summary Adjust an existing Unit\n */\nexport const patchUnit = (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/unit/${unitId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: unitPatchBodyBody,\n },\n options,\n );\n};\n\nexport const getPatchUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUnit>>,\n { unitId: string; data: UnitPatchBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return patchUnit(unitId, data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>;\nexport type PatchUnitMutationBody = UnitPatchBodyBody;\nexport type PatchUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Unit\n */\nexport const usePatchUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof patchUnit>>,\n TError,\n { unitId: string; data: UnitPatchBodyBody },\n TContext\n> => {\n const mutationOptions = getPatchUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.\n\nYou cannot delete Units in the **Default Organisation**. These Units are **Personal Units** and need to be deleted using the `DELETE /unit` endpoint.\n\nYou cannot delete a Unit that contains undeleted **Products**\n\n * @summary Deletes an Organisational Unit\n */\nexport const deleteOrganisationUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/unit/${unitId}`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteOrganisationUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationKey = [\"deleteOrganisationUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n { unitId: string }\n > = (props) => {\n const { unitId } = props ?? {};\n\n return deleteOrganisationUnit(unitId, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteOrganisationUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>\n>;\n\nexport type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an Organisational Unit\n */\nexport const useDeleteOrganisationUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisationUnit>>,\n TError,\n { unitId: string },\n TContext\n> => {\n const mutationOptions = getDeleteOrganisationUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const getPersonalUnit = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitAllDetail>({ url: `/personal-unit`, method: \"GET\", signal }, options);\n};\n\nexport const getGetPersonalUnitQueryKey = () => {\n return [\"account-server\", \"personal-unit\"] as const;\n};\n\nexport const getGetPersonalUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetPersonalUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;\nexport type GetPersonalUnitQueryError = ErrorType<void | AsError>;\n\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n Awaited<ReturnType<typeof getPersonalUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n Awaited<ReturnType<typeof getPersonalUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnit<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetPersonalUnitQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\nexport const invalidateGetPersonalUnit = async (\n queryClient: QueryClient,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetPersonalUnitQueryKey() }, options);\n\n return queryClient;\n};\n\nexport const getGetPersonalUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetPersonalUnitQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getPersonalUnit>>> = ({ signal }) =>\n getPersonalUnit(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getPersonalUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetPersonalUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getPersonalUnit>>\n>;\nexport type GetPersonalUnitSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets your Personal Unit (if you have one)\n */\n\nexport function useGetPersonalUnitSuspense<\n TData = Awaited<ReturnType<typeof getPersonalUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetPersonalUnitSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\n * @summary Create a new Personal Unit\n */\nexport const createPersonalUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/personal-unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreatePersonalUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createPersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createPersonalUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreatePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createPersonalUnit>>\n>;\nexport type CreatePersonalUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreatePersonalUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreatePersonalUnit = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createPersonalUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreatePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\n * @summary Deletes a Personal Unit\n */\nexport const deletePersonalUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/personal-unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeletePersonalUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deletePersonalUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deletePersonalUnit>>, void> = () => {\n return deletePersonalUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeletePersonalUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deletePersonalUnit>>\n>;\n\nexport type DeletePersonalUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeletePersonalUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deletePersonalUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeletePersonalUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets all the Units that you are a member of, or a specific Unit by name.\n\nYou can see a Unit if you are a member of it, the owner (creator) of it, or a member or creator of the Unit's Organisation, or if you are an admin user.\n\n * @summary Gets Units\n */\nexport const getUnits = (\n params?: GetUnitsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitsGetResponse>({ url: `/unit`, method: \"GET\", params, signal }, options);\n};\n\nexport const getGetUnitsQueryKey = (params?: GetUnitsParams) => {\n return [\"account-server\", \"unit\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetUnitsQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetUnitsParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n Awaited<ReturnType<typeof getUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n Awaited<ReturnType<typeof getUnits>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnits<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitsQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets Units\n */\nexport const invalidateGetUnits = async (\n queryClient: QueryClient,\n params?: GetUnitsParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetUnitsQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetUnitsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnits>>> = ({ signal }) =>\n getUnits(params, requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnits>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;\nexport type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetUnitsParams,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets Units\n */\n\nexport function useGetUnitsSuspense<\n TData = Awaited<ReturnType<typeof getUnits>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetUnitsParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitsSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.\n\nUsers can only create one Personal unit and you cannot add other Users to a Personal Unit.\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **PUT** at `/personal-unit`.\n\n * @summary Create a new Personal Unit\n */\nexport const createDefaultUnit = (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<PersonalUnitPutResponse>(\n {\n url: `/unit`,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n data: personalUnitPutBodyBody,\n },\n options,\n );\n};\n\nexport const getCreateDefaultUnitMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationKey = [\"createDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n { data: PersonalUnitPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDefaultUnit(data, requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type CreateDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDefaultUnit>>\n>;\nexport type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody;\nexport type CreateDefaultUnitMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new Personal Unit\n */\nexport const useCreateDefaultUnit = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createDefaultUnit>>,\n TError,\n { data: PersonalUnitPutBodyBody },\n TContext\n> => {\n const mutationOptions = getCreateDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**\n\nThis endpoint is DECREMENTED and will be removed in a future release. Please use **DELETE** at `/personal-unit`.\n\n * @summary Deletes a Personal Unit\n */\nexport const deleteDefaultUnit = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<void>({ url: `/unit`, method: \"DELETE\" }, options);\n};\n\nexport const getDeleteDefaultUnitMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationKey = [\"deleteDefaultUnit\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDefaultUnit>>, void> = () => {\n return deleteDefaultUnit(requestOptions);\n };\n\n return { mutationFn, ...mutationOptions };\n};\n\nexport type DeleteDefaultUnitMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDefaultUnit>>\n>;\n\nexport type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes a Personal Unit\n */\nexport const useDeleteDefaultUnit = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDefaultUnit>>,\n TError,\n void,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoDA,MAAa,wBACX,OACA,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK,iBAAiB,MAAM;EAAQ,QAAQ;EAAO;EAAQ,EAC7D,QACD;;AAGH,MAAa,mCAAmC,UAAmB;AACjE,QAAO;EAAC;EAAkB;EAAgB;EAAO;EAAO;;AAG1D,MAAa,uCAIX,OACA,YAMG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,gCAAgC,MAAM;CAEjF,MAAMA,WAA4E,EAAE,aAClF,qBAAqB,OAAO,gBAAgB,OAAO;AAErD,QAAO;EAAE;EAAU;EAAS,SAAS,CAAC,CAAC;EAAO,GAAG;EAAc;;;;;AAuEjE,SAAgB,wBAId,OACA,SAMA,aACwE;CACxE,MAAM,eAAe,oCAAoC,OAAO,QAAQ;CAExE,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,iCAAiC,OAC5C,aACA,OACA,YACyB;AACzB,OAAM,YAAY,kBAChB,EAAE,UAAU,gCAAgC,MAAM,EAAE,EACpD,QACD;AAED,QAAO;;AAGT,MAAa,+CAIX,OACA,YAMG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,gCAAgC,MAAM;CAEjF,MAAMA,WAA4E,EAAE,aAClF,qBAAqB,OAAO,gBAAgB,OAAO;AAErD,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AAuD/C,SAAgB,gCAId,OACA,SAMA,aACgF;CAChF,MAAM,eAAe,4CAA4C,OAAO,QAAQ;CAEhF,MA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mB,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;;AAG1C,QAAO;EAAE;EAAY,GAAG;EAAiB;;;;;AAY3C,MAAa,wBACX,SASA,gBAC6F;AAG7F,QAAO,YAFiB,oCAAoC,QAAQ,EAEhC,YAAY"}
@@ -45,9 +45,9 @@ const getGetUserAccountQueryOptions = (options) => {
45
45
  /**
46
46
  * @summary Get information about your account
47
47
  */
48
- function useGetUserAccount(options) {
48
+ function useGetUserAccount(options, queryClient) {
49
49
  const queryOptions = getGetUserAccountQueryOptions(options);
50
- const query = (0, __tanstack_react_query.useQuery)(queryOptions);
50
+ const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
51
51
  query.queryKey = queryOptions.queryKey;
52
52
  return query;
53
53
  }
@@ -71,9 +71,9 @@ const getGetUserAccountSuspenseQueryOptions = (options) => {
71
71
  /**
72
72
  * @summary Get information about your account
73
73
  */
74
- function useGetUserAccountSuspense(options) {
74
+ function useGetUserAccountSuspense(options, queryClient) {
75
75
  const queryOptions = getGetUserAccountSuspenseQueryOptions(options);
76
- const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
76
+ const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
77
77
  query.queryKey = queryOptions.queryKey;
78
78
  return query;
79
79
  }
@@ -115,9 +115,9 @@ const getGetOrganisationUsersQueryOptions = (orgId, options) => {
115
115
  /**
116
116
  * @summary Gets users in an Organisation
117
117
  */
118
- function useGetOrganisationUsers(orgId, options) {
118
+ function useGetOrganisationUsers(orgId, options, queryClient) {
119
119
  const queryOptions = getGetOrganisationUsersQueryOptions(orgId, options);
120
- const query = (0, __tanstack_react_query.useQuery)(queryOptions);
120
+ const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
121
121
  query.queryKey = queryOptions.queryKey;
122
122
  return query;
123
123
  }
@@ -141,9 +141,9 @@ const getGetOrganisationUsersSuspenseQueryOptions = (orgId, options) => {
141
141
  /**
142
142
  * @summary Gets users in an Organisation
143
143
  */
144
- function useGetOrganisationUsersSuspense(orgId, options) {
144
+ function useGetOrganisationUsersSuspense(orgId, options, queryClient) {
145
145
  const queryOptions = getGetOrganisationUsersSuspenseQueryOptions(orgId, options);
146
- const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
146
+ const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
147
147
  query.queryKey = queryOptions.queryKey;
148
148
  return query;
149
149
  }
@@ -184,8 +184,8 @@ const getAddOrganisationUserMutationOptions = (options) => {
184
184
  /**
185
185
  * @summary Adds a User to an Organisation
186
186
  */
187
- const useAddOrganisationUser = (options) => {
188
- return (0, __tanstack_react_query.useMutation)(getAddOrganisationUserMutationOptions(options));
187
+ const useAddOrganisationUser = (options, queryClient) => {
188
+ return (0, __tanstack_react_query.useMutation)(getAddOrganisationUserMutationOptions(options), queryClient);
189
189
  };
190
190
  /**
191
191
  * Removes a User from an **Organisation**.
@@ -224,8 +224,8 @@ const getDeleteOrganisationUserMutationOptions = (options) => {
224
224
  /**
225
225
  * @summary Deletes a User from an Organisation
226
226
  */
227
- const useDeleteOrganisationUser = (options) => {
228
- return (0, __tanstack_react_query.useMutation)(getDeleteOrganisationUserMutationOptions(options));
227
+ const useDeleteOrganisationUser = (options, queryClient) => {
228
+ return (0, __tanstack_react_query.useMutation)(getDeleteOrganisationUserMutationOptions(options), queryClient);
229
229
  };
230
230
  /**
231
231
  * Gets users in an Organisational Unit.
@@ -265,9 +265,9 @@ const getGetOrganisationUnitUsersQueryOptions = (unitId, options) => {
265
265
  /**
266
266
  * @summary Gets users in an Organisational Unit
267
267
  */
268
- function useGetOrganisationUnitUsers(unitId, options) {
268
+ function useGetOrganisationUnitUsers(unitId, options, queryClient) {
269
269
  const queryOptions = getGetOrganisationUnitUsersQueryOptions(unitId, options);
270
- const query = (0, __tanstack_react_query.useQuery)(queryOptions);
270
+ const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
271
271
  query.queryKey = queryOptions.queryKey;
272
272
  return query;
273
273
  }
@@ -291,9 +291,9 @@ const getGetOrganisationUnitUsersSuspenseQueryOptions = (unitId, options) => {
291
291
  /**
292
292
  * @summary Gets users in an Organisational Unit
293
293
  */
294
- function useGetOrganisationUnitUsersSuspense(unitId, options) {
294
+ function useGetOrganisationUnitUsersSuspense(unitId, options, queryClient) {
295
295
  const queryOptions = getGetOrganisationUnitUsersSuspenseQueryOptions(unitId, options);
296
- const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
296
+ const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
297
297
  query.queryKey = queryOptions.queryKey;
298
298
  return query;
299
299
  }
@@ -336,8 +336,8 @@ const getAddOrganisationUnitUserMutationOptions = (options) => {
336
336
  /**
337
337
  * @summary Adds a user to an Organisational Unit
338
338
  */
339
- const useAddOrganisationUnitUser = (options) => {
340
- return (0, __tanstack_react_query.useMutation)(getAddOrganisationUnitUserMutationOptions(options));
339
+ const useAddOrganisationUnitUser = (options, queryClient) => {
340
+ return (0, __tanstack_react_query.useMutation)(getAddOrganisationUnitUserMutationOptions(options), queryClient);
341
341
  };
342
342
  /**
343
343
  * Removes a User from an Organisational Unit.
@@ -378,8 +378,8 @@ const getDeleteOrganisationUnitUserMutationOptions = (options) => {
378
378
  /**
379
379
  * @summary Deletes a User from an Organisational Unit
380
380
  */
381
- const useDeleteOrganisationUnitUser = (options) => {
382
- return (0, __tanstack_react_query.useMutation)(getDeleteOrganisationUnitUserMutationOptions(options));
381
+ const useDeleteOrganisationUnitUser = (options, queryClient) => {
382
+ return (0, __tanstack_react_query.useMutation)(getDeleteOrganisationUnitUserMutationOptions(options), queryClient);
383
383
  };
384
384
 
385
385
  //#endregion