aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-02-08 17:39:39 -0300
committerSebastian <sebasjm@gmail.com>2023-02-08 17:39:39 -0300
commit603efbd073a2a9aa56f801fe57d13f060821b05d (patch)
tree9ca8367dbbe6e47b2a11ac67bbc2747298fcd255 /packages/merchant-backoffice-ui/src/paths/instance
parentbe01d1479cf650fe8eb0c8e567620abfa4544e1e (diff)
downloadwallet-core-603efbd073a2a9aa56f801fe57d13f060821b05d.tar.xz
use request api from web-util
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx9
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx5
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx5
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx9
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx10
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx3
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx5
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx1
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx4
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx16
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx8
18 files changed, 80 insertions, 51 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx
index 56d5c0755..8f7d9b136 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx
@@ -13,18 +13,19 @@
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
+import { HttpError } from "@gnu-taler/web-util/lib/index.browser.js";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../components/exception/loading.js";
import { DeleteModal } from "../../../components/modal/index.js";
import { useInstanceContext } from "../../../context/instance.js";
-import { HttpError } from "../../../utils/request.js";
+import { MerchantBackend } from "../../../declaration.js";
import { useInstanceAPI, useInstanceDetails } from "../../../hooks/instance.js";
import { DetailPage } from "./DetailPage.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onUpdate: () => void;
onNotFound: () => VNode;
onDelete: () => void;
@@ -63,7 +64,9 @@ export default function Detail({
try {
await deleteInstance();
onDelete();
- } catch (error) {}
+ } catch (error) {
+ //FIXME: show message error
+ }
setDeleting(false);
}}
/>
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
index 83af002b3..dba2aab21 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
@@ -19,15 +19,16 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
+import { HttpError } from "@gnu-taler/web-util/lib/index.browser.js";
import { h, VNode } from "preact";
import { Loading } from "../../../../components/exception/loading.js";
-import { HttpError } from "../../../../utils/request.js";
+import { MerchantBackend } from "../../../../declaration.js";
import { useInstanceKYCDetails } from "../../../../hooks/instance.js";
import { ListPage } from "./ListPage.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx
index 5c6293a81..a37df2176 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx
@@ -19,18 +19,17 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
+import { HttpError } from "@gnu-taler/web-util/lib/index.browser.js";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
import { MerchantBackend } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import { useInstanceDetails } from "../../../../hooks/instance.js";
import { useOrderAPI } from "../../../../hooks/order.js";
import { useInstanceProducts } from "../../../../hooks/product.js";
import { Notification } from "../../../../utils/types.js";
import { CreatePage } from "./CreatePage.js";
-import { OrderCreatedSuccessfully } from "./OrderCreatedSuccessfully.js";
export type Entity = {
request: MerchantBackend.Orders.PostOrderRequest;
@@ -41,7 +40,7 @@ interface Props {
onConfirm: () => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
}
export default function OrderCreate({
onConfirm,
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx
index 19aaddf50..986c46b95 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx
@@ -13,12 +13,15 @@
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ useTranslationContext,
+ HttpError,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
-import { HttpError } from "../../../../utils/request.js";
+import { MerchantBackend } from "../../../../declaration.js";
import { useOrderAPI, useOrderDetails } from "../../../../hooks/order.js";
import { Notification } from "../../../../utils/types.js";
import { DetailPage } from "./DetailPage.js";
@@ -29,7 +32,7 @@ export interface Props {
onBack: () => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
}
export default function Update({
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx
index 3744ce8c5..bd0924808 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx
@@ -19,13 +19,15 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
import { MerchantBackend } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import {
InstanceOrderFilter,
useInstanceOrders,
@@ -38,7 +40,7 @@ import { RefundModal } from "./Table.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
onSelect: (id: string) => void;
onCreate: () => void;
@@ -177,7 +179,7 @@ export default function OrderList({
interface RefundProps {
id: string;
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
onCancel: () => void;
onConfirm: (m: MerchantBackend.Orders.RefundRequest) => void;
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
index 25332acee..c32339563 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
@@ -19,13 +19,15 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import {
useInstanceProducts,
useProductAPI,
@@ -38,7 +40,7 @@ interface Props {
onNotFound: () => VNode;
onCreate: () => void;
onSelect: (id: string) => void;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
}
export default function ProductList({
onUnauthorized,
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx
index 5b19a7aa3..b35606f53 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx
@@ -19,13 +19,15 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
import { MerchantBackend } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import { useProductAPI, useProductDetails } from "../../../../hooks/product.js";
import { Notification } from "../../../../utils/types.js";
import { UpdatePage } from "./UpdatePage.js";
@@ -36,7 +38,7 @@ interface Props {
onConfirm: () => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
pid: string;
}
export default function UpdateProduct({
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx
index eeb59611c..c0c36e651 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx
@@ -30,8 +30,7 @@ import {
import { Input } from "../../../../components/form/Input.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { InputSelector } from "../../../../components/form/InputSelector.js";
-import { ExchangeBackend, MerchantBackend } from "../../../../declaration.js";
-// import { request } from "../../../../utils/request.js";
+import { MerchantBackend } from "../../../../declaration.js";
import {
PAYTO_WIRE_METHOD_LOOKUP,
URL_REGEX,
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx
index 57ee566d1..e7ec68fab 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx
@@ -19,9 +19,10 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
+import { HttpError } from "@gnu-taler/web-util/lib/index.browser.js";
import { Fragment, h, VNode } from "preact";
import { Loading } from "../../../../components/exception/loading.js";
-import { HttpError } from "../../../../utils/request.js";
+import { MerchantBackend } from "../../../../declaration.js";
import { useReserveDetails } from "../../../../hooks/reserves.js";
import { DetailPage } from "./DetailPage.js";
@@ -29,7 +30,7 @@ interface Props {
rid: string;
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
onDelete: () => void;
onBack: () => void;
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx
index 597bde167..e6c6abc23 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx
@@ -19,13 +19,15 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
import { MerchantBackend } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import {
useInstanceReserves,
useReservesAPI,
@@ -36,7 +38,7 @@ import { CardTable } from "./Table.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onSelect: (id: string) => void;
onNotFound: () => VNode;
onCreate: () => void;
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx
index 5fce3a819..0b7c191bd 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx
@@ -19,13 +19,15 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
import { MerchantBackend } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import {
useInstanceTemplates,
useTemplateAPI,
@@ -35,7 +37,7 @@ import { ListPage } from "./ListPage.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
onCreate: () => void;
onSelect: (id: string) => void;
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx
index 684ffd429..73489869b 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx
@@ -19,13 +19,15 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import {
useTemplateAPI,
useTemplateDetails,
@@ -40,7 +42,7 @@ interface Props {
onConfirm: () => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
tid: string;
}
export default function UpdateTemplate({
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx
index cbcadc608..13576d94d 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx
@@ -19,7 +19,6 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { h, VNode, FunctionalComponent } from "preact";
import { UsePage as TestedComponent } from "./UsePage.js";
export default {
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx
index fa9a98c6d..d5fa6d39d 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx
@@ -19,7 +19,10 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
@@ -29,7 +32,6 @@ import {
useTemplateAPI,
useTemplateDetails,
} from "../../../../hooks/templates.js";
-import { HttpError } from "../../../../utils/request.js";
import { Notification } from "../../../../utils/types.js";
import { UsePage } from "./UsePage.js";
@@ -39,7 +41,7 @@ interface Props {
onOrderCreated: (id: string) => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
tid: string;
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx
index 59b56a613..9f2b59efd 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx
@@ -19,18 +19,18 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
+import { HttpError } from "@gnu-taler/web-util/lib/index.browser.js";
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { MerchantBackend } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import { useInstanceDetails } from "../../../../hooks/instance.js";
import { useInstanceTransfers } from "../../../../hooks/transfer.js";
import { ListPage } from "./ListPage.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
onCreate: () => void;
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
index 02beb36f2..912393c7c 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
@@ -13,7 +13,11 @@
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ HttpResponse,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../components/exception/loading.js";
@@ -26,7 +30,6 @@ import {
useManagedInstanceDetails,
useManagementAPI,
} from "../../../hooks/instance.js";
-import { HttpError, HttpResponse } from "../../../utils/request.js";
import { Notification } from "../../../utils/types.js";
import { UpdatePage } from "./UpdatePage.js";
@@ -36,8 +39,8 @@ export interface Props {
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError) => VNode;
- onUpdateError: (e: HttpError) => void;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
+ onUpdateError: (e: HttpError<MerchantBackend.ErrorDetail>) => void;
}
export default function Update(props: Props): VNode {
@@ -63,7 +66,10 @@ function CommonUpdate(
onUpdateError,
onUnauthorized,
}: Props,
- result: HttpResponse<MerchantBackend.Instances.QueryInstancesResponse>,
+ result: HttpResponse<
+ MerchantBackend.Instances.QueryInstancesResponse,
+ MerchantBackend.ErrorDetail
+ >,
updateInstance: any,
clearToken: any,
setNewToken: any,
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx
index c5846e4db..670fc7218 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx
@@ -19,7 +19,10 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
@@ -29,13 +32,12 @@ import {
useInstanceWebhooks,
useWebhookAPI,
} from "../../../../hooks/webhooks.js";
-import { HttpError } from "../../../../utils/request.js";
import { Notification } from "../../../../utils/types.js";
import { ListPage } from "./ListPage.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
onCreate: () => void;
onSelect: (id: string) => void;
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx
index 3597fb849..b9a8674b3 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx
@@ -19,7 +19,10 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import {
+ HttpError,
+ useTranslationContext,
+} from "@gnu-taler/web-util/lib/index.browser";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
@@ -29,7 +32,6 @@ import {
useWebhookAPI,
useWebhookDetails,
} from "../../../../hooks/webhooks.js";
-import { HttpError } from "../../../../utils/request.js";
import { Notification } from "../../../../utils/types.js";
import { UpdatePage } from "./UpdatePage.js";
@@ -40,7 +42,7 @@ interface Props {
onConfirm: () => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
tid: string;
}
export default function UpdateWebhook({