refactor: clarify frontend model ownership
This commit is contained in:
@@ -13,6 +13,7 @@ export { ApiErrorCode, apiErrorCode, isApiErrorCode } from "./problem-details";
|
||||
|
||||
export {
|
||||
invalidateResourceAccess,
|
||||
type InvestmentResourceMeta,
|
||||
unwrapResourceResult,
|
||||
useResourceQuery,
|
||||
} from "./resource-query";
|
||||
|
||||
@@ -16,9 +16,11 @@ import { ApiErrorCode, apiErrorCode, isApiErrorCode } from "./problem-details";
|
||||
|
||||
const accessEpochs = new WeakMap<QueryClient, Map<string, number>>();
|
||||
|
||||
type InvestmentResourceMeta = components["schemas"]["InvestmentResourceMetaDto"];
|
||||
|
||||
type Resource = {
|
||||
data: unknown;
|
||||
meta: components["schemas"]["InvestmentResourceMetaDto"];
|
||||
meta: InvestmentResourceMeta;
|
||||
};
|
||||
|
||||
function invalidateResourceAccess(
|
||||
@@ -183,4 +185,9 @@ function useResourceQuery<T extends Resource, E, K extends QueryKey>(
|
||||
};
|
||||
}
|
||||
|
||||
export { invalidateResourceAccess, unwrapResourceResult, useResourceQuery };
|
||||
export {
|
||||
invalidateResourceAccess,
|
||||
type InvestmentResourceMeta,
|
||||
unwrapResourceResult,
|
||||
useResourceQuery,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user