@squonk/account-server-client 4.4.0-4-4.2174798239 → 4.4.0-4-4.2194834412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/actions/actions.cjs +5 -5
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +17 -35
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +17 -35
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.js +5 -5
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/api.schemas.cjs.map +1 -1
- package/dist/api/api.schemas.d.cts +1 -1
- package/dist/api/api.schemas.d.ts +1 -1
- package/dist/api/api.schemas.js.map +1 -1
- package/dist/api/asset/asset.cjs +23 -23
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +40 -76
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +40 -76
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.js +23 -23
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +17 -17
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +65 -137
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +65 -137
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.js +17 -17
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +13 -13
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +35 -71
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +35 -71
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.js +13 -13
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +9 -9
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +33 -69
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +33 -69
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.js +9 -9
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +19 -19
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +52 -106
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +52 -106
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.js +19 -19
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +31 -31
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +100 -208
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +100 -208
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.js +31 -31
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +5 -5
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +17 -35
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +17 -35
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.js +5 -5
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +31 -31
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +72 -144
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +72 -144
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.js +31 -31
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +21 -21
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +53 -107
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +53 -107
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.js +21 -21
- package/dist/api/user/user.js.map +1 -1
- package/package.json +4 -7
- package/pnpm-workspace.yaml +1 -3
- package/src/api/actions/actions.ts +13 -105
- package/src/api/api.schemas.ts +1 -1
- package/src/api/asset/asset.ts +95 -305
- package/src/api/charges/charges.ts +55 -458
- package/src/api/event-stream/event-stream.ts +59 -264
- package/src/api/merchant/merchant.ts +29 -214
- package/src/api/organisation/organisation.ts +87 -383
- package/src/api/product/product.ts +131 -726
- package/src/api/state/state.ts +17 -107
- package/src/api/unit/unit.ts +147 -523
- package/src/api/user/user.ts +102 -403
|
@@ -4,7 +4,7 @@ import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
|
4
4
|
|
|
5
5
|
//#region src/api/product/product.ts
|
|
6
6
|
/**
|
|
7
|
-
* Generated by orval v7.
|
|
7
|
+
* Generated by orval v7.17.0 🍺
|
|
8
8
|
* Do not edit manually.
|
|
9
9
|
* Account Server API
|
|
10
10
|
* The Informatics Matters Account Server API.
|
|
@@ -41,9 +41,9 @@ const useGetProductTypesQueryOptions = (options) => {
|
|
|
41
41
|
/**
|
|
42
42
|
* @summary Gets all Product Types
|
|
43
43
|
*/
|
|
44
|
-
function useGetProductTypes(options
|
|
44
|
+
function useGetProductTypes(options) {
|
|
45
45
|
const queryOptions = useGetProductTypesQueryOptions(options);
|
|
46
|
-
const query = useQuery(queryOptions
|
|
46
|
+
const query = useQuery(queryOptions);
|
|
47
47
|
query.queryKey = queryOptions.queryKey;
|
|
48
48
|
return query;
|
|
49
49
|
}
|
|
@@ -60,9 +60,9 @@ const useGetProductTypesSuspenseQueryOptions = (options) => {
|
|
|
60
60
|
/**
|
|
61
61
|
* @summary Gets all Product Types
|
|
62
62
|
*/
|
|
63
|
-
function useGetProductTypesSuspense(options
|
|
63
|
+
function useGetProductTypesSuspense(options) {
|
|
64
64
|
const queryOptions = useGetProductTypesSuspenseQueryOptions(options);
|
|
65
|
-
const query = useSuspenseQuery(queryOptions
|
|
65
|
+
const query = useSuspenseQuery(queryOptions);
|
|
66
66
|
query.queryKey = queryOptions.queryKey;
|
|
67
67
|
return query;
|
|
68
68
|
}
|
|
@@ -94,9 +94,9 @@ const useGetProductDefaultStorageCostQueryOptions = (options) => {
|
|
|
94
94
|
/**
|
|
95
95
|
* @summary Gets the default cross-product storage cost
|
|
96
96
|
*/
|
|
97
|
-
function useGetProductDefaultStorageCost(options
|
|
97
|
+
function useGetProductDefaultStorageCost(options) {
|
|
98
98
|
const queryOptions = useGetProductDefaultStorageCostQueryOptions(options);
|
|
99
|
-
const query = useQuery(queryOptions
|
|
99
|
+
const query = useQuery(queryOptions);
|
|
100
100
|
query.queryKey = queryOptions.queryKey;
|
|
101
101
|
return query;
|
|
102
102
|
}
|
|
@@ -113,9 +113,9 @@ const useGetProductDefaultStorageCostSuspenseQueryOptions = (options) => {
|
|
|
113
113
|
/**
|
|
114
114
|
* @summary Gets the default cross-product storage cost
|
|
115
115
|
*/
|
|
116
|
-
function useGetProductDefaultStorageCostSuspense(options
|
|
116
|
+
function useGetProductDefaultStorageCostSuspense(options) {
|
|
117
117
|
const queryOptions = useGetProductDefaultStorageCostSuspenseQueryOptions(options);
|
|
118
|
-
const query = useSuspenseQuery(queryOptions
|
|
118
|
+
const query = useSuspenseQuery(queryOptions);
|
|
119
119
|
query.queryKey = queryOptions.queryKey;
|
|
120
120
|
return query;
|
|
121
121
|
}
|
|
@@ -147,9 +147,9 @@ const useGetProductsQueryOptions = (options) => {
|
|
|
147
147
|
/**
|
|
148
148
|
* @summary Gets all Products
|
|
149
149
|
*/
|
|
150
|
-
function useGetProducts(options
|
|
150
|
+
function useGetProducts(options) {
|
|
151
151
|
const queryOptions = useGetProductsQueryOptions(options);
|
|
152
|
-
const query = useQuery(queryOptions
|
|
152
|
+
const query = useQuery(queryOptions);
|
|
153
153
|
query.queryKey = queryOptions.queryKey;
|
|
154
154
|
return query;
|
|
155
155
|
}
|
|
@@ -166,9 +166,9 @@ const useGetProductsSuspenseQueryOptions = (options) => {
|
|
|
166
166
|
/**
|
|
167
167
|
* @summary Gets all Products
|
|
168
168
|
*/
|
|
169
|
-
function useGetProductsSuspense(options
|
|
169
|
+
function useGetProductsSuspense(options) {
|
|
170
170
|
const queryOptions = useGetProductsSuspenseQueryOptions(options);
|
|
171
|
-
const query = useSuspenseQuery(queryOptions
|
|
171
|
+
const query = useSuspenseQuery(queryOptions);
|
|
172
172
|
query.queryKey = queryOptions.queryKey;
|
|
173
173
|
return query;
|
|
174
174
|
}
|
|
@@ -200,9 +200,9 @@ const useGetProductsForOrganisationQueryOptions = (orgId, options) => {
|
|
|
200
200
|
/**
|
|
201
201
|
* @summary Gets Products for an Organisation
|
|
202
202
|
*/
|
|
203
|
-
function useGetProductsForOrganisation(orgId, options
|
|
203
|
+
function useGetProductsForOrganisation(orgId, options) {
|
|
204
204
|
const queryOptions = useGetProductsForOrganisationQueryOptions(orgId, options);
|
|
205
|
-
const query = useQuery(queryOptions
|
|
205
|
+
const query = useQuery(queryOptions);
|
|
206
206
|
query.queryKey = queryOptions.queryKey;
|
|
207
207
|
return query;
|
|
208
208
|
}
|
|
@@ -219,9 +219,9 @@ const useGetProductsForOrganisationSuspenseQueryOptions = (orgId, options) => {
|
|
|
219
219
|
/**
|
|
220
220
|
* @summary Gets Products for an Organisation
|
|
221
221
|
*/
|
|
222
|
-
function useGetProductsForOrganisationSuspense(orgId, options
|
|
222
|
+
function useGetProductsForOrganisationSuspense(orgId, options) {
|
|
223
223
|
const queryOptions = useGetProductsForOrganisationSuspenseQueryOptions(orgId, options);
|
|
224
|
-
const query = useSuspenseQuery(queryOptions
|
|
224
|
+
const query = useSuspenseQuery(queryOptions);
|
|
225
225
|
query.queryKey = queryOptions.queryKey;
|
|
226
226
|
return query;
|
|
227
227
|
}
|
|
@@ -271,8 +271,8 @@ const useCreateUnitProductMutationOptions = (options) => {
|
|
|
271
271
|
/**
|
|
272
272
|
* @summary Creates a Product for a Unit
|
|
273
273
|
*/
|
|
274
|
-
const useCreateUnitProduct = (options
|
|
275
|
-
return useMutation(useCreateUnitProductMutationOptions(options)
|
|
274
|
+
const useCreateUnitProduct = (options) => {
|
|
275
|
+
return useMutation(useCreateUnitProductMutationOptions(options));
|
|
276
276
|
};
|
|
277
277
|
/**
|
|
278
278
|
* Gets products you have access to based on an Organisational **Unit**
|
|
@@ -302,9 +302,9 @@ const useGetProductsForUnitQueryOptions = (unitId, options) => {
|
|
|
302
302
|
/**
|
|
303
303
|
* @summary Gets Products for an Organisational Unit
|
|
304
304
|
*/
|
|
305
|
-
function useGetProductsForUnit(unitId, options
|
|
305
|
+
function useGetProductsForUnit(unitId, options) {
|
|
306
306
|
const queryOptions = useGetProductsForUnitQueryOptions(unitId, options);
|
|
307
|
-
const query = useQuery(queryOptions
|
|
307
|
+
const query = useQuery(queryOptions);
|
|
308
308
|
query.queryKey = queryOptions.queryKey;
|
|
309
309
|
return query;
|
|
310
310
|
}
|
|
@@ -321,9 +321,9 @@ const useGetProductsForUnitSuspenseQueryOptions = (unitId, options) => {
|
|
|
321
321
|
/**
|
|
322
322
|
* @summary Gets Products for an Organisational Unit
|
|
323
323
|
*/
|
|
324
|
-
function useGetProductsForUnitSuspense(unitId, options
|
|
324
|
+
function useGetProductsForUnitSuspense(unitId, options) {
|
|
325
325
|
const queryOptions = useGetProductsForUnitSuspenseQueryOptions(unitId, options);
|
|
326
|
-
const query = useSuspenseQuery(queryOptions
|
|
326
|
+
const query = useSuspenseQuery(queryOptions);
|
|
327
327
|
query.queryKey = queryOptions.queryKey;
|
|
328
328
|
return query;
|
|
329
329
|
}
|
|
@@ -355,9 +355,9 @@ const useGetProductQueryOptions = (productId, options) => {
|
|
|
355
355
|
/**
|
|
356
356
|
* @summary Gets a Product
|
|
357
357
|
*/
|
|
358
|
-
function useGetProduct(productId, options
|
|
358
|
+
function useGetProduct(productId, options) {
|
|
359
359
|
const queryOptions = useGetProductQueryOptions(productId, options);
|
|
360
|
-
const query = useQuery(queryOptions
|
|
360
|
+
const query = useQuery(queryOptions);
|
|
361
361
|
query.queryKey = queryOptions.queryKey;
|
|
362
362
|
return query;
|
|
363
363
|
}
|
|
@@ -374,9 +374,9 @@ const useGetProductSuspenseQueryOptions = (productId, options) => {
|
|
|
374
374
|
/**
|
|
375
375
|
* @summary Gets a Product
|
|
376
376
|
*/
|
|
377
|
-
function useGetProductSuspense(productId, options
|
|
377
|
+
function useGetProductSuspense(productId, options) {
|
|
378
378
|
const queryOptions = useGetProductSuspenseQueryOptions(productId, options);
|
|
379
|
-
const query = useSuspenseQuery(queryOptions
|
|
379
|
+
const query = useSuspenseQuery(queryOptions);
|
|
380
380
|
query.queryKey = queryOptions.queryKey;
|
|
381
381
|
return query;
|
|
382
382
|
}
|
|
@@ -415,8 +415,8 @@ const useDeleteProductMutationOptions = (options) => {
|
|
|
415
415
|
/**
|
|
416
416
|
* @summary Deletes an existing Product
|
|
417
417
|
*/
|
|
418
|
-
const useDeleteProduct = (options
|
|
419
|
-
return useMutation(useDeleteProductMutationOptions(options)
|
|
418
|
+
const useDeleteProduct = (options) => {
|
|
419
|
+
return useMutation(useDeleteProductMutationOptions(options));
|
|
420
420
|
};
|
|
421
421
|
/**
|
|
422
422
|
* Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.
|
|
@@ -459,8 +459,8 @@ const usePatchProductMutationOptions = (options) => {
|
|
|
459
459
|
/**
|
|
460
460
|
* @summary Adjust an existing Product
|
|
461
461
|
*/
|
|
462
|
-
const usePatchProduct = (options
|
|
463
|
-
return useMutation(usePatchProductMutationOptions(options)
|
|
462
|
+
const usePatchProduct = (options) => {
|
|
463
|
+
return useMutation(usePatchProductMutationOptions(options));
|
|
464
464
|
};
|
|
465
465
|
|
|
466
466
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteProduct>>,\n { productId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n >"],"sources":["../../../src/api/product/product.ts"],"sourcesContent":["/**\n * Generated by orval v7.16.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n ProductPatchBodyBody,\n ProductUnitGetResponse,\n ProductsGetDefaultStorageCost,\n ProductsGetResponse,\n ProductsGetTypesResponse,\n UnitProductPostBodyBody,\n UnitProductPostResponse,\n} from \"../api.schemas\";\n\nimport { customInstance } from \"../../custom-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\nimport { mutationMutator } from \"../../options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Product Types you can purchase (subscribe to)\n\n * @summary Gets all Product Types\n */\nexport const getProductTypes = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetTypesResponse>(\n { url: `/product-type`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductTypesQueryKey = () => {\n return [`/product-type`] as const;\n};\n\nexport const useGetProductTypesQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;\nexport type GetProductTypesQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n Awaited<ReturnType<typeof getProductTypes>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n Awaited<ReturnType<typeof getProductTypes>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductTypesQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductTypesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductTypesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductTypes>>\n>;\nexport type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductTypesSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * The storage cost is returned along with its measurement units, typically a Coin value based on the the peak storage that was measured on each billable day.\n\n * @summary Gets the default cross-product storage cost\n */\nexport const getProductDefaultStorageCost = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetDefaultStorageCost>(\n { url: `/product-default-storage-cost`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductDefaultStorageCostQueryKey = () => {\n return [`/product-default-storage-cost`] as const;\n};\n\nexport const useGetProductDefaultStorageCostQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductDefaultStorageCostQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the default cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductDefaultStorageCostQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductDefaultStorageCostSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the default cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductDefaultStorageCostSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets Products you have access to, across all **Units** and **Organisations**\n\n * @summary Gets all Products\n */\nexport const getProducts = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetResponse>({ url: `/product`, method: \"GET\", signal }, options);\n};\n\nexport const getGetProductsQueryKey = () => {\n return [`/product`] as const;\n};\n\nexport const useGetProductsQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsQueryError = ErrorType<AsError | void>;\n\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n Awaited<ReturnType<typeof getProducts>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n Awaited<ReturnType<typeof getProducts>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductsQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductsSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets Products you have access to based on an **Organisation**\n\n * @summary Gets Products for an Organisation\n */\nexport const getProductsForOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetResponse>(\n { url: `/product/organisation/${orgId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductsForOrganisationQueryKey = (orgId?: string) => {\n return [`/product/organisation/${orgId}`] as const;\n};\n\nexport const useGetProductsForOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductsForOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductsForOrganisationQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductsForOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductsForOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductsForOrganisationSuspenseQueryOptions(orgId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Products are **Subscriptions** that you create in a **Unit** that allow you to use services provided by a **Merchant**. To create products you need to be a member of the **Unit** or the Unit's **Organisation**.\n\nSupported subscription **types** include `DATA_MANAGER_STORAGE_SUBSCRIPTION`, and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nThe `DATA_MANAGER_STORAGE_SUBSCRIPTION` **type** needs a **name**, an **allowance**, and an optional **limit** (that cannot be less than the **allowance**). If no **limit** is provided the **allowance** is used.\n\nThe `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` **type** needs a **name**, and a **flavour**. The **flavour**, a string, should typically be one of `EVALUATION`, `BRONZE`, `SILVER` or `GOLD`.\n\nUsers who are **Evaluators** can only create products in their Personal Unit, and where products support flavours, are restricted to `EVALUATION` flavours .\n\n * @summary Creates a Product for a Unit\n */\nexport const createUnitProduct = (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitProductPostResponse>(\n {\n url: `/product/unit/${unitId}`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: unitProductPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const useCreateUnitProductMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createUnitProduct\"];\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 createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return createUnitProduct(unitId, data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type CreateUnitProductMutationResult = NonNullable<\n Awaited<ReturnType<typeof createUnitProduct>>\n>;\nexport type CreateUnitProductMutationBody = UnitProductPostBodyBody;\nexport type CreateUnitProductMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Creates a Product for a Unit\n */\nexport const useCreateUnitProduct = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationOptions = useCreateUnitProductMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Gets products you have access to based on an Organisational **Unit**\n\n * @summary Gets Products for an Organisational Unit\n */\nexport const getProductsForUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetResponse>(\n { url: `/product/unit/${unitId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductsForUnitQueryKey = (unitId?: string) => {\n return [`/product/unit/${unitId}`] as const;\n};\n\nexport const useGetProductsForUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductsForUnitQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n Awaited<ReturnType<typeof getProductsForUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n Awaited<ReturnType<typeof getProductsForUnit>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductsForUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductsForUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductsForUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductsForUnitSuspenseQueryOptions(unitId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets details of a specific Product that you have access to.\n\n * @summary Gets a Product\n */\nexport const getProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductUnitGetResponse>(\n { url: `/product/${productId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductQueryKey = (productId?: string) => {\n return [`/product/${productId}`] as const;\n};\n\nexport const useGetProductQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n};\n\nexport type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductQueryError = ErrorType<AsError | void>;\n\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n Awaited<ReturnType<typeof getProduct>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n Awaited<ReturnType<typeof getProduct>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductQueryOptions(productId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetProductSuspenseQueryOptions(productId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * You need access to the Product and, if the Product is *claimable* the claim must be removed before the Product can be removed. An example claimable Product is a `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` where the *claimable* commodity is a Data Manager **Project**. In this case you will need to delete the Data Manager **Project** before you can delete the Account Server **Product**.\n\n * @summary Deletes an existing Product\n */\nexport const deleteProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/product/${productId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationKey = [\"deleteProduct\"];\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 deleteProduct>>,\n { productId: string }\n > = (props) => {\n const { productId } = props ?? {};\n\n return deleteProduct(productId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>;\n\nexport type DeleteProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an existing Product\n */\nexport const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationOptions = useDeleteProductMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.\n\nYou must be a member of the **Unit**, or its **Organisation**, or an administrator to use this method.\n\nAt the moment we only support Products associated with the Data Manager, and these can be patched by changing the `name`, its coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport const patchProduct = (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/product/${productId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: productPatchBodyBody,\n },\n options,\n );\n};\n\nexport const usePatchProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchProduct\"];\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 patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n > = (props) => {\n const { productId, data } = props ?? {};\n\n return patchProduct(productId, data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>;\nexport type PatchProductMutationBody = ProductPatchBodyBody;\nexport type PatchProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Product\n */\nexport const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationOptions = usePatchProductMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,mBACX,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAiB,QAAQ;EAAO;EAAQ,EAC/C,QACD;;AAGH,MAAa,mCAAmC;AAC9C,QAAO,CAAC,gBAAgB;;AAG1B,MAAa,kCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,4BAA4B;CAEvE,MAAMA,WAAuE,EAAE,aAC7E,gBAAgB,gBAAgB,OAAO;AAIzC,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AA8D5E,SAAgB,mBAId,SAIA,aACgF;CAChF,MAAM,eAAe,+BAA+B,QAAQ;CAE5D,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;AAGT,MAAa,0CAGX,YAKI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAA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;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMC,cAGD,UAAU;EACb,MAAM,EAAE,cAAc,SAAS,EAAE;AAEjC,SAAO,cAAc,WAAW,eAAe;;AAKjD,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAY3E,MAAa,oBACX,SASA,gBAMG;AAGH,QAAO,YAFiB,gCAAgC,QAAQ,EAE5B,YAAY;;;;;;;;;;;AAWlD,MAAa,gBACX,WACA,sBACA,YACG;AACH,QAAO,eACL;EACE,KAAK,YAAY;EACjB,QAAQ;EACR,SAAS,EAAE,gBAAgB,oBAAoB;EAC/C,MAAM;EACP,EACD,QACD;;AAGH,MAAa,kCAGX,YAaG;CACH,MAAM,cAAc,CAAC,eAAe;CACpC,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,cAGD,UAAU;EACb,MAAM,EAAE,WAAW,SAAS,SAAS,EAAE;AAEvC,SAAO,aAAa,WAAW,MAAM,eAAe;;AAKtD,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAY3E,MAAa,mBACX,SASA,gBAMG;AAGH,QAAO,YAFiB,+BAA+B,QAAQ,EAE3B,YAAY"}
|
|
1
|
+
{"version":3,"file":"product.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n >","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteProduct>>,\n { productId: string }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n >"],"sources":["../../../src/api/product/product.ts"],"sourcesContent":["/**\n * Generated by orval v7.17.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n ProductPatchBodyBody,\n ProductUnitGetResponse,\n ProductsGetDefaultStorageCost,\n ProductsGetResponse,\n ProductsGetTypesResponse,\n UnitProductPostBodyBody,\n UnitProductPostResponse,\n} from \"../api.schemas\";\n\nimport { customInstance } from \"../../custom-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\nimport { mutationMutator } from \"../../options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Product Types you can purchase (subscribe to)\n\n * @summary Gets all Product Types\n */\nexport const getProductTypes = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetTypesResponse>(\n { url: `/product-type`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductTypesQueryKey = () => {\n return [`/product-type`] as const;\n};\n\nexport const useGetProductTypesQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>;\nexport type GetProductTypesQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypes<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductTypesQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductTypesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) =>\n getProductTypes(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductTypesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductTypes>>\n>;\nexport type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Product Types\n */\n\nexport function useGetProductTypesSuspense<\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductTypesSuspenseQueryOptions(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 * The storage cost is returned along with its measurement units, typically a Coin value based on the the peak storage that was measured on each billable day.\n\n * @summary Gets the default cross-product storage cost\n */\nexport const getProductDefaultStorageCost = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetDefaultStorageCost>(\n { url: `/product-default-storage-cost`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductDefaultStorageCostQueryKey = () => {\n return [`/product-default-storage-cost`] as const;\n};\n\nexport const useGetProductDefaultStorageCostQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductDefaultStorageCostQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets the default cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCost<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductDefaultStorageCostQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductDefaultStorageCostSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({\n signal,\n }) => getProductDefaultStorageCost(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>\n>;\nexport type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets the default cross-product storage cost\n */\n\nexport function useGetProductDefaultStorageCostSuspense<\n TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductDefaultStorageCost>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductDefaultStorageCostSuspenseQueryOptions(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 * Gets Products you have access to, across all **Units** and **Organisations**\n\n * @summary Gets all Products\n */\nexport const getProducts = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetResponse>({ url: `/product`, method: \"GET\", signal }, options);\n};\n\nexport const getGetProductsQueryKey = () => {\n return [`/product`] as const;\n};\n\nexport const useGetProductsQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProducts<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductsQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) =>\n getProducts(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>;\nexport type GetProductsSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets all Products\n */\n\nexport function useGetProductsSuspense<\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductsSuspenseQueryOptions(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 * Gets Products you have access to based on an **Organisation**\n\n * @summary Gets Products for an Organisation\n */\nexport const getProductsForOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetResponse>(\n { url: `/product/organisation/${orgId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductsForOrganisationQueryKey = (orgId?: string) => {\n return [`/product/organisation/${orgId}`] as const;\n};\n\nexport const useGetProductsForOrganisationQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisation<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductsForOrganisationQueryOptions(orgId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductsForOrganisationSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({\n signal,\n }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForOrganisationSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisation\n */\n\nexport function useGetProductsForOrganisationSuspense<\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductsForOrganisationSuspenseQueryOptions(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 * Products are **Subscriptions** that you create in a **Unit** that allow you to use services provided by a **Merchant**. To create products you need to be a member of the **Unit** or the Unit's **Organisation**.\n\nSupported subscription **types** include `DATA_MANAGER_STORAGE_SUBSCRIPTION`, and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nThe `DATA_MANAGER_STORAGE_SUBSCRIPTION` **type** needs a **name**, an **allowance**, and an optional **limit** (that cannot be less than the **allowance**). If no **limit** is provided the **allowance** is used.\n\nThe `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` **type** needs a **name**, and a **flavour**. The **flavour**, a string, should typically be one of `EVALUATION`, `BRONZE`, `SILVER` or `GOLD`.\n\nUsers who are **Evaluators** can only create products in their Personal Unit, and where products support flavours, are restricted to `EVALUATION` flavours .\n\n * @summary Creates a Product for a Unit\n */\nexport const createUnitProduct = (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<UnitProductPostResponse>(\n {\n url: `/product/unit/${unitId}`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: unitProductPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const useCreateUnitProductMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createUnitProduct\"];\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 createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return createUnitProduct(unitId, data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type CreateUnitProductMutationResult = NonNullable<\n Awaited<ReturnType<typeof createUnitProduct>>\n>;\nexport type CreateUnitProductMutationBody = UnitProductPostBodyBody;\nexport type CreateUnitProductMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Creates a Product for a Unit\n */\nexport const useCreateUnitProduct = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n> => {\n const mutationOptions = useCreateUnitProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Gets products you have access to based on an Organisational **Unit**\n\n * @summary Gets Products for an Organisational Unit\n */\nexport const getProductsForUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductsGetResponse>(\n { url: `/product/unit/${unitId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductsForUnitQueryKey = (unitId?: string) => {\n return [`/product/unit/${unitId}`] as const;\n};\n\nexport const useGetProductsForUnitQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForUnitQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnit<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductsForUnitQueryOptions(unitId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductsForUnitSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) =>\n getProductsForUnit(unitId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductsForUnitSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\n\nexport function useGetProductsForUnitSuspense<\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>,\n>(\n unitId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductsForUnitSuspenseQueryOptions(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 * Gets details of a specific Product that you have access to.\n\n * @summary Gets a Product\n */\nexport const getProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<ProductUnitGetResponse>(\n { url: `/product/${productId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetProductQueryKey = (productId?: string) => {\n return [`/product/${productId}`] as const;\n};\n\nexport const useGetProductQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & {\n queryKey: QueryKey;\n };\n};\n\nexport type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProduct<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductQueryOptions(productId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetProductSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) =>\n getProduct(productId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>;\nexport type GetProductSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets a Product\n */\n\nexport function useGetProductSuspense<\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetProductSuspenseQueryOptions(productId, 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 * You need access to the Product and, if the Product is *claimable* the claim must be removed before the Product can be removed. An example claimable Product is a `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` where the *claimable* commodity is a Data Manager **Project**. In this case you will need to delete the Data Manager **Project** before you can delete the Account Server **Product**.\n\n * @summary Deletes an existing Product\n */\nexport const deleteProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/product/${productId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationKey = [\"deleteProduct\"];\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 deleteProduct>>,\n { productId: string }\n > = (props) => {\n const { productId } = props ?? {};\n\n return deleteProduct(productId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>;\n\nexport type DeleteProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an existing Product\n */\nexport const useDeleteProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n> => {\n const mutationOptions = useDeleteProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n/**\n * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.\n\nYou must be a member of the **Unit**, or its **Organisation**, or an administrator to use this method.\n\nAt the moment we only support Products associated with the Data Manager, and these can be patched by changing the `name`, its coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport const patchProduct = (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>(\n {\n url: `/product/${productId}`,\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n data: productPatchBodyBody,\n },\n options,\n );\n};\n\nexport const usePatchProductMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationKey = [\"patchProduct\"];\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 patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n > = (props) => {\n const { productId, data } = props ?? {};\n\n return patchProduct(productId, data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>;\nexport type PatchProductMutationBody = ProductPatchBodyBody;\nexport type PatchProductMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Adjust an existing Product\n */\nexport const usePatchProduct = <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationResult<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n> => {\n const mutationOptions = usePatchProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,mBACX,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAiB,QAAQ;EAAO;EAAQ,EAC/C,QACD;;AAGH,MAAa,mCAAmC;AAC9C,QAAO,CAAC,gBAAgB;;AAG1B,MAAa,kCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,4BAA4B;CAEvE,MAAMA,WAAuE,EAAE,aAC7E,gBAAgB,gBAAgB,OAAO;AAIzC,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAgB5E,SAAgB,mBAGd,SAGyD;CACzD,MAAM,eAAe,+BAA+B,QAAQ;CAE5D,MA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GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMC,cAGD,UAAU;EACb,MAAM,EAAE,cAAc,SAAS,EAAE;AAEjC,SAAO,cAAc,WAAW,eAAe;;AAKjD,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAY3E,MAAa,oBAA4E,YAapF;AAGH,QAAO,YAFiB,gCAAgC,QAAQ,CAE7B;;;;;;;;;;;AAWrC,MAAa,gBACX,WACA,sBACA,YACG;AACH,QAAO,eACL;EACE,KAAK,YAAY;EACjB,QAAQ;EACR,SAAS,EAAE,gBAAgB,oBAAoB;EAC/C,MAAM;EACP,EACD,QACD;;AAGH,MAAa,kCAGX,YAaG;CACH,MAAM,cAAc,CAAC,eAAe;CACpC,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,cAGD,UAAU;EACb,MAAM,EAAE,WAAW,SAAS,SAAS,EAAE;AAEvC,SAAO,aAAa,WAAW,MAAM,eAAe;;AAKtD,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAY3E,MAAa,mBAA2E,YAanF;AAGH,QAAO,YAFiB,+BAA+B,QAAQ,CAE5B"}
|
package/dist/api/state/state.cjs
CHANGED
|
@@ -5,7 +5,7 @@ let __tanstack_react_query = require("@tanstack/react-query");
|
|
|
5
5
|
|
|
6
6
|
//#region src/api/state/state.ts
|
|
7
7
|
/**
|
|
8
|
-
* Generated by orval v7.
|
|
8
|
+
* Generated by orval v7.17.0 🍺
|
|
9
9
|
* Do not edit manually.
|
|
10
10
|
* Account Server API
|
|
11
11
|
* The Informatics Matters Account Server API.
|
|
@@ -40,9 +40,9 @@ const useGetVersionQueryOptions = (options) => {
|
|
|
40
40
|
/**
|
|
41
41
|
* @summary Gets the Account Server version
|
|
42
42
|
*/
|
|
43
|
-
function useGetVersion(options
|
|
43
|
+
function useGetVersion(options) {
|
|
44
44
|
const queryOptions = useGetVersionQueryOptions(options);
|
|
45
|
-
const query = (0, __tanstack_react_query.useQuery)(queryOptions
|
|
45
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions);
|
|
46
46
|
query.queryKey = queryOptions.queryKey;
|
|
47
47
|
return query;
|
|
48
48
|
}
|
|
@@ -59,9 +59,9 @@ const useGetVersionSuspenseQueryOptions = (options) => {
|
|
|
59
59
|
/**
|
|
60
60
|
* @summary Gets the Account Server version
|
|
61
61
|
*/
|
|
62
|
-
function useGetVersionSuspense(options
|
|
62
|
+
function useGetVersionSuspense(options) {
|
|
63
63
|
const queryOptions = useGetVersionSuspenseQueryOptions(options);
|
|
64
|
-
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions
|
|
64
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions);
|
|
65
65
|
query.queryKey = queryOptions.queryKey;
|
|
66
66
|
return query;
|
|
67
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.cjs","names":["customInstance","queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>>","queryMutator"],"sources":["../../../src/api/state/state.ts"],"sourcesContent":["/**\n * Generated by orval v7.
|
|
1
|
+
{"version":3,"file":"state.cjs","names":["customInstance","queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>>","queryMutator"],"sources":["../../../src/api/state/state.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 { useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type { AsError, StateGetVersionResponse } from \"../api.schemas\";\n\nimport { customInstance } from \"../../custom-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * @summary Gets the Account Server version\n */\nexport const getVersion = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<StateGetVersionResponse>(\n { url: `/version`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetVersionQueryKey = () => {\n return [`/version`] as const;\n};\n\nexport const useGetVersionQueryOptions = <\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({ signal }) =>\n getVersion(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & {\n queryKey: QueryKey;\n };\n};\n\nexport type GetVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;\nexport type GetVersionQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets the Account Server version\n */\n\nexport function useGetVersion<\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetVersionQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetVersionSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersion>>> = ({ signal }) =>\n getVersion(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getVersion>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;\nexport type GetVersionSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Gets the Account Server version\n */\n\nexport function useGetVersionSuspense<\n TData = Awaited<ReturnType<typeof getVersion>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = useGetVersionSuspenseQueryOptions(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"],"mappings":";;;;;;;;;;;;;;;;;;;AA+BA,MAAa,cACX,SACA,WACG;AACH,QAAOA,uCACL;EAAE,KAAK;EAAY,QAAQ;EAAO;EAAQ,EAC1C,QACD;;AAGH,MAAa,8BAA8B;AACzC,QAAO,CAAC,WAAW;;AAGrB,MAAa,6BAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,uBAAuB;CAElE,MAAMC,WAAkE,EAAE,aACxE,WAAW,gBAAgB,OAAO;AAIpC,QAFsBC,qCAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAc5E,SAAgB,cAGd,SAGyD;CACzD,MAAM,eAAe,0BAA0B,QAAQ;CAEvD,MAAM,6CAAiB,aAAa;AAEpC,OAAM,WAAW,aAAa;AAE9B,QAAO;;AAGT,MAAa,qCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,uBAAuB;CAElE,MAAMD,WAAkE,EAAE,aACxE,WAAW,gBAAgB,OAAO;AAIpC,QAFsBC,qCAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAgB5E,SAAgB,sBAGd,SAGiE;CACjE,MAAM,eAAe,kCAAkC,QAAQ;CAE/D,MAAM,qDAAyB,aAAa;AAI5C,OAAM,WAAW,aAAa;AAE9B,QAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsError, StateGetVersionResponse } from "../api.schemas.cjs";
|
|
2
2
|
import { ErrorType, customInstance } from "../../custom-instance.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { QueryKey, UseQueryOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
4
4
|
|
|
5
5
|
//#region src/api/state/state.d.ts
|
|
6
6
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
@@ -10,56 +10,38 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
|
10
10
|
declare const getVersion: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<StateGetVersionResponse>;
|
|
11
11
|
declare const getGetVersionQueryKey: () => readonly ["/version"];
|
|
12
12
|
declare const useGetVersionQueryOptions: <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
13
|
-
query?:
|
|
13
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;
|
|
14
14
|
request?: SecondParameter<typeof customInstance>;
|
|
15
15
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & {
|
|
16
|
-
queryKey:
|
|
16
|
+
queryKey: QueryKey;
|
|
17
17
|
};
|
|
18
18
|
type GetVersionQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;
|
|
19
19
|
type GetVersionQueryError = ErrorType<AsError | void>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
24
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
25
|
-
};
|
|
26
|
-
declare function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
27
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getVersion>>, TError, Awaited<ReturnType<typeof getVersion>>>, "initialData">;
|
|
28
|
-
request?: SecondParameter<typeof customInstance>;
|
|
29
|
-
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
30
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
31
|
-
};
|
|
20
|
+
/**
|
|
21
|
+
* @summary Gets the Account Server version
|
|
22
|
+
*/
|
|
32
23
|
declare function useGetVersion<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
33
|
-
query?:
|
|
24
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;
|
|
34
25
|
request?: SecondParameter<typeof customInstance>;
|
|
35
|
-
}
|
|
36
|
-
queryKey:
|
|
26
|
+
}): UseQueryResult<TData, TError> & {
|
|
27
|
+
queryKey: QueryKey;
|
|
37
28
|
};
|
|
38
29
|
declare const useGetVersionSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
39
|
-
query?:
|
|
30
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;
|
|
40
31
|
request?: SecondParameter<typeof customInstance>;
|
|
41
32
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData> & {
|
|
42
|
-
queryKey:
|
|
33
|
+
queryKey: QueryKey;
|
|
43
34
|
};
|
|
44
35
|
type GetVersionSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getVersion>>>;
|
|
45
36
|
type GetVersionSuspenseQueryError = ErrorType<AsError | void>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
50
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
51
|
-
};
|
|
52
|
-
declare function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
53
|
-
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>>;
|
|
54
|
-
request?: SecondParameter<typeof customInstance>;
|
|
55
|
-
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
56
|
-
queryKey: DataTag<QueryKey, TData, TError>;
|
|
57
|
-
};
|
|
37
|
+
/**
|
|
38
|
+
* @summary Gets the Account Server version
|
|
39
|
+
*/
|
|
58
40
|
declare function useGetVersionSuspense<TData = Awaited<ReturnType<typeof getVersion>>, TError = ErrorType<AsError | void>>(options?: {
|
|
59
|
-
query?:
|
|
41
|
+
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getVersion>>, TError, TData>;
|
|
60
42
|
request?: SecondParameter<typeof customInstance>;
|
|
61
|
-
}
|
|
62
|
-
queryKey:
|
|
43
|
+
}): UseSuspenseQueryResult<TData, TError> & {
|
|
44
|
+
queryKey: QueryKey;
|
|
63
45
|
};
|
|
64
46
|
//#endregion
|
|
65
47
|
export { GetVersionQueryError, GetVersionQueryResult, GetVersionSuspenseQueryError, GetVersionSuspenseQueryResult, getGetVersionQueryKey, getVersion, useGetVersion, useGetVersionQueryOptions, useGetVersionSuspense, useGetVersionSuspenseQueryOptions };
|