@passly-nl/data 1.5.0 → 1.6.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@passly-nl/data",
3
3
  "description": "API implementation for Passly.",
4
- "version": "1.5.0",
4
+ "version": "1.6.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
@@ -24,6 +24,7 @@ export class EventAdapter {
24
24
  data.id,
25
25
  data.name,
26
26
  data.description,
27
+ data.description_plaintext,
27
28
  DateTimeAdapter.parseDateTime(data.starts_on),
28
29
  DateTimeAdapter.parseDateTime(data.ends_on),
29
30
  data.minimum_age,
@@ -11,6 +11,7 @@ export class ProductAdapter {
11
11
  data.type,
12
12
  data.name,
13
13
  data.description,
14
+ data.description_plaintext,
14
15
  optional(data.price, PaymentAdapter.parseCost),
15
16
  data.max_quantity,
16
17
  data.is_active,
@@ -99,6 +99,7 @@ export class PublicShopAdapter {
99
99
  data.id,
100
100
  data.name,
101
101
  data.description,
102
+ data.description_plaintext,
102
103
  data.status,
103
104
  AddressAdapter.parseAddress(data.address),
104
105
  optional(data.header_file, FileSystemAdapter.parsePicture),
@@ -121,6 +122,7 @@ export class PublicShopAdapter {
121
122
  data.type,
122
123
  data.name,
123
124
  data.description,
125
+ data.description_plaintext,
124
126
  PaymentAdapter.parseCost(data.price),
125
127
  data.max_quantity,
126
128
  data.is_active,
@@ -29,6 +29,14 @@ export class EventDto {
29
29
  this.#description = value;
30
30
  }
31
31
 
32
+ get descriptionPlaintext(): string {
33
+ return this.#descriptionPlaintext;
34
+ }
35
+
36
+ set descriptionPlaintext(value: string) {
37
+ this.#descriptionPlaintext = value;
38
+ }
39
+
32
40
  get startsOn(): DateTime {
33
41
  return this.#startsOn;
34
42
  }
@@ -96,6 +104,7 @@ export class EventDto {
96
104
  #id: string;
97
105
  #name: string;
98
106
  #description: string;
107
+ #descriptionPlaintext: string;
99
108
  #startsOn: DateTime;
100
109
  #endsOn: DateTime;
101
110
  #minimumAge: number;
@@ -105,10 +114,11 @@ export class EventDto {
105
114
  #createdOn: DateTime;
106
115
  #updatedOn: DateTime;
107
116
 
108
- constructor(id: string, name: string, description: string, startsOn: DateTime, endsOn: DateTime, minimumAge: number, status: EventStatus, address: AddressDto, headerFile: PictureDto | null, createdOn: DateTime, updatedOn: DateTime) {
117
+ constructor(id: string, name: string, description: string, descriptionPlaintext: string, startsOn: DateTime, endsOn: DateTime, minimumAge: number, status: EventStatus, address: AddressDto, headerFile: PictureDto | null, createdOn: DateTime, updatedOn: DateTime) {
109
118
  this.#id = id;
110
119
  this.#name = name;
111
120
  this.#description = description;
121
+ this.#descriptionPlaintext = descriptionPlaintext;
112
122
  this.#startsOn = startsOn;
113
123
  this.#endsOn = endsOn;
114
124
  this.#minimumAge = minimumAge;
@@ -37,6 +37,14 @@ export class ProductDto {
37
37
  this.#description = value;
38
38
  }
39
39
 
40
+ get descriptionPlaintext(): string {
41
+ return this.#descriptionPlaintext;
42
+ }
43
+
44
+ set descriptionPlaintext(value: string) {
45
+ this.#descriptionPlaintext = value;
46
+ }
47
+
40
48
  get price(): CostDto {
41
49
  return this.#price;
42
50
  }
@@ -193,6 +201,7 @@ export class ProductDto {
193
201
  #type: ProductType;
194
202
  #name: string;
195
203
  #description: string;
204
+ #descriptionPlaintext: string;
196
205
  #price: CostDto;
197
206
  #maxQuantity: number;
198
207
  #isActive: boolean;
@@ -213,11 +222,12 @@ export class ProductDto {
213
222
  #sold: number;
214
223
  #isScannable: boolean;
215
224
 
216
- constructor(id: string, type: ProductType, name: string, description: string, price: CostDto, maxQuantity: number, isActive: boolean, isPersonalizationRequired: boolean, isSwappable: boolean, isTimeslotted: boolean, timeSlots: TimeSlotDto[], remainingStock: number, stock: StockPoolDto, hasSales: boolean, image: PictureDto, images: PictureDto[], ticketsReleasedOn: DateTime | null, showWhenUnavailable: boolean, saleStartsOn: DateTime | null, saleEndsOn: DateTime | null, availability: ProductAvailability, sold: number, isScannable: boolean = true) {
225
+ constructor(id: string, type: ProductType, name: string, description: string, descriptionPlaintext: string, price: CostDto, maxQuantity: number, isActive: boolean, isPersonalizationRequired: boolean, isSwappable: boolean, isTimeslotted: boolean, timeSlots: TimeSlotDto[], remainingStock: number, stock: StockPoolDto, hasSales: boolean, image: PictureDto, images: PictureDto[], ticketsReleasedOn: DateTime | null, showWhenUnavailable: boolean, saleStartsOn: DateTime | null, saleEndsOn: DateTime | null, availability: ProductAvailability, sold: number, isScannable: boolean = true) {
217
226
  this.#id = id;
218
227
  this.#type = type;
219
228
  this.#name = name;
220
229
  this.#description = description;
230
+ this.#descriptionPlaintext = descriptionPlaintext;
221
231
  this.#price = price;
222
232
  this.#maxQuantity = maxQuantity;
223
233
  this.#isActive = isActive;
@@ -29,6 +29,14 @@ export class PublicShopEventDto {
29
29
  this.#description = value;
30
30
  }
31
31
 
32
+ get descriptionPlaintext(): string {
33
+ return this.#descriptionPlaintext;
34
+ }
35
+
36
+ set descriptionPlaintext(value: string) {
37
+ this.#descriptionPlaintext = value;
38
+ }
39
+
32
40
  get status(): EventStatus {
33
41
  return this.#status;
34
42
  }
@@ -80,6 +88,7 @@ export class PublicShopEventDto {
80
88
  #id: string;
81
89
  #name: string;
82
90
  #description: string;
91
+ #descriptionPlaintext: string;
83
92
  #status: EventStatus;
84
93
  #address: AddressDto;
85
94
  #headerFile: PictureDto | null;
@@ -87,10 +96,11 @@ export class PublicShopEventDto {
87
96
  #startsOn: DateTime;
88
97
  #endsOn: DateTime;
89
98
 
90
- constructor(id: string, name: string, description: string, status: EventStatus, address: AddressDto, headerFile: PictureDto | null, minimumAge: number, startsOn: DateTime, endsOn: DateTime) {
99
+ constructor(id: string, name: string, description: string, descriptionPlaintext: string, status: EventStatus, address: AddressDto, headerFile: PictureDto | null, minimumAge: number, startsOn: DateTime, endsOn: DateTime) {
91
100
  this.#id = id;
92
101
  this.#name = name;
93
102
  this.#description = description;
103
+ this.#descriptionPlaintext = descriptionPlaintext;
94
104
  this.#status = status;
95
105
  this.#address = address;
96
106
  this.#headerFile = headerFile;
@@ -37,6 +37,14 @@ export class PublicShopProductDto {
37
37
  this.#description = value;
38
38
  }
39
39
 
40
+ get descriptionPlaintext(): string {
41
+ return this.#descriptionPlaintext;
42
+ }
43
+
44
+ set descriptionPlaintext(value: string) {
45
+ this.#descriptionPlaintext = value;
46
+ }
47
+
40
48
  get price(): CostDto {
41
49
  return this.#price;
42
50
  }
@@ -121,6 +129,7 @@ export class PublicShopProductDto {
121
129
  #type: ProductType;
122
130
  #name: string;
123
131
  #description: string;
132
+ #descriptionPlaintext: string;
124
133
  #price: CostDto;
125
134
  #maxQuantity: number;
126
135
  #isActive: boolean;
@@ -132,11 +141,12 @@ export class PublicShopProductDto {
132
141
  #saleStartsOn: DateTime | null;
133
142
  #saleEndsOn: DateTime | null;
134
143
 
135
- constructor(id: string, type: ProductType, name: string, description: string, price: CostDto, maxQuantity: number, isActive: boolean, isTimeslotted: boolean, timeSlots: PublicShopTimeSlotDto[], image: PictureDto | null, images: PictureDto[], availability: ProductAvailability, saleStartsOn: DateTime | null, saleEndsOn: DateTime | null) {
144
+ constructor(id: string, type: ProductType, name: string, description: string, descriptionPlaintext: string, price: CostDto, maxQuantity: number, isActive: boolean, isTimeslotted: boolean, timeSlots: PublicShopTimeSlotDto[], image: PictureDto | null, images: PictureDto[], availability: ProductAvailability, saleStartsOn: DateTime | null, saleEndsOn: DateTime | null) {
136
145
  this.#id = id;
137
146
  this.#type = type;
138
147
  this.#name = name;
139
148
  this.#description = description;
149
+ this.#descriptionPlaintext = descriptionPlaintext;
140
150
  this.#price = price;
141
151
  this.#maxQuantity = maxQuantity;
142
152
  this.#isActive = isActive;