@passly-nl/data 0.1.0
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/CODEOWNERS +1 -0
- package/LICENSE +21 -0
- package/README.md +19 -0
- package/dist/adapter/AddressAdapter.d.ts +3 -0
- package/dist/adapter/AuthAdapter.d.ts +6 -0
- package/dist/adapter/BuyerAdapter.d.ts +4 -0
- package/dist/adapter/CommonAdapter.d.ts +4 -0
- package/dist/adapter/DateTimeAdapter.d.ts +4 -0
- package/dist/adapter/EventAdapter.d.ts +22 -0
- package/dist/adapter/FileSystemAdapter.d.ts +4 -0
- package/dist/adapter/FinanceAdapter.d.ts +6 -0
- package/dist/adapter/FluxAdapter.d.ts +6 -0
- package/dist/adapter/MerchantAdapter.d.ts +8 -0
- package/dist/adapter/MerchantDashboardAdapter.d.ts +5 -0
- package/dist/adapter/OrderAdapter.d.ts +7 -0
- package/dist/adapter/PaymentAdapter.d.ts +7 -0
- package/dist/adapter/ProductAdapter.d.ts +4 -0
- package/dist/adapter/PublicPayAdapter.d.ts +4 -0
- package/dist/adapter/PublicShopAdapter.d.ts +13 -0
- package/dist/adapter/ReservationAdapter.d.ts +6 -0
- package/dist/adapter/TicketAdapter.d.ts +4 -0
- package/dist/adapter/index.d.ts +18 -0
- package/dist/dto/address/AddressDto.d.ts +20 -0
- package/dist/dto/address/index.d.ts +1 -0
- package/dist/dto/auth/TotpStateDto.d.ts +10 -0
- package/dist/dto/auth/UserDto.d.ts +23 -0
- package/dist/dto/auth/UserTokenDto.d.ts +23 -0
- package/dist/dto/auth/index.d.ts +3 -0
- package/dist/dto/common/StatusResponseDto.d.ts +8 -0
- package/dist/dto/common/index.d.ts +1 -0
- package/dist/dto/event/EventAvailabilityDto.d.ts +14 -0
- package/dist/dto/event/EventCountersDto.d.ts +10 -0
- package/dist/dto/event/EventDto.d.ts +29 -0
- package/dist/dto/event/EventStatisticsAttendanceDto.d.ts +10 -0
- package/dist/dto/event/EventStatisticsBuyerTotalsDto.d.ts +14 -0
- package/dist/dto/event/EventStatisticsFinancialDto.d.ts +9 -0
- package/dist/dto/event/EventStatisticsOrderTotalsDto.d.ts +12 -0
- package/dist/dto/event/EventStatisticsOrdersDto.d.ts +10 -0
- package/dist/dto/event/EventStatisticsScanTotalsDto.d.ts +10 -0
- package/dist/dto/event/EventStatisticsScansDto.d.ts +12 -0
- package/dist/dto/event/EventStatisticsScansPerAppTeamDto.d.ts +10 -0
- package/dist/dto/event/EventStatisticsSwapTotalsDto.d.ts +10 -0
- package/dist/dto/event/ShopDesignDto.d.ts +10 -0
- package/dist/dto/event/ShopDto.d.ts +35 -0
- package/dist/dto/event/ShopElementButtonDto.d.ts +12 -0
- package/dist/dto/event/ShopElementDividerDto.d.ts +10 -0
- package/dist/dto/event/ShopElementDto.d.ts +9 -0
- package/dist/dto/event/ShopElementHeadingDto.d.ts +10 -0
- package/dist/dto/event/ShopElementNoticeDto.d.ts +15 -0
- package/dist/dto/event/ShopElementProductDto.d.ts +7 -0
- package/dist/dto/event/ShopElementTextDto.d.ts +7 -0
- package/dist/dto/event/StockOverviewDto.d.ts +13 -0
- package/dist/dto/event/StockOverviewItemDto.d.ts +13 -0
- package/dist/dto/event/StockPoolDto.d.ts +25 -0
- package/dist/dto/event/TicketTemplateDto.d.ts +18 -0
- package/dist/dto/event/index.d.ts +25 -0
- package/dist/dto/fileSystem/PictureDto.d.ts +10 -0
- package/dist/dto/fileSystem/index.d.ts +1 -0
- package/dist/dto/finance/FinanceOverviewDto.d.ts +13 -0
- package/dist/dto/finance/InvoiceDto.d.ts +25 -0
- package/dist/dto/finance/InvoiceLineDto.d.ts +17 -0
- package/dist/dto/finance/index.d.ts +3 -0
- package/dist/dto/index.d.ts +14 -0
- package/dist/dto/merchant/ContractDto.d.ts +16 -0
- package/dist/dto/merchant/InvitationDto.d.ts +25 -0
- package/dist/dto/merchant/MerchantDashboardKeyMetricsDto.d.ts +22 -0
- package/dist/dto/merchant/MerchantDashboardUpcomingEventDto.d.ts +25 -0
- package/dist/dto/merchant/MerchantDto.d.ts +32 -0
- package/dist/dto/merchant/MerchantUserDto.d.ts +14 -0
- package/dist/dto/merchant/VatNumberDto.d.ts +19 -0
- package/dist/dto/merchant/index.d.ts +7 -0
- package/dist/dto/order/BuyerDto.d.ts +27 -0
- package/dist/dto/order/OrderDto.d.ts +37 -0
- package/dist/dto/order/OrderLineDto.d.ts +20 -0
- package/dist/dto/order/OrderPaymentProviderDto.d.ts +8 -0
- package/dist/dto/order/OrderProductDto.d.ts +12 -0
- package/dist/dto/order/index.d.ts +5 -0
- package/dist/dto/payment/CostDto.d.ts +16 -0
- package/dist/dto/payment/PaymentMethodDto.d.ts +10 -0
- package/dist/dto/payment/PaymentProviderDto.d.ts +12 -0
- package/dist/dto/payment/TransactionDto.d.ts +24 -0
- package/dist/dto/payment/index.d.ts +4 -0
- package/dist/dto/product/ProductDto.d.ts +30 -0
- package/dist/dto/product/index.d.ts +1 -0
- package/dist/dto/publicPay/PublicPaymentMethodDto.d.ts +10 -0
- package/dist/dto/publicPay/index.d.ts +1 -0
- package/dist/dto/publicShop/PublicShopCartProductDto.d.ts +10 -0
- package/dist/dto/publicShop/PublicShopDesignDto.d.ts +10 -0
- package/dist/dto/publicShop/PublicShopDto.d.ts +31 -0
- package/dist/dto/publicShop/PublicShopElementButtonDto.d.ts +12 -0
- package/dist/dto/publicShop/PublicShopElementDividerDto.d.ts +10 -0
- package/dist/dto/publicShop/PublicShopElementDto.d.ts +9 -0
- package/dist/dto/publicShop/PublicShopElementHeadingDto.d.ts +10 -0
- package/dist/dto/publicShop/PublicShopElementNoticeDto.d.ts +15 -0
- package/dist/dto/publicShop/PublicShopElementProductDto.d.ts +7 -0
- package/dist/dto/publicShop/PublicShopElementTextDto.d.ts +7 -0
- package/dist/dto/publicShop/PublicShopEventDto.d.ts +16 -0
- package/dist/dto/publicShop/PublicShopMerchantDto.d.ts +8 -0
- package/dist/dto/publicShop/PublicShopProductDto.d.ts +28 -0
- package/dist/dto/publicShop/PublicShopReservationDto.d.ts +14 -0
- package/dist/dto/publicShop/PublicShopReservationProductDetailsDto.d.ts +13 -0
- package/dist/dto/publicShop/PublicShopReservationProductDto.d.ts +9 -0
- package/dist/dto/publicShop/PublicShopTimeSlotDto.d.ts +15 -0
- package/dist/dto/publicShop/index.d.ts +17 -0
- package/dist/dto/reservation/ReservationDto.d.ts +16 -0
- package/dist/dto/reservation/ReservationItemDto.d.ts +9 -0
- package/dist/dto/reservation/ReservationProductDto.d.ts +13 -0
- package/dist/dto/reservation/index.d.ts +3 -0
- package/dist/dto/ticket/TicketDto.d.ts +31 -0
- package/dist/dto/ticket/index.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +136 -0
- package/dist/service/AuthService.d.ts +11 -0
- package/dist/service/InvitationService.d.ts +7 -0
- package/dist/service/MeService.d.ts +12 -0
- package/dist/service/MerchantBuyerService.d.ts +7 -0
- package/dist/service/MerchantBuyersService.d.ts +5 -0
- package/dist/service/MerchantDashboardService.d.ts +6 -0
- package/dist/service/MerchantEventProductService.d.ts +10 -0
- package/dist/service/MerchantEventProductsService.d.ts +8 -0
- package/dist/service/MerchantEventService.d.ts +13 -0
- package/dist/service/MerchantEventShopService.d.ts +9 -0
- package/dist/service/MerchantEventShopsService.d.ts +8 -0
- package/dist/service/MerchantEventStatisticsService.d.ts +10 -0
- package/dist/service/MerchantEventStockPoolsService.d.ts +9 -0
- package/dist/service/MerchantEventTicketTemplateService.d.ts +11 -0
- package/dist/service/MerchantEventTicketTemplatesService.d.ts +9 -0
- package/dist/service/MerchantEventsService.d.ts +7 -0
- package/dist/service/MerchantFinanceInvoiceService.d.ts +6 -0
- package/dist/service/MerchantFinanceInvoicesService.d.ts +5 -0
- package/dist/service/MerchantFinanceService.d.ts +8 -0
- package/dist/service/MerchantOrderService.d.ts +9 -0
- package/dist/service/MerchantOrdersService.d.ts +5 -0
- package/dist/service/MerchantService.d.ts +14 -0
- package/dist/service/MerchantStatisticsService.d.ts +5 -0
- package/dist/service/MerchantTicketService.d.ts +7 -0
- package/dist/service/MerchantTicketsService.d.ts +5 -0
- package/dist/service/MerchantUsersService.d.ts +7 -0
- package/dist/service/MerchantsService.d.ts +5 -0
- package/dist/service/PublicOrderService.d.ts +7 -0
- package/dist/service/PublicShopService.d.ts +9 -0
- package/dist/service/ReservationService.d.ts +6 -0
- package/dist/service/ServicesService.d.ts +9 -0
- package/dist/service/UiSelectOptionsService.d.ts +6 -0
- package/dist/service/index.d.ts +32 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/util/emptyNull.d.ts +1 -0
- package/dist/util/index.d.ts +4 -0
- package/dist/util/jsonBlob.d.ts +1 -0
- package/dist/util/optional.d.ts +4 -0
- package/dist/util/optionalArray.d.ts +1 -0
- package/package.json +62 -0
- package/src/adapter/AddressAdapter.ts +18 -0
- package/src/adapter/AuthAdapter.ts +42 -0
- package/src/adapter/BuyerAdapter.ts +22 -0
- package/src/adapter/CommonAdapter.ts +12 -0
- package/src/adapter/DateTimeAdapter.ts +11 -0
- package/src/adapter/EventAdapter.ts +237 -0
- package/src/adapter/FileSystemAdapter.ts +13 -0
- package/src/adapter/FinanceAdapter.ts +40 -0
- package/src/adapter/FluxAdapter.ts +21 -0
- package/src/adapter/MerchantAdapter.ts +70 -0
- package/src/adapter/MerchantDashboardAdapter.ts +29 -0
- package/src/adapter/OrderAdapter.ts +55 -0
- package/src/adapter/PaymentAdapter.ts +48 -0
- package/src/adapter/ProductAdapter.ts +24 -0
- package/src/adapter/PublicPayAdapter.ts +13 -0
- package/src/adapter/PublicShopAdapter.ts +149 -0
- package/src/adapter/ReservationAdapter.ts +33 -0
- package/src/adapter/TicketAdapter.ts +24 -0
- package/src/adapter/index.ts +18 -0
- package/src/dto/address/AddressDto.ts +88 -0
- package/src/dto/address/index.ts +1 -0
- package/src/dto/auth/TotpStateDto.ts +38 -0
- package/src/dto/auth/UserDto.ts +99 -0
- package/src/dto/auth/UserTokenDto.ts +91 -0
- package/src/dto/auth/index.ts +3 -0
- package/src/dto/common/StatusResponseDto.ts +28 -0
- package/src/dto/common/index.ts +1 -0
- package/src/dto/event/EventAvailabilityDto.ts +58 -0
- package/src/dto/event/EventCountersDto.ts +38 -0
- package/src/dto/event/EventDto.ts +121 -0
- package/src/dto/event/EventStatisticsAttendanceDto.ts +38 -0
- package/src/dto/event/EventStatisticsBuyerTotalsDto.ts +58 -0
- package/src/dto/event/EventStatisticsFinancialDto.ts +29 -0
- package/src/dto/event/EventStatisticsOrderTotalsDto.ts +48 -0
- package/src/dto/event/EventStatisticsOrdersDto.ts +30 -0
- package/src/dto/event/EventStatisticsScanTotalsDto.ts +38 -0
- package/src/dto/event/EventStatisticsScansDto.ts +40 -0
- package/src/dto/event/EventStatisticsScansPerAppTeamDto.ts +38 -0
- package/src/dto/event/EventStatisticsSwapTotalsDto.ts +38 -0
- package/src/dto/event/ShopDesignDto.ts +38 -0
- package/src/dto/event/ShopDto.ts +151 -0
- package/src/dto/event/ShopElementButtonDto.ts +41 -0
- package/src/dto/event/ShopElementDividerDto.ts +31 -0
- package/src/dto/event/ShopElementDto.ts +27 -0
- package/src/dto/event/ShopElementHeadingDto.ts +31 -0
- package/src/dto/event/ShopElementNoticeDto.ts +52 -0
- package/src/dto/event/ShopElementProductDto.ts +20 -0
- package/src/dto/event/ShopElementTextDto.ts +20 -0
- package/src/dto/event/StockOverviewDto.ts +49 -0
- package/src/dto/event/StockOverviewItemDto.ts +49 -0
- package/src/dto/event/StockPoolDto.ts +109 -0
- package/src/dto/event/TicketTemplateDto.ts +70 -0
- package/src/dto/event/index.ts +25 -0
- package/src/dto/fileSystem/PictureDto.ts +38 -0
- package/src/dto/fileSystem/index.ts +1 -0
- package/src/dto/finance/FinanceOverviewDto.ts +49 -0
- package/src/dto/finance/InvoiceDto.ts +101 -0
- package/src/dto/finance/InvoiceLineDto.ts +61 -0
- package/src/dto/finance/index.ts +3 -0
- package/src/dto/index.ts +14 -0
- package/src/dto/merchant/ContractDto.ts +60 -0
- package/src/dto/merchant/InvitationDto.ts +101 -0
- package/src/dto/merchant/MerchantDashboardKeyMetricsDto.ts +59 -0
- package/src/dto/merchant/MerchantDashboardUpcomingEventDto.ts +101 -0
- package/src/dto/merchant/MerchantDto.ts +140 -0
- package/src/dto/merchant/MerchantUserDto.ts +50 -0
- package/src/dto/merchant/VatNumberDto.ts +79 -0
- package/src/dto/merchant/index.ts +7 -0
- package/src/dto/order/BuyerDto.ts +111 -0
- package/src/dto/order/OrderDto.ts +161 -0
- package/src/dto/order/OrderLineDto.ts +80 -0
- package/src/dto/order/OrderPaymentProviderDto.ts +28 -0
- package/src/dto/order/OrderProductDto.ts +48 -0
- package/src/dto/order/index.ts +5 -0
- package/src/dto/payment/CostDto.ts +68 -0
- package/src/dto/payment/PaymentMethodDto.ts +38 -0
- package/src/dto/payment/PaymentProviderDto.ts +40 -0
- package/src/dto/payment/TransactionDto.ts +100 -0
- package/src/dto/payment/index.ts +4 -0
- package/src/dto/product/ProductDto.ts +130 -0
- package/src/dto/product/index.ts +1 -0
- package/src/dto/publicPay/PublicPaymentMethodDto.ts +38 -0
- package/src/dto/publicPay/index.ts +1 -0
- package/src/dto/publicShop/PublicShopCartProductDto.ts +38 -0
- package/src/dto/publicShop/PublicShopDesignDto.ts +38 -0
- package/src/dto/publicShop/PublicShopDto.ts +131 -0
- package/src/dto/publicShop/PublicShopElementButtonDto.ts +41 -0
- package/src/dto/publicShop/PublicShopElementDividerDto.ts +31 -0
- package/src/dto/publicShop/PublicShopElementDto.ts +27 -0
- package/src/dto/publicShop/PublicShopElementHeadingDto.ts +31 -0
- package/src/dto/publicShop/PublicShopElementNoticeDto.ts +52 -0
- package/src/dto/publicShop/PublicShopElementProductDto.ts +20 -0
- package/src/dto/publicShop/PublicShopElementTextDto.ts +20 -0
- package/src/dto/publicShop/PublicShopEventDto.ts +60 -0
- package/src/dto/publicShop/PublicShopMerchantDto.ts +28 -0
- package/src/dto/publicShop/PublicShopProductDto.ts +120 -0
- package/src/dto/publicShop/PublicShopReservationDto.ts +50 -0
- package/src/dto/publicShop/PublicShopReservationProductDetailsDto.ts +49 -0
- package/src/dto/publicShop/PublicShopReservationProductDto.ts +29 -0
- package/src/dto/publicShop/PublicShopTimeSlotDto.ts +59 -0
- package/src/dto/publicShop/index.ts +17 -0
- package/src/dto/reservation/ReservationDto.ts +60 -0
- package/src/dto/reservation/ReservationItemDto.ts +29 -0
- package/src/dto/reservation/ReservationProductDto.ts +49 -0
- package/src/dto/reservation/index.ts +3 -0
- package/src/dto/ticket/TicketDto.ts +131 -0
- package/src/dto/ticket/index.ts +1 -0
- package/src/index.ts +5 -0
- package/src/service/AuthService.ts +71 -0
- package/src/service/InvitationService.ts +35 -0
- package/src/service/MeService.ts +106 -0
- package/src/service/MerchantBuyerService.ts +37 -0
- package/src/service/MerchantBuyersService.ts +17 -0
- package/src/service/MerchantDashboardService.ts +23 -0
- package/src/service/MerchantEventProductService.ts +76 -0
- package/src/service/MerchantEventProductsService.ts +48 -0
- package/src/service/MerchantEventService.ts +115 -0
- package/src/service/MerchantEventShopService.ts +66 -0
- package/src/service/MerchantEventShopsService.ts +43 -0
- package/src/service/MerchantEventStatisticsService.ts +65 -0
- package/src/service/MerchantEventStockPoolsService.ts +54 -0
- package/src/service/MerchantEventTicketTemplateService.ts +75 -0
- package/src/service/MerchantEventTicketTemplatesService.ts +53 -0
- package/src/service/MerchantEventsService.ts +35 -0
- package/src/service/MerchantFinanceInvoiceService.ts +25 -0
- package/src/service/MerchantFinanceInvoicesService.ts +17 -0
- package/src/service/MerchantFinanceService.ts +36 -0
- package/src/service/MerchantOrderService.ts +55 -0
- package/src/service/MerchantOrdersService.ts +26 -0
- package/src/service/MerchantService.ts +117 -0
- package/src/service/MerchantStatisticsService.ts +14 -0
- package/src/service/MerchantTicketService.ts +35 -0
- package/src/service/MerchantTicketsService.ts +26 -0
- package/src/service/MerchantUsersService.ts +34 -0
- package/src/service/MerchantsService.ts +15 -0
- package/src/service/PublicOrderService.ts +35 -0
- package/src/service/PublicShopService.ts +49 -0
- package/src/service/ReservationService.ts +23 -0
- package/src/service/ServicesService.ts +18 -0
- package/src/service/UiSelectOptionsService.ts +33 -0
- package/src/service/index.ts +32 -0
- package/src/types/auth.ts +47 -0
- package/src/types/event.ts +28 -0
- package/src/types/finance.ts +14 -0
- package/src/types/general.ts +19 -0
- package/src/types/index.ts +9 -0
- package/src/types/order.ts +7 -0
- package/src/types/payment.ts +11 -0
- package/src/types/product.ts +2 -0
- package/src/types/publicShop.ts +7 -0
- package/src/types/ticket.ts +12 -0
- package/src/util/emptyNull.ts +9 -0
- package/src/util/index.ts +4 -0
- package/src/util/jsonBlob.ts +5 -0
- package/src/util/optional.ts +7 -0
- package/src/util/optionalArray.ts +7 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, type Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { UserTokenDto } from "#data/dto";
|
|
3
|
+
import type { Claim } from "#data/types";
|
|
4
|
+
export declare class AuthService extends BaseService {
|
|
5
|
+
get(): Promise<BaseResponse<UserTokenDto>>;
|
|
6
|
+
getClaims(): Promise<BaseResponse<Claim[]>>;
|
|
7
|
+
getPasswordCompromised(): Promise<BaseResponse<boolean>>;
|
|
8
|
+
getSessions(offset: number, limit: number): Promise<BaseResponse<Paginated<UserTokenDto>>>;
|
|
9
|
+
post(email: string, password: string, code?: string): Promise<BaseResponse<UserTokenDto>>;
|
|
10
|
+
deleteSession(token: string): Promise<BaseResponse<never>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { InvitationDto, StatusResponseDto, UserTokenDto } from "#data/dto";
|
|
3
|
+
export declare class InvitationService extends BaseService {
|
|
4
|
+
get(invitationId: string): Promise<BaseResponse<InvitationDto>>;
|
|
5
|
+
postAccept(invitationId: string, password?: string): Promise<BaseResponse<UserTokenDto>>;
|
|
6
|
+
postDecline(invitationId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { StatusResponseDto, TotpStateDto, UserDto } from "#data/dto";
|
|
3
|
+
export declare class MeService extends BaseService {
|
|
4
|
+
get(): Promise<BaseResponse<UserDto>>;
|
|
5
|
+
getTotp(): Promise<BaseResponse<TotpStateDto>>;
|
|
6
|
+
post(firstName: string, lastName: string, phoneNumber: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
7
|
+
postChangePassword(password: string, newPassword: string, newPasswordConfirm: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
8
|
+
postProfilePicture(picture: File): Promise<BaseResponse<StatusResponseDto>>;
|
|
9
|
+
postTotp(secret: string, code: string): Promise<BaseResponse<TotpStateDto>>;
|
|
10
|
+
deleteProfilePicture(): Promise<BaseResponse<StatusResponseDto>>;
|
|
11
|
+
deleteTotp(code: string): Promise<BaseResponse<TotpStateDto>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { BuyerDto, OrderDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantBuyerService extends BaseService {
|
|
4
|
+
get(merchantId: string, buyerId: string): Promise<BaseResponse<BuyerDto>>;
|
|
5
|
+
getOrder(merchantId: string, buyerId: string, orderId: string): Promise<BaseResponse<OrderDto>>;
|
|
6
|
+
getOrders(merchantId: string, buyerId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<OrderDto>>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { BuyerDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantBuyersService extends BaseService {
|
|
4
|
+
get(merchantId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<BuyerDto>>>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { MerchantDashboardKeyMetricsDto, MerchantDashboardUpcomingEventDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantDashboardService extends BaseService {
|
|
4
|
+
getKeyMetrics(merchantId: string): Promise<BaseResponse<MerchantDashboardKeyMetricsDto>>;
|
|
5
|
+
getUpcomingEvents(merchantId: string): Promise<BaseResponse<MerchantDashboardUpcomingEventDto[]>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { ProductDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantEventProductService extends BaseService {
|
|
4
|
+
get(merchantId: string, eventId: string, productId: string): Promise<BaseResponse<ProductDto>>;
|
|
5
|
+
postImage(merchantId: string, eventId: string, productId: string, picture: File): Promise<BaseResponse<object>>;
|
|
6
|
+
patch(merchantId: string, eventId: string, productId: string, product: ProductDto): Promise<BaseResponse<ProductDto>>;
|
|
7
|
+
patchPause(merchantId: string, eventId: string, productId: string): Promise<BaseResponse<never>>;
|
|
8
|
+
patchResume(merchantId: string, eventId: string, productId: string): Promise<BaseResponse<never>>;
|
|
9
|
+
delete(merchantId: string, eventId: string, productId: string): Promise<BaseResponse<never>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { FluxFormSelectEntry } from "@flux-ui/types";
|
|
3
|
+
import type { ProductDto } from "#data/dto";
|
|
4
|
+
export declare class MerchantEventProductsService extends BaseService {
|
|
5
|
+
get(merchantId: string, eventId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<ProductDto>>>;
|
|
6
|
+
getSelectOptions(merchantId: string, eventId: string, searchQuery?: string | null, ids?: string[] | null): Promise<BaseResponse<FluxFormSelectEntry[]>>;
|
|
7
|
+
post(merchantId: string, eventId: string, name: string, description: string, price: number, maxQuantity: number, stock: number | null, stockPoolId: string | null): Promise<BaseResponse<ProductDto>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { EventAvailabilityDto, EventCountersDto, EventDto, StatusResponseDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantEventService extends BaseService {
|
|
4
|
+
get(merchantId: string, eventId: string): Promise<BaseResponse<EventDto>>;
|
|
5
|
+
getAvailability(merchantId: string, eventId: string): Promise<BaseResponse<EventAvailabilityDto>>;
|
|
6
|
+
getCounters(merchantId: string, eventId: string): Promise<BaseResponse<EventCountersDto>>;
|
|
7
|
+
post(merchantId: string, event: EventDto): Promise<BaseResponse<EventDto>>;
|
|
8
|
+
postHeader(merchantId: string, eventId: string, picture: File): Promise<BaseResponse<StatusResponseDto>>;
|
|
9
|
+
postPublish(merchantId: string, eventId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
10
|
+
postUnpublish(merchantId: string, eventId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
11
|
+
delete(merchantId: string, eventId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
12
|
+
deleteHeader(merchantId: string, eventId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { ShopDesignDto, ShopDto, ShopElementDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantEventShopService extends BaseService {
|
|
4
|
+
get(merchantId: string, eventId: string, shopId: string): Promise<BaseResponse<ShopDto>>;
|
|
5
|
+
getElements(merchantId: string, eventId: string, shopId: string): Promise<BaseResponse<ShopElementDto[]>>;
|
|
6
|
+
patch(merchantId: string, eventId: string, shop: ShopDto): Promise<BaseResponse<ShopDto>>;
|
|
7
|
+
patchDesign(merchantId: string, eventId: string, shopId: string, design: ShopDesignDto): Promise<BaseResponse<ShopDesignDto>>;
|
|
8
|
+
patchElements(merchantId: string, eventId: string, shopId: string, elements: object[]): Promise<BaseResponse<ShopElementDto[]>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { DateTime } from "luxon";
|
|
3
|
+
import type { ShopDto, StatusResponseDto } from "#data/dto";
|
|
4
|
+
export declare class MerchantEventShopsService extends BaseService {
|
|
5
|
+
get(merchantId: string, eventId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<ShopDto>>>;
|
|
6
|
+
post(merchantId: string, eventId: string, name: string, startsOn: DateTime, endsOn: DateTime): Promise<BaseResponse<ShopDto>>;
|
|
7
|
+
delete(merchantId: string, eventId: string, shopId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { EventStatisticsAttendanceDto, EventStatisticsBuyerTotalsDto, EventStatisticsFinancialDto, EventStatisticsOrdersDto, EventStatisticsScansDto, EventStatisticsSwapTotalsDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantEventStatisticsService extends BaseService {
|
|
4
|
+
getAttendance(merchantId: string, eventId: string): Promise<BaseResponse<EventStatisticsAttendanceDto>>;
|
|
5
|
+
getBuyers(merchantId: string, eventId: string): Promise<BaseResponse<EventStatisticsBuyerTotalsDto>>;
|
|
6
|
+
getFinancial(merchant: string, event: string): Promise<BaseResponse<EventStatisticsFinancialDto>>;
|
|
7
|
+
getOrders(merchant: string, event: string): Promise<BaseResponse<EventStatisticsOrdersDto>>;
|
|
8
|
+
getScans(merchant: string, event: string): Promise<BaseResponse<EventStatisticsScansDto>>;
|
|
9
|
+
getSwaps(merchant: string, event: string): Promise<BaseResponse<EventStatisticsSwapTotalsDto>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { FluxFormSelectEntry } from "@flux-ui/types";
|
|
3
|
+
import type { StockOverviewDto, StockPoolDto } from "#data/dto";
|
|
4
|
+
export declare class MerchantEventStockPoolsService extends BaseService {
|
|
5
|
+
get(merchantId: string, eventId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<StockPoolDto>>>;
|
|
6
|
+
getOverview(merchantId: string, eventId: string): Promise<BaseResponse<StockOverviewDto>>;
|
|
7
|
+
getSelectOptions(merchantId: string, eventId: string, searchQuery?: string | null, ids?: string[] | null): Promise<BaseResponse<FluxFormSelectEntry[]>>;
|
|
8
|
+
post(merchantId: string, eventId: string, name: string, stock: number): Promise<BaseResponse<StockPoolDto>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, type BlobResponse } from "@basmilius/http-client";
|
|
2
|
+
import type { StatusResponseDto, TicketTemplateDto } from "#data/dto";
|
|
3
|
+
import type { TicketTemplateType } from "#data/types";
|
|
4
|
+
export declare class MerchantEventTicketTemplateService extends BaseService {
|
|
5
|
+
get(merchantId: string, eventId: string, ticketTemplateId: string): Promise<BaseResponse<TicketTemplateDto>>;
|
|
6
|
+
getDemo(merchantId: string, eventId: string, ticketTemplateId: string): Promise<BlobResponse>;
|
|
7
|
+
postVisual(merchantId: string, eventId: string, ticketTemplateId: string, picture: File): Promise<BaseResponse<StatusResponseDto>>;
|
|
8
|
+
patch(merchantId: string, eventId: string, ticketTemplateId: string, name: string, productId: string | null, variant: TicketTemplateType): Promise<BaseResponse<TicketTemplateDto>>;
|
|
9
|
+
delete(merchantId: string, eventId: string, ticketTemplateId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
10
|
+
deleteVisual(merchantId: string, eventId: string, ticketTemplateId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { FluxFormSelectEntry } from "@flux-ui/types";
|
|
3
|
+
import type { TicketTemplateDto } from "#data/dto";
|
|
4
|
+
import type { TicketTemplateType } from "#data/types";
|
|
5
|
+
export declare class MerchantEventTicketTemplatesService extends BaseService {
|
|
6
|
+
get(merchantId: string, eventId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<TicketTemplateDto>>>;
|
|
7
|
+
getSelectOptions(merchantId: string, eventId: string, searchQuery?: string | null, ids?: string[] | null): Promise<BaseResponse<FluxFormSelectEntry[]>>;
|
|
8
|
+
post(merchantId: string, eventId: string, name: string, productId: string | null, variant: TicketTemplateType, visual: File): Promise<BaseResponse<TicketTemplateDto>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { DateTime } from "luxon";
|
|
3
|
+
import type { EventDto } from "#data/dto";
|
|
4
|
+
export declare class MerchantEventsService extends BaseService {
|
|
5
|
+
get(merchantId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<EventDto>>>;
|
|
6
|
+
post(merchantId: string, name: string, description: string, startsOn: DateTime, endsOn: DateTime, minimumAge: number): Promise<BaseResponse<EventDto>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, BlobResponse } from "@basmilius/http-client";
|
|
2
|
+
import type { InvoiceDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantFinanceInvoiceService extends BaseService {
|
|
4
|
+
get(merchantId: string, invoiceId: string): Promise<BaseResponse<InvoiceDto>>;
|
|
5
|
+
getPDF(merchantId: string, invoiceId: string): Promise<BlobResponse>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { InvoiceDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantFinanceInvoicesService extends BaseService {
|
|
4
|
+
get(merchantId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<InvoiceDto>>>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { FinanceOverviewDto } from "#data/dto";
|
|
3
|
+
import type { DailyRevenueChart } from "#data/types";
|
|
4
|
+
export declare class MerchantFinanceService extends BaseService {
|
|
5
|
+
getDailyRevenue(merchantId: string): Promise<BaseResponse<DailyRevenueChart>>;
|
|
6
|
+
getMonthlyRevenue(merchantId: string): Promise<BaseResponse<DailyRevenueChart>>;
|
|
7
|
+
getOverview(merchantId: string): Promise<BaseResponse<FinanceOverviewDto>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, BlobResponse } from "@basmilius/http-client";
|
|
2
|
+
import type { OrderDto, TicketDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantOrderService extends BaseService {
|
|
4
|
+
get(merchantId: string, orderId: string): Promise<BaseResponse<OrderDto>>;
|
|
5
|
+
getPasses(merchantId: string, orderId: string): Promise<BlobResponse>;
|
|
6
|
+
getPDF(merchantId: string, orderId: string): Promise<BlobResponse>;
|
|
7
|
+
getTickets(merchantId: string, orderId: string): Promise<BaseResponse<TicketDto[]>>;
|
|
8
|
+
postResend(merchantId: string, orderId: string): Promise<BaseResponse<never>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { OrderDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantOrdersService extends BaseService {
|
|
4
|
+
get(merchantId: string, offset: number, limit: number, filter?: Record<string, string | number | boolean>): Promise<BaseResponse<Paginated<OrderDto>>>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { ContractDto, MerchantDto, PaymentProviderDto, StatusResponseDto, UserDto, VatNumberDto } from "#data/dto";
|
|
3
|
+
import type { Claim } from "#data/types";
|
|
4
|
+
export declare class MerchantService extends BaseService {
|
|
5
|
+
get(merchantId: string): Promise<BaseResponse<MerchantDto>>;
|
|
6
|
+
getAccountManager(merchantId: string): Promise<BaseResponse<UserDto | null>>;
|
|
7
|
+
getClaims(merchantId: string): Promise<BaseResponse<Claim[]>>;
|
|
8
|
+
getContract(merchantId: string): Promise<BaseResponse<ContractDto>>;
|
|
9
|
+
getPaymentProviders(merchantId: string): Promise<BaseResponse<PaymentProviderDto[]>>;
|
|
10
|
+
getVatNumber(merchantId: string): Promise<BaseResponse<VatNumberDto>>;
|
|
11
|
+
put(merchantId: string, merchant: MerchantDto): Promise<BaseResponse<MerchantDto>>;
|
|
12
|
+
postLogo(merchantId: string, picture: File): Promise<BaseResponse<StatusResponseDto>>;
|
|
13
|
+
deleteLogo(merchantId: string): Promise<BaseResponse<StatusResponseDto>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, BlobResponse } from "@basmilius/http-client";
|
|
2
|
+
import type { TicketDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantTicketService extends BaseService {
|
|
4
|
+
get(merchantId: string, ticketId: string): Promise<BaseResponse<TicketDto>>;
|
|
5
|
+
getPass(merchantId: string, ticketId: string): Promise<BlobResponse>;
|
|
6
|
+
getPDF(merchantId: string, ticketId: string): Promise<BlobResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { TicketDto } from "#data/dto";
|
|
3
|
+
export declare class MerchantTicketsService extends BaseService {
|
|
4
|
+
get(merchantId: string, offset: number, limit: number, filter?: Record<string, string | number | boolean>): Promise<BaseResponse<Paginated<TicketDto>>>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseResponse, BaseService, Paginated } from "@basmilius/http-client";
|
|
2
|
+
import type { InvitationDto, MerchantUserDto } from "#data/dto";
|
|
3
|
+
import type { Claim } from "#data/types";
|
|
4
|
+
export declare class MerchantUsersService extends BaseService {
|
|
5
|
+
get(merchantId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<MerchantUserDto>>>;
|
|
6
|
+
postInvite(merchantId: string, firstName: string, lastName: string, email: string, claims: Claim[]): Promise<BaseResponse<InvitationDto>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { OrderDto, PublicPaymentMethodDto, TransactionDto } from "#data/dto";
|
|
3
|
+
export declare class PublicOrderService extends BaseService {
|
|
4
|
+
get(orderId: string): Promise<BaseResponse<OrderDto>>;
|
|
5
|
+
getPaymentMethods(orderId: string): Promise<BaseResponse<PublicPaymentMethodDto[]>>;
|
|
6
|
+
postPay(orderId: string, paymentMethodId: string): Promise<BaseResponse<TransactionDto>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { DateTime } from "luxon";
|
|
3
|
+
import type { OrderDto, PublicShopCartProductDto, PublicShopDto, PublicShopReservationDto } from "#data/dto";
|
|
4
|
+
import type { Gender } from "#data/types";
|
|
5
|
+
export declare class PublicShopService extends BaseService {
|
|
6
|
+
get(shopId: string): Promise<BaseResponse<PublicShopDto>>;
|
|
7
|
+
buy(shopId: string, reservationId: string, firstName: string, lastName: string, email: string, phoneNumber: string, dateOfBirth: DateTime | null, gender: Gender | null): Promise<BaseResponse<OrderDto>>;
|
|
8
|
+
reserve(shopId: string, products: PublicShopCartProductDto[]): Promise<BaseResponse<PublicShopReservationDto>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { ReservationDto } from "#data/dto";
|
|
3
|
+
export declare class ReservationService extends BaseService {
|
|
4
|
+
get(id: string): Promise<BaseResponse<ReservationDto>>;
|
|
5
|
+
remove(id: string): Promise<BaseResponse<never>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
export declare class ServicesService extends BaseService {
|
|
3
|
+
checkEmail(email: string): Promise<BaseResponse<CheckEmailResponse>>;
|
|
4
|
+
}
|
|
5
|
+
type CheckEmailResponse = {
|
|
6
|
+
readonly email: string;
|
|
7
|
+
readonly suggestions?: string[];
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseResponse, BaseService } from "@basmilius/http-client";
|
|
2
|
+
import type { FluxFormSelectEntry, FluxFormSelectOption } from "@flux-ui/types";
|
|
3
|
+
export declare class UiSelectOptionsService extends BaseService {
|
|
4
|
+
getClaims(): Promise<BaseResponse<FluxFormSelectEntry[]>>;
|
|
5
|
+
getCountries(): Promise<BaseResponse<FluxFormSelectOption[]>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from "./AuthService";
|
|
2
|
+
export * from "./InvitationService";
|
|
3
|
+
export * from "./MerchantService";
|
|
4
|
+
export * from "./MerchantsService";
|
|
5
|
+
export * from "./MerchantBuyerService";
|
|
6
|
+
export * from "./MerchantBuyersService";
|
|
7
|
+
export * from "./MerchantDashboardService";
|
|
8
|
+
export * from "./MerchantEventProductService";
|
|
9
|
+
export * from "./MerchantEventProductsService";
|
|
10
|
+
export * from "./MerchantEventService";
|
|
11
|
+
export * from "./MerchantEventStatisticsService";
|
|
12
|
+
export * from "./MerchantEventShopService";
|
|
13
|
+
export * from "./MerchantEventShopsService";
|
|
14
|
+
export * from "./MerchantEventStockPoolsService";
|
|
15
|
+
export * from "./MerchantEventTicketTemplateService";
|
|
16
|
+
export * from "./MerchantEventTicketTemplatesService";
|
|
17
|
+
export * from "./MerchantEventsService";
|
|
18
|
+
export * from "./MerchantFinanceInvoiceService";
|
|
19
|
+
export * from "./MerchantFinanceInvoicesService";
|
|
20
|
+
export * from "./MerchantFinanceService";
|
|
21
|
+
export * from "./MerchantOrderService";
|
|
22
|
+
export * from "./MerchantOrdersService";
|
|
23
|
+
export * from "./MerchantStatisticsService";
|
|
24
|
+
export * from "./MerchantTicketService";
|
|
25
|
+
export * from "./MerchantTicketsService";
|
|
26
|
+
export * from "./MerchantUsersService";
|
|
27
|
+
export * from "./MeService";
|
|
28
|
+
export * from "./PublicOrderService";
|
|
29
|
+
export * from "./PublicShopService";
|
|
30
|
+
export * from "./ReservationService";
|
|
31
|
+
export * from "./ServicesService";
|
|
32
|
+
export * from "./UiSelectOptionsService";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type * from "./auth";
|
|
2
|
+
export type * from "./general";
|
|
3
|
+
export type * from "./event";
|
|
4
|
+
export type * from "./finance";
|
|
5
|
+
export type * from "./order";
|
|
6
|
+
export type * from "./payment";
|
|
7
|
+
export type * from "./product";
|
|
8
|
+
export type * from "./publicShop";
|
|
9
|
+
export type * from "./ticket";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function<T>(value: T): T | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function<T>(json: T): Blob;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function<T>(value: object[], adapter: (value: object) => T): T[] | null;
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@passly-nl/data",
|
|
3
|
+
"description": "API implementation for Passly.",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"funding": "https://github.com/sponsors/basmilius",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Bas Milius",
|
|
10
|
+
"email": "bas@mili.us",
|
|
11
|
+
"url": "https://bas.dev"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/basmilius/passly-data.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"api",
|
|
19
|
+
"passly",
|
|
20
|
+
"passly-nl"
|
|
21
|
+
],
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"src",
|
|
25
|
+
"CODEOWNERS",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public",
|
|
30
|
+
"provenance": false
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsgo --noEmit && bun -b build.ts"
|
|
34
|
+
},
|
|
35
|
+
"main": "./dist/index.js",
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"typings": "./dist/index.d.ts",
|
|
38
|
+
"sideEffects": false,
|
|
39
|
+
"imports": {
|
|
40
|
+
"#data/*": ["./src/*"]
|
|
41
|
+
},
|
|
42
|
+
"exports": {
|
|
43
|
+
".": {
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"default": "./dist/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./*": "./*"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@basmilius/http-client": "^2.27.0",
|
|
51
|
+
"@fortawesome/fontawesome-common-types": "^7.2.0",
|
|
52
|
+
"apexcharts": "^5.6.0",
|
|
53
|
+
"luxon": "^3.7.2"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@basmilius/tools": "^2.27.0",
|
|
57
|
+
"@flux-ui/types": "^3.0.0-next.26",
|
|
58
|
+
"@types/bun": "^1.3.9",
|
|
59
|
+
"@types/luxon": "^3.7.1",
|
|
60
|
+
"@typescript/native-preview": "^7.0.0-dev.20260222.1"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { adapter } from '@basmilius/http-client';
|
|
2
|
+
import { AddressDto } from '#data/dto';
|
|
3
|
+
|
|
4
|
+
@adapter
|
|
5
|
+
export class AddressAdapter {
|
|
6
|
+
static parseAddressFromObject(address: Record<string, any>) {
|
|
7
|
+
return new AddressDto(
|
|
8
|
+
address.id,
|
|
9
|
+
address.label,
|
|
10
|
+
address.street,
|
|
11
|
+
address.number,
|
|
12
|
+
address.postal_code,
|
|
13
|
+
address.city,
|
|
14
|
+
address.country,
|
|
15
|
+
address.formatted
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { adapter } from '@basmilius/http-client';
|
|
2
|
+
import { DateTimeAdapter, FileSystemAdapter } from '#data/adapter';
|
|
3
|
+
import { TotpStateDto, UserDto, UserTokenDto } from '#data/dto';
|
|
4
|
+
import { optional } from '#data/util';
|
|
5
|
+
|
|
6
|
+
@adapter
|
|
7
|
+
export class AuthAdapter {
|
|
8
|
+
static parseTotpStateFromObject(state: Record<string, any>): TotpStateDto {
|
|
9
|
+
return new TotpStateDto(
|
|
10
|
+
state.enabled,
|
|
11
|
+
state.secret,
|
|
12
|
+
state.qr
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static parseUserFromObject(user: Record<string, any>): UserDto {
|
|
17
|
+
return new UserDto(
|
|
18
|
+
user.id,
|
|
19
|
+
user.email,
|
|
20
|
+
user.first_name,
|
|
21
|
+
user.last_name,
|
|
22
|
+
user.full_name,
|
|
23
|
+
user.initials,
|
|
24
|
+
user.phone_number,
|
|
25
|
+
user.is_online,
|
|
26
|
+
optional(user.picture, FileSystemAdapter.parsePictureFromObject)
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static parseUserTokenFromObject(token: Record<string, any>): UserTokenDto {
|
|
31
|
+
return new UserTokenDto(
|
|
32
|
+
token.token,
|
|
33
|
+
token.type,
|
|
34
|
+
token.browser,
|
|
35
|
+
token.operating_system,
|
|
36
|
+
DateTimeAdapter.parseDateTimeFromString(token.created_on),
|
|
37
|
+
DateTimeAdapter.parseDateTimeFromString(token.expires_on),
|
|
38
|
+
token.realtime_channel,
|
|
39
|
+
optional(token.user, AuthAdapter.parseUserFromObject)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { adapter } from '@basmilius/http-client';
|
|
2
|
+
import { AddressAdapter, DateTimeAdapter } from '#data/adapter';
|
|
3
|
+
import { BuyerDto } from '#data/dto';
|
|
4
|
+
import { optional } from '#data/util';
|
|
5
|
+
|
|
6
|
+
@adapter
|
|
7
|
+
export class BuyerAdapter {
|
|
8
|
+
static parseBuyerFromObject(buyer: Record<string, any>): BuyerDto {
|
|
9
|
+
return new BuyerDto(
|
|
10
|
+
buyer.id,
|
|
11
|
+
buyer.first_name,
|
|
12
|
+
buyer.last_name,
|
|
13
|
+
buyer.email,
|
|
14
|
+
buyer.phone_number,
|
|
15
|
+
optional(buyer.date_of_birth, DateTimeAdapter.parseDateTimeFromString),
|
|
16
|
+
buyer.gender,
|
|
17
|
+
buyer.order_count ?? -1,
|
|
18
|
+
buyer.full_name,
|
|
19
|
+
optional(buyer.address, AddressAdapter.parseAddressFromObject)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { adapter } from '@basmilius/http-client';
|
|
2
|
+
import { StatusResponseDto } from '#data/dto';
|
|
3
|
+
|
|
4
|
+
@adapter
|
|
5
|
+
export class CommonAdapter {
|
|
6
|
+
static parseStatusResponseFromObject(response: Record<string, any>): StatusResponseDto {
|
|
7
|
+
return new StatusResponseDto(
|
|
8
|
+
response.message,
|
|
9
|
+
response.status
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { adapter } from '@basmilius/http-client';
|
|
2
|
+
import { DateTime } from 'luxon';
|
|
3
|
+
|
|
4
|
+
@adapter
|
|
5
|
+
export class DateTimeAdapter {
|
|
6
|
+
static parseDateTimeFromString(dateTime: string): DateTime {
|
|
7
|
+
return DateTime
|
|
8
|
+
.fromISO(dateTime, {zone: 'UTC'})
|
|
9
|
+
.setZone('Europe/Amsterdam');
|
|
10
|
+
}
|
|
11
|
+
}
|