diff --git a/package.json b/package.json
index 00e79676bb..4a47a2f176 100644
--- a/package.json
+++ b/package.json
@@ -113,7 +113,7 @@
"mutationobserver-shim": "^0.3.7",
"node-sass": "^7.0.1",
"nyc": "^15.1.0",
- "orval": "^6.8.1",
+ "orval": "^6.18.1",
"postcss": "^8.4.31",
"postcss-cli": "^10.1.0",
"postcss-loader": "^7.3.3",
@@ -154,7 +154,7 @@
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"lodash": "^4.17.21",
- "orval": "^6.8.1",
+ "orval": "^6.18.1",
"prop-types": "^15.8.1",
"react": "^18.1.0",
"react-device-detect": "^2.2.2",
diff --git a/src/core/cover-service-api/cover-service.ts b/src/core/cover-service-api/cover-service.ts
index 00b437081c..0d6a079536 100644
--- a/src/core/cover-service-api/cover-service.ts
+++ b/src/core/cover-service-api/cover-service.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
@@ -8,50 +8,44 @@ The service is provided by [Det Digitale Folkebibliotek](https://detdigitalefolk
Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow the instructions here: [Open Platform](https://openplatform.dbc.dk/v3/). To use the "Authorize" option in this tool use your 'client_id' and 'client_secret' and fill in '@agency' (e.g. '@123456') for both username and password.
* OpenAPI spec version: 2.0
*/
-import {
- useQuery,
+import { useQuery } from "react-query";
+import type {
UseQueryOptions,
QueryFunction,
UseQueryResult,
QueryKey
} from "react-query";
import type { Cover, GetCoverCollectionParams } from "./model";
-import { fetcher, ErrorType, BodyType } from "./mutator/fetcher";
-
-type AwaitedInput = PromiseLike | T;
-
-type Awaited = O extends AwaitedInput ? T : never;
+import { fetcher } from "./mutator/fetcher";
+import type { ErrorType } from "./mutator/fetcher";
/**
* Get covers by identifier in specific image format(s), specific image size(s) and with or without generic covers.
* @summary Search multiple covers
*/
export const getCoverCollection = (
- params?: GetCoverCollectionParams,
+ params: GetCoverCollectionParams,
signal?: AbortSignal
) => {
return fetcher({
url: `/api/v2/covers`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
export const getGetCoverCollectionQueryKey = (
- params?: GetCoverCollectionParams
-) => [`/api/v2/covers`, ...(params ? [params] : [])];
-
-export type GetCoverCollectionQueryResult = NonNullable<
- Awaited>
->;
-export type GetCoverCollectionQueryError = ErrorType;
+ params: GetCoverCollectionParams
+) => {
+ return [`/api/v2/covers`, ...(params ? [params] : [])] as const;
+};
-export const useGetCoverCollection = <
+export const getGetCoverCollectionQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
- params?: GetCoverCollectionParams,
+ params: GetCoverCollectionParams,
options?: {
query?: UseQueryOptions<
Awaited>,
@@ -59,7 +53,7 @@ export const useGetCoverCollection = <
TData
>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey =
@@ -69,14 +63,41 @@ export const useGetCoverCollection = <
Awaited>
> = ({ signal }) => getCoverCollection(params, signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
+
+export type GetCoverCollectionQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetCoverCollectionQueryError = ErrorType;
- return {
- queryKey,
- ...query
+/**
+ * @summary Search multiple covers
+ */
+export const useGetCoverCollection = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ params: GetCoverCollectionParams,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetCoverCollectionQueryOptions(params, options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
diff --git a/src/core/cover-service-api/model/cover.ts b/src/core/cover-service-api/model/cover.ts
index 45e031d806..dc182dd748 100644
--- a/src/core/cover-service-api/model/cover.ts
+++ b/src/core/cover-service-api/model/cover.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
diff --git a/src/core/cover-service-api/model/coverImageUrls.ts b/src/core/cover-service-api/model/coverImageUrls.ts
index 756069ec8e..6cb02e1935 100644
--- a/src/core/cover-service-api/model/coverImageUrls.ts
+++ b/src/core/cover-service-api/model/coverImageUrls.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
@@ -13,7 +13,11 @@ import type { ImageUrl } from "./imageUrl";
export type CoverImageUrls = {
default?: ImageUrl;
original?: ImageUrl;
+ "xx-small"?: ImageUrl;
+ "x-small"?: ImageUrl;
small?: ImageUrl;
+ "small-medium"?: ImageUrl;
medium?: ImageUrl;
+ "medium-large"?: ImageUrl;
large?: ImageUrl;
};
diff --git a/src/core/cover-service-api/model/coverType.ts b/src/core/cover-service-api/model/coverType.ts
index f2c4089a35..60d91edc25 100644
--- a/src/core/cover-service-api/model/coverType.ts
+++ b/src/core/cover-service-api/model/coverType.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
diff --git a/src/core/cover-service-api/model/getCoverCollectionParams.ts b/src/core/cover-service-api/model/getCoverCollectionParams.ts
index 0ff8d5cd79..5673512e27 100644
--- a/src/core/cover-service-api/model/getCoverCollectionParams.ts
+++ b/src/core/cover-service-api/model/getCoverCollectionParams.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
@@ -12,7 +12,30 @@ import type { GetCoverCollectionType } from "./getCoverCollectionType";
import type { GetCoverCollectionSizesItem } from "./getCoverCollectionSizesItem";
export type GetCoverCollectionParams = {
+ /**
+ * The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn'
+ */
type: GetCoverCollectionType;
+ /**
+ * A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200
+ */
identifiers: string[];
+ /**
+ * A list of image sizes for the cover(s) you want to receive. Please note:
+ - If the cover is not available for the requested size 'null' will be returned for that size.
+ - If the 'sizes' parameter is omitted the 'default' size will be returned,
+ - If you request the 'original' size a cover will always be returned.
+
+ The different sizes in pixels (height).
+ - default: 1000px
+ - original: [variable]
+ - xx-small: 104px
+ - x-small: 136px
+ - small: 160px
+ - small-medium: 230px
+ - medium: 270px
+ - medium-large: 430px
+ - large: 540px
+ */
sizes?: GetCoverCollectionSizesItem[];
};
diff --git a/src/core/cover-service-api/model/getCoverCollectionSizesItem.ts b/src/core/cover-service-api/model/getCoverCollectionSizesItem.ts
index 20d20fc247..dce50206e4 100644
--- a/src/core/cover-service-api/model/getCoverCollectionSizesItem.ts
+++ b/src/core/cover-service-api/model/getCoverCollectionSizesItem.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
@@ -16,7 +16,11 @@ export type GetCoverCollectionSizesItem =
export const GetCoverCollectionSizesItem = {
default: "default",
original: "original",
+ "xx-small": "xx-small",
+ "x-small": "x-small",
small: "small",
+ "small-medium": "small-medium",
medium: "medium",
+ "medium-large": "medium-large",
large: "large"
} as const;
diff --git a/src/core/cover-service-api/model/getCoverCollectionType.ts b/src/core/cover-service-api/model/getCoverCollectionType.ts
index e2aa21baff..34c2fe2c11 100644
--- a/src/core/cover-service-api/model/getCoverCollectionType.ts
+++ b/src/core/cover-service-api/model/getCoverCollectionType.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
diff --git a/src/core/cover-service-api/model/imageUrl.ts b/src/core/cover-service-api/model/imageUrl.ts
index 8d1039c93c..1a4b7dc3d1 100644
--- a/src/core/cover-service-api/model/imageUrl.ts
+++ b/src/core/cover-service-api/model/imageUrl.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
diff --git a/src/core/cover-service-api/model/imageUrlSize.ts b/src/core/cover-service-api/model/imageUrlSize.ts
index 7effdd0de4..79033455be 100644
--- a/src/core/cover-service-api/model/imageUrlSize.ts
+++ b/src/core/cover-service-api/model/imageUrlSize.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DDF Cover Service
* This service provides covers for library materials indexed by isbn, issn, faust, pid.
@@ -15,7 +15,11 @@ export type ImageUrlSize = typeof ImageUrlSize[keyof typeof ImageUrlSize];
export const ImageUrlSize = {
default: "default",
original: "original",
+ "xx-small": "xx-small",
+ "x-small": "x-small",
small: "small",
+ "small-medium": "small-medium",
medium: "medium",
+ "medium-large": "medium-large",
large: "large"
} as const;
diff --git a/src/core/cover-service-api/model/index.ts b/src/core/cover-service-api/model/index.ts
index f4cdce67e4..400f04a114 100644
--- a/src/core/cover-service-api/model/index.ts
+++ b/src/core/cover-service-api/model/index.ts
@@ -1,8 +1,19 @@
+/**
+ * Generated by orval v6.18.1 🍺
+ * Do not edit manually.
+ * DDF Cover Service
+ * This service provides covers for library materials indexed by isbn, issn, faust, pid.
+The service is provided by [Det Digitale Folkebibliotek](https://detdigitalefolkebibliotek.dk/section/i-brug-paa-biblioteket/cover-service)
+### Authentication notes
+Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow the instructions here: [Open Platform](https://openplatform.dbc.dk/v3/). To use the "Authorize" option in this tool use your 'client_id' and 'client_secret' and fill in '@agency' (e.g. '@123456') for both username and password.
+ * OpenAPI spec version: 2.0
+ */
+
export * from "./cover";
+export * from "./coverImageUrls";
export * from "./coverType";
-export * from "./imageUrlSize";
export * from "./getCoverCollectionParams";
export * from "./getCoverCollectionSizesItem";
-export * from "./imageUrl";
-export * from "./coverImageUrls";
export * from "./getCoverCollectionType";
+export * from "./imageUrl";
+export * from "./imageUrlSize";
diff --git a/src/core/dpl-cms/dpl-cms.ts b/src/core/dpl-cms/dpl-cms.ts
index d5bef31934..8261b2c0eb 100644
--- a/src/core/dpl-cms/dpl-cms.ts
+++ b/src/core/dpl-cms/dpl-cms.ts
@@ -1,13 +1,12 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
* OpenAPI spec version: Versioning not supported
*/
-import {
- useQuery,
- useMutation,
+import { useQuery, useMutation } from "react-query";
+import type {
UseQueryOptions,
UseMutationOptions,
QueryFunction,
@@ -22,18 +21,15 @@ import type {
ProxyUrlGET200,
ProxyUrlGETParams
} from "./model";
-import { fetcher, ErrorType, BodyType } from "./mutator/fetcher";
-
-type AwaitedInput = PromiseLike | T;
-
-type Awaited = O extends AwaitedInput ? T : never;
+import { fetcher } from "./mutator/fetcher";
+import type { ErrorType, BodyType } from "./mutator/fetcher";
/**
* @summary Get campaign matching search result facets
*/
export const campaignMatchPOST = (
campaignMatchPOSTBodyItem: CampaignMatchPOSTBodyItem[],
- params?: CampaignMatchPOSTParams
+ params: CampaignMatchPOSTParams
) => {
return fetcher({
url: `/dpl_campaign/match`,
@@ -44,15 +40,7 @@ export const campaignMatchPOST = (
});
};
-export type CampaignMatchPOSTMutationResult = NonNullable<
- Awaited>
->;
-export type CampaignMatchPOSTMutationBody = BodyType<
- CampaignMatchPOSTBodyItem[]
->;
-export type CampaignMatchPOSTMutationError = ErrorType;
-
-export const useCampaignMatchPOST = <
+export const getCampaignMatchPOSTMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -61,18 +49,26 @@ export const useCampaignMatchPOST = <
TError,
{
data: BodyType;
- params?: CampaignMatchPOSTParams;
+ params: CampaignMatchPOSTParams;
},
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ {
+ data: BodyType;
+ params: CampaignMatchPOSTParams;
+ },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
Awaited>,
{
data: BodyType;
- params?: CampaignMatchPOSTParams;
+ params: CampaignMatchPOSTParams;
}
> = (props) => {
const { data, params } = props ?? {};
@@ -80,67 +76,108 @@ export const useCampaignMatchPOST = <
return campaignMatchPOST(data, params);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type CampaignMatchPOSTMutationResult = NonNullable<
+ Awaited>
+>;
+export type CampaignMatchPOSTMutationBody = BodyType<
+ CampaignMatchPOSTBodyItem[]
+>;
+export type CampaignMatchPOSTMutationError = ErrorType;
+
+/**
+ * @summary Get campaign matching search result facets
+ */
+export const useCampaignMatchPOST = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{
data: BodyType;
- params?: CampaignMatchPOSTParams;
+ params: CampaignMatchPOSTParams;
},
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getCampaignMatchPOSTMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
* @summary Generate proxy url
*/
export const proxyUrlGET = (
- params?: ProxyUrlGETParams,
+ params: ProxyUrlGETParams,
signal?: AbortSignal
) => {
return fetcher({
url: `/dpl-url-proxy`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
-export const getProxyUrlGETQueryKey = (params?: ProxyUrlGETParams) => [
- `/dpl-url-proxy`,
- ...(params ? [params] : [])
-];
-
-export type ProxyUrlGETQueryResult = NonNullable<
- Awaited>
->;
-export type ProxyUrlGETQueryError = ErrorType;
+export const getProxyUrlGETQueryKey = (params: ProxyUrlGETParams) => {
+ return [`/dpl-url-proxy`, ...(params ? [params] : [])] as const;
+};
-export const useProxyUrlGET = <
+export const getProxyUrlGETQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
- params?: ProxyUrlGETParams,
+ params: ProxyUrlGETParams,
queryOptions?: UseQueryOptions<
Awaited>,
TError,
TData
>
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const queryKey = queryOptions?.queryKey ?? getProxyUrlGETQueryKey(params);
const queryFn: QueryFunction>> = ({
signal
- }) => proxyUrlGET(params);
+ }) => proxyUrlGET(params, signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
+
+export type ProxyUrlGETQueryResult = NonNullable<
+ Awaited>
+>;
+export type ProxyUrlGETQueryError = ErrorType;
- return {
- queryKey,
- ...query
+/**
+ * @summary Generate proxy url
+ */
+export const useProxyUrlGET = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ params: ProxyUrlGETParams,
+ queryOptions?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+): UseQueryResult & { queryKey: QueryKey } => {
+ const options = getProxyUrlGETQueryOptions(params, queryOptions);
+
+ const query = useQuery(options) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = options.queryKey;
+
+ return query;
};
diff --git a/src/core/dpl-cms/model/campaignMatchPOST200.ts b/src/core/dpl-cms/model/campaignMatchPOST200.ts
index e187ce43ca..b7d9cb342a 100644
--- a/src/core/dpl-cms/model/campaignMatchPOST200.ts
+++ b/src/core/dpl-cms/model/campaignMatchPOST200.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
diff --git a/src/core/dpl-cms/model/campaignMatchPOST200Data.ts b/src/core/dpl-cms/model/campaignMatchPOST200Data.ts
index fc5240295b..e145b74965 100644
--- a/src/core/dpl-cms/model/campaignMatchPOST200Data.ts
+++ b/src/core/dpl-cms/model/campaignMatchPOST200Data.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
diff --git a/src/core/dpl-cms/model/campaignMatchPOST200DataImage.ts b/src/core/dpl-cms/model/campaignMatchPOST200DataImage.ts
index 3ddff54460..853ac154e0 100644
--- a/src/core/dpl-cms/model/campaignMatchPOST200DataImage.ts
+++ b/src/core/dpl-cms/model/campaignMatchPOST200DataImage.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
diff --git a/src/core/dpl-cms/model/campaignMatchPOSTBodyItem.ts b/src/core/dpl-cms/model/campaignMatchPOSTBodyItem.ts
index 5473159eac..5b43d85a73 100644
--- a/src/core/dpl-cms/model/campaignMatchPOSTBodyItem.ts
+++ b/src/core/dpl-cms/model/campaignMatchPOSTBodyItem.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
diff --git a/src/core/dpl-cms/model/campaignMatchPOSTBodyItemValuesItem.ts b/src/core/dpl-cms/model/campaignMatchPOSTBodyItemValuesItem.ts
index 08da5096bd..60e6673f59 100644
--- a/src/core/dpl-cms/model/campaignMatchPOSTBodyItemValuesItem.ts
+++ b/src/core/dpl-cms/model/campaignMatchPOSTBodyItemValuesItem.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
diff --git a/src/core/dpl-cms/model/campaignMatchPOSTFormat.ts b/src/core/dpl-cms/model/campaignMatchPOSTFormat.ts
index c96e610c69..d5219aab77 100644
--- a/src/core/dpl-cms/model/campaignMatchPOSTFormat.ts
+++ b/src/core/dpl-cms/model/campaignMatchPOSTFormat.ts
@@ -1,15 +1,15 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
* OpenAPI spec version: Versioning not supported
*/
-export type CampaignMatchPOSTFormat =
- typeof CampaignMatchPOSTFormat[keyof typeof CampaignMatchPOSTFormat];
+export type CampaignMatchPOST_Format =
+ typeof CampaignMatchPOST_Format[keyof typeof CampaignMatchPOST_Format];
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export const CampaignMatchPOSTFormat = {
+export const CampaignMatchPOST_Format = {
json: "json"
} as const;
diff --git a/src/core/dpl-cms/model/campaignMatchPOSTParams.ts b/src/core/dpl-cms/model/campaignMatchPOSTParams.ts
index 3891386a5c..6ee91deeaf 100644
--- a/src/core/dpl-cms/model/campaignMatchPOSTParams.ts
+++ b/src/core/dpl-cms/model/campaignMatchPOSTParams.ts
@@ -1,10 +1,15 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
* OpenAPI spec version: Versioning not supported
*/
-import type { CampaignMatchPOSTFormat } from "./campaignMatchPOSTFormat";
+import type { CampaignMatchPOST_Format } from "./campaignMatchPOSTFormat";
-export type CampaignMatchPOSTParams = { _format?: CampaignMatchPOSTFormat };
+export type CampaignMatchPOSTParams = {
+ /**
+ * Request format
+ */
+ _format?: CampaignMatchPOST_Format;
+};
diff --git a/src/core/dpl-cms/model/index.ts b/src/core/dpl-cms/model/index.ts
index a2f3db36fc..87f35f2dfb 100644
--- a/src/core/dpl-cms/model/index.ts
+++ b/src/core/dpl-cms/model/index.ts
@@ -1,14 +1,22 @@
-export * from "./proxyUrlGETParams";
-export * from "./proxyUrlGET200";
-export * from "./proxyUrlGET200Data";
-export * from "./proxyUrlGETFormat";
+/**
+ * Generated by orval v6.18.1 🍺
+ * Do not edit manually.
+ * DPL CMS - REST API
+ * The REST API provide by the core REST module.
+ * OpenAPI spec version: Versioning not supported
+ */
+
export * from "./campaignMatchPOST200";
-export * from "./campaignMatchPOSTFormat";
export * from "./campaignMatchPOST200Data";
-export * from "./campaignMatchPOSTParams";
-export * from "./campaignMatchPOSTBodyItem";
export * from "./campaignMatchPOST200DataImage";
+export * from "./campaignMatchPOSTBodyItem";
export * from "./campaignMatchPOSTBodyItemValuesItem";
+export * from "./campaignMatchPOSTFormat";
+export * from "./campaignMatchPOSTParams";
+export * from "./dplDasDigitalArticleOrderPOSTBody";
export * from "./dplDasDigitalArticleOrderPOSTFormat";
export * from "./dplDasDigitalArticleOrderPOSTParams";
-export * from "./dplDasDigitalArticleOrderPOSTBody";
+export * from "./proxyUrlGET200";
+export * from "./proxyUrlGET200Data";
+export * from "./proxyUrlGETFormat";
+export * from "./proxyUrlGETParams";
diff --git a/src/core/dpl-cms/model/proxyUrlGET200.ts b/src/core/dpl-cms/model/proxyUrlGET200.ts
index 42171cba3a..c0c6e22b5e 100644
--- a/src/core/dpl-cms/model/proxyUrlGET200.ts
+++ b/src/core/dpl-cms/model/proxyUrlGET200.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
diff --git a/src/core/dpl-cms/model/proxyUrlGET200Data.ts b/src/core/dpl-cms/model/proxyUrlGET200Data.ts
index 9c64b1847d..43879f9fe1 100644
--- a/src/core/dpl-cms/model/proxyUrlGET200Data.ts
+++ b/src/core/dpl-cms/model/proxyUrlGET200Data.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
diff --git a/src/core/dpl-cms/model/proxyUrlGETFormat.ts b/src/core/dpl-cms/model/proxyUrlGETFormat.ts
index b0089790a4..28a3fadc8d 100644
--- a/src/core/dpl-cms/model/proxyUrlGETFormat.ts
+++ b/src/core/dpl-cms/model/proxyUrlGETFormat.ts
@@ -1,15 +1,15 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
* OpenAPI spec version: Versioning not supported
*/
-export type ProxyUrlGETFormat =
- typeof ProxyUrlGETFormat[keyof typeof ProxyUrlGETFormat];
+export type ProxyUrlGET_Format =
+ typeof ProxyUrlGET_Format[keyof typeof ProxyUrlGET_Format];
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export const ProxyUrlGETFormat = {
+export const ProxyUrlGET_Format = {
json: "json"
} as const;
diff --git a/src/core/dpl-cms/model/proxyUrlGETParams.ts b/src/core/dpl-cms/model/proxyUrlGETParams.ts
index 19685eb39e..87767bd7ab 100644
--- a/src/core/dpl-cms/model/proxyUrlGETParams.ts
+++ b/src/core/dpl-cms/model/proxyUrlGETParams.ts
@@ -1,10 +1,19 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* DPL CMS - REST API
* The REST API provide by the core REST module.
* OpenAPI spec version: Versioning not supported
*/
-import type { ProxyUrlGETFormat } from "./proxyUrlGETFormat";
+import type { ProxyUrlGET_Format } from "./proxyUrlGETFormat";
-export type ProxyUrlGETParams = { _format?: ProxyUrlGETFormat; url: string };
+export type ProxyUrlGETParams = {
+ /**
+ * Request format
+ */
+ _format?: ProxyUrlGET_Format;
+ /**
+ * A url to an online resource which may be accessible through a proxy which requires rewriting of the url
+ */
+ url: string;
+};
diff --git a/src/core/fbs/fbs.ts b/src/core/fbs/fbs.ts
index 0a7bcc97dd..24cbc9f8cf 100644
--- a/src/core/fbs/fbs.ts
+++ b/src/core/fbs/fbs.ts
@@ -1,12 +1,11 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
*/
-import {
- useQuery,
- useMutation,
+import { useQuery, useMutation } from "react-query";
+import type {
UseQueryOptions,
UseMutationOptions,
QueryFunction,
@@ -39,11 +38,8 @@ import type {
AuthenticatedPatronV6,
UpdatePatronRequestV4
} from "./model";
-import { fetcher, ErrorType, BodyType } from "./mutator/fetcher";
-
-type AwaitedInput = PromiseLike | T;
-
-type Awaited = O extends AwaitedInput ? T : never;
+import { fetcher } from "./mutator/fetcher";
+import type { ErrorType, BodyType } from "./mutator/fetcher";
/**
*
@@ -59,22 +55,19 @@ export const getBranches = (
return fetcher({
url: `/external/v1/agencyid/branches`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
-export const getGetBranchesQueryKey = (params?: GetBranchesParams) => [
- `/external/v1/agencyid/branches`,
- ...(params ? [params] : [])
-];
-
-export type GetBranchesQueryResult = NonNullable<
- Awaited>
->;
-export type GetBranchesQueryError = ErrorType;
+export const getGetBranchesQueryKey = (params?: GetBranchesParams) => {
+ return [
+ `/external/v1/agencyid/branches`,
+ ...(params ? [params] : [])
+ ] as const;
+};
-export const useGetBranches = <
+export const getGetBranchesQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
@@ -86,7 +79,7 @@ export const useGetBranches = <
TData
>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetBranchesQueryKey(params);
@@ -95,22 +88,49 @@ export const useGetBranches = <
signal
}) => getBranches(params, signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
+
+export type GetBranchesQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetBranchesQueryError = ErrorType;
+
+/**
+ * @summary Get branches for an agency.
+ */
+export const useGetBranches = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ params?: GetBranchesParams,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetBranchesQueryOptions(params, options);
- return {
- queryKey,
- ...query
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
* @summary Delete existing reservations.
*/
-export const deleteReservations = (params?: DeleteReservationsParams) => {
+export const deleteReservations = (params: DeleteReservationsParams) => {
return fetcher({
url: `/external/v1/agencyid/patrons/patronid/reservations`,
method: "delete",
@@ -118,40 +138,59 @@ export const deleteReservations = (params?: DeleteReservationsParams) => {
});
};
-export type DeleteReservationsMutationResult = NonNullable<
- Awaited>
->;
-
-export type DeleteReservationsMutationError = ErrorType;
-
-export const useDeleteReservations = <
+export const getDeleteReservationsMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
mutation?: UseMutationOptions<
Awaited>,
TError,
- { params?: DeleteReservationsParams },
+ { params: DeleteReservationsParams },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { params: DeleteReservationsParams },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
Awaited>,
- { params?: DeleteReservationsParams }
+ { params: DeleteReservationsParams }
> = (props) => {
const { params } = props ?? {};
return deleteReservations(params);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type DeleteReservationsMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type DeleteReservationsMutationError = ErrorType;
+
+/**
+ * @summary Delete existing reservations.
+ */
+export const useDeleteReservations = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
- { params?: DeleteReservationsParams },
+ { params: DeleteReservationsParams },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getDeleteReservationsMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -188,16 +227,11 @@ export const getReservations = (signal?: AbortSignal) => {
});
};
-export const getGetReservationsQueryKey = () => [
- `/external/v1/agencyid/patrons/patronid/reservations`
-];
-
-export type GetReservationsQueryResult = NonNullable<
- Awaited>
->;
-export type GetReservationsQueryError = ErrorType;
+export const getGetReservationsQueryKey = () => {
+ return [`/external/v1/agencyid/patrons/patronid/reservations`] as const;
+};
-export const useGetReservations = <
+export const getGetReservationsQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(options?: {
@@ -206,7 +240,7 @@ export const useGetReservations = <
TError,
TData
>;
-}): UseQueryResult & { queryKey: QueryKey } => {
+}) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetReservationsQueryKey();
@@ -215,16 +249,40 @@ export const useGetReservations = <
signal
}) => getReservations(signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: QueryKey };
+};
+
+export type GetReservationsQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetReservationsQueryError = ErrorType;
+
+/**
+ * @summary Get all unfulfilled reservations made by the patron (DEPRECATED).
+ */
+export const useGetReservations = <
+ TData = Awaited>,
+ TError = ErrorType
+>(options?: {
+ query?: UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ >;
+}): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetReservationsQueryOptions(options);
- return {
- queryKey,
- ...query
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -265,14 +323,7 @@ export const addReservationsDeprecated = (
});
};
-export type AddReservationsDeprecatedMutationResult = NonNullable<
- Awaited>
->;
-export type AddReservationsDeprecatedMutationBody =
- BodyType;
-export type AddReservationsDeprecatedMutationError = ErrorType;
-
-export const useAddReservationsDeprecated = <
+export const getAddReservationsDeprecatedMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -282,7 +333,12 @@ export const useAddReservationsDeprecated = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -294,12 +350,33 @@ export const useAddReservationsDeprecated = <
return addReservationsDeprecated(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type AddReservationsDeprecatedMutationResult = NonNullable<
+ Awaited>
+>;
+export type AddReservationsDeprecatedMutationBody =
+ BodyType;
+export type AddReservationsDeprecatedMutationError = ErrorType;
+
+/**
+ * @summary Create new reservations for the patron (DEPRECATED).
+ */
+export const useAddReservationsDeprecated = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getAddReservationsDeprecatedMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -335,13 +412,7 @@ export const updateReservations = (
});
};
-export type UpdateReservationsMutationResult = NonNullable<
- Awaited>
->;
-export type UpdateReservationsMutationBody = BodyType;
-export type UpdateReservationsMutationError = ErrorType;
-
-export const useUpdateReservations = <
+export const getUpdateReservationsMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -351,7 +422,12 @@ export const useUpdateReservations = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -363,12 +439,32 @@ export const useUpdateReservations = <
return updateReservations(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type UpdateReservationsMutationResult = NonNullable<
+ Awaited>
+>;
+export type UpdateReservationsMutationBody = BodyType;
+export type UpdateReservationsMutationError = ErrorType;
+
+/**
+ * @summary Update existing reservations.
+ */
+export const useUpdateReservations = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getUpdateReservationsMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -407,16 +503,11 @@ export const getReservationsV2 = (signal?: AbortSignal) => {
});
};
-export const getGetReservationsV2QueryKey = () => [
- `/external/v1/agencyid/patrons/patronid/reservations/v2`
-];
-
-export type GetReservationsV2QueryResult = NonNullable<
- Awaited>
->;
-export type GetReservationsV2QueryError = ErrorType;
+export const getGetReservationsV2QueryKey = () => {
+ return [`/external/v1/agencyid/patrons/patronid/reservations/v2`] as const;
+};
-export const useGetReservationsV2 = <
+export const getGetReservationsV2QueryOptions = <
TData = Awaited>,
TError = ErrorType
>(options?: {
@@ -425,7 +516,7 @@ export const useGetReservationsV2 = <
TError,
TData
>;
-}): UseQueryResult & { queryKey: QueryKey } => {
+}) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetReservationsV2QueryKey();
@@ -434,16 +525,40 @@ export const useGetReservationsV2 = <
Awaited>
> = ({ signal }) => getReservationsV2(signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: QueryKey };
+};
+
+export type GetReservationsV2QueryResult = NonNullable<
+ Awaited>
+>;
+export type GetReservationsV2QueryError = ErrorType;
+
+/**
+ * @summary Get all unfulfilled reservations made by the patron.
+ */
+export const useGetReservationsV2 = <
+ TData = Awaited>,
+ TError = ErrorType
+>(options?: {
+ query?: UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ >;
+}): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetReservationsV2QueryOptions(options);
- return {
- queryKey,
- ...query
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -515,13 +630,7 @@ export const addReservationsV2 = (
});
};
-export type AddReservationsV2MutationResult = NonNullable<
- Awaited>
->;
-export type AddReservationsV2MutationBody = BodyType;
-export type AddReservationsV2MutationError = ErrorType;
-
-export const useAddReservationsV2 = <
+export const getAddReservationsV2MutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -531,7 +640,12 @@ export const useAddReservationsV2 = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -543,12 +657,32 @@ export const useAddReservationsV2 = <
return addReservationsV2(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type AddReservationsV2MutationResult = NonNullable<
+ Awaited>
+>;
+export type AddReservationsV2MutationBody = BodyType;
+export type AddReservationsV2MutationError = ErrorType;
+
+/**
+ * @summary Create new reservations for the patron.
+ */
+export const useAddReservationsV2 = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getAddReservationsV2MutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -557,34 +691,31 @@ export const useAddReservationsV2 = <
* @summary Get availability of bibliographical records.
*/
export const getAvailabilityV3 = (
- params?: GetAvailabilityV3Params,
+ params: GetAvailabilityV3Params,
signal?: AbortSignal
) => {
return fetcher({
url: `/external/agencyid/catalog/availability/v3`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
export const getGetAvailabilityV3QueryKey = (
- params?: GetAvailabilityV3Params
-) => [
- `/external/agencyid/catalog/availability/v3`,
- ...(params ? [params] : [])
-];
-
-export type GetAvailabilityV3QueryResult = NonNullable<
- Awaited>
->;
-export type GetAvailabilityV3QueryError = ErrorType;
+ params: GetAvailabilityV3Params
+) => {
+ return [
+ `/external/agencyid/catalog/availability/v3`,
+ ...(params ? [params] : [])
+ ] as const;
+};
-export const useGetAvailabilityV3 = <
+export const getGetAvailabilityV3QueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
- params?: GetAvailabilityV3Params,
+ params: GetAvailabilityV3Params,
options?: {
query?: UseQueryOptions<
Awaited>,
@@ -592,7 +723,7 @@ export const useGetAvailabilityV3 = <
TData
>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey =
@@ -602,16 +733,43 @@ export const useGetAvailabilityV3 = <
Awaited>
> = ({ signal }) => getAvailabilityV3(params, signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
- return {
- queryKey,
- ...query
+export type GetAvailabilityV3QueryResult = NonNullable<
+ Awaited>
+>;
+export type GetAvailabilityV3QueryError = ErrorType;
+
+/**
+ * @summary Get availability of bibliographical records.
+ */
+export const useGetAvailabilityV3 = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ params: GetAvailabilityV3Params,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetAvailabilityV3QueryOptions(params, options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -621,32 +779,29 @@ export const useGetAvailabilityV3 = <
* @summary Get placement holdings for bibliographical records.
*/
export const getHoldingsV3 = (
- params?: GetHoldingsV3Params,
+ params: GetHoldingsV3Params,
signal?: AbortSignal
) => {
return fetcher({
url: `/external/agencyid/catalog/holdings/v3`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
-export const getGetHoldingsV3QueryKey = (params?: GetHoldingsV3Params) => [
- `/external/agencyid/catalog/holdings/v3`,
- ...(params ? [params] : [])
-];
-
-export type GetHoldingsV3QueryResult = NonNullable<
- Awaited>
->;
-export type GetHoldingsV3QueryError = ErrorType;
+export const getGetHoldingsV3QueryKey = (params: GetHoldingsV3Params) => {
+ return [
+ `/external/agencyid/catalog/holdings/v3`,
+ ...(params ? [params] : [])
+ ] as const;
+};
-export const useGetHoldingsV3 = <
+export const getGetHoldingsV3QueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
- params?: GetHoldingsV3Params,
+ params: GetHoldingsV3Params,
options?: {
query?: UseQueryOptions<
Awaited>,
@@ -654,7 +809,7 @@ export const useGetHoldingsV3 = <
TData
>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetHoldingsV3QueryKey(params);
@@ -663,16 +818,43 @@ export const useGetHoldingsV3 = <
signal
}) => getHoldingsV3(params, signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
+
+export type GetHoldingsV3QueryResult = NonNullable<
+ Awaited>
+>;
+export type GetHoldingsV3QueryError = ErrorType;
+
+/**
+ * @summary Get placement holdings for bibliographical records.
+ */
+export const useGetHoldingsV3 = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ params: GetHoldingsV3Params,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetHoldingsV3QueryOptions(params, options);
- return {
- queryKey,
- ...query
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -692,30 +874,27 @@ export const useGetHoldingsV3 = <
important that unrecognized types are treated as 'other'.
* @summary List of fees in FBS for the patron with all available information about the fee.
*/
-export const getFeesV2 = (params?: GetFeesV2Params, signal?: AbortSignal) => {
+export const getFeesV2 = (params: GetFeesV2Params, signal?: AbortSignal) => {
return fetcher({
url: `/external/agencyid/patron/patronid/fees/v2`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
-export const getGetFeesV2QueryKey = (params?: GetFeesV2Params) => [
- `/external/agencyid/patron/patronid/fees/v2`,
- ...(params ? [params] : [])
-];
-
-export type GetFeesV2QueryResult = NonNullable<
- Awaited>
->;
-export type GetFeesV2QueryError = ErrorType;
+export const getGetFeesV2QueryKey = (params: GetFeesV2Params) => {
+ return [
+ `/external/agencyid/patron/patronid/fees/v2`,
+ ...(params ? [params] : [])
+ ] as const;
+};
-export const useGetFeesV2 = <
+export const getGetFeesV2QueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
- params?: GetFeesV2Params,
+ params: GetFeesV2Params,
options?: {
query?: UseQueryOptions<
Awaited>,
@@ -723,7 +902,7 @@ export const useGetFeesV2 = <
TData
>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetFeesV2QueryKey(params);
@@ -732,16 +911,43 @@ export const useGetFeesV2 = <
signal
}) => getFeesV2(params, signal);
- const query = useQuery>, TError, TData>(
- queryKey,
- queryFn,
- queryOptions
- );
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: QueryKey };
+};
- return {
- queryKey,
- ...query
+export type GetFeesV2QueryResult = NonNullable<
+ Awaited>
+>;
+export type GetFeesV2QueryError = ErrorType;
+
+/**
+ * @summary List of fees in FBS for the patron with all available information about the fee.
+ */
+export const useGetFeesV2 = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ params: GetFeesV2Params,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetFeesV2QueryOptions(params, options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -774,13 +980,7 @@ export const createV4 = (
});
};
-export type CreateV4MutationResult = NonNullable<
- Awaited>
->;
-export type CreateV4MutationBody = BodyType;
-export type CreateV4MutationError = ErrorType;
-
-export const useCreateV4 = <
+export const getCreateV4MutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -790,7 +990,12 @@ export const useCreateV4 = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -802,12 +1007,32 @@ export const useCreateV4 = <
return createV4(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type CreateV4MutationResult = NonNullable<
+ Awaited>
+>;
+export type CreateV4MutationBody = BodyType;
+export type CreateV4MutationError = ErrorType;
+
+/**
+ * @summary Create a new patron who is a person.
+ */
+export const useCreateV4 = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getCreateV4MutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -834,14 +1059,7 @@ export const createWithGuardian = (
});
};
-export type CreateWithGuardianMutationResult = NonNullable<
- Awaited>
->;
-export type CreateWithGuardianMutationBody =
- BodyType;
-export type CreateWithGuardianMutationError = ErrorType;
-
-export const useCreateWithGuardian = <
+export const getCreateWithGuardianMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -851,7 +1069,12 @@ export const useCreateWithGuardian = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -863,12 +1086,33 @@ export const useCreateWithGuardian = <
return createWithGuardian(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type CreateWithGuardianMutationResult = NonNullable<
+ Awaited>
+>;
+export type CreateWithGuardianMutationBody =
+ BodyType;
+export type CreateWithGuardianMutationError = ErrorType;
+
+/**
+ * @summary Creates a person patron with a guardian (eg A financial responsible).
+ */
+export const useCreateWithGuardian = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getCreateWithGuardianMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -895,13 +1139,7 @@ export const updateGuardian = (
});
};
-export type UpdateGuardianMutationResult = NonNullable<
- Awaited>
->;
-export type UpdateGuardianMutationBody = BodyType;
-export type UpdateGuardianMutationError = ErrorType;
-
-export const useUpdateGuardian = <
+export const getUpdateGuardianMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -911,7 +1149,12 @@ export const useUpdateGuardian = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -923,12 +1166,32 @@ export const useUpdateGuardian = <
return updateGuardian(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type UpdateGuardianMutationResult = NonNullable<
+ Awaited>
+>;
+export type UpdateGuardianMutationBody = BodyType;
+export type UpdateGuardianMutationError = ErrorType;
+
+/**
+ * @summary Updates a person patron's guardian (eg A financial responsible).
+ */
+export const useUpdateGuardian = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getUpdateGuardianMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -972,13 +1235,7 @@ export const renewLoansV2 = (renewLoansV2Body: number[]) => {
});
};
-export type RenewLoansV2MutationResult = NonNullable<
- Awaited>
->;
-export type RenewLoansV2MutationBody = BodyType;
-export type RenewLoansV2MutationError = ErrorType;
-
-export const useRenewLoansV2 = <
+export const getRenewLoansV2MutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -988,7 +1245,12 @@ export const useRenewLoansV2 = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -1000,12 +1262,32 @@ export const useRenewLoansV2 = <
return renewLoansV2(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type RenewLoansV2MutationResult = NonNullable<
+ Awaited>
+>;
+export type RenewLoansV2MutationBody = BodyType;
+export type RenewLoansV2MutationError = ErrorType;
+
+/**
+ * @summary Renew loans.
+ */
+export const useRenewLoansV2 = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getRenewLoansV2MutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -1049,16 +1331,11 @@ export const getLoansV2 = (signal?: AbortSignal) => {
});
};
-export const getGetLoansV2QueryKey = () => [
- `/external/agencyid/patrons/patronid/loans/v2`
-];
-
-export type GetLoansV2QueryResult = NonNullable<
- Awaited>
->;
-export type GetLoansV2QueryError = ErrorType;
+export const getGetLoansV2QueryKey = () => {
+ return [`/external/agencyid/patrons/patronid/loans/v2`] as const;
+};
-export const useGetLoansV2 = <
+export const getGetLoansV2QueryOptions = <
TData = Awaited>,
TError = ErrorType
>(options?: {
@@ -1067,7 +1344,7 @@ export const useGetLoansV2 = <
TError,
TData
>;
-}): UseQueryResult & { queryKey: QueryKey } => {
+}) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetLoansV2QueryKey();
@@ -1076,16 +1353,40 @@ export const useGetLoansV2 = <
signal
}) => getLoansV2(signal);
- const query = useQuery>, TError, TData>(
- queryKey,
- queryFn,
- queryOptions
- );
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: QueryKey };
+};
+
+export type GetLoansV2QueryResult = NonNullable<
+ Awaited>
+>;
+export type GetLoansV2QueryError = ErrorType;
+
+/**
+ * @summary Get list of current loans by the patron.
+ */
+export const useGetLoansV2 = <
+ TData = Awaited>,
+ TError = ErrorType
+>(options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+}): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetLoansV2QueryOptions(options);
- return {
- queryKey,
- ...query
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -1111,16 +1412,11 @@ export const getPatronInformationByPatronIdV2 = (signal?: AbortSignal) => {
});
};
-export const getGetPatronInformationByPatronIdV2QueryKey = () => [
- `/external/agencyid/patrons/patronid/v2`
-];
-
-export type GetPatronInformationByPatronIdV2QueryResult = NonNullable<
- Awaited>
->;
-export type GetPatronInformationByPatronIdV2QueryError = ErrorType;
+export const getGetPatronInformationByPatronIdV2QueryKey = () => {
+ return [`/external/agencyid/patrons/patronid/v2`] as const;
+};
-export const useGetPatronInformationByPatronIdV2 = <
+export const getGetPatronInformationByPatronIdV2QueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
@@ -1129,24 +1425,48 @@ export const useGetPatronInformationByPatronIdV2 = <
TError,
TData
>
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const queryKey =
queryOptions?.queryKey ?? getGetPatronInformationByPatronIdV2QueryKey();
const queryFn: QueryFunction<
Awaited>
- > = ({ signal }) => getPatronInformationByPatronIdV2();
+ > = ({ signal }) => getPatronInformationByPatronIdV2(signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: QueryKey };
+};
+
+export type GetPatronInformationByPatronIdV2QueryResult = NonNullable<
+ Awaited>
+>;
+export type GetPatronInformationByPatronIdV2QueryError = ErrorType;
+
+/**
+ * @summary Returns the patron details
+ */
+export const useGetPatronInformationByPatronIdV2 = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ queryOptions?: UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ >
+): UseQueryResult & { queryKey: QueryKey } => {
+ const options = getGetPatronInformationByPatronIdV2QueryOptions(queryOptions);
- return {
- queryKey,
- ...query
+ const query = useQuery(options) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = options.queryKey;
+
+ return query;
};
/**
@@ -1178,13 +1498,7 @@ export const updateV5 = (
});
};
-export type UpdateV5MutationResult = NonNullable<
- Awaited>
->;
-export type UpdateV5MutationBody = BodyType;
-export type UpdateV5MutationError = ErrorType;
-
-export const useUpdateV5 = <
+export const getUpdateV5MutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -1194,7 +1508,12 @@ export const useUpdateV5 = <
{ data: BodyType },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: BodyType },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -1206,10 +1525,30 @@ export const useUpdateV5 = <
return updateV5(data);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type UpdateV5MutationResult = NonNullable<
+ Awaited>
+>;
+export type UpdateV5MutationBody = BodyType;
+export type UpdateV5MutationError = ErrorType;
+
+/**
+ * @summary Update information about the patron.
+ */
+export const useUpdateV5 = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ data: BodyType },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getUpdateV5MutationOptions(options);
+
+ return useMutation(mutationOptions);
};
diff --git a/src/core/fbs/model/address.ts b/src/core/fbs/model/address.ts
index 652ead100c..f8d5a8b3c9 100644
--- a/src/core/fbs/model/address.ts
+++ b/src/core/fbs/model/address.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/addressV2.ts b/src/core/fbs/model/addressV2.ts
index 1648656f29..6ec66f5ca9 100644
--- a/src/core/fbs/model/addressV2.ts
+++ b/src/core/fbs/model/addressV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/agencyBranch.ts b/src/core/fbs/model/agencyBranch.ts
index 2167f21533..2b947a4979 100644
--- a/src/core/fbs/model/agencyBranch.ts
+++ b/src/core/fbs/model/agencyBranch.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/agencyDepartment.ts b/src/core/fbs/model/agencyDepartment.ts
index 55df921e20..abc1012759 100644
--- a/src/core/fbs/model/agencyDepartment.ts
+++ b/src/core/fbs/model/agencyDepartment.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/agencyLocation.ts b/src/core/fbs/model/agencyLocation.ts
index adfe2d03cd..1551af9848 100644
--- a/src/core/fbs/model/agencyLocation.ts
+++ b/src/core/fbs/model/agencyLocation.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/agencySublocation.ts b/src/core/fbs/model/agencySublocation.ts
index 3287b2fcd0..a045ad49ba 100644
--- a/src/core/fbs/model/agencySublocation.ts
+++ b/src/core/fbs/model/agencySublocation.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/authenticatedPatronV4.ts b/src/core/fbs/model/authenticatedPatronV4.ts
index 8977be1e25..db41ebb746 100644
--- a/src/core/fbs/model/authenticatedPatronV4.ts
+++ b/src/core/fbs/model/authenticatedPatronV4.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/authenticatedPatronV6.ts b/src/core/fbs/model/authenticatedPatronV6.ts
index dc794be596..d37e14de37 100644
--- a/src/core/fbs/model/authenticatedPatronV6.ts
+++ b/src/core/fbs/model/authenticatedPatronV6.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/authenticatedPatronV6AuthenticateStatus.ts b/src/core/fbs/model/authenticatedPatronV6AuthenticateStatus.ts
index 9a66d11d71..fa33f25cd9 100644
--- a/src/core/fbs/model/authenticatedPatronV6AuthenticateStatus.ts
+++ b/src/core/fbs/model/authenticatedPatronV6AuthenticateStatus.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/availabilityV3.ts b/src/core/fbs/model/availabilityV3.ts
index 96c17ccb2d..148d6331eb 100644
--- a/src/core/fbs/model/availabilityV3.ts
+++ b/src/core/fbs/model/availabilityV3.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/blockStatus.ts b/src/core/fbs/model/blockStatus.ts
index e2b1e27965..3a73cd91f1 100644
--- a/src/core/fbs/model/blockStatus.ts
+++ b/src/core/fbs/model/blockStatus.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/booking.ts b/src/core/fbs/model/booking.ts
index a188b3bca1..d954731666 100644
--- a/src/core/fbs/model/booking.ts
+++ b/src/core/fbs/model/booking.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/bookingInfo.ts b/src/core/fbs/model/bookingInfo.ts
index 48323d4d32..6a719244a5 100644
--- a/src/core/fbs/model/bookingInfo.ts
+++ b/src/core/fbs/model/bookingInfo.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/createBooking.ts b/src/core/fbs/model/createBooking.ts
index e492846151..3c6da55f8b 100644
--- a/src/core/fbs/model/createBooking.ts
+++ b/src/core/fbs/model/createBooking.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/createPatronRequestV3.ts b/src/core/fbs/model/createPatronRequestV3.ts
index 0409a43fe6..4ccf8190f1 100644
--- a/src/core/fbs/model/createPatronRequestV3.ts
+++ b/src/core/fbs/model/createPatronRequestV3.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/createReservation.ts b/src/core/fbs/model/createReservation.ts
index dca5326364..8851121ae0 100644
--- a/src/core/fbs/model/createReservation.ts
+++ b/src/core/fbs/model/createReservation.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/createReservationBatch.ts b/src/core/fbs/model/createReservationBatch.ts
index 0f73f52a2a..346e09993b 100644
--- a/src/core/fbs/model/createReservationBatch.ts
+++ b/src/core/fbs/model/createReservationBatch.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/createReservationBatchV2.ts b/src/core/fbs/model/createReservationBatchV2.ts
index 2e4641bb9f..6b67bdedaa 100644
--- a/src/core/fbs/model/createReservationBatchV2.ts
+++ b/src/core/fbs/model/createReservationBatchV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/deleteReservationsParams.ts b/src/core/fbs/model/deleteReservationsParams.ts
index e6a99c3ddf..2ddb925917 100644
--- a/src/core/fbs/model/deleteReservationsParams.ts
+++ b/src/core/fbs/model/deleteReservationsParams.ts
@@ -1,8 +1,13 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
*/
-export type DeleteReservationsParams = { reservationid: number[] };
+export type DeleteReservationsParams = {
+ /**
+ * a list of reservation ids for reservations that are to be deleted
+ */
+ reservationid: number[];
+};
diff --git a/src/core/fbs/model/feeMaterial.ts b/src/core/fbs/model/feeMaterial.ts
index 961968a73d..b64f30d06a 100644
--- a/src/core/fbs/model/feeMaterial.ts
+++ b/src/core/fbs/model/feeMaterial.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/feeMaterialV2.ts b/src/core/fbs/model/feeMaterialV2.ts
index 21f426aa7d..69b25428de 100644
--- a/src/core/fbs/model/feeMaterialV2.ts
+++ b/src/core/fbs/model/feeMaterialV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/feeV2.ts b/src/core/fbs/model/feeV2.ts
index 4390805fd3..4f1ffd509b 100644
--- a/src/core/fbs/model/feeV2.ts
+++ b/src/core/fbs/model/feeV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/getAvailabilityV3Params.ts b/src/core/fbs/model/getAvailabilityV3Params.ts
index a1bff83afe..b92add1c3c 100644
--- a/src/core/fbs/model/getAvailabilityV3Params.ts
+++ b/src/core/fbs/model/getAvailabilityV3Params.ts
@@ -1,11 +1,17 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
*/
export type GetAvailabilityV3Params = {
+ /**
+ * list of record ids
+ */
recordid: string[];
+ /**
+ * Identifies the branchIds which are excluded from the result
+ */
exclude?: string[];
};
diff --git a/src/core/fbs/model/getBranchesParams.ts b/src/core/fbs/model/getBranchesParams.ts
index 3ba9469599..fedb1183e6 100644
--- a/src/core/fbs/model/getBranchesParams.ts
+++ b/src/core/fbs/model/getBranchesParams.ts
@@ -1,8 +1,13 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
*/
-export type GetBranchesParams = { exclude?: string[] };
+export type GetBranchesParams = {
+ /**
+ * Identifies the branchIds which are excluded from the result
+ */
+ exclude?: string[];
+};
diff --git a/src/core/fbs/model/getFeesV2Params.ts b/src/core/fbs/model/getFeesV2Params.ts
index 0de7683865..630f177443 100644
--- a/src/core/fbs/model/getFeesV2Params.ts
+++ b/src/core/fbs/model/getFeesV2Params.ts
@@ -1,11 +1,19 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
*/
export type GetFeesV2Params = {
+ /**
+ * true if all paid/unpaid fees should be included, false if only unpaid fees should
+ be included; default=false
+ */
includepaid: boolean;
+ /**
+ * true if fees that are not payable through a CMS system should be included (for read
+ only access); default=false
+ */
includenonpayable: boolean;
};
diff --git a/src/core/fbs/model/getHoldingsV3Params.ts b/src/core/fbs/model/getHoldingsV3Params.ts
index 3e36599200..aaae32f1a1 100644
--- a/src/core/fbs/model/getHoldingsV3Params.ts
+++ b/src/core/fbs/model/getHoldingsV3Params.ts
@@ -1,8 +1,17 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
*/
-export type GetHoldingsV3Params = { recordid: string[]; exclude?: string[] };
+export type GetHoldingsV3Params = {
+ /**
+ * Identifies the bibliographical records - The FAUST number.
+ */
+ recordid: string[];
+ /**
+ * Identifies the branchIds which are excluded from the result
+ */
+ exclude?: string[];
+};
diff --git a/src/core/fbs/model/guardian.ts b/src/core/fbs/model/guardian.ts
index a35ebb11ff..8dd73eb6ef 100644
--- a/src/core/fbs/model/guardian.ts
+++ b/src/core/fbs/model/guardian.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/holdings.ts b/src/core/fbs/model/holdings.ts
index 50c521203c..06add68ebe 100644
--- a/src/core/fbs/model/holdings.ts
+++ b/src/core/fbs/model/holdings.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/holdingsForBibliographicalRecordV3.ts b/src/core/fbs/model/holdingsForBibliographicalRecordV3.ts
index a6b226a952..834ce88eb5 100644
--- a/src/core/fbs/model/holdingsForBibliographicalRecordV3.ts
+++ b/src/core/fbs/model/holdingsForBibliographicalRecordV3.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/holdingsV3.ts b/src/core/fbs/model/holdingsV3.ts
index 796812b3f7..3494cac02e 100644
--- a/src/core/fbs/model/holdingsV3.ts
+++ b/src/core/fbs/model/holdingsV3.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/iLLBibliographicRecord.ts b/src/core/fbs/model/iLLBibliographicRecord.ts
index 1fcfcc949c..6366bbd03e 100644
--- a/src/core/fbs/model/iLLBibliographicRecord.ts
+++ b/src/core/fbs/model/iLLBibliographicRecord.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/index.ts b/src/core/fbs/model/index.ts
index 849c5d4068..0487a94c7a 100644
--- a/src/core/fbs/model/index.ts
+++ b/src/core/fbs/model/index.ts
@@ -1,60 +1,67 @@
+/**
+ * Generated by orval v6.18.1 🍺
+ * Do not edit manually.
+ * FBS Adapter
+ * OpenAPI spec version: 1.0
+ */
+
export * from "./address";
+export * from "./addressV2";
+export * from "./agencyBranch";
export * from "./agencyDepartment";
export * from "./agencyLocation";
+export * from "./agencySublocation";
+export * from "./authenticatedPatronV4";
+export * from "./authenticatedPatronV6";
export * from "./authenticatedPatronV6AuthenticateStatus";
-export * from "./booking";
export * from "./availabilityV3";
+export * from "./blockStatus";
+export * from "./booking";
+export * from "./bookingInfo";
export * from "./createBooking";
-export * from "./createReservation";
export * from "./createPatronRequestV3";
-export * from "./authenticatedPatronV6";
-export * from "./blockStatus";
-export * from "./feeV2";
-export * from "./feeMaterialV2";
+export * from "./createReservation";
export * from "./createReservationBatch";
-export * from "./agencyBranch";
export * from "./createReservationBatchV2";
+export * from "./deleteReservationsParams";
+export * from "./feeMaterial";
+export * from "./feeMaterialV2";
+export * from "./feeV2";
+export * from "./getAvailabilityV3Params";
+export * from "./getBranchesParams";
+export * from "./getFeesV2Params";
+export * from "./getHoldingsV3Params";
export * from "./guardian";
+export * from "./holdings";
export * from "./holdingsForBibliographicalRecordV3";
-export * from "./loanDetailsV2";
export * from "./holdingsV3";
export * from "./iLLBibliographicRecord";
-export * from "./material";
export * from "./loanDetails";
+export * from "./loanDetailsV2";
export * from "./loanV2";
+export * from "./material";
+export * from "./materialGroup";
export * from "./materialV3";
export * from "./patron";
-export * from "./agencySublocation";
-export * from "./materialGroup";
+export * from "./patronGroup";
export * from "./patronSettings";
export * from "./patronSettingsV3";
-export * from "./holdings";
+export * from "./patronSettingsV4";
export * from "./patronV3";
export * from "./patronV4";
+export * from "./patronV5";
+export * from "./patronWithGuardianRequest";
export * from "./period";
-export * from "./patronSettingsV4";
-export * from "./authenticatedPatronV4";
-export * from "./feeMaterial";
+export * from "./periodical";
export * from "./periodicalReservation";
-export * from "./bookingInfo";
-export * from "./patronGroup";
+export * from "./pincodeChange";
+export * from "./renewedLoanV2";
export * from "./reservationDetails";
+export * from "./reservationDetailsV2";
export * from "./reservationResponseV2";
-export * from "./addressV2";
export * from "./reservationResult";
-export * from "./patronV5";
+export * from "./reservationResultV2";
export * from "./updateGuardianRequest";
-export * from "./updateReservationBatch";
-export * from "./reservationDetailsV2";
-export * from "./getAvailabilityV3Params";
-export * from "./pincodeChange";
-export * from "./patronWithGuardianRequest";
-export * from "./updateReservation";
-export * from "./periodical";
-export * from "./getHoldingsV3Params";
-export * from "./renewedLoanV2";
-export * from "./getFeesV2Params";
-export * from "./getBranchesParams";
export * from "./updatePatronRequestV4";
-export * from "./reservationResultV2";
-export * from "./deleteReservationsParams";
+export * from "./updateReservation";
+export * from "./updateReservationBatch";
diff --git a/src/core/fbs/model/loanDetails.ts b/src/core/fbs/model/loanDetails.ts
index db689d2457..096b2c208f 100644
--- a/src/core/fbs/model/loanDetails.ts
+++ b/src/core/fbs/model/loanDetails.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/loanDetailsV2.ts b/src/core/fbs/model/loanDetailsV2.ts
index 2e79494c6f..b1c42e4313 100644
--- a/src/core/fbs/model/loanDetailsV2.ts
+++ b/src/core/fbs/model/loanDetailsV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/loanV2.ts b/src/core/fbs/model/loanV2.ts
index b9544a87c8..43c9152930 100644
--- a/src/core/fbs/model/loanV2.ts
+++ b/src/core/fbs/model/loanV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/material.ts b/src/core/fbs/model/material.ts
index 527b60ca61..2c66165aca 100644
--- a/src/core/fbs/model/material.ts
+++ b/src/core/fbs/model/material.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/materialGroup.ts b/src/core/fbs/model/materialGroup.ts
index 566bb0eaf8..b2fcda16e6 100644
--- a/src/core/fbs/model/materialGroup.ts
+++ b/src/core/fbs/model/materialGroup.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/materialV3.ts b/src/core/fbs/model/materialV3.ts
index bbd7830fa8..aeeaf2794c 100644
--- a/src/core/fbs/model/materialV3.ts
+++ b/src/core/fbs/model/materialV3.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patron.ts b/src/core/fbs/model/patron.ts
index ba14641c37..022fa5f905 100644
--- a/src/core/fbs/model/patron.ts
+++ b/src/core/fbs/model/patron.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronGroup.ts b/src/core/fbs/model/patronGroup.ts
index ca63200c03..9eecfa93e6 100644
--- a/src/core/fbs/model/patronGroup.ts
+++ b/src/core/fbs/model/patronGroup.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronSettings.ts b/src/core/fbs/model/patronSettings.ts
index 868350f7f0..45f3eb5259 100644
--- a/src/core/fbs/model/patronSettings.ts
+++ b/src/core/fbs/model/patronSettings.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronSettingsV3.ts b/src/core/fbs/model/patronSettingsV3.ts
index e7e04c3337..313ce7901d 100644
--- a/src/core/fbs/model/patronSettingsV3.ts
+++ b/src/core/fbs/model/patronSettingsV3.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronSettingsV4.ts b/src/core/fbs/model/patronSettingsV4.ts
index bdf5edc199..8d16ca22a3 100644
--- a/src/core/fbs/model/patronSettingsV4.ts
+++ b/src/core/fbs/model/patronSettingsV4.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronV3.ts b/src/core/fbs/model/patronV3.ts
index 5d4b051d76..2340c96741 100644
--- a/src/core/fbs/model/patronV3.ts
+++ b/src/core/fbs/model/patronV3.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronV4.ts b/src/core/fbs/model/patronV4.ts
index 0e7e5b5416..0baa21accf 100644
--- a/src/core/fbs/model/patronV4.ts
+++ b/src/core/fbs/model/patronV4.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronV5.ts b/src/core/fbs/model/patronV5.ts
index 319d93bbdc..edc8d17f30 100644
--- a/src/core/fbs/model/patronV5.ts
+++ b/src/core/fbs/model/patronV5.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/patronWithGuardianRequest.ts b/src/core/fbs/model/patronWithGuardianRequest.ts
index f6fbabdcc5..05d464097d 100644
--- a/src/core/fbs/model/patronWithGuardianRequest.ts
+++ b/src/core/fbs/model/patronWithGuardianRequest.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/period.ts b/src/core/fbs/model/period.ts
index a80faf2efc..4da77a2782 100644
--- a/src/core/fbs/model/period.ts
+++ b/src/core/fbs/model/period.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/periodical.ts b/src/core/fbs/model/periodical.ts
index 5a06a581bc..e082dd9c51 100644
--- a/src/core/fbs/model/periodical.ts
+++ b/src/core/fbs/model/periodical.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/periodicalReservation.ts b/src/core/fbs/model/periodicalReservation.ts
index 06c877bf48..0a05ca55a5 100644
--- a/src/core/fbs/model/periodicalReservation.ts
+++ b/src/core/fbs/model/periodicalReservation.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/pincodeChange.ts b/src/core/fbs/model/pincodeChange.ts
index d8be595dc8..9b34d636c8 100644
--- a/src/core/fbs/model/pincodeChange.ts
+++ b/src/core/fbs/model/pincodeChange.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/renewedLoanV2.ts b/src/core/fbs/model/renewedLoanV2.ts
index 74a6b98de9..eecc3fbc82 100644
--- a/src/core/fbs/model/renewedLoanV2.ts
+++ b/src/core/fbs/model/renewedLoanV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/reservationDetails.ts b/src/core/fbs/model/reservationDetails.ts
index 50a497437d..a58b1942d6 100644
--- a/src/core/fbs/model/reservationDetails.ts
+++ b/src/core/fbs/model/reservationDetails.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/reservationDetailsV2.ts b/src/core/fbs/model/reservationDetailsV2.ts
index adf1215be0..e12fb9d4eb 100644
--- a/src/core/fbs/model/reservationDetailsV2.ts
+++ b/src/core/fbs/model/reservationDetailsV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/reservationResponseV2.ts b/src/core/fbs/model/reservationResponseV2.ts
index 067fadc003..001e586608 100644
--- a/src/core/fbs/model/reservationResponseV2.ts
+++ b/src/core/fbs/model/reservationResponseV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/reservationResult.ts b/src/core/fbs/model/reservationResult.ts
index c01918115a..8e0be3058d 100644
--- a/src/core/fbs/model/reservationResult.ts
+++ b/src/core/fbs/model/reservationResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/reservationResultV2.ts b/src/core/fbs/model/reservationResultV2.ts
index fb0e1afc86..988929f5c3 100644
--- a/src/core/fbs/model/reservationResultV2.ts
+++ b/src/core/fbs/model/reservationResultV2.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/updateGuardianRequest.ts b/src/core/fbs/model/updateGuardianRequest.ts
index 0456dfd789..7bbc2ca326 100644
--- a/src/core/fbs/model/updateGuardianRequest.ts
+++ b/src/core/fbs/model/updateGuardianRequest.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/updatePatronRequestV4.ts b/src/core/fbs/model/updatePatronRequestV4.ts
index fd9bb9198b..c5807baab5 100644
--- a/src/core/fbs/model/updatePatronRequestV4.ts
+++ b/src/core/fbs/model/updatePatronRequestV4.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/updateReservation.ts b/src/core/fbs/model/updateReservation.ts
index bdeecba690..a55d82f0ba 100644
--- a/src/core/fbs/model/updateReservation.ts
+++ b/src/core/fbs/model/updateReservation.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/fbs/model/updateReservationBatch.ts b/src/core/fbs/model/updateReservationBatch.ts
index 45fc71569b..576d06c0af 100644
--- a/src/core/fbs/model/updateReservationBatch.ts
+++ b/src/core/fbs/model/updateReservationBatch.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* FBS Adapter
* OpenAPI spec version: 1.0
diff --git a/src/core/material-list-api/material-list.ts b/src/core/material-list-api/material-list.ts
index 248b280798..5eb2eeb90b 100644
--- a/src/core/material-list-api/material-list.ts
+++ b/src/core/material-list-api/material-list.ts
@@ -1,12 +1,11 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Collection List
* OpenAPI spec version: 2.0.0
*/
-import {
- useQuery,
- useMutation,
+import { useQuery, useMutation } from "react-query";
+import type {
UseQueryOptions,
UseMutationOptions,
QueryFunction,
@@ -15,11 +14,8 @@ import {
QueryKey
} from "react-query";
import type { List, GetListParams } from "./model";
-import { fetcher, ErrorType } from "./mutator/fetcher";
-
-type AwaitedInput = PromiseLike | T;
-
-type Awaited = O extends AwaitedInput ? T : never;
+import { fetcher } from "./mutator/fetcher";
+import type { ErrorType } from "./mutator/fetcher";
/**
* Get list with collections.
@@ -32,22 +28,16 @@ export const getList = (
return fetcher({
url: `/list/${listId}`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
-export const getGetListQueryKey = (listId: string, params?: GetListParams) => [
- `/list/${listId}`,
- ...(params ? [params] : [])
-];
-
-export type GetListQueryResult = NonNullable<
- Awaited>
->;
-export type GetListQueryError = ErrorType;
+export const getGetListQueryKey = (listId: string, params?: GetListParams) => {
+ return [`/list/${listId}`, ...(params ? [params] : [])] as const;
+};
-export const useGetList = <
+export const getGetListQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
@@ -56,7 +46,7 @@ export const useGetList = <
options?: {
query?: UseQueryOptions>, TError, TData>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetListQueryKey(listId, params);
@@ -65,16 +55,40 @@ export const useGetList = <
signal
}) => getList(listId, params, signal);
- const query = useQuery>, TError, TData>(
+ return {
queryKey,
queryFn,
- { enabled: !!listId, ...queryOptions }
- );
+ enabled: !!listId,
+ ...queryOptions
+ } as UseQueryOptions>, TError, TData> & {
+ queryKey: QueryKey;
+ };
+};
- return {
- queryKey,
- ...query
+export type GetListQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetListQueryError = ErrorType;
+
+export const useGetList = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ listId: string,
+ params?: GetListParams,
+ options?: {
+ query?: UseQueryOptions>, TError, TData>;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetListQueryOptions(listId, params, options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -92,13 +106,7 @@ export const hasItem = (
});
};
-export type HasItemMutationResult = NonNullable<
- Awaited>
->;
-
-export type HasItemMutationError = ErrorType;
-
-export const useHasItem = <
+export const getHasItemMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -108,7 +116,12 @@ export const useHasItem = <
{ listId: string; itemId: string },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { listId: string; itemId: string },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -120,12 +133,29 @@ export const useHasItem = <
return hasItem(listId, itemId);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type HasItemMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type HasItemMutationError = ErrorType;
+
+export const useHasItem = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ listId: string; itemId: string },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getHasItemMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -135,13 +165,7 @@ export const addItem = (listId: string, itemId: string) => {
return fetcher({ url: `/list/${listId}/${itemId}`, method: "put" });
};
-export type AddItemMutationResult = NonNullable<
- Awaited>
->;
-
-export type AddItemMutationError = ErrorType;
-
-export const useAddItem = <
+export const getAddItemMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -151,7 +175,12 @@ export const useAddItem = <
{ listId: string; itemId: string },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { listId: string; itemId: string },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -163,12 +192,29 @@ export const useAddItem = <
return addItem(listId, itemId);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type AddItemMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type AddItemMutationError = ErrorType;
+
+export const useAddItem = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ listId: string; itemId: string },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getAddItemMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -178,13 +224,7 @@ export const removeItem = (listId: string, itemId: string) => {
return fetcher({ url: `/list/${listId}/${itemId}`, method: "delete" });
};
-export type RemoveItemMutationResult = NonNullable<
- Awaited>
->;
-
-export type RemoveItemMutationError = ErrorType;
-
-export const useRemoveItem = <
+export const getRemoveItemMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -194,7 +234,12 @@ export const useRemoveItem = <
{ listId: string; itemId: string },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { listId: string; itemId: string },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -206,10 +251,27 @@ export const useRemoveItem = <
return removeItem(listId, itemId);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type RemoveItemMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type RemoveItemMutationError = ErrorType;
+
+export const useRemoveItem = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ listId: string; itemId: string },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getRemoveItemMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
diff --git a/src/core/material-list-api/model/collectionIdsParameter.ts b/src/core/material-list-api/model/collectionIdsParameter.ts
index 2a96912a04..8e8a9ee0d6 100644
--- a/src/core/material-list-api/model/collectionIdsParameter.ts
+++ b/src/core/material-list-api/model/collectionIdsParameter.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Collection List
* OpenAPI spec version: 2.0.0
diff --git a/src/core/material-list-api/model/getListParams.ts b/src/core/material-list-api/model/getListParams.ts
index 6c79331771..e0ef5449a1 100644
--- a/src/core/material-list-api/model/getListParams.ts
+++ b/src/core/material-list-api/model/getListParams.ts
@@ -1,9 +1,14 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Collection List
* OpenAPI spec version: 2.0.0
*/
import type { CollectionIdsParameter } from "./collectionIdsParameter";
-export type GetListParams = { collection_ids?: CollectionIdsParameter };
+export type GetListParams = {
+ /**
+ * Filter the list reply down to the given collection identifiers. This is the recommended way to check for existence of multiple collections on the list.
+ */
+ collection_ids?: CollectionIdsParameter;
+};
diff --git a/src/core/material-list-api/model/index.ts b/src/core/material-list-api/model/index.ts
index 3ed0a3f2ba..f514860f4b 100644
--- a/src/core/material-list-api/model/index.ts
+++ b/src/core/material-list-api/model/index.ts
@@ -1,6 +1,13 @@
-export * from "./listId";
+/**
+ * Generated by orval v6.18.1 🍺
+ * Do not edit manually.
+ * Collection List
+ * OpenAPI spec version: 2.0.0
+ */
+
+export * from "./collectionIdsParameter";
+export * from "./getListParams";
export * from "./itemId";
export * from "./legacyUserId";
export * from "./list";
-export * from "./collectionIdsParameter";
-export * from "./getListParams";
+export * from "./listId";
diff --git a/src/core/material-list-api/model/itemId.ts b/src/core/material-list-api/model/itemId.ts
index d8cb6f9a39..f0321288db 100644
--- a/src/core/material-list-api/model/itemId.ts
+++ b/src/core/material-list-api/model/itemId.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Collection List
* OpenAPI spec version: 2.0.0
diff --git a/src/core/material-list-api/model/legacyUserId.ts b/src/core/material-list-api/model/legacyUserId.ts
index 4e2fced561..d5a070339a 100644
--- a/src/core/material-list-api/model/legacyUserId.ts
+++ b/src/core/material-list-api/model/legacyUserId.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Collection List
* OpenAPI spec version: 2.0.0
diff --git a/src/core/material-list-api/model/list.ts b/src/core/material-list-api/model/list.ts
index 88a58d527e..9485c2c038 100644
--- a/src/core/material-list-api/model/list.ts
+++ b/src/core/material-list-api/model/list.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Collection List
* OpenAPI spec version: 2.0.0
diff --git a/src/core/material-list-api/model/listId.ts b/src/core/material-list-api/model/listId.ts
index 31432f1b7b..4e329d01be 100644
--- a/src/core/material-list-api/model/listId.ts
+++ b/src/core/material-list-api/model/listId.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Collection List
* OpenAPI spec version: 2.0.0
diff --git a/src/core/publizon/model/apiResponseCode.ts b/src/core/publizon/model/apiResponseCode.ts
index 7d821fa33a..94f2d7a160 100644
--- a/src/core/publizon/model/apiResponseCode.ts
+++ b/src/core/publizon/model/apiResponseCode.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/apiResult.ts b/src/core/publizon/model/apiResult.ts
index 80d8973157..9cc45bbe15 100644
--- a/src/core/publizon/model/apiResult.ts
+++ b/src/core/publizon/model/apiResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/bookTypes.ts b/src/core/publizon/model/bookTypes.ts
index d97440eaee..77a67fc102 100644
--- a/src/core/publizon/model/bookTypes.ts
+++ b/src/core/publizon/model/bookTypes.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/checklistItem.ts b/src/core/publizon/model/checklistItem.ts
index 57721df5d2..a35111a226 100644
--- a/src/core/publizon/model/checklistItem.ts
+++ b/src/core/publizon/model/checklistItem.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/checklistResult.ts b/src/core/publizon/model/checklistResult.ts
index c1814553d3..21d0e63824 100644
--- a/src/core/publizon/model/checklistResult.ts
+++ b/src/core/publizon/model/checklistResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/contentLoanStatusEnum.ts b/src/core/publizon/model/contentLoanStatusEnum.ts
index 05a5dc038a..c41b8953d0 100644
--- a/src/core/publizon/model/contentLoanStatusEnum.ts
+++ b/src/core/publizon/model/contentLoanStatusEnum.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/createLoanResult.ts b/src/core/publizon/model/createLoanResult.ts
index a7ca15dcc3..318acb8367 100644
--- a/src/core/publizon/model/createLoanResult.ts
+++ b/src/core/publizon/model/createLoanResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/fileExtensionType.ts b/src/core/publizon/model/fileExtensionType.ts
index 13a90b4e6b..59cb963e51 100644
--- a/src/core/publizon/model/fileExtensionType.ts
+++ b/src/core/publizon/model/fileExtensionType.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/friendlyCardResult.ts b/src/core/publizon/model/friendlyCardResult.ts
index e8b5ccbd63..199506b067 100644
--- a/src/core/publizon/model/friendlyCardResult.ts
+++ b/src/core/publizon/model/friendlyCardResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/getV1UserLoansParams.ts b/src/core/publizon/model/getV1UserLoansParams.ts
index e614253097..94b1642932 100644
--- a/src/core/publizon/model/getV1UserLoansParams.ts
+++ b/src/core/publizon/model/getV1UserLoansParams.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
@@ -8,4 +8,9 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/
import type { BookTypes } from "./bookTypes";
-export type GetV1UserLoansParams = { bookType?: BookTypes };
+export type GetV1UserLoansParams = {
+ /**
+ * 0 = Ebook, 1 = Audio
+ */
+ bookType?: BookTypes;
+};
diff --git a/src/core/publizon/model/identifierTypeEnum.ts b/src/core/publizon/model/identifierTypeEnum.ts
index fcba664d69..68062d2429 100644
--- a/src/core/publizon/model/identifierTypeEnum.ts
+++ b/src/core/publizon/model/identifierTypeEnum.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/index.ts b/src/core/publizon/model/index.ts
index 39acfc1cd4..e43094800e 100644
--- a/src/core/publizon/model/index.ts
+++ b/src/core/publizon/model/index.ts
@@ -1,32 +1,41 @@
-export * from "./checklistResult";
-export * from "./contentLoanStatusEnum";
-export * from "./identifierTypeEnum";
-export * from "./bookTypes";
+/**
+ * Generated by orval v6.18.1 🍺
+ * Do not edit manually.
+ * Publizon Library API
+ * Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
+Orders/loans created in test environment will not be invoiced. Please request a new license key for the production environment when you're ready to go live.
+ * OpenAPI spec version: 1
+ */
+
export * from "./apiResponseCode";
-export * from "./fileExtensionType";
export * from "./apiResult";
-export * from "./libraryProductContributor";
-export * from "./createLoanResult";
+export * from "./bookTypes";
export * from "./checklistItem";
-export * from "./libraryProductCategory";
-export * from "./libraryBook";
+export * from "./checklistResult";
+export * from "./contentLoanStatusEnum";
+export * from "./createLoanResult";
+export * from "./fileExtensionType";
export * from "./friendlyCardResult";
-export * from "./loanListResult";
-export * from "./reservation";
-export * from "./product";
-export * from "./loan";
+export * from "./getV1UserLoansParams";
+export * from "./identifierTypeEnum";
+export * from "./libraryBook";
+export * from "./libraryData";
+export * from "./libraryProductCategory";
+export * from "./libraryProductContributor";
export * from "./libraryProductExternalId";
-export * from "./productListResult";
-export * from "./loanStatusListResult";
+export * from "./libraryProfile";
+export * from "./loan";
+export * from "./loanListResult";
export * from "./loanResult";
export * from "./loanStatusItem";
-export * from "./userData";
+export * from "./loanStatusListResult";
export * from "./loanStatusResult";
-export * from "./libraryData";
+export * from "./postV1UserLoansIdentifierParams";
+export * from "./product";
+export * from "./productListResult";
+export * from "./productResult";
+export * from "./reservation";
export * from "./reservationInput";
-export * from "./libraryProfile";
export * from "./reservationListResult";
-export * from "./productResult";
-export * from "./getV1UserLoansParams";
export * from "./testCard";
-export * from "./postV1UserLoansIdentifierParams";
+export * from "./userData";
diff --git a/src/core/publizon/model/libraryBook.ts b/src/core/publizon/model/libraryBook.ts
index d88af7ef1c..3ae176198a 100644
--- a/src/core/publizon/model/libraryBook.ts
+++ b/src/core/publizon/model/libraryBook.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/libraryData.ts b/src/core/publizon/model/libraryData.ts
index 78289bbcf8..7c23c54b53 100644
--- a/src/core/publizon/model/libraryData.ts
+++ b/src/core/publizon/model/libraryData.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/libraryProductCategory.ts b/src/core/publizon/model/libraryProductCategory.ts
index 653bd30f06..a3f3f84a24 100644
--- a/src/core/publizon/model/libraryProductCategory.ts
+++ b/src/core/publizon/model/libraryProductCategory.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/libraryProductContributor.ts b/src/core/publizon/model/libraryProductContributor.ts
index aa92bff3d9..bd5f182304 100644
--- a/src/core/publizon/model/libraryProductContributor.ts
+++ b/src/core/publizon/model/libraryProductContributor.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/libraryProductExternalId.ts b/src/core/publizon/model/libraryProductExternalId.ts
index 6494315689..8610623623 100644
--- a/src/core/publizon/model/libraryProductExternalId.ts
+++ b/src/core/publizon/model/libraryProductExternalId.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/libraryProfile.ts b/src/core/publizon/model/libraryProfile.ts
index c9f40cb775..b56114c657 100644
--- a/src/core/publizon/model/libraryProfile.ts
+++ b/src/core/publizon/model/libraryProfile.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/loan.ts b/src/core/publizon/model/loan.ts
index 17fdb9ad1f..bcfefb7f3f 100644
--- a/src/core/publizon/model/loan.ts
+++ b/src/core/publizon/model/loan.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/loanListResult.ts b/src/core/publizon/model/loanListResult.ts
index fefd77f63b..6f4ad112fd 100644
--- a/src/core/publizon/model/loanListResult.ts
+++ b/src/core/publizon/model/loanListResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/loanResult.ts b/src/core/publizon/model/loanResult.ts
index 446faa3ab2..ad1cdabed3 100644
--- a/src/core/publizon/model/loanResult.ts
+++ b/src/core/publizon/model/loanResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/loanStatusItem.ts b/src/core/publizon/model/loanStatusItem.ts
index d730ca9f69..e2a81bf0f1 100644
--- a/src/core/publizon/model/loanStatusItem.ts
+++ b/src/core/publizon/model/loanStatusItem.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/loanStatusListResult.ts b/src/core/publizon/model/loanStatusListResult.ts
index 23c2daf532..d93e03f584 100644
--- a/src/core/publizon/model/loanStatusListResult.ts
+++ b/src/core/publizon/model/loanStatusListResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/loanStatusResult.ts b/src/core/publizon/model/loanStatusResult.ts
index bbf8ad873a..582c2c7008 100644
--- a/src/core/publizon/model/loanStatusResult.ts
+++ b/src/core/publizon/model/loanStatusResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/postV1UserLoansIdentifierParams.ts b/src/core/publizon/model/postV1UserLoansIdentifierParams.ts
index 04087fdfbb..6466e9bf41 100644
--- a/src/core/publizon/model/postV1UserLoansIdentifierParams.ts
+++ b/src/core/publizon/model/postV1UserLoansIdentifierParams.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/product.ts b/src/core/publizon/model/product.ts
index ef551b2689..fe5825f700 100644
--- a/src/core/publizon/model/product.ts
+++ b/src/core/publizon/model/product.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/productListResult.ts b/src/core/publizon/model/productListResult.ts
index f816719905..9cb04aa26b 100644
--- a/src/core/publizon/model/productListResult.ts
+++ b/src/core/publizon/model/productListResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/productResult.ts b/src/core/publizon/model/productResult.ts
index b8c4f63be6..7d07120920 100644
--- a/src/core/publizon/model/productResult.ts
+++ b/src/core/publizon/model/productResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/reservation.ts b/src/core/publizon/model/reservation.ts
index e9b1010b1c..d1f25324cc 100644
--- a/src/core/publizon/model/reservation.ts
+++ b/src/core/publizon/model/reservation.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/reservationInput.ts b/src/core/publizon/model/reservationInput.ts
index 85a87dcdf5..31e4cfb0ff 100644
--- a/src/core/publizon/model/reservationInput.ts
+++ b/src/core/publizon/model/reservationInput.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/reservationListResult.ts b/src/core/publizon/model/reservationListResult.ts
index fc32645236..b3cffc6cb1 100644
--- a/src/core/publizon/model/reservationListResult.ts
+++ b/src/core/publizon/model/reservationListResult.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/testCard.ts b/src/core/publizon/model/testCard.ts
index 0b75da931e..bbd0571435 100644
--- a/src/core/publizon/model/testCard.ts
+++ b/src/core/publizon/model/testCard.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/model/userData.ts b/src/core/publizon/model/userData.ts
index dc3d4c72e7..c1a047a44c 100644
--- a/src/core/publizon/model/userData.ts
+++ b/src/core/publizon/model/userData.ts
@@ -1,5 +1,5 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
diff --git a/src/core/publizon/publizon.ts b/src/core/publizon/publizon.ts
index b8be5f38f1..92e3779bdc 100644
--- a/src/core/publizon/publizon.ts
+++ b/src/core/publizon/publizon.ts
@@ -1,14 +1,13 @@
/**
- * Generated by orval v6.8.1 🍺
+ * Generated by orval v6.18.1 🍺
* Do not edit manually.
* Publizon Library API
* Pubhub exists in two separate environments, each with their own server, code and database. Please use the web service located at library-api.qa.pubhub.dk when developing and testing.
Orders/loans created in test environment will not be invoiced. Please request a new license key for the production environment when you're ready to go live.
* OpenAPI spec version: 1
*/
-import {
- useQuery,
- useMutation,
+import { useQuery, useMutation } from "react-query";
+import type {
UseQueryOptions,
UseMutationOptions,
QueryFunction,
@@ -33,11 +32,8 @@ import type {
ReservationListResult,
ReservationInput
} from "./model";
-import { fetcher, ErrorType, BodyType } from "./mutator/fetcher";
-
-type AwaitedInput = PromiseLike | T;
-
-type Awaited = O extends AwaitedInput ? T : never;
+import { fetcher } from "./mutator/fetcher";
+import type { ErrorType, BodyType } from "./mutator/fetcher";
/**
* Sample **request**:
@@ -56,16 +52,11 @@ export const getV1UserCardnumberFriendly = (signal?: AbortSignal) => {
});
};
-export const getGetV1UserCardnumberFriendlyQueryKey = () => [
- `/v1/user/cardnumber/friendly`
-];
-
-export type GetV1UserCardnumberFriendlyQueryResult = NonNullable<
- Awaited>
->;
-export type GetV1UserCardnumberFriendlyQueryError = ErrorType;
+export const getGetV1UserCardnumberFriendlyQueryKey = () => {
+ return [`/v1/user/cardnumber/friendly`] as const;
+};
-export const useGetV1UserCardnumberFriendly = <
+export const getGetV1UserCardnumberFriendlyQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(options?: {
@@ -74,7 +65,7 @@ export const useGetV1UserCardnumberFriendly = <
TError,
TData
>;
-}): UseQueryResult & { queryKey: QueryKey } => {
+}) => {
const { query: queryOptions } = options ?? {};
const queryKey =
@@ -84,16 +75,40 @@ export const useGetV1UserCardnumberFriendly = <
Awaited>
> = ({ signal }) => getV1UserCardnumberFriendly(signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
- return {
- queryKey,
- ...query
+export type GetV1UserCardnumberFriendlyQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetV1UserCardnumberFriendlyQueryError = ErrorType;
+
+/**
+ * @summary Gets the user's friendly card number.
+ */
+export const useGetV1UserCardnumberFriendly = <
+ TData = Awaited>,
+ TError = ErrorType
+>(options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+}): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetV1UserCardnumberFriendlyQueryOptions(options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -107,14 +122,11 @@ export const getV1UserChecklist = (signal?: AbortSignal) => {
});
};
-export const getGetV1UserChecklistQueryKey = () => [`/v1/user/checklist`];
-
-export type GetV1UserChecklistQueryResult = NonNullable<
- Awaited>
->;
-export type GetV1UserChecklistQueryError = ErrorType;
+export const getGetV1UserChecklistQueryKey = () => {
+ return [`/v1/user/checklist`] as const;
+};
-export const useGetV1UserChecklist = <
+export const getGetV1UserChecklistQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(options?: {
@@ -123,7 +135,7 @@ export const useGetV1UserChecklist = <
TError,
TData
>;
-}): UseQueryResult & { queryKey: QueryKey } => {
+}) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetV1UserChecklistQueryKey();
@@ -132,16 +144,40 @@ export const useGetV1UserChecklist = <
Awaited>
> = ({ signal }) => getV1UserChecklist(signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
- return {
- queryKey,
- ...query
+export type GetV1UserChecklistQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetV1UserChecklistQueryError = ErrorType;
+
+/**
+ * @summary List all checklist items of the user.
+ */
+export const useGetV1UserChecklist = <
+ TData = Awaited>,
+ TError = ErrorType
+>(options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+}): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetV1UserChecklistQueryOptions(options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -154,13 +190,7 @@ export const postV1UserChecklistIdentifier = (identifier: string) => {
});
};
-export type PostV1UserChecklistIdentifierMutationResult = NonNullable<
- Awaited>
->;
-
-export type PostV1UserChecklistIdentifierMutationError = ErrorType;
-
-export const usePostV1UserChecklistIdentifier = <
+export const getPostV1UserChecklistIdentifierMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -170,7 +200,12 @@ export const usePostV1UserChecklistIdentifier = <
{ identifier: string },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { identifier: string },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -182,12 +217,33 @@ export const usePostV1UserChecklistIdentifier = <
return postV1UserChecklistIdentifier(identifier);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type PostV1UserChecklistIdentifierMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type PostV1UserChecklistIdentifierMutationError = ErrorType;
+
+/**
+ * @summary Add a book to the user's checklist.
+ */
+export const usePostV1UserChecklistIdentifier = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ identifier: string },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions =
+ getPostV1UserChecklistIdentifierMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -200,13 +256,7 @@ export const deleteV1UserChecklistIdentifier = (identifier: string) => {
});
};
-export type DeleteV1UserChecklistIdentifierMutationResult = NonNullable<
- Awaited>
->;
-
-export type DeleteV1UserChecklistIdentifierMutationError = ErrorType;
-
-export const useDeleteV1UserChecklistIdentifier = <
+export const getDeleteV1UserChecklistIdentifierMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -216,7 +266,12 @@ export const useDeleteV1UserChecklistIdentifier = <
{ identifier: string },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { identifier: string },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -228,12 +283,33 @@ export const useDeleteV1UserChecklistIdentifier = <
return deleteV1UserChecklistIdentifier(identifier);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type DeleteV1UserChecklistIdentifierMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type DeleteV1UserChecklistIdentifierMutationError = ErrorType;
+
+/**
+ * @summary Delete a book from the user's checklist.
+ */
+export const useDeleteV1UserChecklistIdentifier = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ identifier: string },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions =
+ getDeleteV1UserChecklistIdentifierMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
export const getV1LibraryProfile = (signal?: AbortSignal) => {
@@ -244,14 +320,11 @@ export const getV1LibraryProfile = (signal?: AbortSignal) => {
});
};
-export const getGetV1LibraryProfileQueryKey = () => [`/v1/library/profile`];
-
-export type GetV1LibraryProfileQueryResult = NonNullable<
- Awaited>
->;
-export type GetV1LibraryProfileQueryError = ErrorType;
+export const getGetV1LibraryProfileQueryKey = () => {
+ return [`/v1/library/profile`] as const;
+};
-export const useGetV1LibraryProfile = <
+export const getGetV1LibraryProfileQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(options?: {
@@ -260,7 +333,7 @@ export const useGetV1LibraryProfile = <
TError,
TData
>;
-}): UseQueryResult & { queryKey: QueryKey } => {
+}) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetV1LibraryProfileQueryKey();
@@ -269,16 +342,37 @@ export const useGetV1LibraryProfile = <
Awaited>
> = ({ signal }) => getV1LibraryProfile(signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
- return {
- queryKey,
- ...query
+export type GetV1LibraryProfileQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetV1LibraryProfileQueryError = ErrorType;
+
+export const useGetV1LibraryProfile = <
+ TData = Awaited>,
+ TError = ErrorType
+>(options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+}): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetV1LibraryProfileQueryOptions(options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -291,22 +385,16 @@ export const getV1UserLoans = (
return fetcher({
url: `/v1/user/loans`,
method: "get",
- signal,
- params
+ params,
+ signal
});
};
-export const getGetV1UserLoansQueryKey = (params?: GetV1UserLoansParams) => [
- `/v1/user/loans`,
- ...(params ? [params] : [])
-];
-
-export type GetV1UserLoansQueryResult = NonNullable<
- Awaited>
->;
-export type GetV1UserLoansQueryError = ErrorType;
+export const getGetV1UserLoansQueryKey = (params?: GetV1UserLoansParams) => {
+ return [`/v1/user/loans`, ...(params ? [params] : [])] as const;
+};
-export const useGetV1UserLoans = <
+export const getGetV1UserLoansQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
@@ -318,7 +406,7 @@ export const useGetV1UserLoans = <
TData
>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetV1UserLoansQueryKey(params);
@@ -327,16 +415,43 @@ export const useGetV1UserLoans = <
signal
}) => getV1UserLoans(params, signal);
- const query = useQuery<
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, queryOptions);
+ > & { queryKey: QueryKey };
+};
- return {
- queryKey,
- ...query
+export type GetV1UserLoansQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetV1UserLoansQueryError = ErrorType;
+
+/**
+ * @summary Lists all active loans of the user.
+ */
+export const useGetV1UserLoans = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ params?: GetV1UserLoansParams,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetV1UserLoansQueryOptions(params, options);
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -353,16 +468,11 @@ export const getV1UserLoansIdentifier = (
});
};
-export const getGetV1UserLoansIdentifierQueryKey = (identifier: string) => [
- `/v1/user/loans/${identifier}`
-];
-
-export type GetV1UserLoansIdentifierQueryResult = NonNullable<
- Awaited>
->;
-export type GetV1UserLoansIdentifierQueryError = ErrorType;
+export const getGetV1UserLoansIdentifierQueryKey = (identifier: string) => {
+ return [`/v1/user/loans/${identifier}`] as const;
+};
-export const useGetV1UserLoansIdentifier = <
+export const getGetV1UserLoansIdentifierQueryOptions = <
TData = Awaited>,
TError = ErrorType
>(
@@ -374,7 +484,7 @@ export const useGetV1UserLoansIdentifier = <
TData
>;
}
-): UseQueryResult & { queryKey: QueryKey } => {
+) => {
const { query: queryOptions } = options ?? {};
const queryKey =
@@ -384,16 +494,51 @@ export const useGetV1UserLoansIdentifier = <
Awaited>
> = ({ signal }) => getV1UserLoansIdentifier(identifier, signal);
- const query = useQuery<
+ return {
+ queryKey,
+ queryFn,
+ enabled: !!identifier,
+ ...queryOptions
+ } as UseQueryOptions<
Awaited>,
TError,
TData
- >(queryKey, queryFn, { enabled: !!identifier, ...queryOptions });
+ > & { queryKey: QueryKey };
+};
- return {
- queryKey,
- ...query
+export type GetV1UserLoansIdentifierQueryResult = NonNullable<
+ Awaited>
+>;
+export type GetV1UserLoansIdentifierQueryError = ErrorType;
+
+/**
+ * @summary Gets details of a specific loan.
+ */
+export const useGetV1UserLoansIdentifier = <
+ TData = Awaited>,
+ TError = ErrorType
+>(
+ identifier: string,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >;
+ }
+): UseQueryResult & { queryKey: QueryKey } => {
+ const queryOptions = getGetV1UserLoansIdentifierQueryOptions(
+ identifier,
+ options
+ );
+
+ const query = useQuery(queryOptions) as UseQueryResult & {
+ queryKey: QueryKey;
};
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
};
/**
@@ -410,13 +555,7 @@ export const postV1UserLoansIdentifier = (
});
};
-export type PostV1UserLoansIdentifierMutationResult = NonNullable<
- Awaited>
->;
-
-export type PostV1UserLoansIdentifierMutationError = ErrorType;
-
-export const usePostV1UserLoansIdentifier = <
+export const getPostV1UserLoansIdentifierMutationOptions = <
TError = ErrorType,
TContext = unknown
>(options?: {
@@ -426,7 +565,12 @@ export const usePostV1UserLoansIdentifier = <
{ identifier: string; params?: PostV1UserLoansIdentifierParams },
TContext
>;
-}) => {
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { identifier: string; params?: PostV1UserLoansIdentifierParams },
+ TContext
+> => {
const { mutation: mutationOptions } = options ?? {};
const mutationFn: MutationFunction<
@@ -438,12 +582,32 @@ export const usePostV1UserLoansIdentifier = <
return postV1UserLoansIdentifier(identifier, params);
};
- return useMutation<
+ return { mutationFn, ...mutationOptions };
+};
+
+export type PostV1UserLoansIdentifierMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type PostV1UserLoansIdentifierMutationError = ErrorType;
+
+/**
+ * @summary Creates a new loan.
+ */
+export const usePostV1UserLoansIdentifier = <
+ TError = ErrorType,
+ TContext = unknown
+>(options?: {
+ mutation?: UseMutationOptions<
Awaited>,
TError,
{ identifier: string; params?: PostV1UserLoansIdentifierParams },
TContext
- >(mutationFn, mutationOptions);
+ >;
+}) => {
+ const mutationOptions = getPostV1UserLoansIdentifierMutationOptions(options);
+
+ return useMutation(mutationOptions);
};
/**
@@ -460,16 +624,11 @@ export const getV1LoanstatusIdentifier = (
});
};
-export const getGetV1LoanstatusIdentifierQueryKey = (identifier: string) => [
- `/v1/loanstatus/${identifier}`
-];
-
-export type GetV1LoanstatusIdentifierQueryResult = NonNullable<
- Awaited