@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,88 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { PlaceShipmentOrderDto } from "../models/PlaceShipmentOrderDto";
|
|
6
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
7
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
8
|
+
import { request as __request } from "../core/request";
|
|
9
|
+
export class ShipmentOrdersService {
|
|
10
|
+
/**
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns any
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
public static shippingOrdersControllerPlaceOrder(
|
|
16
|
+
requestBody: PlaceShipmentOrderDto,
|
|
17
|
+
): CancelablePromise<any> {
|
|
18
|
+
return __request(OpenAPI, {
|
|
19
|
+
method: "POST",
|
|
20
|
+
url: "/v1/shipment-orders",
|
|
21
|
+
body: requestBody,
|
|
22
|
+
mediaType: "application/json",
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @param page
|
|
27
|
+
* @param limit
|
|
28
|
+
* @param sort
|
|
29
|
+
* @param sortBy
|
|
30
|
+
* @param keyword
|
|
31
|
+
* @returns any
|
|
32
|
+
* @throws ApiError
|
|
33
|
+
*/
|
|
34
|
+
public static shippingOrdersControllerGetOrders(
|
|
35
|
+
page: number = 1,
|
|
36
|
+
limit: number = 30,
|
|
37
|
+
sort: string = "desc",
|
|
38
|
+
sortBy: string = "createdAt",
|
|
39
|
+
keyword?: string | null,
|
|
40
|
+
): CancelablePromise<any> {
|
|
41
|
+
return __request(OpenAPI, {
|
|
42
|
+
method: "GET",
|
|
43
|
+
url: "/v1/shipment-orders",
|
|
44
|
+
query: {
|
|
45
|
+
page: page,
|
|
46
|
+
limit: limit,
|
|
47
|
+
sort: sort,
|
|
48
|
+
sortBy: sortBy,
|
|
49
|
+
keyword: keyword,
|
|
50
|
+
},
|
|
51
|
+
isServerAction: true,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @param id
|
|
57
|
+
* @returns any
|
|
58
|
+
* @throws ApiError
|
|
59
|
+
*/
|
|
60
|
+
public static shippingOrdersControllerGetOrder(
|
|
61
|
+
id: string,
|
|
62
|
+
): CancelablePromise<any> {
|
|
63
|
+
return __request(OpenAPI, {
|
|
64
|
+
method: "GET",
|
|
65
|
+
url: "/v1/shipment-orders/{id}",
|
|
66
|
+
path: {
|
|
67
|
+
id: id,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @param shipmentOrderId
|
|
74
|
+
* @returns any
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
public static shippingOrdersControllerGetOrderInvoice(
|
|
78
|
+
shipmentOrderId: string,
|
|
79
|
+
): CancelablePromise<any> {
|
|
80
|
+
return __request(OpenAPI, {
|
|
81
|
+
method: "GET",
|
|
82
|
+
url: "/v1/shipment-orders/{shipmentOrderId}/invoice",
|
|
83
|
+
path: {
|
|
84
|
+
shipmentOrderId: shipmentOrderId,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
6
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
7
|
+
import { request as __request } from "../core/request";
|
|
8
|
+
export class ShipmentsService {
|
|
9
|
+
/**
|
|
10
|
+
* @param orderId
|
|
11
|
+
* @returns any
|
|
12
|
+
* @throws ApiError
|
|
13
|
+
*/
|
|
14
|
+
public static shipmentsControllerGetAllShipmentItems(
|
|
15
|
+
orderId: string,
|
|
16
|
+
status?: "in-house" | "returned",
|
|
17
|
+
): CancelablePromise<any> {
|
|
18
|
+
return __request(OpenAPI, {
|
|
19
|
+
method: "GET",
|
|
20
|
+
url: "/v1/shipping/{orderId}/shipment-items",
|
|
21
|
+
path: {
|
|
22
|
+
orderId: orderId,
|
|
23
|
+
},
|
|
24
|
+
query: {
|
|
25
|
+
status: status,
|
|
26
|
+
},
|
|
27
|
+
isServerAction: true,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { AddProductToShippingCartDto } from "../models/AddProductToShippingCartDto";
|
|
6
|
+
import type { ShippingCartUpdateBillingAddressesDto } from "../models/ShippingCartUpdateBillingAddressesDto";
|
|
7
|
+
import type { ShippingCartUpdateShippingMethodDto } from "../models/ShippingCartUpdateShippingMethodDto";
|
|
8
|
+
import type { UpdateShippingCartPaymentMethodDto } from "../models/UpdateShippingCartPaymentMethodDto";
|
|
9
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
10
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
11
|
+
import { request as __request } from "../core/request";
|
|
12
|
+
import { AddAllProductToShippingCartDto } from "../models/AddAllProductToShippingCartDto";
|
|
13
|
+
export class ShippingCartService {
|
|
14
|
+
/**
|
|
15
|
+
* @param orderId
|
|
16
|
+
* @returns any
|
|
17
|
+
* @throws ApiError
|
|
18
|
+
*/
|
|
19
|
+
public static shippingCartControllerGetShippingCart(
|
|
20
|
+
orderId: string,
|
|
21
|
+
): CancelablePromise<any> {
|
|
22
|
+
return __request(OpenAPI, {
|
|
23
|
+
method: "GET",
|
|
24
|
+
url: "/v1/shipping-cart/{orderId}",
|
|
25
|
+
path: {
|
|
26
|
+
orderId: orderId,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @param orderId
|
|
32
|
+
* @param requestBody
|
|
33
|
+
* @returns any
|
|
34
|
+
* @throws ApiError
|
|
35
|
+
*/
|
|
36
|
+
public static shippingCartControllerAddShippingCartForAllProduct(
|
|
37
|
+
orderId: string,
|
|
38
|
+
requestBody: AddAllProductToShippingCartDto,
|
|
39
|
+
): CancelablePromise<any> {
|
|
40
|
+
return __request(OpenAPI, {
|
|
41
|
+
method: "POST",
|
|
42
|
+
url: "/v1/shipping-cart/{orderId}",
|
|
43
|
+
path: {
|
|
44
|
+
orderId: orderId,
|
|
45
|
+
},
|
|
46
|
+
body: requestBody,
|
|
47
|
+
mediaType: "application/json",
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @param orderId
|
|
53
|
+
* @param requestBody
|
|
54
|
+
* @returns any
|
|
55
|
+
* @throws ApiError
|
|
56
|
+
*/
|
|
57
|
+
public static shippingCartControllerAddShippingCartProduct(
|
|
58
|
+
orderId: string,
|
|
59
|
+
requestBody: AddProductToShippingCartDto,
|
|
60
|
+
): CancelablePromise<any> {
|
|
61
|
+
return __request(OpenAPI, {
|
|
62
|
+
method: "POST",
|
|
63
|
+
url: "/v1/shipping-cart/{orderId}/items",
|
|
64
|
+
path: {
|
|
65
|
+
orderId: orderId,
|
|
66
|
+
},
|
|
67
|
+
body: requestBody,
|
|
68
|
+
mediaType: "application/json",
|
|
69
|
+
isServerAction: true,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @param state
|
|
74
|
+
* @param orderId
|
|
75
|
+
* @returns any
|
|
76
|
+
* @throws ApiError
|
|
77
|
+
*/
|
|
78
|
+
public static shippingCartControllerUpdateCartState(
|
|
79
|
+
state: string,
|
|
80
|
+
orderId: string,
|
|
81
|
+
): CancelablePromise<any> {
|
|
82
|
+
return __request(OpenAPI, {
|
|
83
|
+
method: "PATCH",
|
|
84
|
+
url: "/v1/shipping-cart/{orderId}/cart-state/{state}",
|
|
85
|
+
path: {
|
|
86
|
+
state: state,
|
|
87
|
+
orderId: orderId,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @param type
|
|
93
|
+
* @param id
|
|
94
|
+
* @param requestBody
|
|
95
|
+
* @returns any
|
|
96
|
+
* @throws ApiError
|
|
97
|
+
*/
|
|
98
|
+
public static shippingCartControllerUpdateAddresses(
|
|
99
|
+
type: string,
|
|
100
|
+
id: number,
|
|
101
|
+
requestBody: ShippingCartUpdateBillingAddressesDto,
|
|
102
|
+
): CancelablePromise<any> {
|
|
103
|
+
return __request(OpenAPI, {
|
|
104
|
+
method: "PATCH",
|
|
105
|
+
url: "/v1/shipping-cart/{id}/address/{type}",
|
|
106
|
+
path: {
|
|
107
|
+
type: type,
|
|
108
|
+
id: id,
|
|
109
|
+
},
|
|
110
|
+
body: requestBody,
|
|
111
|
+
mediaType: "application/json",
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @param id
|
|
116
|
+
* @param requestBody
|
|
117
|
+
* @returns any
|
|
118
|
+
* @throws ApiError
|
|
119
|
+
*/
|
|
120
|
+
public static shippingCartControllerUpdateShippingMethod(
|
|
121
|
+
id: number,
|
|
122
|
+
requestBody: ShippingCartUpdateShippingMethodDto,
|
|
123
|
+
): CancelablePromise<any> {
|
|
124
|
+
return __request(OpenAPI, {
|
|
125
|
+
method: "PATCH",
|
|
126
|
+
url: "/v1/shipping-cart/{id}/shipping-method",
|
|
127
|
+
path: {
|
|
128
|
+
id: id,
|
|
129
|
+
},
|
|
130
|
+
body: requestBody,
|
|
131
|
+
mediaType: "application/json",
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* @param shippingCartId
|
|
136
|
+
* @param storeId
|
|
137
|
+
* @returns any
|
|
138
|
+
* @throws ApiError
|
|
139
|
+
*/
|
|
140
|
+
public static shippingCartControllerUpdatePickupStore(
|
|
141
|
+
shippingCartId: number,
|
|
142
|
+
storeId: number,
|
|
143
|
+
): CancelablePromise<any> {
|
|
144
|
+
return __request(OpenAPI, {
|
|
145
|
+
method: "PATCH",
|
|
146
|
+
url: "/v1/shipping-cart/{shippingCartId}/store/{storeId}",
|
|
147
|
+
path: {
|
|
148
|
+
shippingCartId: shippingCartId,
|
|
149
|
+
storeId: storeId,
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @param shippingCartId
|
|
155
|
+
* @param requestBody
|
|
156
|
+
* @returns any
|
|
157
|
+
* @throws ApiError
|
|
158
|
+
*/
|
|
159
|
+
public static shippingCartControllerUpdatePaymentMethod(
|
|
160
|
+
shippingCartId: number,
|
|
161
|
+
requestBody: UpdateShippingCartPaymentMethodDto,
|
|
162
|
+
): CancelablePromise<any> {
|
|
163
|
+
return __request(OpenAPI, {
|
|
164
|
+
method: "PATCH",
|
|
165
|
+
url: "/v1/shipping-cart/{shippingCartId}/payment-method",
|
|
166
|
+
path: {
|
|
167
|
+
shippingCartId: shippingCartId,
|
|
168
|
+
},
|
|
169
|
+
body: requestBody,
|
|
170
|
+
mediaType: "application/json",
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @param shippingCartId
|
|
175
|
+
* @param shippingMethodId
|
|
176
|
+
* @returns any
|
|
177
|
+
* @throws ApiError
|
|
178
|
+
*/
|
|
179
|
+
public static shippingCartControllerGetALlowedShippingOrPickupCountries(
|
|
180
|
+
shippingCartId: number,
|
|
181
|
+
shippingMethodId: number,
|
|
182
|
+
): CancelablePromise<any> {
|
|
183
|
+
return __request(OpenAPI, {
|
|
184
|
+
method: "GET",
|
|
185
|
+
url: "/v1/shipping-cart/{shippingCartId}/allowed-shipping-countries/{shippingMethodId}",
|
|
186
|
+
path: {
|
|
187
|
+
shippingCartId: shippingCartId,
|
|
188
|
+
shippingMethodId: shippingMethodId,
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* @param shippingCartId
|
|
194
|
+
* @returns any
|
|
195
|
+
* @throws ApiError
|
|
196
|
+
*/
|
|
197
|
+
public static shippingCartControllerClearPaymentMethodOnCart(
|
|
198
|
+
shippingCartId: number,
|
|
199
|
+
): CancelablePromise<any> {
|
|
200
|
+
return __request(OpenAPI, {
|
|
201
|
+
method: "GET",
|
|
202
|
+
url: "/v1/shipping-cart/{shippingCartId}/clear-payment-method",
|
|
203
|
+
path: {
|
|
204
|
+
shippingCartId: shippingCartId,
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @param type
|
|
211
|
+
* @param id
|
|
212
|
+
* @returns any
|
|
213
|
+
* @throws ApiError
|
|
214
|
+
*/
|
|
215
|
+
public static shippingCartControllerResetAddresses(
|
|
216
|
+
type: string,
|
|
217
|
+
id: number,
|
|
218
|
+
): CancelablePromise<any> {
|
|
219
|
+
return __request(OpenAPI, {
|
|
220
|
+
method: "PATCH",
|
|
221
|
+
url: "/v1/shipping-cart/{id}/reset-address/{type}",
|
|
222
|
+
path: {
|
|
223
|
+
type: type,
|
|
224
|
+
id: id,
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* @param mode
|
|
230
|
+
* @param orderId
|
|
231
|
+
* @returns any
|
|
232
|
+
* @throws ApiError
|
|
233
|
+
*/
|
|
234
|
+
public static shippingCartControllerValidateCart(
|
|
235
|
+
mode: string,
|
|
236
|
+
orderId: string,
|
|
237
|
+
): CancelablePromise<any> {
|
|
238
|
+
return __request(OpenAPI, {
|
|
239
|
+
method: "PATCH",
|
|
240
|
+
url: "/v1/shipping-cart/{orderId}/refresh/{mode}",
|
|
241
|
+
path: {
|
|
242
|
+
mode: mode,
|
|
243
|
+
orderId: orderId,
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
6
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
7
|
+
import { request as __request } from "../core/request";
|
|
8
|
+
export class ShippingMethodsService {
|
|
9
|
+
/**
|
|
10
|
+
* @returns any
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
public static shippingMethodControllerFindAll(): CancelablePromise<any> {
|
|
14
|
+
return __request(OpenAPI, {
|
|
15
|
+
method: "GET",
|
|
16
|
+
url: "/v1/shipping-methods",
|
|
17
|
+
isServerAction: false,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
6
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
7
|
+
import { request as __request } from "../core/request";
|
|
8
|
+
export class StoresService {
|
|
9
|
+
/**
|
|
10
|
+
* @param countryId
|
|
11
|
+
* @returns any
|
|
12
|
+
* @throws ApiError
|
|
13
|
+
*/
|
|
14
|
+
public static storesControllerFindAll(
|
|
15
|
+
countryId?: number,
|
|
16
|
+
): CancelablePromise<any> {
|
|
17
|
+
return __request(OpenAPI, {
|
|
18
|
+
method: "GET",
|
|
19
|
+
url: "/v1/stores",
|
|
20
|
+
query: {
|
|
21
|
+
countryId: countryId,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
6
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
7
|
+
import { request as __request } from "../core/request";
|
|
8
|
+
export class SyncServiceQueueService {
|
|
9
|
+
/**
|
|
10
|
+
* @returns any
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
public static syncServiceQueueControllerGetStats(): CancelablePromise<any> {
|
|
14
|
+
return __request(OpenAPI, {
|
|
15
|
+
method: "GET",
|
|
16
|
+
url: "/v1/sync-service-queue/stats",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @returns any
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
public static syncServiceQueueControllerStopQueue(): CancelablePromise<any> {
|
|
24
|
+
return __request(OpenAPI, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
url: "/v1/sync-service-queue/stop",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @returns any
|
|
31
|
+
* @throws ApiError
|
|
32
|
+
*/
|
|
33
|
+
public static syncServiceQueueControllerRestartQueue(): CancelablePromise<any> {
|
|
34
|
+
return __request(OpenAPI, {
|
|
35
|
+
method: "POST",
|
|
36
|
+
url: "/v1/sync-service-queue/restart",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { PlaceOrderDto } from "../models/PlaceOrderDto";
|
|
6
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
7
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
8
|
+
import { request as __request } from "../core/request";
|
|
9
|
+
export class UpgradeOrdersService {
|
|
10
|
+
/**
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns any
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
public static upgradeOrdersControllerPlaceOrder(
|
|
16
|
+
requestBody: PlaceOrderDto,
|
|
17
|
+
): CancelablePromise<any> {
|
|
18
|
+
return __request(OpenAPI, {
|
|
19
|
+
method: "POST",
|
|
20
|
+
url: "/v1/upgrade-orders",
|
|
21
|
+
body: requestBody,
|
|
22
|
+
mediaType: "application/json",
|
|
23
|
+
isServerAction: true,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ValidateAuthCodeDto } from "../models/ValidateAuthCodeDto";
|
|
6
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
7
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
8
|
+
import { request as __request } from "../core/request";
|
|
9
|
+
export class UsersAuthService {
|
|
10
|
+
/**
|
|
11
|
+
* @returns any return sso redirection link
|
|
12
|
+
* @throws ApiError
|
|
13
|
+
*/
|
|
14
|
+
public static authControllerGetSsoUri(): CancelablePromise<any> {
|
|
15
|
+
return __request(OpenAPI, {
|
|
16
|
+
method: "GET",
|
|
17
|
+
url: "/v1/auth/sso",
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @param requestBody
|
|
22
|
+
* @returns any return user data and jwt
|
|
23
|
+
* @throws ApiError
|
|
24
|
+
*/
|
|
25
|
+
public static authControllerValidateAuthCode(
|
|
26
|
+
requestBody: ValidateAuthCodeDto,
|
|
27
|
+
): CancelablePromise<any> {
|
|
28
|
+
return __request(OpenAPI, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
url: "/v1/auth/sso",
|
|
31
|
+
body: requestBody,
|
|
32
|
+
mediaType: "application/json",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @returns any return user data and jwt
|
|
37
|
+
* @throws ApiError
|
|
38
|
+
*/
|
|
39
|
+
public static authControllerRefreshAuthToken(): CancelablePromise<any> {
|
|
40
|
+
return __request(OpenAPI, {
|
|
41
|
+
method: "POST",
|
|
42
|
+
url: "/v1/auth/refresh-token",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
6
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
7
|
+
import { request as __request } from "../core/request";
|
|
8
|
+
export class UsersService {
|
|
9
|
+
/**
|
|
10
|
+
* @returns any
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
public static usersControllerGetProfile(): CancelablePromise<any> {
|
|
14
|
+
return __request(OpenAPI, {
|
|
15
|
+
method: "GET",
|
|
16
|
+
url: "/v1/users/me",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public static paymentGatewayControllerGetProfile(): CancelablePromise<any> {
|
|
21
|
+
return __request(OpenAPI, {
|
|
22
|
+
method: "GET",
|
|
23
|
+
url: "/v1/payment-gateway/auth-code",
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @param productSku
|
|
29
|
+
* @returns any
|
|
30
|
+
* @throws ApiError
|
|
31
|
+
*/
|
|
32
|
+
public static usersControllerGetUserProductPurchases(
|
|
33
|
+
productSku: string,
|
|
34
|
+
): CancelablePromise<any> {
|
|
35
|
+
return __request(OpenAPI, {
|
|
36
|
+
method: "GET",
|
|
37
|
+
url: "/v1/users/purchases/{productSKU}",
|
|
38
|
+
path: {
|
|
39
|
+
productSKU: productSku,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @returns any
|
|
45
|
+
* @throws ApiError
|
|
46
|
+
*/
|
|
47
|
+
public static usersControllerSaveConsent(): CancelablePromise<any> {
|
|
48
|
+
return __request(OpenAPI, {
|
|
49
|
+
method: "POST",
|
|
50
|
+
url: "/v1/users/wallet-consent",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
|
|
5
|
+
import type { CancelablePromise } from "../core/CancelablePromise";
|
|
6
|
+
import { OpenAPI } from "../core/OpenAPI";
|
|
7
|
+
import { request as __request } from "../core/request";
|
|
8
|
+
export class XeraQueueService {
|
|
9
|
+
/**
|
|
10
|
+
* @returns any
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
public static xeraQueueControllerGetStats(): CancelablePromise<any> {
|
|
14
|
+
return __request(OpenAPI, {
|
|
15
|
+
method: "GET",
|
|
16
|
+
url: "/v1/xera-queue/stats",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @returns any
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
public static xeraQueueControllerStopQueue(): CancelablePromise<any> {
|
|
24
|
+
return __request(OpenAPI, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
url: "/v1/xera-queue/stop",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @returns any
|
|
31
|
+
* @throws ApiError
|
|
32
|
+
*/
|
|
33
|
+
public static xeraQueueControllerRestartQueue(): CancelablePromise<any> {
|
|
34
|
+
return __request(OpenAPI, {
|
|
35
|
+
method: "POST",
|
|
36
|
+
url: "/v1/xera-queue/restart",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
|
|
3
|
+
import { PaymentsService } from "./api";
|
|
4
|
+
|
|
5
|
+
export const proceedGetPaymentMethodsAsync = async (data: {
|
|
6
|
+
shipping?: boolean | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
console.log("🚀 ~ proceedGetPaymentMethodsAsync ~ data:", data);
|
|
9
|
+
try {
|
|
10
|
+
return await PaymentsService.paymentsControllerGetPaymentMethods();
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.log("🚀 ~ proceedGetPaymentMethodsAsync ~ error:", error);
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const proceedGetPaymentMethodAssetsAsync = async (data: {
|
|
18
|
+
methodId: number;
|
|
19
|
+
shipping?: boolean | undefined;
|
|
20
|
+
}) => {
|
|
21
|
+
try {
|
|
22
|
+
return await PaymentsService.paymentsControllerGetPaymentMethodAssets(
|
|
23
|
+
data.methodId,
|
|
24
|
+
);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.log("🚀 ~ proceedGetPaymentMethodAssetsAsync ~ error:", error);
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
};
|