@squonk/account-server-client 4.4.0-4-4.2197467763 → 4.4.0-4-4.2200269934

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
  }
@@ -75,9 +75,9 @@ const getGetOrganisationUnitsSuspenseQueryOptions = (orgId, options) => {
75
75
  /**
76
76
  * @summary Gets Organisational Units
77
77
  */
78
- function useGetOrganisationUnitsSuspense(orgId, options) {
78
+ function useGetOrganisationUnitsSuspense(orgId, options, queryClient) {
79
79
  const queryOptions = getGetOrganisationUnitsSuspenseQueryOptions(orgId, options);
80
- const query = useSuspenseQuery(queryOptions);
80
+ const query = useSuspenseQuery(queryOptions, queryClient);
81
81
  query.queryKey = queryOptions.queryKey;
82
82
  return query;
83
83
  }
@@ -119,8 +119,8 @@ const getCreateOrganisationUnitMutationOptions = (options) => {
119
119
  /**
120
120
  * @summary Create a new Organisational Unit
121
121
  */
122
- const useCreateOrganisationUnit = (options) => {
123
- return useMutation(getCreateOrganisationUnitMutationOptions(options));
122
+ const useCreateOrganisationUnit = (options, queryClient) => {
123
+ return useMutation(getCreateOrganisationUnitMutationOptions(options), queryClient);
124
124
  };
125
125
  const getGetUnitUrl = (unitId) => {
126
126
  return `/unit/${unitId}`;
@@ -155,9 +155,9 @@ const getGetUnitQueryOptions = (unitId, options) => {
155
155
  /**
156
156
  * @summary Gets an Organisational Unit
157
157
  */
158
- function useGetUnit(unitId, options) {
158
+ function useGetUnit(unitId, options, queryClient) {
159
159
  const queryOptions = getGetUnitQueryOptions(unitId, options);
160
- const query = useQuery(queryOptions);
160
+ const query = useQuery(queryOptions, queryClient);
161
161
  query.queryKey = queryOptions.queryKey;
162
162
  return query;
163
163
  }
@@ -184,9 +184,9 @@ const getGetUnitSuspenseQueryOptions = (unitId, options) => {
184
184
  /**
185
185
  * @summary Gets an Organisational Unit
186
186
  */
187
- function useGetUnitSuspense(unitId, options) {
187
+ function useGetUnitSuspense(unitId, options, queryClient) {
188
188
  const queryOptions = getGetUnitSuspenseQueryOptions(unitId, options);
189
- const query = useSuspenseQuery(queryOptions);
189
+ const query = useSuspenseQuery(queryOptions, queryClient);
190
190
  query.queryKey = queryOptions.queryKey;
191
191
  return query;
192
192
  }
@@ -228,8 +228,8 @@ const getPatchUnitMutationOptions = (options) => {
228
228
  /**
229
229
  * @summary Adjust an existing Unit
230
230
  */
231
- const usePatchUnit = (options) => {
232
- return useMutation(getPatchUnitMutationOptions(options));
231
+ const usePatchUnit = (options, queryClient) => {
232
+ return useMutation(getPatchUnitMutationOptions(options), queryClient);
233
233
  };
234
234
  const getDeleteOrganisationUnitUrl = (unitId) => {
235
235
  return `/unit/${unitId}`;
@@ -264,8 +264,8 @@ const getDeleteOrganisationUnitMutationOptions = (options) => {
264
264
  /**
265
265
  * @summary Deletes an Organisational Unit
266
266
  */
267
- const useDeleteOrganisationUnit = (options) => {
268
- return useMutation(getDeleteOrganisationUnitMutationOptions(options));
267
+ const useDeleteOrganisationUnit = (options, queryClient) => {
268
+ return useMutation(getDeleteOrganisationUnitMutationOptions(options), queryClient);
269
269
  };
270
270
  const getGetPersonalUnitUrl = () => {
271
271
  return `/personal-unit`;
@@ -295,9 +295,9 @@ const getGetPersonalUnitQueryOptions = (options) => {
295
295
  /**
296
296
  * @summary Gets your Personal Unit (if you have one)
297
297
  */
298
- function useGetPersonalUnit(options) {
298
+ function useGetPersonalUnit(options, queryClient) {
299
299
  const queryOptions = getGetPersonalUnitQueryOptions(options);
300
- const query = useQuery(queryOptions);
300
+ const query = useQuery(queryOptions, queryClient);
301
301
  query.queryKey = queryOptions.queryKey;
302
302
  return query;
303
303
  }
@@ -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
  }
@@ -368,8 +368,8 @@ const getCreatePersonalUnitMutationOptions = (options) => {
368
368
  /**
369
369
  * @summary Create a new Personal Unit
370
370
  */
371
- const useCreatePersonalUnit = (options) => {
372
- return useMutation(getCreatePersonalUnitMutationOptions(options));
371
+ const useCreatePersonalUnit = (options, queryClient) => {
372
+ return useMutation(getCreatePersonalUnitMutationOptions(options), queryClient);
373
373
  };
374
374
  const getDeletePersonalUnitUrl = () => {
375
375
  return `/personal-unit`;
@@ -403,8 +403,8 @@ const getDeletePersonalUnitMutationOptions = (options) => {
403
403
  /**
404
404
  * @summary Deletes a Personal Unit
405
405
  */
406
- const useDeletePersonalUnit = (options) => {
407
- return useMutation(getDeletePersonalUnitMutationOptions(options));
406
+ const useDeletePersonalUnit = (options, queryClient) => {
407
+ return useMutation(getDeletePersonalUnitMutationOptions(options), queryClient);
408
408
  };
409
409
  const getGetUnitsUrl = (params) => {
410
410
  const normalizedParams = new URLSearchParams();
@@ -443,9 +443,9 @@ const getGetUnitsQueryOptions = (params, options) => {
443
443
  /**
444
444
  * @summary Gets Units
445
445
  */
446
- function useGetUnits(params, options) {
446
+ function useGetUnits(params, options, queryClient) {
447
447
  const queryOptions = getGetUnitsQueryOptions(params, options);
448
- const query = useQuery(queryOptions);
448
+ const query = useQuery(queryOptions, queryClient);
449
449
  query.queryKey = queryOptions.queryKey;
450
450
  return query;
451
451
  }
@@ -472,9 +472,9 @@ const getGetUnitsSuspenseQueryOptions = (params, options) => {
472
472
  /**
473
473
  * @summary Gets Units
474
474
  */
475
- function useGetUnitsSuspense(params, options) {
475
+ function useGetUnitsSuspense(params, options, queryClient) {
476
476
  const queryOptions = getGetUnitsSuspenseQueryOptions(params, options);
477
- const query = useSuspenseQuery(queryOptions);
477
+ const query = useSuspenseQuery(queryOptions, queryClient);
478
478
  query.queryKey = queryOptions.queryKey;
479
479
  return query;
480
480
  }
@@ -516,8 +516,8 @@ const getCreateDefaultUnitMutationOptions = (options) => {
516
516
  /**
517
517
  * @summary Create a new Personal Unit
518
518
  */
519
- const useCreateDefaultUnit = (options) => {
520
- return useMutation(getCreateDefaultUnitMutationOptions(options));
519
+ const useCreateDefaultUnit = (options, queryClient) => {
520
+ return useMutation(getCreateDefaultUnitMutationOptions(options), queryClient);
521
521
  };
522
522
  const getDeleteDefaultUnitUrl = () => {
523
523
  return `/unit`;
@@ -551,8 +551,8 @@ const getDeleteDefaultUnitMutationOptions = (options) => {
551
551
  /**
552
552
  * @summary Deletes a Personal Unit
553
553
  */
554
- const useDeleteDefaultUnit = (options) => {
555
- return useMutation(getDeleteDefaultUnitMutationOptions(options));
554
+ const useDeleteDefaultUnit = (options, queryClient) => {
555
+ return useMutation(getDeleteDefaultUnitMutationOptions(options), queryClient);
556
556
  };
557
557
 
558
558
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"unit.fetch.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.fetch.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 { customFetch } from \"../../custom-fetch\";\nimport type { ErrorType } from \"../../custom-fetch\";\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 type getOrganisationUnitsResponse200 = { data: OrganisationUnitsGetResponse; status: 200 };\n\nexport type getOrganisationUnitsResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationUnitsResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationUnitsResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationUnitsResponseSuccess = getOrganisationUnitsResponse200 & {\n headers: Headers;\n};\nexport type getOrganisationUnitsResponseError = (\n | getOrganisationUnitsResponse401\n | getOrganisationUnitsResponse403\n | getOrganisationUnitsResponse404\n) & { headers: Headers };\n\nexport type getOrganisationUnitsResponse =\n | getOrganisationUnitsResponseSuccess\n | getOrganisationUnitsResponseError;\n\nexport const getGetOrganisationUnitsUrl = (orgId: string) => {\n return `/organisation/${orgId}/unit`;\n};\n\nexport const getOrganisationUnits = async (\n orgId: string,\n options?: RequestInit,\n): Promise<getOrganisationUnitsResponse> => {\n return customFetch<getOrganisationUnitsResponse>(getGetOrganisationUnitsUrl(orgId), {\n ...options,\n method: \"GET\",\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 type createOrganisationUnitResponse201 = { data: OrganisationUnitPostResponse; status: 201 };\n\nexport type createOrganisationUnitResponse400 = { data: AsError; status: 400 };\n\nexport type createOrganisationUnitResponse401 = { data: void; status: 401 };\n\nexport type createOrganisationUnitResponse403 = { data: AsError; status: 403 };\n\nexport type createOrganisationUnitResponseSuccess = createOrganisationUnitResponse201 & {\n headers: Headers;\n};\nexport type createOrganisationUnitResponseError = (\n | createOrganisationUnitResponse400\n | createOrganisationUnitResponse401\n | createOrganisationUnitResponse403\n) & { headers: Headers };\n\nexport type createOrganisationUnitResponse =\n | createOrganisationUnitResponseSuccess\n | createOrganisationUnitResponseError;\n\nexport const getCreateOrganisationUnitUrl = (orgId: string) => {\n return `/organisation/${orgId}/unit`;\n};\n\nexport const createOrganisationUnit = async (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: RequestInit,\n): Promise<createOrganisationUnitResponse> => {\n return customFetch<createOrganisationUnitResponse>(getCreateOrganisationUnitUrl(orgId), {\n ...options,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(organisationUnitPostBodyBody),\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 customFetch>;\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 customFetch>;\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 type getUnitResponse200 = { data: UnitAllDetail; status: 200 };\n\nexport type getUnitResponse401 = { data: void; status: 401 };\n\nexport type getUnitResponse403 = { data: AsError; status: 403 };\n\nexport type getUnitResponse404 = { data: AsError; status: 404 };\n\nexport type getUnitResponseSuccess = getUnitResponse200 & { headers: Headers };\nexport type getUnitResponseError = (\n | getUnitResponse401\n | getUnitResponse403\n | getUnitResponse404\n) & { headers: Headers };\n\nexport type getUnitResponse = getUnitResponseSuccess | getUnitResponseError;\n\nexport const getGetUnitUrl = (unitId: string) => {\n return `/unit/${unitId}`;\n};\n\nexport const getUnit = async (unitId: string, options?: RequestInit): Promise<getUnitResponse> => {\n return customFetch<getUnitResponse>(getGetUnitUrl(unitId), { ...options, method: \"GET\" });\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 type patchUnitResponse200 = { data: void; status: 200 };\n\nexport type patchUnitResponse401 = { data: void; status: 401 };\n\nexport type patchUnitResponse403 = { data: AsError; status: 403 };\n\nexport type patchUnitResponse404 = { data: AsError; status: 404 };\n\nexport type patchUnitResponseSuccess = patchUnitResponse200 & { headers: Headers };\nexport type patchUnitResponseError = (\n | patchUnitResponse401\n | patchUnitResponse403\n | patchUnitResponse404\n) & { headers: Headers };\n\nexport type patchUnitResponse = patchUnitResponseSuccess | patchUnitResponseError;\n\nexport const getPatchUnitUrl = (unitId: string) => {\n return `/unit/${unitId}`;\n};\n\nexport const patchUnit = async (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: RequestInit,\n): Promise<patchUnitResponse> => {\n return customFetch<patchUnitResponse>(getPatchUnitUrl(unitId), {\n ...options,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(unitPatchBodyBody),\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 customFetch>;\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 customFetch>;\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 type deleteOrganisationUnitResponse204 = { data: void; status: 204 };\n\nexport type deleteOrganisationUnitResponse401 = { data: void; status: 401 };\n\nexport type deleteOrganisationUnitResponse403 = { data: AsError; status: 403 };\n\nexport type deleteOrganisationUnitResponse404 = { data: AsError; status: 404 };\n\nexport type deleteOrganisationUnitResponseSuccess = deleteOrganisationUnitResponse204 & {\n headers: Headers;\n};\nexport type deleteOrganisationUnitResponseError = (\n | deleteOrganisationUnitResponse401\n | deleteOrganisationUnitResponse403\n | deleteOrganisationUnitResponse404\n) & { headers: Headers };\n\nexport type deleteOrganisationUnitResponse =\n | deleteOrganisationUnitResponseSuccess\n | deleteOrganisationUnitResponseError;\n\nexport const getDeleteOrganisationUnitUrl = (unitId: string) => {\n return `/unit/${unitId}`;\n};\n\nexport const deleteOrganisationUnit = async (\n unitId: string,\n options?: RequestInit,\n): Promise<deleteOrganisationUnitResponse> => {\n return customFetch<deleteOrganisationUnitResponse>(getDeleteOrganisationUnitUrl(unitId), {\n ...options,\n method: \"DELETE\",\n });\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 customFetch>;\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 customFetch>;\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 type getPersonalUnitResponse200 = { data: UnitAllDetail; status: 200 };\n\nexport type getPersonalUnitResponse401 = { data: void; status: 401 };\n\nexport type getPersonalUnitResponse403 = { data: AsError; status: 403 };\n\nexport type getPersonalUnitResponse404 = { data: AsError; status: 404 };\n\nexport type getPersonalUnitResponseSuccess = getPersonalUnitResponse200 & { headers: Headers };\nexport type getPersonalUnitResponseError = (\n | getPersonalUnitResponse401\n | getPersonalUnitResponse403\n | getPersonalUnitResponse404\n) & { headers: Headers };\n\nexport type getPersonalUnitResponse = getPersonalUnitResponseSuccess | getPersonalUnitResponseError;\n\nexport const getGetPersonalUnitUrl = () => {\n return `/personal-unit`;\n};\n\nexport const getPersonalUnit = async (options?: RequestInit): Promise<getPersonalUnitResponse> => {\n return customFetch<getPersonalUnitResponse>(getGetPersonalUnitUrl(), {\n ...options,\n method: \"GET\",\n });\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 customFetch>;\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({ signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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({ signal, ...requestOptions });\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 customFetch>;\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 type createPersonalUnitResponse201 = { data: PersonalUnitPutResponse; status: 201 };\n\nexport type createPersonalUnitResponse400 = { data: AsError; status: 400 };\n\nexport type createPersonalUnitResponse401 = { data: void; status: 401 };\n\nexport type createPersonalUnitResponse403 = { data: AsError; status: 403 };\n\nexport type createPersonalUnitResponseSuccess = createPersonalUnitResponse201 & {\n headers: Headers;\n};\nexport type createPersonalUnitResponseError = (\n | createPersonalUnitResponse400\n | createPersonalUnitResponse401\n | createPersonalUnitResponse403\n) & { headers: Headers };\n\nexport type createPersonalUnitResponse =\n | createPersonalUnitResponseSuccess\n | createPersonalUnitResponseError;\n\nexport const getCreatePersonalUnitUrl = () => {\n return `/personal-unit`;\n};\n\nexport const createPersonalUnit = async (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: RequestInit,\n): Promise<createPersonalUnitResponse> => {\n return customFetch<createPersonalUnitResponse>(getCreatePersonalUnitUrl(), {\n ...options,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(personalUnitPutBodyBody),\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 customFetch>;\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 customFetch>;\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 type deletePersonalUnitResponse204 = { data: void; status: 204 };\n\nexport type deletePersonalUnitResponse401 = { data: void; status: 401 };\n\nexport type deletePersonalUnitResponse403 = { data: AsError; status: 403 };\n\nexport type deletePersonalUnitResponse404 = { data: AsError; status: 404 };\n\nexport type deletePersonalUnitResponseSuccess = deletePersonalUnitResponse204 & {\n headers: Headers;\n};\nexport type deletePersonalUnitResponseError = (\n | deletePersonalUnitResponse401\n | deletePersonalUnitResponse403\n | deletePersonalUnitResponse404\n) & { headers: Headers };\n\nexport type deletePersonalUnitResponse =\n | deletePersonalUnitResponseSuccess\n | deletePersonalUnitResponseError;\n\nexport const getDeletePersonalUnitUrl = () => {\n return `/personal-unit`;\n};\n\nexport const deletePersonalUnit = async (\n options?: RequestInit,\n): Promise<deletePersonalUnitResponse> => {\n return customFetch<deletePersonalUnitResponse>(getDeletePersonalUnitUrl(), {\n ...options,\n method: \"DELETE\",\n });\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 customFetch>;\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 customFetch>;\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 type getUnitsResponse200 = { data: UnitsGetResponse; status: 200 };\n\nexport type getUnitsResponse401 = { data: void; status: 401 };\n\nexport type getUnitsResponse403 = { data: AsError; status: 403 };\n\nexport type getUnitsResponse404 = { data: AsError; status: 404 };\n\nexport type getUnitsResponseSuccess = getUnitsResponse200 & { headers: Headers };\nexport type getUnitsResponseError = (\n | getUnitsResponse401\n | getUnitsResponse403\n | getUnitsResponse404\n) & { headers: Headers };\n\nexport type getUnitsResponse = getUnitsResponseSuccess | getUnitsResponseError;\n\nexport const getGetUnitsUrl = (params?: GetUnitsParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/unit?${stringifiedParams}` : `/unit`;\n};\n\nexport const getUnits = async (\n params?: GetUnitsParams,\n options?: RequestInit,\n): Promise<getUnitsResponse> => {\n return customFetch<getUnitsResponse>(getGetUnitsUrl(params), { ...options, method: \"GET\" });\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 type createDefaultUnitResponse201 = { data: PersonalUnitPutResponse; status: 201 };\n\nexport type createDefaultUnitResponse400 = { data: AsError; status: 400 };\n\nexport type createDefaultUnitResponse401 = { data: void; status: 401 };\n\nexport type createDefaultUnitResponse403 = { data: AsError; status: 403 };\n\nexport type createDefaultUnitResponseSuccess = createDefaultUnitResponse201 & { headers: Headers };\nexport type createDefaultUnitResponseError = (\n | createDefaultUnitResponse400\n | createDefaultUnitResponse401\n | createDefaultUnitResponse403\n) & { headers: Headers };\n\nexport type createDefaultUnitResponse =\n | createDefaultUnitResponseSuccess\n | createDefaultUnitResponseError;\n\nexport const getCreateDefaultUnitUrl = () => {\n return `/unit`;\n};\n\nexport const createDefaultUnit = async (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: RequestInit,\n): Promise<createDefaultUnitResponse> => {\n return customFetch<createDefaultUnitResponse>(getCreateDefaultUnitUrl(), {\n ...options,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(personalUnitPutBodyBody),\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 customFetch>;\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 customFetch>;\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 type deleteDefaultUnitResponse204 = { data: void; status: 204 };\n\nexport type deleteDefaultUnitResponse401 = { data: void; status: 401 };\n\nexport type deleteDefaultUnitResponse403 = { data: AsError; status: 403 };\n\nexport type deleteDefaultUnitResponse404 = { data: AsError; status: 404 };\n\nexport type deleteDefaultUnitResponseSuccess = deleteDefaultUnitResponse204 & { headers: Headers };\nexport type deleteDefaultUnitResponseError = (\n | deleteDefaultUnitResponse401\n | deleteDefaultUnitResponse403\n | deleteDefaultUnitResponse404\n) & { headers: Headers };\n\nexport type deleteDefaultUnitResponse =\n | deleteDefaultUnitResponseSuccess\n | deleteDefaultUnitResponseError;\n\nexport const getDeleteDefaultUnitUrl = () => {\n return `/unit`;\n};\n\nexport const deleteDefaultUnit = async (\n options?: RequestInit,\n): Promise<deleteDefaultUnitResponse> => {\n return customFetch<deleteDefaultUnitResponse>(getDeleteDefaultUnitUrl(), {\n ...options,\n method: \"DELETE\",\n });\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 customFetch>;\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 customFetch>;\n}): UseMutationResult<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext> => {\n const mutationOptions = getDeleteDefaultUnitMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n"],"mappings":";;;;;;;;;;;;;;AAqEA,MAAa,8BAA8B,UAAkB;AAC3D,QAAO,iBAAiB,MAAM;;AAGhC,MAAa,uBAAuB,OAClC,OACA,YAC0C;AAC1C,QAAO,YAA0C,2BAA2B,MAAM,EAAE;EAClF,GAAG;EACH,QAAQ;EACT,CAAC;;AAGJ,M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Y,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;;AA4BrC,MAAa,gCAAgC;AAC3C,QAAO;;AAGT,MAAa,oBAAoB,OAC/B,YACuC;AACvC,QAAO,YAAuC,yBAAyB,EAAE;EACvE,GAAG;EACH,QAAQ;EACT,CAAC;;AAGJ,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.fetch.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.fetch.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 { customFetch } from \"../../custom-fetch\";\nimport type { ErrorType } from \"../../custom-fetch\";\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 type getOrganisationUnitsResponse200 = { data: OrganisationUnitsGetResponse; status: 200 };\n\nexport type getOrganisationUnitsResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationUnitsResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationUnitsResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationUnitsResponseSuccess = getOrganisationUnitsResponse200 & {\n headers: Headers;\n};\nexport type getOrganisationUnitsResponseError = (\n | getOrganisationUnitsResponse401\n | getOrganisationUnitsResponse403\n | getOrganisationUnitsResponse404\n) & { headers: Headers };\n\nexport type getOrganisationUnitsResponse =\n | getOrganisationUnitsResponseSuccess\n | getOrganisationUnitsResponseError;\n\nexport const getGetOrganisationUnitsUrl = (orgId: string) => {\n return `/organisation/${orgId}/unit`;\n};\n\nexport const getOrganisationUnits = async (\n orgId: string,\n options?: RequestInit,\n): Promise<getOrganisationUnitsResponse> => {\n return customFetch<getOrganisationUnitsResponse>(getGetOrganisationUnitsUrl(orgId), {\n ...options,\n method: \"GET\",\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 type createOrganisationUnitResponse201 = { data: OrganisationUnitPostResponse; status: 201 };\n\nexport type createOrganisationUnitResponse400 = { data: AsError; status: 400 };\n\nexport type createOrganisationUnitResponse401 = { data: void; status: 401 };\n\nexport type createOrganisationUnitResponse403 = { data: AsError; status: 403 };\n\nexport type createOrganisationUnitResponseSuccess = createOrganisationUnitResponse201 & {\n headers: Headers;\n};\nexport type createOrganisationUnitResponseError = (\n | createOrganisationUnitResponse400\n | createOrganisationUnitResponse401\n | createOrganisationUnitResponse403\n) & { headers: Headers };\n\nexport type createOrganisationUnitResponse =\n | createOrganisationUnitResponseSuccess\n | createOrganisationUnitResponseError;\n\nexport const getCreateOrganisationUnitUrl = (orgId: string) => {\n return `/organisation/${orgId}/unit`;\n};\n\nexport const createOrganisationUnit = async (\n orgId: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: RequestInit,\n): Promise<createOrganisationUnitResponse> => {\n return customFetch<createOrganisationUnitResponse>(getCreateOrganisationUnitUrl(orgId), {\n ...options,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(organisationUnitPostBodyBody),\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 customFetch>;\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 customFetch>;\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 type getUnitResponse200 = { data: UnitAllDetail; status: 200 };\n\nexport type getUnitResponse401 = { data: void; status: 401 };\n\nexport type getUnitResponse403 = { data: AsError; status: 403 };\n\nexport type getUnitResponse404 = { data: AsError; status: 404 };\n\nexport type getUnitResponseSuccess = getUnitResponse200 & { headers: Headers };\nexport type getUnitResponseError = (\n | getUnitResponse401\n | getUnitResponse403\n | getUnitResponse404\n) & { headers: Headers };\n\nexport type getUnitResponse = getUnitResponseSuccess | getUnitResponseError;\n\nexport const getGetUnitUrl = (unitId: string) => {\n return `/unit/${unitId}`;\n};\n\nexport const getUnit = async (unitId: string, options?: RequestInit): Promise<getUnitResponse> => {\n return customFetch<getUnitResponse>(getGetUnitUrl(unitId), { ...options, method: \"GET\" });\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 type patchUnitResponse200 = { data: void; status: 200 };\n\nexport type patchUnitResponse401 = { data: void; status: 401 };\n\nexport type patchUnitResponse403 = { data: AsError; status: 403 };\n\nexport type patchUnitResponse404 = { data: AsError; status: 404 };\n\nexport type patchUnitResponseSuccess = patchUnitResponse200 & { headers: Headers };\nexport type patchUnitResponseError = (\n | patchUnitResponse401\n | patchUnitResponse403\n | patchUnitResponse404\n) & { headers: Headers };\n\nexport type patchUnitResponse = patchUnitResponseSuccess | patchUnitResponseError;\n\nexport const getPatchUnitUrl = (unitId: string) => {\n return `/unit/${unitId}`;\n};\n\nexport const patchUnit = async (\n unitId: string,\n unitPatchBodyBody: UnitPatchBodyBody,\n options?: RequestInit,\n): Promise<patchUnitResponse> => {\n return customFetch<patchUnitResponse>(getPatchUnitUrl(unitId), {\n ...options,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(unitPatchBodyBody),\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 customFetch>;\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 customFetch>;\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 type deleteOrganisationUnitResponse204 = { data: void; status: 204 };\n\nexport type deleteOrganisationUnitResponse401 = { data: void; status: 401 };\n\nexport type deleteOrganisationUnitResponse403 = { data: AsError; status: 403 };\n\nexport type deleteOrganisationUnitResponse404 = { data: AsError; status: 404 };\n\nexport type deleteOrganisationUnitResponseSuccess = deleteOrganisationUnitResponse204 & {\n headers: Headers;\n};\nexport type deleteOrganisationUnitResponseError = (\n | deleteOrganisationUnitResponse401\n | deleteOrganisationUnitResponse403\n | deleteOrganisationUnitResponse404\n) & { headers: Headers };\n\nexport type deleteOrganisationUnitResponse =\n | deleteOrganisationUnitResponseSuccess\n | deleteOrganisationUnitResponseError;\n\nexport const getDeleteOrganisationUnitUrl = (unitId: string) => {\n return `/unit/${unitId}`;\n};\n\nexport const deleteOrganisationUnit = async (\n unitId: string,\n options?: RequestInit,\n): Promise<deleteOrganisationUnitResponse> => {\n return customFetch<deleteOrganisationUnitResponse>(getDeleteOrganisationUnitUrl(unitId), {\n ...options,\n method: \"DELETE\",\n });\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 customFetch>;\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 customFetch>;\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 type getPersonalUnitResponse200 = { data: UnitAllDetail; status: 200 };\n\nexport type getPersonalUnitResponse401 = { data: void; status: 401 };\n\nexport type getPersonalUnitResponse403 = { data: AsError; status: 403 };\n\nexport type getPersonalUnitResponse404 = { data: AsError; status: 404 };\n\nexport type getPersonalUnitResponseSuccess = getPersonalUnitResponse200 & { headers: Headers };\nexport type getPersonalUnitResponseError = (\n | getPersonalUnitResponse401\n | getPersonalUnitResponse403\n | getPersonalUnitResponse404\n) & { headers: Headers };\n\nexport type getPersonalUnitResponse = getPersonalUnitResponseSuccess | getPersonalUnitResponseError;\n\nexport const getGetPersonalUnitUrl = () => {\n return `/personal-unit`;\n};\n\nexport const getPersonalUnit = async (options?: RequestInit): Promise<getPersonalUnitResponse> => {\n return customFetch<getPersonalUnitResponse>(getGetPersonalUnitUrl(), {\n ...options,\n method: \"GET\",\n });\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 customFetch>;\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({ signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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({ signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 type createPersonalUnitResponse201 = { data: PersonalUnitPutResponse; status: 201 };\n\nexport type createPersonalUnitResponse400 = { data: AsError; status: 400 };\n\nexport type createPersonalUnitResponse401 = { data: void; status: 401 };\n\nexport type createPersonalUnitResponse403 = { data: AsError; status: 403 };\n\nexport type createPersonalUnitResponseSuccess = createPersonalUnitResponse201 & {\n headers: Headers;\n};\nexport type createPersonalUnitResponseError = (\n | createPersonalUnitResponse400\n | createPersonalUnitResponse401\n | createPersonalUnitResponse403\n) & { headers: Headers };\n\nexport type createPersonalUnitResponse =\n | createPersonalUnitResponseSuccess\n | createPersonalUnitResponseError;\n\nexport const getCreatePersonalUnitUrl = () => {\n return `/personal-unit`;\n};\n\nexport const createPersonalUnit = async (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: RequestInit,\n): Promise<createPersonalUnitResponse> => {\n return customFetch<createPersonalUnitResponse>(getCreatePersonalUnitUrl(), {\n ...options,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(personalUnitPutBodyBody),\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 customFetch>;\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 customFetch>;\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 type deletePersonalUnitResponse204 = { data: void; status: 204 };\n\nexport type deletePersonalUnitResponse401 = { data: void; status: 401 };\n\nexport type deletePersonalUnitResponse403 = { data: AsError; status: 403 };\n\nexport type deletePersonalUnitResponse404 = { data: AsError; status: 404 };\n\nexport type deletePersonalUnitResponseSuccess = deletePersonalUnitResponse204 & {\n headers: Headers;\n};\nexport type deletePersonalUnitResponseError = (\n | deletePersonalUnitResponse401\n | deletePersonalUnitResponse403\n | deletePersonalUnitResponse404\n) & { headers: Headers };\n\nexport type deletePersonalUnitResponse =\n | deletePersonalUnitResponseSuccess\n | deletePersonalUnitResponseError;\n\nexport const getDeletePersonalUnitUrl = () => {\n return `/personal-unit`;\n};\n\nexport const deletePersonalUnit = async (\n options?: RequestInit,\n): Promise<deletePersonalUnitResponse> => {\n return customFetch<deletePersonalUnitResponse>(getDeletePersonalUnitUrl(), {\n ...options,\n method: \"DELETE\",\n });\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 customFetch>;\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 customFetch>;\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 type getUnitsResponse200 = { data: UnitsGetResponse; status: 200 };\n\nexport type getUnitsResponse401 = { data: void; status: 401 };\n\nexport type getUnitsResponse403 = { data: AsError; status: 403 };\n\nexport type getUnitsResponse404 = { data: AsError; status: 404 };\n\nexport type getUnitsResponseSuccess = getUnitsResponse200 & { headers: Headers };\nexport type getUnitsResponseError = (\n | getUnitsResponse401\n | getUnitsResponse403\n | getUnitsResponse404\n) & { headers: Headers };\n\nexport type getUnitsResponse = getUnitsResponseSuccess | getUnitsResponseError;\n\nexport const getGetUnitsUrl = (params?: GetUnitsParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/unit?${stringifiedParams}` : `/unit`;\n};\n\nexport const getUnits = async (\n params?: GetUnitsParams,\n options?: RequestInit,\n): Promise<getUnitsResponse> => {\n return customFetch<getUnitsResponse>(getGetUnitsUrl(params), { ...options, method: \"GET\" });\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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, { signal, ...requestOptions });\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 customFetch>;\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 type createDefaultUnitResponse201 = { data: PersonalUnitPutResponse; status: 201 };\n\nexport type createDefaultUnitResponse400 = { data: AsError; status: 400 };\n\nexport type createDefaultUnitResponse401 = { data: void; status: 401 };\n\nexport type createDefaultUnitResponse403 = { data: AsError; status: 403 };\n\nexport type createDefaultUnitResponseSuccess = createDefaultUnitResponse201 & { headers: Headers };\nexport type createDefaultUnitResponseError = (\n | createDefaultUnitResponse400\n | createDefaultUnitResponse401\n | createDefaultUnitResponse403\n) & { headers: Headers };\n\nexport type createDefaultUnitResponse =\n | createDefaultUnitResponseSuccess\n | createDefaultUnitResponseError;\n\nexport const getCreateDefaultUnitUrl = () => {\n return `/unit`;\n};\n\nexport const createDefaultUnit = async (\n personalUnitPutBodyBody: PersonalUnitPutBodyBody,\n options?: RequestInit,\n): Promise<createDefaultUnitResponse> => {\n return customFetch<createDefaultUnitResponse>(getCreateDefaultUnitUrl(), {\n ...options,\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\", ...options?.headers },\n body: JSON.stringify(personalUnitPutBodyBody),\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 customFetch>;\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 customFetch>;\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 type deleteDefaultUnitResponse204 = { data: void; status: 204 };\n\nexport type deleteDefaultUnitResponse401 = { data: void; status: 401 };\n\nexport type deleteDefaultUnitResponse403 = { data: AsError; status: 403 };\n\nexport type deleteDefaultUnitResponse404 = { data: AsError; status: 404 };\n\nexport type deleteDefaultUnitResponseSuccess = deleteDefaultUnitResponse204 & { headers: Headers };\nexport type deleteDefaultUnitResponseError = (\n | deleteDefaultUnitResponse401\n | deleteDefaultUnitResponse403\n | deleteDefaultUnitResponse404\n) & { headers: Headers };\n\nexport type deleteDefaultUnitResponse =\n | deleteDefaultUnitResponseSuccess\n | deleteDefaultUnitResponseError;\n\nexport const getDeleteDefaultUnitUrl = () => {\n return `/unit`;\n};\n\nexport const deleteDefaultUnit = async (\n options?: RequestInit,\n): Promise<deleteDefaultUnitResponse> => {\n return customFetch<deleteDefaultUnitResponse>(getDeleteDefaultUnitUrl(), {\n ...options,\n method: \"DELETE\",\n });\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 customFetch>;\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 customFetch>;\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":";;;;;;;;;;;;;;AAyEA,MAAa,8BAA8B,UAAkB;AAC3D,QAAO,iBAAiB,MAAM;;AAGhC,MAAa,uBAAuB,OAClC,OACA,YAC0C;AAC1C,QAAO,YAA0C,2BAA2B,MAAM,EAAE;EAClF,GAAG;EACH,QAAQ;EACT,CAAC;;AAGJ,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;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAE5D,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,WA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