@lmnto/h-mall-shared 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.css +457 -0
- package/bitbucket-pipelines.yml +223 -0
- package/package.json +43 -0
- package/public/gif/balloon.gif +0 -0
- package/public/gif/gift.gif +0 -0
- package/public/img/ai-dialog.png +0 -0
- package/public/img/ai-x1-banner.png +0 -0
- package/public/img/ai-x1.png +0 -0
- package/public/img/alert-Icon.png +0 -0
- package/public/img/aleta-payment-kyc-require.png +0 -0
- package/public/img/aleta-payment-pending.png +0 -0
- package/public/img/aleta-payment-rejected.png +0 -0
- package/public/img/aleta-payment-subscription-required.png +0 -0
- package/public/img/boost-banner-bg.png +0 -0
- package/public/img/boost-banner-right.png +0 -0
- package/public/img/boost-banner.png +0 -0
- package/public/img/boost-dialog-bg.png +0 -0
- package/public/img/boostPower.png +0 -0
- package/public/img/boostTooltip.png +0 -0
- package/public/img/brand-icon.svg +23 -0
- package/public/img/brand-text.svg +11 -0
- package/public/img/card-icon.png +0 -0
- package/public/img/cashback-Icon.png +0 -0
- package/public/img/crown.svg +9 -0
- package/public/img/empty-box.png +0 -0
- package/public/img/gen3-dialog.png +0 -0
- package/public/img/gen3-home-banner-bg.png +0 -0
- package/public/img/gen3-image.png +0 -0
- package/public/img/gift.png +0 -0
- package/public/img/img-placeholder-illustration.svg +6 -0
- package/public/img/logo.svg +31 -0
- package/public/img/offerBanner.png +0 -0
- package/public/img/pagenotfound.png +0 -0
- package/public/img/partial-pay-payment-successful.png +0 -0
- package/public/img/phoneShippingBG.png +0 -0
- package/public/img/placeholder-image.jpg +0 -0
- package/public/img/powerIcon.png +0 -0
- package/public/img/product-01.png +0 -0
- package/public/img/product-02.jpg +0 -0
- package/public/img/product-03.jpg +0 -0
- package/public/img/product-04.jpg +0 -0
- package/public/img/product-05.png +0 -0
- package/public/img/product-06.png +0 -0
- package/public/img/profile-avatar.svg +12 -0
- package/public/img/promotion-icon.png +0 -0
- package/public/img/session-expired.png +0 -0
- package/public/img/shipping-alert-icon.png +0 -0
- package/public/img/shippingIcon.png +0 -0
- package/public/img/smart-pay-banner-how.png +0 -0
- package/public/img/smart-pay-banner-own.png +0 -0
- package/public/img/smart-pay-chose.png +0 -0
- package/public/img/smart-pay-easy.png +0 -0
- package/public/img/smart-pay-payment.png +0 -0
- package/public/img/smart-plan-fire.gif +0 -0
- package/public/img/smart-plan-sparkle.gif +0 -0
- package/public/img/special.png +0 -0
- package/public/img/specialOfferBg.png +0 -0
- package/public/img/stop-shipping-banner.png +0 -0
- package/public/img/subscriptionBanner.png +0 -0
- package/public/img/subscriptionIcon.png +0 -0
- package/public/img/successIcon.png +0 -0
- package/public/img/wallet-icon.png +0 -0
- package/public/img/world-wide-shipping.png +0 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/shared/components/AddressFormComponent.tsx +215 -0
- package/shared/components/AddressShippingFormComponent.tsx +223 -0
- package/shared/components/AiPaymentDialog.tsx +95 -0
- package/shared/components/AppLoadingComponent.tsx +15 -0
- package/shared/components/AppLoadingComponentV2.tsx +18 -0
- package/shared/components/Button.tsx +48 -0
- package/shared/components/BuySubscriptionDialog.tsx +75 -0
- package/shared/components/CartDrawerComponent.tsx +324 -0
- package/shared/components/CashbackComponent.tsx +48 -0
- package/shared/components/CashbackMigrationComponent.tsx +41 -0
- package/shared/components/CommissionNonEligibleComponent.tsx +27 -0
- package/shared/components/CustomNextImage.tsx +50 -0
- package/shared/components/CustomNextLink.tsx +46 -0
- package/shared/components/EditAddressFormComponent.tsx +254 -0
- package/shared/components/EmptyCartMessageComponent.tsx +25 -0
- package/shared/components/EmptyCartMessageForCartPage.tsx +61 -0
- package/shared/components/EmptyLegacyOrderMessageForOrdersPage.tsx +52 -0
- package/shared/components/EmptyOrderMessageForOrdersPage.tsx +62 -0
- package/shared/components/EmptyOrderMessageForShippingOrdersPage.tsx +62 -0
- package/shared/components/Footer.tsx +71 -0
- package/shared/components/GreetingDialog.tsx +96 -0
- package/shared/components/Header.tsx +106 -0
- package/shared/components/HoldShippingDialog.tsx +165 -0
- package/shared/components/HomeBanners.tsx +298 -0
- package/shared/components/InactiveCartDialog.tsx +69 -0
- package/shared/components/InputCartQuantity.tsx +342 -0
- package/shared/components/Inputfield.tsx +110 -0
- package/shared/components/ListItemComponent.tsx +82 -0
- package/shared/components/LoadingIconComponent.tsx +284 -0
- package/shared/components/OrderNotFoundComponent.tsx +56 -0
- package/shared/components/PageHeader.tsx +42 -0
- package/shared/components/PhoneNumberCountries.tsx +133 -0
- package/shared/components/PhoneShippingDialog.tsx +77 -0
- package/shared/components/PickupDialog.tsx +92 -0
- package/shared/components/ProductNotFoundComponent.tsx +56 -0
- package/shared/components/ProductPriceComponent.tsx +32 -0
- package/shared/components/ProfileMenu.tsx +120 -0
- package/shared/components/RequestCreditNoteInvoiceDialog.tsx +214 -0
- package/shared/components/RequestInvoiceDialog.tsx +194 -0
- package/shared/components/SelectCities.tsx +133 -0
- package/shared/components/SelectComponent.tsx +334 -0
- package/shared/components/SelectCountries.tsx +179 -0
- package/shared/components/SelectPickUpStore.tsx +131 -0
- package/shared/components/SelectStates.tsx +144 -0
- package/shared/components/ServerTime.tsx +68 -0
- package/shared/components/SessionDialogComponent.tsx +60 -0
- package/shared/components/ShippingAddressFormDialogComponent.tsx +51 -0
- package/shared/components/Sidebar.tsx +281 -0
- package/shared/components/SpecialOfferDialog.tsx +193 -0
- package/shared/components/StatusComponents.tsx +25 -0
- package/shared/components/StepperComponent.tsx +79 -0
- package/shared/components/StepperSmartPayComponent.tsx +97 -0
- package/shared/components/SubscriptionPurchaseDialogComponent.tsx +81 -0
- package/shared/components/TableComponent.tsx +144 -0
- package/shared/components/TablePaginationComponent.tsx +151 -0
- package/shared/components/aleta/AletaManagerComponent.tsx +52 -0
- package/shared/components/aleta/KycPendingStatus.tsx +33 -0
- package/shared/components/aleta/KycRejectedStatus.tsx +53 -0
- package/shared/components/aleta/KycRequiredStatus.tsx +53 -0
- package/shared/components/aleta/SubscriptionRequiredStatus.tsx +45 -0
- package/shared/components/icons/AletaWalletIcon.tsx +21 -0
- package/shared/components/icons/BrandIcon.tsx +97 -0
- package/shared/components/icons/BrandText.tsx +47 -0
- package/shared/components/icons/CartIcon.tsx +21 -0
- package/shared/components/icons/DoneIcon.tsx +27 -0
- package/shared/components/icons/HomnifiIcon.tsx +23 -0
- package/shared/components/icons/InfoIcon.tsx +16 -0
- package/shared/components/icons/SmartPayProductIcon.tsx +31 -0
- package/shared/components/payments/DisclaimerAlertDialog.tsx +205 -0
- package/shared/components/payments/EmptyAssets.tsx +23 -0
- package/shared/components/payments/PaybyWalletItemComponent.tsx +116 -0
- package/shared/components/payments/PaymentAssetItemComponent.tsx +101 -0
- package/shared/components/payments/RequestProcessingDialog.tsx +123 -0
- package/shared/components/payments/WalletSectionManager.tsx +82 -0
- package/shared/components/payments/WalletSliderComponent.tsx +326 -0
- package/shared/components/payments/WalletTermsAndConditionComponent.tsx +88 -0
- package/shared/constants/address-shipping.schema.ts +56 -0
- package/shared/constants/address.schema.ts +56 -0
- package/shared/constants/app.ts +323 -0
- package/shared/constants/environment.ts +23 -0
- package/shared/constants/feature-flags.ts +15 -0
- package/shared/constants/query-keys.ts +106 -0
- package/shared/constants/routes.ts +41 -0
- package/shared/constants/socket.ts +15 -0
- package/shared/contexts/HomeProductsContext.tsx +51 -0
- package/shared/contexts/MainWrapperContext.tsx +289 -0
- package/shared/contexts/WebSocketContext.tsx +155 -0
- package/shared/hooks/useAddressForm.ts +169 -0
- package/shared/hooks/useAddresses.ts +28 -0
- package/shared/hooks/useAppForm.ts +39 -0
- package/shared/hooks/useCart.ts +207 -0
- package/shared/hooks/useCopy.ts +45 -0
- package/shared/hooks/useCountries.ts +27 -0
- package/shared/hooks/useCustomRouter.ts +51 -0
- package/shared/hooks/useDebounce.ts +21 -0
- package/shared/hooks/useInvoice.ts +41 -0
- package/shared/hooks/useOnlineUser.ts +38 -0
- package/shared/hooks/usePayments.ts +101 -0
- package/shared/hooks/useShippingAddressForm.ts +70 -0
- package/shared/hooks/useShippingAddresses.ts +33 -0
- package/shared/hooks/useStores.ts +29 -0
- package/shared/hooks/useUserActivity.ts +43 -0
- package/shared/i18n/client.ts +27 -0
- package/shared/i18n/locales/en.ts +383 -0
- package/shared/i18n/locales/it.ts +373 -0
- package/shared/i18n/server.ts +7 -0
- package/shared/services/addresses.service.ts +27 -0
- package/shared/services/api/core/ApiError.ts +29 -0
- package/shared/services/api/core/ApiRequestOptions.ts +25 -0
- package/shared/services/api/core/ApiResult.ts +11 -0
- package/shared/services/api/core/CancelablePromise.ts +130 -0
- package/shared/services/api/core/OpenAPI.ts +37 -0
- package/shared/services/api/core/request.ts +376 -0
- package/shared/services/api/index.ts +64 -0
- package/shared/services/api/models/AddAllProductToShippingCartDto.ts +7 -0
- package/shared/services/api/models/AddProductToCartDto.ts +8 -0
- package/shared/services/api/models/AddProductToShippingCartDto.ts +8 -0
- package/shared/services/api/models/AdminPlaceOrderDto.ts +16 -0
- package/shared/services/api/models/AssignPickupSerialNumberDto.ts +10 -0
- package/shared/services/api/models/CreateUserAddressDto.ts +19 -0
- package/shared/services/api/models/DeletCartProductsArrayDto.ts +7 -0
- package/shared/services/api/models/GenerateInvoiceDto.ts +7 -0
- package/shared/services/api/models/OrderConfirmationEmailDto.ts +8 -0
- package/shared/services/api/models/PlaceOrderDto.ts +9 -0
- package/shared/services/api/models/PlaceShipmentOrderDto.ts +8 -0
- package/shared/services/api/models/ProductBoostDto.ts +18 -0
- package/shared/services/api/models/RemoveAssignedSerialNumberDto.ts +9 -0
- package/shared/services/api/models/RemoveProductToCartDto.ts +8 -0
- package/shared/services/api/models/ShipmentItem.ts +8 -0
- package/shared/services/api/models/ShippingCartUpdateBillingAddressesDto.ts +7 -0
- package/shared/services/api/models/ShippingCartUpdateShippingMethodDto.ts +7 -0
- package/shared/services/api/models/UnfreezeWalletDto.ts +8 -0
- package/shared/services/api/models/UpdateCartBillingAddressesDto.ts +7 -0
- package/shared/services/api/models/UpdateCartPaymentMethodDto.ts +9 -0
- package/shared/services/api/models/UpdateCartShippingMethodDto.ts +7 -0
- package/shared/services/api/models/UpdateCartStoreDto.ts +7 -0
- package/shared/services/api/models/UpdateProductDto.ts +11 -0
- package/shared/services/api/models/UpdateShipmentItemStatusDto.ts +24 -0
- package/shared/services/api/models/UpdateShippingCartPaymentMethodDto.ts +9 -0
- package/shared/services/api/models/UpdateUserAddressDto.ts +19 -0
- package/shared/services/api/models/ValidateAuthCodeDto.ts +8 -0
- package/shared/services/api/models/WithdrawOrderWalletDto.ts +8 -0
- package/shared/services/api/services/AddressesService.ts +160 -0
- package/shared/services/api/services/AdminsDevicesService.ts +28 -0
- package/shared/services/api/services/AdminsOrdersService.ts +117 -0
- package/shared/services/api/services/AdminsPickupsService.ts +57 -0
- package/shared/services/api/services/AdminsProductsService.ts +86 -0
- package/shared/services/api/services/CartsService.ts +190 -0
- package/shared/services/api/services/CashBackQueueService.ts +39 -0
- package/shared/services/api/services/CategoriesService.ts +65 -0
- package/shared/services/api/services/DefaultService.ts +19 -0
- package/shared/services/api/services/FeaturesFlagsService.ts +20 -0
- package/shared/services/api/services/IossQueueService.ts +39 -0
- package/shared/services/api/services/OrderCallbackService.ts +67 -0
- package/shared/services/api/services/OrderEmailsService.ts +40 -0
- package/shared/services/api/services/OrderImportService.ts +228 -0
- package/shared/services/api/services/OrdersService.ts +183 -0
- package/shared/services/api/services/PaymentGatewayService.ts +19 -0
- package/shared/services/api/services/PaymentsService.ts +88 -0
- package/shared/services/api/services/ProductsService.ts +67 -0
- package/shared/services/api/services/ShipmentOrderCallbackService.ts +67 -0
- package/shared/services/api/services/ShipmentOrdersService.ts +88 -0
- package/shared/services/api/services/ShipmentsService.ts +30 -0
- package/shared/services/api/services/ShippingCartService.ts +247 -0
- package/shared/services/api/services/ShippingMethodsService.ts +20 -0
- package/shared/services/api/services/StoresService.ts +25 -0
- package/shared/services/api/services/SyncServiceQueueService.ts +39 -0
- package/shared/services/api/services/UpgradeOrdersService.ts +26 -0
- package/shared/services/api/services/UsersAuthService.ts +45 -0
- package/shared/services/api/services/UsersService.ts +53 -0
- package/shared/services/api/services/XeraQueueService.ts +39 -0
- package/shared/services/index.ts +0 -0
- package/shared/services/payment-method.service.ts +29 -0
- package/shared/stores/cartStore.ts +108 -0
- package/shared/stores/countriesStore.ts +62 -0
- package/shared/stores/formStore.ts +19 -0
- package/shared/stores/loadingStore.ts +12 -0
- package/shared/stores/userStore.ts +32 -0
- package/shared/types/SelectComponent.types.ts +31 -0
- package/shared/types/addressForm.ts +27 -0
- package/shared/types/cart.ts +208 -0
- package/shared/types/category.ts +6 -0
- package/shared/types/creditNote.ts +0 -0
- package/shared/types/feature-flags.ts +5 -0
- package/shared/types/icon.ts +5 -0
- package/shared/types/index.d.ts +84 -0
- package/shared/types/order.ts +332 -0
- package/shared/types/pagination.ts +5 -0
- package/shared/types/payments.ts +68 -0
- package/shared/types/product.ts +54 -0
- package/shared/types/shoppingCart.ts +219 -0
- package/shared/types/upgradeCart.ts +226 -0
- package/shared/types/user.ts +36 -0
- package/shared/utils/app.util.ts +261 -0
- package/shared/utils/notifications.util.ts +39 -0
- package/shared/utils/user-session.util.ts +171 -0
- package/tailwind.config.ts +234 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
signIn: {
|
|
3
|
+
title: "Accedi con SSO/SAML",
|
|
4
|
+
subTitle:
|
|
5
|
+
"Questo workspace ti permette di accedere con il tuo account Nodelink. Accedi con Nodelink",
|
|
6
|
+
signInBtn: "Accedi con Nodelink",
|
|
7
|
+
errorMsg: "Si è verificato un errore. Riprova più tardi",
|
|
8
|
+
loadingMsg: "Attendi...",
|
|
9
|
+
},
|
|
10
|
+
paymentConfimation: {
|
|
11
|
+
title: "Si è verificato un errore durante l'ordine",
|
|
12
|
+
subTitle: "Chiudi questa scheda e torna al pagamento",
|
|
13
|
+
redirectBtn: "Vai alla pagina degli ordini",
|
|
14
|
+
},
|
|
15
|
+
profile: {
|
|
16
|
+
title: "Il mio profilo",
|
|
17
|
+
email: "Indirizzo email",
|
|
18
|
+
userName: "Nome utente",
|
|
19
|
+
phone: "Numero di telefono",
|
|
20
|
+
profileInformationHeader: "Informazioni sul profilo",
|
|
21
|
+
allAddressesHeader: "Tutti gli Indirizzi",
|
|
22
|
+
billingAddresses: "Indirizzi di Fatturazione",
|
|
23
|
+
shippingAddresses: "Indirizzi di Spedizione",
|
|
24
|
+
memberShipStatus: "Stato dell'abbonamento",
|
|
25
|
+
expirationDate: "Data di scadenza",
|
|
26
|
+
userType: "Tipo di utente",
|
|
27
|
+
active: "Attivo",
|
|
28
|
+
inactive: "Inattivo",
|
|
29
|
+
memberShipInformationHeader: "Informazioni sull'abbonamento",
|
|
30
|
+
authentication: "Autenticazione",
|
|
31
|
+
profileRedirectBtn: "Torna a Nodelink",
|
|
32
|
+
},
|
|
33
|
+
sideBarMenu: {
|
|
34
|
+
products: "Prodotti",
|
|
35
|
+
myCart: "Il mio carrello",
|
|
36
|
+
orderHistory: "Cronologia ordini",
|
|
37
|
+
shippingOrderHistory: "Cronologia delle spedizioni",
|
|
38
|
+
legacyOrderHistory: "Cronologia Ordini Legacy",
|
|
39
|
+
profile: "Profilo",
|
|
40
|
+
wiki: "Wiki",
|
|
41
|
+
support: "Supporto",
|
|
42
|
+
navigation: "Navigazione",
|
|
43
|
+
logout: "Esci",
|
|
44
|
+
},
|
|
45
|
+
products: {
|
|
46
|
+
purchaseLimitComponent: {
|
|
47
|
+
maxPurchaseLimit: "Limite massimo di acquisto",
|
|
48
|
+
alreadyPurchased: "Quantità già acquistata",
|
|
49
|
+
qtyInCart: "Quantità già nel carrello",
|
|
50
|
+
},
|
|
51
|
+
subscriptionBanner: {
|
|
52
|
+
welcome: "Benvenuto!",
|
|
53
|
+
welcomeBack: "Bentornato!",
|
|
54
|
+
activeSubscription:
|
|
55
|
+
"Il tuo abbonamento è attivo e sei pronto a continuare a goderti contenuti esclusivi. Immergiti ed esplora nuove funzionalità e aggiornamenti ora!",
|
|
56
|
+
inactiveSubscription:
|
|
57
|
+
"Sblocca vantaggi esclusivi rinnovando il tuo abbonamento oggi",
|
|
58
|
+
buySubscriptionBtn: "Acquista abbonamento",
|
|
59
|
+
},
|
|
60
|
+
quantityComponent: {
|
|
61
|
+
quantity: "Quantità",
|
|
62
|
+
},
|
|
63
|
+
productSummaryComponent: {
|
|
64
|
+
addToCartError: "Impossibile aggiungere il prodotto al carrello",
|
|
65
|
+
category: "Categoria",
|
|
66
|
+
addToCartBtn: "Aggiungi al carrello",
|
|
67
|
+
addedToCartBtn: "Aggiunto al carrello",
|
|
68
|
+
buyNowBtn: "Acquista ora",
|
|
69
|
+
|
|
70
|
+
originalPrice: "Prezzo originale",
|
|
71
|
+
remaining80: "Pagamento rimanente dell’80% del dispositivo informatico",
|
|
72
|
+
deductedFuture: "Detratto dalle future ricompense giornaliere",
|
|
73
|
+
smartPlanBreakdown: "Dettaglio del piano SmartPay",
|
|
74
|
+
cost20: "Costo del dispositivo informatico (20%):",
|
|
75
|
+
cost20Tooltip:
|
|
76
|
+
"Paga questo costo iniziale per ricevere immediatamente un airdrop di LYK equivalente al valore del token Utility una volta completato l’ordine.",
|
|
77
|
+
utilityToken: "Token Utility:",
|
|
78
|
+
estimatedDeliveryFee: "Costo di consegna stimato:",
|
|
79
|
+
estimatedDeliveryFeeTooltip:
|
|
80
|
+
"Questo importo può variare in base alla modalità di consegna scelta durante il checkout",
|
|
81
|
+
totalDueToday: "Totale da pagare oggi:",
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
productCategoriesComponent: {
|
|
85
|
+
title: "Categoria prodotto",
|
|
86
|
+
allProducts: "Tutti i prodotti",
|
|
87
|
+
notFound: "Nessuna categoria trovata",
|
|
88
|
+
},
|
|
89
|
+
productBenefitsComponent: {
|
|
90
|
+
benefitsTitle: "Benefici",
|
|
91
|
+
descriptionTitle: "Descrizione",
|
|
92
|
+
keyFeaturesTitle: "Caratteristiche principali",
|
|
93
|
+
specificationsTitle: "Specifiche",
|
|
94
|
+
function: "Funzione",
|
|
95
|
+
name: "Nome",
|
|
96
|
+
specificationDescription: "Descrizione della specifica",
|
|
97
|
+
mark: "Marca",
|
|
98
|
+
},
|
|
99
|
+
breadcrumbsComponent: {
|
|
100
|
+
shop: "Negozio",
|
|
101
|
+
allProducts: "Tutti i prodotti",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
orders: {
|
|
105
|
+
title: "I miei ordini",
|
|
106
|
+
choseProductToProceed: "Scegli i prodotti per procedere",
|
|
107
|
+
followingProductMigrated:
|
|
108
|
+
"I dispositivi Gen2 seguenti saranno migrati a Gen3",
|
|
109
|
+
buyGen3Extensions: "Acquista estensioni Gen3",
|
|
110
|
+
followingProductMigratedNote:
|
|
111
|
+
"Nota: Tutti i dispositivi Gen2 idonei in questo ordine devono essere migrati insieme.",
|
|
112
|
+
alreadyHaveShippingOrder:
|
|
113
|
+
"Oops! Il tuo primo ordine di spedizione è ancora in stato di attesa! Ti preghiamo di attendere che venga completato prima di effettuare un altro ordine di spedizione.",
|
|
114
|
+
upgradeYourMachine: "AGGIORNA IL TUO SOFTWARE!",
|
|
115
|
+
selectEligibleItem: "Seleziona gli articoli idonei",
|
|
116
|
+
},
|
|
117
|
+
order: {
|
|
118
|
+
orderId: "ID ordine",
|
|
119
|
+
placedOn: "Ordinato il",
|
|
120
|
+
itemsTitle: "Articoli ordinati",
|
|
121
|
+
boostedMintingSuccess:
|
|
122
|
+
"Hai ottenuto la potenza di coniazione potenziata di",
|
|
123
|
+
subTotal: "Totale parziale",
|
|
124
|
+
shippingTotal: "Tassa di spedizione",
|
|
125
|
+
oneCare: "Un Cura",
|
|
126
|
+
items: "articoli",
|
|
127
|
+
grandTotal: "Totale generale",
|
|
128
|
+
goToLegacyOrder: `Vai all'ordine Legacy`,
|
|
129
|
+
goToMainOrder: "Vai all'ordine principale",
|
|
130
|
+
billingAddressComponent: {
|
|
131
|
+
contactInfo: "Informazioni di contatto",
|
|
132
|
+
mobileNumber: "Numero di cellulare",
|
|
133
|
+
emailInfo: "Informazioni sull'email",
|
|
134
|
+
email: "Email",
|
|
135
|
+
paymentInfo: "Informazioni di pagamento",
|
|
136
|
+
paymentType: "Tipo di pagamento",
|
|
137
|
+
billingAddressTitle: "Indirizzo di fatturazione",
|
|
138
|
+
shippingAddressTitle: "Indirizzo di spedizione",
|
|
139
|
+
pickupAddress: "Indirizzo di ritiro",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
cart: {
|
|
143
|
+
backBtn: "Indietro",
|
|
144
|
+
loading: "Caricamento carrello...",
|
|
145
|
+
title: "Carrello",
|
|
146
|
+
checkoutNowBtn: "Procedi al checkout",
|
|
147
|
+
removeBtn: "Rimuovi",
|
|
148
|
+
discountApplied: "Sconto Applicato",
|
|
149
|
+
proceed: "Procedi",
|
|
150
|
+
cartInactive: "Carrello inattivo",
|
|
151
|
+
cartInactiveSummery:
|
|
152
|
+
"Il tuo carrello è stato aggiornato per riflettere la disponibilità e i prezzi più recenti dei prodotti. Ti preghiamo di controllare il carrello prima di procedere al pagamento.",
|
|
153
|
+
cartInactiveAction: "Aggiorna carrello",
|
|
154
|
+
|
|
155
|
+
cartShippingInactive: "Carrello di spedizione inattivo",
|
|
156
|
+
cartShippingInactiveSummery:
|
|
157
|
+
"Il tuo carrello di spedizione è stato aggiornato per riflettere la disponibilità e i prezzi più recenti dei prodotti. Ti invitiamo a rivedere il carrello di spedizione prima di procedere al checkout.",
|
|
158
|
+
cartShippingInactiveAction: "Aggiorna carrello di spedizione",
|
|
159
|
+
|
|
160
|
+
tableItemsComponent: {
|
|
161
|
+
category: "Categoria",
|
|
162
|
+
maxPurchaseLimit: "Limite massimo di acquisto",
|
|
163
|
+
alreadyPurchased: "Quantità già acquistata",
|
|
164
|
+
},
|
|
165
|
+
orderSummaryComponent: {
|
|
166
|
+
title: "Riepilogo ordine",
|
|
167
|
+
editBtn: "Modifica",
|
|
168
|
+
category: "Categoria",
|
|
169
|
+
subTotal: "Totale parziale",
|
|
170
|
+
shippingTotal: "Tassa di spedizione",
|
|
171
|
+
loading: "Caricamento...",
|
|
172
|
+
grandTotal: "Totale generale",
|
|
173
|
+
continueShoppingBtn: "Continua lo shopping",
|
|
174
|
+
},
|
|
175
|
+
shippingOrderSummaryComponent: {
|
|
176
|
+
title: "Riepilogo della Spedizione",
|
|
177
|
+
},
|
|
178
|
+
upgradeOrderSummaryComponent: {
|
|
179
|
+
title: "Riepilogo Upgrade",
|
|
180
|
+
},
|
|
181
|
+
migrationOrderSummaryComponent: {
|
|
182
|
+
title: "Riepilogo Migrazione",
|
|
183
|
+
titleExtensions: "Riepilogo Estensioni",
|
|
184
|
+
},
|
|
185
|
+
initiateDelivery: {
|
|
186
|
+
shippingMethod: {
|
|
187
|
+
billingAddress: "Indirizzo di fatturazione",
|
|
188
|
+
addNewBillingAddress: "Aggiungi un nuovo indirizzo di fatturazione",
|
|
189
|
+
shippingAddress: "Indirizzo di spedizione",
|
|
190
|
+
sameAsBillingAddress: "Uguale all'indirizzo di fatturazione",
|
|
191
|
+
addNewShippingAddress: "Aggiungi un nuovo indirizzo di spedizione",
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
sharedComponents: {
|
|
196
|
+
addressFormComponent: {
|
|
197
|
+
firstName: "Nome",
|
|
198
|
+
lastName: "Cognome",
|
|
199
|
+
address: "Indirizzo",
|
|
200
|
+
flatHouseBuilding: "Appartamento, Casa n. (Opzionale)",
|
|
201
|
+
selectCountry: "Seleziona Paese",
|
|
202
|
+
state: "Stato/Regione",
|
|
203
|
+
city: "Città",
|
|
204
|
+
zipCode: "Codice postale",
|
|
205
|
+
submitBtn: "Aggiungi indirizzo",
|
|
206
|
+
},
|
|
207
|
+
buySubscriptionComponent: {
|
|
208
|
+
header: "Abbonamento primo acquisto",
|
|
209
|
+
description:
|
|
210
|
+
"Si prega di notare che l'abbonamento è obbligatorio per acquistare qualsiasi prodotto del dispositivo informatico. Questo articolo non può essere rimosso dal carrello.",
|
|
211
|
+
descriptionSummery: `Si prega di notare che l'abbonamento è obbligatorio per continuare.`,
|
|
212
|
+
|
|
213
|
+
redirectBtn: "Acquista abbonamento",
|
|
214
|
+
},
|
|
215
|
+
cartDrawerComponent: {
|
|
216
|
+
category: "Categoria",
|
|
217
|
+
maxPurchaseLimit: "Limite massimo di acquisto",
|
|
218
|
+
alreadyPurchased: "Quantità già acquistata",
|
|
219
|
+
title: "Il mio carrello",
|
|
220
|
+
grandTotal: "Totale generale",
|
|
221
|
+
subTotal: "Totale parziale",
|
|
222
|
+
checkoutNowBtn: "Procedi al checkout",
|
|
223
|
+
},
|
|
224
|
+
emptyCartMessageComponent: {
|
|
225
|
+
title: "Non hai ancora aggiunto nulla!",
|
|
226
|
+
},
|
|
227
|
+
emptyCartMessageForCartPage: {
|
|
228
|
+
title: "Il tuo carrello è attualmente vuoto",
|
|
229
|
+
subTitle: "Non hai ancora aggiunto nulla!",
|
|
230
|
+
message: "Aggiungi articoli al tuo carrello per iniziare lo shopping!",
|
|
231
|
+
redirectBtn: "Inizia lo shopping",
|
|
232
|
+
},
|
|
233
|
+
emptyAssets: {
|
|
234
|
+
title: "Nessun Bene",
|
|
235
|
+
message: "Non ci sono beni per questo metodo.",
|
|
236
|
+
},
|
|
237
|
+
emptyOrderMessageForOrdersPage: {
|
|
238
|
+
title: "La cronologia dei tuoi ordini è attualmente vuota",
|
|
239
|
+
subTitle: "Non hai ancora acquistato nulla.",
|
|
240
|
+
message: "Aggiungi articoli al tuo carrello per iniziare lo shopping!",
|
|
241
|
+
redirectBtn: "Inizia lo shopping",
|
|
242
|
+
},
|
|
243
|
+
emptyLegacyOrderMessageForOrdersPage: {
|
|
244
|
+
title: "La tua cronologia degli ordini legacy è attualmente vuota",
|
|
245
|
+
subTitle: `Si prega di visitare`,
|
|
246
|
+
linkText: ` questo link `,
|
|
247
|
+
message: "per ottenere maggiori dettagli.",
|
|
248
|
+
redirectBtn: "Inizia a fare acquisti",
|
|
249
|
+
},
|
|
250
|
+
emptyOrderMessageForShippingOrdersPage: {
|
|
251
|
+
title: "La tua cronologia degli ordini di spedizione è attualmente vuota",
|
|
252
|
+
subTitle: "Non hai ancora avviato alcun ordine di spedizione.",
|
|
253
|
+
message: "avvia una spedizione!",
|
|
254
|
+
redirectBtn: "Cronologia ordini",
|
|
255
|
+
},
|
|
256
|
+
footerComponent: {
|
|
257
|
+
termsAndC: "Termini e condizioni",
|
|
258
|
+
privacy: "Informativa sulla privacy e sui cookie",
|
|
259
|
+
risk: "Divulgazione del rischio",
|
|
260
|
+
},
|
|
261
|
+
headerComponent: {
|
|
262
|
+
title: "Bentornato",
|
|
263
|
+
},
|
|
264
|
+
orderNotFoundComponent: {
|
|
265
|
+
title: "L'ordine richiesto non è stato trovato",
|
|
266
|
+
message: "Torna alla cronologia degli ordini!",
|
|
267
|
+
redirectBtn: "Visualizza tutti gli ordini",
|
|
268
|
+
},
|
|
269
|
+
phoneNumberComponent: {
|
|
270
|
+
title: "Numero di cellulare",
|
|
271
|
+
},
|
|
272
|
+
productNotFoundComponent: {
|
|
273
|
+
title: "Il prodotto richiesto non è stato trovato",
|
|
274
|
+
message: "Torna alla cronologia dei prodotti!",
|
|
275
|
+
redirectBtn: "Visualizza tutti i prodotti",
|
|
276
|
+
},
|
|
277
|
+
profileMenuComponent: {
|
|
278
|
+
nodeLinkRedirectionLink: "Vai a Nodelink",
|
|
279
|
+
logout: "Esci",
|
|
280
|
+
},
|
|
281
|
+
serverTime: {
|
|
282
|
+
title: "Ora del server",
|
|
283
|
+
},
|
|
284
|
+
sessionDialogComponent: {
|
|
285
|
+
header: "Oops, la tua sessione è scaduta!",
|
|
286
|
+
message:
|
|
287
|
+
"Sembra che tu sia stato via per un po' di tempo. Per mantenere sicuro il tuo account, ti abbiamo disconnesso. Fai clic qui sotto per accedere nuovamente.",
|
|
288
|
+
redirectBtn: "Accedi nuovamente",
|
|
289
|
+
},
|
|
290
|
+
cartStepperComponent: {
|
|
291
|
+
first: "Carrello",
|
|
292
|
+
second: "Checkout",
|
|
293
|
+
third: "Pagamento",
|
|
294
|
+
productPayment: "Pagamento del Prodotto",
|
|
295
|
+
four: "Conferma ordine",
|
|
296
|
+
|
|
297
|
+
review: "Recensione",
|
|
298
|
+
deliveryPayment: "Pagamento alla consegna",
|
|
299
|
+
},
|
|
300
|
+
commissionNonEligibleComponent: {
|
|
301
|
+
message: "Il prodotto non è applicabile per i punti CV e VP.",
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
payment: {
|
|
305
|
+
loading: "Caricamento carrello",
|
|
306
|
+
paymentMethod: "Metodo di pagamento",
|
|
307
|
+
payByCard: "Paga con carta",
|
|
308
|
+
payByHomnifi: "Paga con portafoglio Nodelink",
|
|
309
|
+
proceedBtn: "Procedi al pagamento",
|
|
310
|
+
walletTermsAndConditionComponent: {
|
|
311
|
+
consentAcceptedMsg: "Consenso accettato con successo!",
|
|
312
|
+
consentErrorMsg: "Si è verificato un errore. Riprova più tardi.",
|
|
313
|
+
consentClickMsg: "Cliccando su questo, accetto il",
|
|
314
|
+
termsAndC: "Termini e Condizioni",
|
|
315
|
+
and: "e",
|
|
316
|
+
privacyP: "Informativa sulla privacy",
|
|
317
|
+
importBtn: "Importa Portafoglio Nodelink",
|
|
318
|
+
},
|
|
319
|
+
walletSliderComponent: {
|
|
320
|
+
backBtn: "Indietro",
|
|
321
|
+
amount: "Importo",
|
|
322
|
+
avlBalance: "Saldo disponibile",
|
|
323
|
+
grandTotal: "Totale",
|
|
324
|
+
insufficientBalance: "Saldo insufficiente per",
|
|
325
|
+
depositBtn: "Deposita ora",
|
|
326
|
+
},
|
|
327
|
+
requestProcessingDialog: {
|
|
328
|
+
title: "Elaborazione della tua richiesta",
|
|
329
|
+
subTitle: "Attendi! mentre elaboriamo il tuo ordine.",
|
|
330
|
+
message:
|
|
331
|
+
"Un momento! Si prega di non aggiornare la pagina mentre completiamo il tuo ordine.",
|
|
332
|
+
orderId: "ID Ordine",
|
|
333
|
+
errorMsg: "Si è verificato un errore durante il processo",
|
|
334
|
+
retryBtn: "Clicca qui per riprovare",
|
|
335
|
+
},
|
|
336
|
+
paybyWalletItemComponent: {
|
|
337
|
+
insufficientBalanceMsg:
|
|
338
|
+
"Saldo del portafoglio insufficiente. Si prega di ricaricare.",
|
|
339
|
+
avlBalance: "Saldo disponibile",
|
|
340
|
+
},
|
|
341
|
+
disclaimerAlertDialog: {
|
|
342
|
+
header: "Avviso di esclusione di responsabilità",
|
|
343
|
+
acceptCheckboxPrivacy: "Ho letto e accetto l'adesione",
|
|
344
|
+
privacyP: "informativa sulla privacy",
|
|
345
|
+
acceptCheckboxTerms: "Ho letto e accettato HMall",
|
|
346
|
+
termsAndC: "Termini e Condizioni",
|
|
347
|
+
acceptCheckboxRickDisclosure:
|
|
348
|
+
"Confermo di aver letto e di accettare HMall",
|
|
349
|
+
shippingAcknowledgment:
|
|
350
|
+
"Riconosco che il pagamento per questo acquisto viene elaborato dal nostro partner terzo, HORYS TECHNOLOGIES. Eventuali costi aggiuntivi non contemplati dalla procedura di spedizione standard che potrebbero sorgere durante la consegna non sono inclusi. I costi di spedizione coprono la consegna a destinazione e la gestione, ma non includono spese doganali aggiuntive. Confermo di aver letto e di accettare l",
|
|
351
|
+
riskDisclosureLink: "politica di divulgazione del rischio",
|
|
352
|
+
riskDisclosure: "Politica di divulgazione dei rischi",
|
|
353
|
+
confirmBtn: "Conferma tutto",
|
|
354
|
+
legalTermsAccept: "Ho letto e accetto HMall",
|
|
355
|
+
legalOtherTermsAccept: "e altri documenti legali",
|
|
356
|
+
here: "qui",
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
invoice: {
|
|
360
|
+
requestProcessingDialog: {
|
|
361
|
+
title: "Elaborazione della tua richiesta",
|
|
362
|
+
subTitle: "Aspetta un attimo! Mentre elaboriamo la tua fattura.",
|
|
363
|
+
message:
|
|
364
|
+
"Un momento! Per favore, non ricaricare mentre completiamo il download della tua fattura.",
|
|
365
|
+
orderId: "ID Ordine",
|
|
366
|
+
errorMsg: "Si è verificato un errore durante il processo",
|
|
367
|
+
retryBtn: "Clicca qui per riprovare",
|
|
368
|
+
failedTitle: "Impossibile generare la fattura.",
|
|
369
|
+
failedMessage:
|
|
370
|
+
"Non siamo riusciti a generare la tua fattura al momento. Riprova più tardi.",
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
} as const;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
|
|
3
|
+
import { AddressesService } from "./api";
|
|
4
|
+
|
|
5
|
+
export const proceedGetStatesAsync = async (countryId: number) => {
|
|
6
|
+
try {
|
|
7
|
+
return await AddressesService.addressesControllerGetSates(countryId);
|
|
8
|
+
} catch (error) {
|
|
9
|
+
console.log("🚀 ~ proceedGetStatesAsync ~ error:", error);
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const proceedGetCitiesAsync = async (
|
|
15
|
+
countryId: number,
|
|
16
|
+
stateId: number,
|
|
17
|
+
) => {
|
|
18
|
+
try {
|
|
19
|
+
return await AddressesService.addressesControllerGetCities(
|
|
20
|
+
countryId,
|
|
21
|
+
stateId,
|
|
22
|
+
);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
console.log("🚀 ~ proceedGetCitiesAsync ~ error:", error);
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
|
6
|
+
import type { ApiResult } from "./ApiResult";
|
|
7
|
+
|
|
8
|
+
export class ApiError extends Error {
|
|
9
|
+
public readonly url: string;
|
|
10
|
+
public readonly status: number;
|
|
11
|
+
public readonly statusText: string;
|
|
12
|
+
public readonly body: any;
|
|
13
|
+
public readonly request: ApiRequestOptions;
|
|
14
|
+
|
|
15
|
+
constructor(
|
|
16
|
+
request: ApiRequestOptions,
|
|
17
|
+
response: ApiResult,
|
|
18
|
+
message: string,
|
|
19
|
+
) {
|
|
20
|
+
super(message);
|
|
21
|
+
|
|
22
|
+
this.name = "ApiError";
|
|
23
|
+
this.url = response.url;
|
|
24
|
+
this.status = response.status;
|
|
25
|
+
this.statusText = response.statusText;
|
|
26
|
+
this.body = response.body;
|
|
27
|
+
this.request = request;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
export type ApiRequestOptions = {
|
|
6
|
+
readonly method:
|
|
7
|
+
| "GET"
|
|
8
|
+
| "PUT"
|
|
9
|
+
| "POST"
|
|
10
|
+
| "DELETE"
|
|
11
|
+
| "OPTIONS"
|
|
12
|
+
| "HEAD"
|
|
13
|
+
| "PATCH";
|
|
14
|
+
readonly url: string;
|
|
15
|
+
readonly path?: Record<string, any>;
|
|
16
|
+
readonly cookies?: Record<string, any>;
|
|
17
|
+
readonly headers?: Record<string, any>;
|
|
18
|
+
readonly query?: Record<string, any>;
|
|
19
|
+
readonly formData?: Record<string, any>;
|
|
20
|
+
readonly body?: any;
|
|
21
|
+
readonly mediaType?: string;
|
|
22
|
+
readonly responseHeader?: string;
|
|
23
|
+
readonly errors?: Record<number, string>;
|
|
24
|
+
readonly isServerAction?: boolean;
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
export type ApiResult = {
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly ok: boolean;
|
|
8
|
+
readonly status: number;
|
|
9
|
+
readonly statusText: string;
|
|
10
|
+
readonly body: any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
export class CancelError extends Error {
|
|
6
|
+
constructor(message: string) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = "CancelError";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get isCancelled(): boolean {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface OnCancel {
|
|
17
|
+
readonly isResolved: boolean;
|
|
18
|
+
readonly isRejected: boolean;
|
|
19
|
+
readonly isCancelled: boolean;
|
|
20
|
+
|
|
21
|
+
(cancelHandler: () => void): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class CancelablePromise<T> implements Promise<T> {
|
|
25
|
+
#isResolved: boolean;
|
|
26
|
+
#isRejected: boolean;
|
|
27
|
+
#isCancelled: boolean;
|
|
28
|
+
readonly #cancelHandlers: (() => void)[];
|
|
29
|
+
readonly #promise: Promise<T>;
|
|
30
|
+
#resolve?: (value: T | PromiseLike<T>) => void;
|
|
31
|
+
#reject?: (reason?: any) => void;
|
|
32
|
+
|
|
33
|
+
constructor(
|
|
34
|
+
executor: (
|
|
35
|
+
resolve: (value: T | PromiseLike<T>) => void,
|
|
36
|
+
reject: (reason?: any) => void,
|
|
37
|
+
onCancel: OnCancel,
|
|
38
|
+
) => void,
|
|
39
|
+
) {
|
|
40
|
+
this.#isResolved = false;
|
|
41
|
+
this.#isRejected = false;
|
|
42
|
+
this.#isCancelled = false;
|
|
43
|
+
this.#cancelHandlers = [];
|
|
44
|
+
this.#promise = new Promise<T>((resolve, reject) => {
|
|
45
|
+
this.#resolve = resolve;
|
|
46
|
+
this.#reject = reject;
|
|
47
|
+
|
|
48
|
+
const onResolve = (value: T | PromiseLike<T>): void => {
|
|
49
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.#isResolved = true;
|
|
53
|
+
if (this.#resolve) this.#resolve(value);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const onReject = (reason?: any): void => {
|
|
57
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this.#isRejected = true;
|
|
61
|
+
if (this.#reject) this.#reject(reason);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const onCancel = (cancelHandler: () => void): void => {
|
|
65
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.#cancelHandlers.push(cancelHandler);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
Object.defineProperty(onCancel, "isResolved", {
|
|
72
|
+
get: (): boolean => this.#isResolved,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
Object.defineProperty(onCancel, "isRejected", {
|
|
76
|
+
get: (): boolean => this.#isRejected,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
Object.defineProperty(onCancel, "isCancelled", {
|
|
80
|
+
get: (): boolean => this.#isCancelled,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
return executor(onResolve, onReject, onCancel as OnCancel);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
get [Symbol.toStringTag]() {
|
|
88
|
+
return "Cancellable Promise";
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public then<TResult1 = T, TResult2 = never>(
|
|
92
|
+
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
|
93
|
+
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
|
|
94
|
+
): Promise<TResult1 | TResult2> {
|
|
95
|
+
return this.#promise.then(onFulfilled, onRejected);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
public catch<TResult = never>(
|
|
99
|
+
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
|
|
100
|
+
): Promise<T | TResult> {
|
|
101
|
+
return this.#promise.catch(onRejected);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public finally(onFinally?: (() => void) | null): Promise<T> {
|
|
105
|
+
return this.#promise.finally(onFinally);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public cancel(): void {
|
|
109
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this.#isCancelled = true;
|
|
113
|
+
if (this.#cancelHandlers.length) {
|
|
114
|
+
try {
|
|
115
|
+
for (const cancelHandler of this.#cancelHandlers) {
|
|
116
|
+
cancelHandler();
|
|
117
|
+
}
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.warn("Cancellation threw an error", error);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
this.#cancelHandlers.length = 0;
|
|
124
|
+
if (this.#reject) this.#reject(new CancelError("Request aborted"));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public get isCancelled(): boolean {
|
|
128
|
+
return this.#isCancelled;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import { Environments } from "../../../constants/environment";
|
|
6
|
+
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
|
7
|
+
|
|
8
|
+
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
9
|
+
type Headers = Record<string, string>;
|
|
10
|
+
|
|
11
|
+
export type OpenAPIConfig = {
|
|
12
|
+
BASE: string;
|
|
13
|
+
SERVER_ACTION_BASE: string;
|
|
14
|
+
|
|
15
|
+
VERSION: string;
|
|
16
|
+
WITH_CREDENTIALS: boolean;
|
|
17
|
+
CREDENTIALS: "include" | "omit" | "same-origin";
|
|
18
|
+
TOKEN?: string | Resolver<string> | undefined;
|
|
19
|
+
USERNAME?: string | Resolver<string> | undefined;
|
|
20
|
+
PASSWORD?: string | Resolver<string> | undefined;
|
|
21
|
+
HEADERS?: Headers | Resolver<Headers> | undefined;
|
|
22
|
+
ENCODE_PATH?: ((path: string) => string) | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const OpenAPI: OpenAPIConfig = {
|
|
26
|
+
BASE: `${Environments.API.hostname}`,
|
|
27
|
+
SERVER_ACTION_BASE: `${Environments.SERVER_ACTION.API.hostname}`,
|
|
28
|
+
|
|
29
|
+
VERSION: "1.0",
|
|
30
|
+
WITH_CREDENTIALS: false,
|
|
31
|
+
CREDENTIALS: "include",
|
|
32
|
+
TOKEN: undefined,
|
|
33
|
+
USERNAME: undefined,
|
|
34
|
+
PASSWORD: undefined,
|
|
35
|
+
HEADERS: undefined,
|
|
36
|
+
ENCODE_PATH: undefined,
|
|
37
|
+
};
|