@passly-nl/data 1.0.5 → 1.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.
Files changed (131) hide show
  1. package/dist/index.d.mts +1116 -171
  2. package/dist/index.d.mts.map +1 -1
  3. package/dist/index.mjs +5 -5
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +15 -10
  6. package/src/adapter/AiChatAdapter.ts +37 -0
  7. package/src/adapter/AiUsageAdapter.ts +42 -0
  8. package/src/adapter/CashFlowAdapter.ts +70 -0
  9. package/src/adapter/ContentCalendarAdapter.ts +34 -0
  10. package/src/adapter/DiscountCodeAdapter.ts +33 -0
  11. package/src/adapter/EventAdapter.ts +8 -71
  12. package/src/adapter/EventStatisticsBuyersAdapter.ts +27 -0
  13. package/src/adapter/EventStatisticsOperationsAdapter.ts +41 -0
  14. package/src/adapter/EventStatisticsOverviewAdapter.ts +39 -0
  15. package/src/adapter/EventStatisticsSalesAdapter.ts +21 -0
  16. package/src/adapter/MarketingAttributionAdapter.ts +18 -0
  17. package/src/adapter/MerchantAdapter.ts +3 -1
  18. package/src/adapter/OrderAdapter.ts +6 -2
  19. package/src/adapter/ProductAdapter.ts +3 -0
  20. package/src/adapter/PublicShopAdapter.ts +1 -2
  21. package/src/adapter/RefundAdapter.ts +34 -0
  22. package/src/adapter/ReservationAdapter.ts +3 -2
  23. package/src/adapter/StatisticsEventsAdapter.ts +6 -2
  24. package/src/adapter/StatisticsGrowthAdapter.ts +38 -0
  25. package/src/adapter/StatisticsInsightsAdapter.ts +39 -0
  26. package/src/adapter/StatisticsOperationsAdapter.ts +47 -0
  27. package/src/adapter/SubscriptionAdapter.ts +32 -0
  28. package/src/adapter/TicketAdapter.ts +1 -0
  29. package/src/adapter/index.ts +16 -1
  30. package/src/dto/aiChat/AiChatConversationDto.ts +49 -0
  31. package/src/dto/aiChat/AiChatMessageDto.ts +73 -0
  32. package/src/dto/aiChat/AiChatToolCallDto.ts +58 -0
  33. package/src/dto/aiChat/index.ts +3 -0
  34. package/src/dto/aiUsage/AiUsageDto.ts +110 -0
  35. package/src/dto/aiUsage/AiUsageFeatureStatusDto.ts +39 -0
  36. package/src/dto/aiUsage/AiUsagePeriodDto.ts +80 -0
  37. package/src/dto/aiUsage/index.ts +3 -0
  38. package/src/dto/cashFlow/CashFlowDiscountDto.ts +40 -0
  39. package/src/dto/cashFlow/CashFlowDto.ts +99 -0
  40. package/src/dto/cashFlow/CashFlowPaymentDto.ts +50 -0
  41. package/src/dto/cashFlow/CashFlowPlatformCostDto.ts +29 -0
  42. package/src/dto/cashFlow/CashFlowRefundDto.ts +101 -0
  43. package/src/dto/cashFlow/CashFlowTimelineEventDto.ts +71 -0
  44. package/src/dto/cashFlow/index.ts +6 -0
  45. package/src/dto/contentCalendar/ContentCalendarItemCreatorDto.ts +69 -0
  46. package/src/dto/contentCalendar/ContentCalendarItemDto.ts +133 -0
  47. package/src/dto/contentCalendar/index.ts +2 -0
  48. package/src/dto/discountCode/DiscountCodeDto.ts +141 -0
  49. package/src/dto/discountCode/index.ts +1 -0
  50. package/src/dto/event/TimeSlotDto.ts +59 -0
  51. package/src/dto/event/index.ts +1 -9
  52. package/src/dto/eventStatistics/EventStatisticsAppTeamDto.ts +58 -0
  53. package/src/dto/{event/EventStatisticsBuyerTotalsDto.ts → eventStatistics/EventStatisticsBuyersOverviewDto.ts} +18 -18
  54. package/src/dto/{event → eventStatistics}/EventStatisticsFinancialDto.ts +11 -1
  55. package/src/dto/eventStatistics/EventStatisticsKpisDto.ts +119 -0
  56. package/src/dto/eventStatistics/EventStatisticsOperationsOverviewDto.ts +58 -0
  57. package/src/dto/eventStatistics/EventStatisticsSalesFlowChartDto.ts +66 -0
  58. package/src/dto/{event/EventStatisticsOrderTotalsDto.ts → eventStatistics/EventStatisticsStatusDto.ts} +1 -1
  59. package/src/dto/{event/EventStatisticsSwapTotalsDto.ts → eventStatistics/EventStatisticsSwapsDto.ts} +1 -1
  60. package/src/dto/eventStatistics/index.ts +9 -0
  61. package/src/dto/index.ts +10 -0
  62. package/src/dto/marketingAttribution/MarketingAttributionDto.ts +88 -0
  63. package/src/dto/marketingAttribution/index.ts +1 -0
  64. package/src/dto/merchant/MerchantDto.ts +39 -2
  65. package/src/dto/order/OrderDto.ts +42 -2
  66. package/src/dto/product/ProductDto.ts +32 -2
  67. package/src/dto/publicShop/PublicShopCartProductDto.ts +1 -11
  68. package/src/dto/publicShop/PublicShopTimeSlotDto.ts +1 -11
  69. package/src/dto/realtime/AiChatMessageCompletedMessageDto.ts +9 -0
  70. package/src/dto/realtime/ContentCalendarGenerationCompletedMessageDto.ts +8 -0
  71. package/src/dto/realtime/InsightCardCompletedMessageDto.ts +9 -0
  72. package/src/dto/realtime/index.ts +3 -0
  73. package/src/dto/refund/RefundDto.ts +91 -0
  74. package/src/dto/{event/EventStatisticsScansPerAppTeamDto.ts → refund/RefundInitiatorDto.ts} +2 -12
  75. package/src/dto/refund/RefundTicketRefDto.ts +28 -0
  76. package/src/dto/refund/index.ts +3 -0
  77. package/src/dto/reservation/ReservationDto.ts +12 -2
  78. package/src/dto/statistics/InsightDto.ts +130 -0
  79. package/src/dto/statistics/InsightSignalDto.ts +29 -0
  80. package/src/dto/statistics/InsightsResponseDto.ts +50 -0
  81. package/src/dto/statistics/MilestoneDto.ts +80 -0
  82. package/src/dto/statistics/StatisticsGrowthOverviewDto.ts +59 -0
  83. package/src/dto/statistics/StatisticsOperationsAppTeamDto.ts +78 -0
  84. package/src/dto/statistics/StatisticsOperationsOverviewDto.ts +58 -0
  85. package/src/dto/statistics/StatisticsOperationsTaskAssigneeDto.ts +48 -0
  86. package/src/dto/statistics/StatisticsOperationsTasksOverviewDto.ts +69 -0
  87. package/src/dto/statistics/index.ts +9 -0
  88. package/src/dto/subscription/MerchantSubscriptionDto.ts +91 -0
  89. package/src/dto/subscription/SubscriptionPlanDto.ts +80 -0
  90. package/src/dto/subscription/index.ts +2 -0
  91. package/src/dto/ticket/TicketDto.ts +11 -1
  92. package/src/service/AdminMerchantSubscriptionService.ts +34 -0
  93. package/src/service/MerchantAiChatService.ts +51 -0
  94. package/src/service/MerchantAiSettingsService.ts +14 -0
  95. package/src/service/MerchantAiUsageService.ts +32 -0
  96. package/src/service/MerchantDiscountCodeService.ts +42 -0
  97. package/src/service/MerchantDiscountCodesService.ts +45 -0
  98. package/src/service/MerchantEventContentCalendarService.ts +122 -0
  99. package/src/service/MerchantEventProductService.ts +34 -8
  100. package/src/service/MerchantEventProductsService.ts +3 -2
  101. package/src/service/MerchantEventStatisticsBuyersService.ts +86 -0
  102. package/src/service/MerchantEventStatisticsOperationsService.ts +56 -0
  103. package/src/service/MerchantEventStatisticsOverviewService.ts +35 -0
  104. package/src/service/MerchantEventStatisticsSalesService.ts +76 -0
  105. package/src/service/MerchantEventTimeSlotService.ts +51 -0
  106. package/src/service/MerchantEventTimeSlotsService.ts +33 -0
  107. package/src/service/MerchantOrderService.ts +28 -2
  108. package/src/service/MerchantStatisticsEventsService.ts +43 -1
  109. package/src/service/MerchantStatisticsGrowthService.ts +37 -0
  110. package/src/service/MerchantStatisticsInsightsService.ts +15 -0
  111. package/src/service/MerchantStatisticsOperationsService.ts +57 -0
  112. package/src/service/PublicOrderService.ts +30 -0
  113. package/src/service/PublicShopService.ts +25 -7
  114. package/src/service/index.ts +17 -2
  115. package/src/types/aiUsage.ts +5 -0
  116. package/src/types/auth.ts +2 -0
  117. package/src/types/cashFlow.ts +10 -0
  118. package/src/types/contentCalendar.ts +3 -0
  119. package/src/types/discountCode.ts +8 -0
  120. package/src/types/feature.ts +14 -0
  121. package/src/types/general.ts +11 -0
  122. package/src/types/index.ts +9 -0
  123. package/src/types/insights.ts +24 -0
  124. package/src/types/milestone.ts +7 -0
  125. package/src/types/refund.ts +12 -0
  126. package/src/types/subscription.ts +1 -0
  127. package/src/dto/event/EventStatisticsOrdersDto.ts +0 -30
  128. package/src/dto/event/EventStatisticsScanTotalsDto.ts +0 -38
  129. package/src/dto/event/EventStatisticsScansDto.ts +0 -40
  130. package/src/service/MerchantEventStatisticsService.ts +0 -65
  131. /package/src/dto/{event → eventStatistics}/EventStatisticsAttendanceDto.ts +0 -0
@@ -0,0 +1,99 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { CashFlowDiscountDto, CashFlowPaymentDto, CashFlowPlatformCostDto, CashFlowRefundDto, CashFlowTimelineEventDto, CostDto } from '#data/dto';
3
+
4
+ @dto
5
+ export class CashFlowDto {
6
+ get subtotal(): CostDto {
7
+ return this.#subtotal;
8
+ }
9
+
10
+ set subtotal(value: CostDto) {
11
+ this.#subtotal = value;
12
+ }
13
+
14
+ get discount(): CashFlowDiscountDto | null {
15
+ return this.#discount;
16
+ }
17
+
18
+ set discount(value: CashFlowDiscountDto | null) {
19
+ this.#discount = value;
20
+ }
21
+
22
+ get total(): CostDto {
23
+ return this.#total;
24
+ }
25
+
26
+ set total(value: CostDto) {
27
+ this.#total = value;
28
+ }
29
+
30
+ get platformCost(): CashFlowPlatformCostDto {
31
+ return this.#platformCost;
32
+ }
33
+
34
+ set platformCost(value: CashFlowPlatformCostDto) {
35
+ this.#platformCost = value;
36
+ }
37
+
38
+ get refunds(): CashFlowRefundDto[] {
39
+ return this.#refunds;
40
+ }
41
+
42
+ set refunds(value: CashFlowRefundDto[]) {
43
+ this.#refunds = value;
44
+ }
45
+
46
+ get refundedTotal(): CostDto {
47
+ return this.#refundedTotal;
48
+ }
49
+
50
+ set refundedTotal(value: CostDto) {
51
+ this.#refundedTotal = value;
52
+ }
53
+
54
+ get netRevenue(): CostDto {
55
+ return this.#netRevenue;
56
+ }
57
+
58
+ set netRevenue(value: CostDto) {
59
+ this.#netRevenue = value;
60
+ }
61
+
62
+ get payment(): CashFlowPaymentDto {
63
+ return this.#payment;
64
+ }
65
+
66
+ set payment(value: CashFlowPaymentDto) {
67
+ this.#payment = value;
68
+ }
69
+
70
+ get timeline(): CashFlowTimelineEventDto[] {
71
+ return this.#timeline;
72
+ }
73
+
74
+ set timeline(value: CashFlowTimelineEventDto[]) {
75
+ this.#timeline = value;
76
+ }
77
+
78
+ #subtotal: CostDto;
79
+ #discount: CashFlowDiscountDto | null;
80
+ #total: CostDto;
81
+ #platformCost: CashFlowPlatformCostDto;
82
+ #refunds: CashFlowRefundDto[];
83
+ #refundedTotal: CostDto;
84
+ #netRevenue: CostDto;
85
+ #payment: CashFlowPaymentDto;
86
+ #timeline: CashFlowTimelineEventDto[];
87
+
88
+ constructor(subtotal: CostDto, discount: CashFlowDiscountDto | null, total: CostDto, platformCost: CashFlowPlatformCostDto, refunds: CashFlowRefundDto[], refundedTotal: CostDto, netRevenue: CostDto, payment: CashFlowPaymentDto, timeline: CashFlowTimelineEventDto[]) {
89
+ this.#subtotal = subtotal;
90
+ this.#discount = discount;
91
+ this.#total = total;
92
+ this.#platformCost = platformCost;
93
+ this.#refunds = refunds;
94
+ this.#refundedTotal = refundedTotal;
95
+ this.#netRevenue = netRevenue;
96
+ this.#payment = payment;
97
+ this.#timeline = timeline;
98
+ }
99
+ }
@@ -0,0 +1,50 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { DateTime } from 'luxon';
3
+ import type { TransactionStatus } from '#data/types';
4
+
5
+ @dto
6
+ export class CashFlowPaymentDto {
7
+ get status(): TransactionStatus | null {
8
+ return this.#status;
9
+ }
10
+
11
+ set status(value: TransactionStatus | null) {
12
+ this.#status = value;
13
+ }
14
+
15
+ get provider(): string | null {
16
+ return this.#provider;
17
+ }
18
+
19
+ set provider(value: string | null) {
20
+ this.#provider = value;
21
+ }
22
+
23
+ get method(): string | null {
24
+ return this.#method;
25
+ }
26
+
27
+ set method(value: string | null) {
28
+ this.#method = value;
29
+ }
30
+
31
+ get paidOn(): DateTime | null {
32
+ return this.#paidOn;
33
+ }
34
+
35
+ set paidOn(value: DateTime | null) {
36
+ this.#paidOn = value;
37
+ }
38
+
39
+ #status: TransactionStatus | null;
40
+ #provider: string | null;
41
+ #method: string | null;
42
+ #paidOn: DateTime | null;
43
+
44
+ constructor(status: TransactionStatus | null, provider: string | null, method: string | null, paidOn: DateTime | null) {
45
+ this.#status = status;
46
+ this.#provider = provider;
47
+ this.#method = method;
48
+ this.#paidOn = paidOn;
49
+ }
50
+ }
@@ -0,0 +1,29 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { CostDto } from '#data/dto';
3
+
4
+ @dto
5
+ export class CashFlowPlatformCostDto {
6
+ get amount(): CostDto {
7
+ return this.#amount;
8
+ }
9
+
10
+ set amount(value: CostDto) {
11
+ this.#amount = value;
12
+ }
13
+
14
+ get isBillable(): boolean {
15
+ return this.#isBillable;
16
+ }
17
+
18
+ set isBillable(value: boolean) {
19
+ this.#isBillable = value;
20
+ }
21
+
22
+ #amount: CostDto;
23
+ #isBillable: boolean;
24
+
25
+ constructor(amount: CostDto, isBillable: boolean) {
26
+ this.#amount = amount;
27
+ this.#isBillable = isBillable;
28
+ }
29
+ }
@@ -0,0 +1,101 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { DateTime } from 'luxon';
3
+ import type { CostDto, RefundInitiatorDto, RefundTicketRefDto } from '#data/dto';
4
+ import type { RefundReason, RefundStatus } from '#data/types';
5
+
6
+ @dto
7
+ export class CashFlowRefundDto {
8
+ get id(): string {
9
+ return this.#id;
10
+ }
11
+
12
+ set id(value: string) {
13
+ this.#id = value;
14
+ }
15
+
16
+ get amount(): CostDto {
17
+ return this.#amount;
18
+ }
19
+
20
+ set amount(value: CostDto) {
21
+ this.#amount = value;
22
+ }
23
+
24
+ get status(): RefundStatus {
25
+ return this.#status;
26
+ }
27
+
28
+ set status(value: RefundStatus) {
29
+ this.#status = value;
30
+ }
31
+
32
+ get reason(): RefundReason {
33
+ return this.#reason;
34
+ }
35
+
36
+ set reason(value: RefundReason) {
37
+ this.#reason = value;
38
+ }
39
+
40
+ get reasonLabel(): string {
41
+ return this.#reasonLabel;
42
+ }
43
+
44
+ set reasonLabel(value: string) {
45
+ this.#reasonLabel = value;
46
+ }
47
+
48
+ get note(): string | null {
49
+ return this.#note;
50
+ }
51
+
52
+ set note(value: string | null) {
53
+ this.#note = value;
54
+ }
55
+
56
+ get initiator(): RefundInitiatorDto | null {
57
+ return this.#initiator;
58
+ }
59
+
60
+ set initiator(value: RefundInitiatorDto | null) {
61
+ this.#initiator = value;
62
+ }
63
+
64
+ get tickets(): RefundTicketRefDto[] {
65
+ return this.#tickets;
66
+ }
67
+
68
+ set tickets(value: RefundTicketRefDto[]) {
69
+ this.#tickets = value;
70
+ }
71
+
72
+ get completedOn(): DateTime | null {
73
+ return this.#completedOn;
74
+ }
75
+
76
+ set completedOn(value: DateTime | null) {
77
+ this.#completedOn = value;
78
+ }
79
+
80
+ #id: string;
81
+ #amount: CostDto;
82
+ #status: RefundStatus;
83
+ #reason: RefundReason;
84
+ #reasonLabel: string;
85
+ #note: string | null;
86
+ #initiator: RefundInitiatorDto | null;
87
+ #tickets: RefundTicketRefDto[];
88
+ #completedOn: DateTime | null;
89
+
90
+ constructor(id: string, amount: CostDto, status: RefundStatus, reason: RefundReason, reasonLabel: string, note: string | null, initiator: RefundInitiatorDto | null, tickets: RefundTicketRefDto[], completedOn: DateTime | null) {
91
+ this.#id = id;
92
+ this.#amount = amount;
93
+ this.#status = status;
94
+ this.#reason = reason;
95
+ this.#reasonLabel = reasonLabel;
96
+ this.#note = note;
97
+ this.#initiator = initiator;
98
+ this.#tickets = tickets;
99
+ this.#completedOn = completedOn;
100
+ }
101
+ }
@@ -0,0 +1,71 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { DateTime } from 'luxon';
3
+ import type { CostDto } from '#data/dto';
4
+ import type { CashFlowEventType } from '#data/types';
5
+
6
+ @dto
7
+ export class CashFlowTimelineEventDto {
8
+ get at(): DateTime {
9
+ return this.#at;
10
+ }
11
+
12
+ set at(value: DateTime) {
13
+ this.#at = value;
14
+ }
15
+
16
+ get type(): CashFlowEventType {
17
+ return this.#type;
18
+ }
19
+
20
+ set type(value: CashFlowEventType) {
21
+ this.#type = value;
22
+ }
23
+
24
+ get amount(): CostDto | null {
25
+ return this.#amount;
26
+ }
27
+
28
+ set amount(value: CostDto | null) {
29
+ this.#amount = value;
30
+ }
31
+
32
+ get balance(): CostDto {
33
+ return this.#balance;
34
+ }
35
+
36
+ set balance(value: CostDto) {
37
+ this.#balance = value;
38
+ }
39
+
40
+ get description(): string {
41
+ return this.#description;
42
+ }
43
+
44
+ set description(value: string) {
45
+ this.#description = value;
46
+ }
47
+
48
+ get details(): Record<string, unknown> | null {
49
+ return this.#details;
50
+ }
51
+
52
+ set details(value: Record<string, unknown> | null) {
53
+ this.#details = value;
54
+ }
55
+
56
+ #at: DateTime;
57
+ #type: CashFlowEventType;
58
+ #amount: CostDto | null;
59
+ #balance: CostDto;
60
+ #description: string;
61
+ #details: Record<string, unknown> | null;
62
+
63
+ constructor(at: DateTime, type: CashFlowEventType, amount: CostDto | null, balance: CostDto, description: string, details: Record<string, unknown> | null) {
64
+ this.#at = at;
65
+ this.#type = type;
66
+ this.#amount = amount;
67
+ this.#balance = balance;
68
+ this.#description = description;
69
+ this.#details = details;
70
+ }
71
+ }
@@ -0,0 +1,6 @@
1
+ export * from './CashFlowDiscountDto';
2
+ export * from './CashFlowDto';
3
+ export * from './CashFlowPaymentDto';
4
+ export * from './CashFlowPlatformCostDto';
5
+ export * from './CashFlowRefundDto';
6
+ export * from './CashFlowTimelineEventDto';
@@ -0,0 +1,69 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { PictureDto } from '#data/dto';
3
+
4
+ @dto
5
+ export class ContentCalendarItemCreatorDto {
6
+ get id(): string {
7
+ return this.#id;
8
+ }
9
+
10
+ set id(value: string) {
11
+ this.#id = value;
12
+ }
13
+
14
+ get firstName(): string {
15
+ return this.#firstName;
16
+ }
17
+
18
+ set firstName(value: string) {
19
+ this.#firstName = value;
20
+ }
21
+
22
+ get lastName(): string {
23
+ return this.#lastName;
24
+ }
25
+
26
+ set lastName(value: string) {
27
+ this.#lastName = value;
28
+ }
29
+
30
+ get fullName(): string {
31
+ return this.#fullName;
32
+ }
33
+
34
+ set fullName(value: string) {
35
+ this.#fullName = value;
36
+ }
37
+
38
+ get initials(): string {
39
+ return this.#initials;
40
+ }
41
+
42
+ set initials(value: string) {
43
+ this.#initials = value;
44
+ }
45
+
46
+ get picture(): PictureDto | null {
47
+ return this.#picture;
48
+ }
49
+
50
+ set picture(value: PictureDto | null) {
51
+ this.#picture = value;
52
+ }
53
+
54
+ #id: string;
55
+ #firstName: string;
56
+ #lastName: string;
57
+ #fullName: string;
58
+ #initials: string;
59
+ #picture: PictureDto | null;
60
+
61
+ constructor(id: string, firstName: string, lastName: string, fullName: string, initials: string, picture: PictureDto | null) {
62
+ this.#id = id;
63
+ this.#firstName = firstName;
64
+ this.#lastName = lastName;
65
+ this.#fullName = fullName;
66
+ this.#initials = initials;
67
+ this.#picture = picture;
68
+ }
69
+ }
@@ -0,0 +1,133 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { DateTime } from 'luxon';
3
+ import type { ContentCalendarItemChannel, ContentCalendarItemSource, ContentCalendarItemStatus } from '#data/types';
4
+ import type { ContentCalendarItemCreatorDto } from './ContentCalendarItemCreatorDto';
5
+
6
+ @dto
7
+ export class ContentCalendarItemDto {
8
+ get id(): string {
9
+ return this.#id;
10
+ }
11
+
12
+ set id(value: string) {
13
+ this.#id = value;
14
+ }
15
+
16
+ get eventId(): string | null {
17
+ return this.#eventId;
18
+ }
19
+
20
+ set eventId(value: string | null) {
21
+ this.#eventId = value;
22
+ }
23
+
24
+ get scheduledOn(): DateTime | null {
25
+ return this.#scheduledOn;
26
+ }
27
+
28
+ set scheduledOn(value: DateTime | null) {
29
+ this.#scheduledOn = value;
30
+ }
31
+
32
+ get status(): ContentCalendarItemStatus {
33
+ return this.#status;
34
+ }
35
+
36
+ set status(value: ContentCalendarItemStatus) {
37
+ this.#status = value;
38
+ }
39
+
40
+ get source(): ContentCalendarItemSource {
41
+ return this.#source;
42
+ }
43
+
44
+ set source(value: ContentCalendarItemSource) {
45
+ this.#source = value;
46
+ }
47
+
48
+ get channel(): ContentCalendarItemChannel | null {
49
+ return this.#channel;
50
+ }
51
+
52
+ set channel(value: ContentCalendarItemChannel | null) {
53
+ this.#channel = value;
54
+ }
55
+
56
+ get content(): string | null {
57
+ return this.#content;
58
+ }
59
+
60
+ set content(value: string | null) {
61
+ this.#content = value;
62
+ }
63
+
64
+ get imageSuggestion(): string | null {
65
+ return this.#imageSuggestion;
66
+ }
67
+
68
+ set imageSuggestion(value: string | null) {
69
+ this.#imageSuggestion = value;
70
+ }
71
+
72
+ get creator(): ContentCalendarItemCreatorDto | null {
73
+ return this.#creator;
74
+ }
75
+
76
+ set creator(value: ContentCalendarItemCreatorDto | null) {
77
+ this.#creator = value;
78
+ }
79
+
80
+ get createdOn(): DateTime {
81
+ return this.#createdOn;
82
+ }
83
+
84
+ set createdOn(value: DateTime) {
85
+ this.#createdOn = value;
86
+ }
87
+
88
+ get updatedOn(): DateTime {
89
+ return this.#updatedOn;
90
+ }
91
+
92
+ set updatedOn(value: DateTime) {
93
+ this.#updatedOn = value;
94
+ }
95
+
96
+ #id: string;
97
+ #eventId: string | null;
98
+ #scheduledOn: DateTime | null;
99
+ #status: ContentCalendarItemStatus;
100
+ #source: ContentCalendarItemSource;
101
+ #channel: ContentCalendarItemChannel | null;
102
+ #content: string | null;
103
+ #imageSuggestion: string | null;
104
+ #creator: ContentCalendarItemCreatorDto | null;
105
+ #createdOn: DateTime;
106
+ #updatedOn: DateTime;
107
+
108
+ constructor(
109
+ id: string,
110
+ eventId: string | null,
111
+ scheduledOn: DateTime | null,
112
+ status: ContentCalendarItemStatus,
113
+ source: ContentCalendarItemSource,
114
+ channel: ContentCalendarItemChannel | null,
115
+ content: string | null,
116
+ imageSuggestion: string | null,
117
+ creator: ContentCalendarItemCreatorDto | null,
118
+ createdOn: DateTime,
119
+ updatedOn: DateTime
120
+ ) {
121
+ this.#id = id;
122
+ this.#eventId = eventId;
123
+ this.#scheduledOn = scheduledOn;
124
+ this.#status = status;
125
+ this.#source = source;
126
+ this.#channel = channel;
127
+ this.#content = content;
128
+ this.#imageSuggestion = imageSuggestion;
129
+ this.#creator = creator;
130
+ this.#createdOn = createdOn;
131
+ this.#updatedOn = updatedOn;
132
+ }
133
+ }
@@ -0,0 +1,2 @@
1
+ export * from './ContentCalendarItemCreatorDto';
2
+ export * from './ContentCalendarItemDto';
@@ -0,0 +1,141 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { DateTime } from 'luxon';
3
+ import type { CostDto } from '#data/dto';
4
+ import type { DiscountCodeEvent, DiscountCodeType } from '#data/types';
5
+
6
+ @dto
7
+ export class DiscountCodeDto {
8
+ get id(): string {
9
+ return this.#id;
10
+ }
11
+
12
+ set id(value: string) {
13
+ this.#id = value;
14
+ }
15
+
16
+ get code(): string {
17
+ return this.#code;
18
+ }
19
+
20
+ set code(value: string) {
21
+ this.#code = value;
22
+ }
23
+
24
+ get type(): DiscountCodeType {
25
+ return this.#type;
26
+ }
27
+
28
+ set type(value: DiscountCodeType) {
29
+ this.#type = value;
30
+ }
31
+
32
+ get percentage(): number | null {
33
+ return this.#percentage;
34
+ }
35
+
36
+ set percentage(value: number | null) {
37
+ this.#percentage = value;
38
+ }
39
+
40
+ get amount(): CostDto | null {
41
+ return this.#amount;
42
+ }
43
+
44
+ set amount(value: CostDto | null) {
45
+ this.#amount = value;
46
+ }
47
+
48
+ get maxUses(): number | null {
49
+ return this.#maxUses;
50
+ }
51
+
52
+ set maxUses(value: number | null) {
53
+ this.#maxUses = value;
54
+ }
55
+
56
+ get validFrom(): DateTime {
57
+ return this.#validFrom;
58
+ }
59
+
60
+ set validFrom(value: DateTime) {
61
+ this.#validFrom = value;
62
+ }
63
+
64
+ get validUntil(): DateTime {
65
+ return this.#validUntil;
66
+ }
67
+
68
+ set validUntil(value: DateTime) {
69
+ this.#validUntil = value;
70
+ }
71
+
72
+ get createdOn(): DateTime {
73
+ return this.#createdOn;
74
+ }
75
+
76
+ set createdOn(value: DateTime) {
77
+ this.#createdOn = value;
78
+ }
79
+
80
+ get usesCount(): number {
81
+ return this.#usesCount;
82
+ }
83
+
84
+ set usesCount(value: number) {
85
+ this.#usesCount = value;
86
+ }
87
+
88
+ get remainingUses(): number | null {
89
+ return this.#remainingUses;
90
+ }
91
+
92
+ set remainingUses(value: number | null) {
93
+ this.#remainingUses = value;
94
+ }
95
+
96
+ get isCurrentlyValid(): boolean {
97
+ return this.#isCurrentlyValid;
98
+ }
99
+
100
+ set isCurrentlyValid(value: boolean) {
101
+ this.#isCurrentlyValid = value;
102
+ }
103
+
104
+ get event(): DiscountCodeEvent | null {
105
+ return this.#event;
106
+ }
107
+
108
+ set event(value: DiscountCodeEvent | null) {
109
+ this.#event = value;
110
+ }
111
+
112
+ #id: string;
113
+ #code: string;
114
+ #type: DiscountCodeType;
115
+ #percentage: number | null;
116
+ #amount: CostDto | null;
117
+ #maxUses: number | null;
118
+ #validFrom: DateTime;
119
+ #validUntil: DateTime;
120
+ #createdOn: DateTime;
121
+ #usesCount: number;
122
+ #remainingUses: number | null;
123
+ #isCurrentlyValid: boolean;
124
+ #event: DiscountCodeEvent | null;
125
+
126
+ constructor(id: string, code: string, type: DiscountCodeType, percentage: number | null, amount: CostDto | null, maxUses: number | null, validFrom: DateTime, validUntil: DateTime, createdOn: DateTime, usesCount: number, remainingUses: number | null, isCurrentlyValid: boolean, event: DiscountCodeEvent | null) {
127
+ this.#id = id;
128
+ this.#code = code;
129
+ this.#type = type;
130
+ this.#percentage = percentage;
131
+ this.#amount = amount;
132
+ this.#maxUses = maxUses;
133
+ this.#validFrom = validFrom;
134
+ this.#validUntil = validUntil;
135
+ this.#createdOn = createdOn;
136
+ this.#usesCount = usesCount;
137
+ this.#remainingUses = remainingUses;
138
+ this.#isCurrentlyValid = isCurrentlyValid;
139
+ this.#event = event;
140
+ }
141
+ }
@@ -0,0 +1 @@
1
+ export * from './DiscountCodeDto';