@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/dist/index.d.mts +12 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +40 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/adapter/EventAdapter.ts +1 -0
- package/src/adapter/ProductAdapter.ts +1 -0
- package/src/adapter/PublicShopAdapter.ts +2 -0
- package/src/dto/event/EventDto.ts +11 -1
- package/src/dto/product/ProductDto.ts +11 -1
- package/src/dto/publicShop/PublicShopEventDto.ts +11 -1
- package/src/dto/publicShop/PublicShopProductDto.ts +11 -1
package/dist/index.mjs
CHANGED
|
@@ -1462,6 +1462,12 @@ let EventDto = class EventDto {
|
|
|
1462
1462
|
set description(value) {
|
|
1463
1463
|
this.#description = value;
|
|
1464
1464
|
}
|
|
1465
|
+
get descriptionPlaintext() {
|
|
1466
|
+
return this.#descriptionPlaintext;
|
|
1467
|
+
}
|
|
1468
|
+
set descriptionPlaintext(value) {
|
|
1469
|
+
this.#descriptionPlaintext = value;
|
|
1470
|
+
}
|
|
1465
1471
|
get startsOn() {
|
|
1466
1472
|
return this.#startsOn;
|
|
1467
1473
|
}
|
|
@@ -1513,6 +1519,7 @@ let EventDto = class EventDto {
|
|
|
1513
1519
|
#id;
|
|
1514
1520
|
#name;
|
|
1515
1521
|
#description;
|
|
1522
|
+
#descriptionPlaintext;
|
|
1516
1523
|
#startsOn;
|
|
1517
1524
|
#endsOn;
|
|
1518
1525
|
#minimumAge;
|
|
@@ -1521,10 +1528,11 @@ let EventDto = class EventDto {
|
|
|
1521
1528
|
#headerFile;
|
|
1522
1529
|
#createdOn;
|
|
1523
1530
|
#updatedOn;
|
|
1524
|
-
constructor(id, name, description, startsOn, endsOn, minimumAge, status, address, headerFile, createdOn, updatedOn) {
|
|
1531
|
+
constructor(id, name, description, descriptionPlaintext, startsOn, endsOn, minimumAge, status, address, headerFile, createdOn, updatedOn) {
|
|
1525
1532
|
this.#id = id;
|
|
1526
1533
|
this.#name = name;
|
|
1527
1534
|
this.#description = description;
|
|
1535
|
+
this.#descriptionPlaintext = descriptionPlaintext;
|
|
1528
1536
|
this.#startsOn = startsOn;
|
|
1529
1537
|
this.#endsOn = endsOn;
|
|
1530
1538
|
this.#minimumAge = minimumAge;
|
|
@@ -3938,6 +3946,12 @@ let ProductDto = class ProductDto {
|
|
|
3938
3946
|
set description(value) {
|
|
3939
3947
|
this.#description = value;
|
|
3940
3948
|
}
|
|
3949
|
+
get descriptionPlaintext() {
|
|
3950
|
+
return this.#descriptionPlaintext;
|
|
3951
|
+
}
|
|
3952
|
+
set descriptionPlaintext(value) {
|
|
3953
|
+
this.#descriptionPlaintext = value;
|
|
3954
|
+
}
|
|
3941
3955
|
get price() {
|
|
3942
3956
|
return this.#price;
|
|
3943
3957
|
}
|
|
@@ -4056,6 +4070,7 @@ let ProductDto = class ProductDto {
|
|
|
4056
4070
|
#type;
|
|
4057
4071
|
#name;
|
|
4058
4072
|
#description;
|
|
4073
|
+
#descriptionPlaintext;
|
|
4059
4074
|
#price;
|
|
4060
4075
|
#maxQuantity;
|
|
4061
4076
|
#isActive;
|
|
@@ -4075,11 +4090,12 @@ let ProductDto = class ProductDto {
|
|
|
4075
4090
|
#availability;
|
|
4076
4091
|
#sold;
|
|
4077
4092
|
#isScannable;
|
|
4078
|
-
constructor(id, type, name, description, price, maxQuantity, isActive, isPersonalizationRequired, isSwappable, isTimeslotted, timeSlots, remainingStock, stock, hasSales, image, images, ticketsReleasedOn, showWhenUnavailable, saleStartsOn, saleEndsOn, availability, sold, isScannable = true) {
|
|
4093
|
+
constructor(id, type, name, description, descriptionPlaintext, price, maxQuantity, isActive, isPersonalizationRequired, isSwappable, isTimeslotted, timeSlots, remainingStock, stock, hasSales, image, images, ticketsReleasedOn, showWhenUnavailable, saleStartsOn, saleEndsOn, availability, sold, isScannable = true) {
|
|
4079
4094
|
this.#id = id;
|
|
4080
4095
|
this.#type = type;
|
|
4081
4096
|
this.#name = name;
|
|
4082
4097
|
this.#description = description;
|
|
4098
|
+
this.#descriptionPlaintext = descriptionPlaintext;
|
|
4083
4099
|
this.#price = price;
|
|
4084
4100
|
this.#maxQuantity = maxQuantity;
|
|
4085
4101
|
this.#isActive = isActive;
|
|
@@ -4538,6 +4554,12 @@ let PublicShopEventDto = class PublicShopEventDto {
|
|
|
4538
4554
|
set description(value) {
|
|
4539
4555
|
this.#description = value;
|
|
4540
4556
|
}
|
|
4557
|
+
get descriptionPlaintext() {
|
|
4558
|
+
return this.#descriptionPlaintext;
|
|
4559
|
+
}
|
|
4560
|
+
set descriptionPlaintext(value) {
|
|
4561
|
+
this.#descriptionPlaintext = value;
|
|
4562
|
+
}
|
|
4541
4563
|
get status() {
|
|
4542
4564
|
return this.#status;
|
|
4543
4565
|
}
|
|
@@ -4577,16 +4599,18 @@ let PublicShopEventDto = class PublicShopEventDto {
|
|
|
4577
4599
|
#id;
|
|
4578
4600
|
#name;
|
|
4579
4601
|
#description;
|
|
4602
|
+
#descriptionPlaintext;
|
|
4580
4603
|
#status;
|
|
4581
4604
|
#address;
|
|
4582
4605
|
#headerFile;
|
|
4583
4606
|
#minimumAge;
|
|
4584
4607
|
#startsOn;
|
|
4585
4608
|
#endsOn;
|
|
4586
|
-
constructor(id, name, description, status, address, headerFile, minimumAge, startsOn, endsOn) {
|
|
4609
|
+
constructor(id, name, description, descriptionPlaintext, status, address, headerFile, minimumAge, startsOn, endsOn) {
|
|
4587
4610
|
this.#id = id;
|
|
4588
4611
|
this.#name = name;
|
|
4589
4612
|
this.#description = description;
|
|
4613
|
+
this.#descriptionPlaintext = descriptionPlaintext;
|
|
4590
4614
|
this.#status = status;
|
|
4591
4615
|
this.#address = address;
|
|
4592
4616
|
this.#headerFile = headerFile;
|
|
@@ -4648,6 +4672,12 @@ let PublicShopProductDto = class PublicShopProductDto {
|
|
|
4648
4672
|
set description(value) {
|
|
4649
4673
|
this.#description = value;
|
|
4650
4674
|
}
|
|
4675
|
+
get descriptionPlaintext() {
|
|
4676
|
+
return this.#descriptionPlaintext;
|
|
4677
|
+
}
|
|
4678
|
+
set descriptionPlaintext(value) {
|
|
4679
|
+
this.#descriptionPlaintext = value;
|
|
4680
|
+
}
|
|
4651
4681
|
get price() {
|
|
4652
4682
|
return this.#price;
|
|
4653
4683
|
}
|
|
@@ -4712,6 +4742,7 @@ let PublicShopProductDto = class PublicShopProductDto {
|
|
|
4712
4742
|
#type;
|
|
4713
4743
|
#name;
|
|
4714
4744
|
#description;
|
|
4745
|
+
#descriptionPlaintext;
|
|
4715
4746
|
#price;
|
|
4716
4747
|
#maxQuantity;
|
|
4717
4748
|
#isActive;
|
|
@@ -4722,11 +4753,12 @@ let PublicShopProductDto = class PublicShopProductDto {
|
|
|
4722
4753
|
#availability;
|
|
4723
4754
|
#saleStartsOn;
|
|
4724
4755
|
#saleEndsOn;
|
|
4725
|
-
constructor(id, type, name, description, price, maxQuantity, isActive, isTimeslotted, timeSlots, image, images, availability, saleStartsOn, saleEndsOn) {
|
|
4756
|
+
constructor(id, type, name, description, descriptionPlaintext, price, maxQuantity, isActive, isTimeslotted, timeSlots, image, images, availability, saleStartsOn, saleEndsOn) {
|
|
4726
4757
|
this.#id = id;
|
|
4727
4758
|
this.#type = type;
|
|
4728
4759
|
this.#name = name;
|
|
4729
4760
|
this.#description = description;
|
|
4761
|
+
this.#descriptionPlaintext = descriptionPlaintext;
|
|
4730
4762
|
this.#price = price;
|
|
4731
4763
|
this.#maxQuantity = maxQuantity;
|
|
4732
4764
|
this.#isActive = isActive;
|
|
@@ -8303,7 +8335,7 @@ let EventAdapter = _EventAdapter = class EventAdapter {
|
|
|
8303
8335
|
return new AppTeamDto(data.id, data.name, data.secret, data.checkin_count, data.checkout_count, optional_default(data.creator, AuthAdapter.parseUser), optional_default(data.event, _EventAdapter.parseEvent), optional_default(data.merchant, MerchantAdapter.parseMerchant), (data.products ?? []).map((product) => product.id));
|
|
8304
8336
|
}
|
|
8305
8337
|
static parseEvent(data) {
|
|
8306
|
-
return new EventDto(data.id, data.name, data.description, DateTimeAdapter.parseDateTime(data.starts_on), DateTimeAdapter.parseDateTime(data.ends_on), data.minimum_age, data.status, optional_default(data.address, AddressAdapter.parseAddress), optional_default(data.header_file, FileSystemAdapter.parsePicture), DateTimeAdapter.parseDateTime(data.created_on), DateTimeAdapter.parseDateTime(data.updated_on));
|
|
8338
|
+
return new EventDto(data.id, data.name, data.description, data.description_plaintext, DateTimeAdapter.parseDateTime(data.starts_on), DateTimeAdapter.parseDateTime(data.ends_on), data.minimum_age, data.status, optional_default(data.address, AddressAdapter.parseAddress), optional_default(data.header_file, FileSystemAdapter.parsePicture), DateTimeAdapter.parseDateTime(data.created_on), DateTimeAdapter.parseDateTime(data.updated_on));
|
|
8307
8339
|
}
|
|
8308
8340
|
static parseEventAvailability(data) {
|
|
8309
8341
|
return new EventAvailabilityDto(data.has_products, data.has_shops, data.has_shops_with_products, data.is_publishable, data.is_published);
|
|
@@ -8519,7 +8551,7 @@ PaymentAdapter = _PaymentAdapter = __decorate([adapter], PaymentAdapter);
|
|
|
8519
8551
|
//#region src/adapter/ProductAdapter.ts
|
|
8520
8552
|
let ProductAdapter = class ProductAdapter {
|
|
8521
8553
|
static parseProduct(data) {
|
|
8522
|
-
return new ProductDto(data.id, data.type, data.name, data.description, optional_default(data.price, PaymentAdapter.parseCost), data.max_quantity, data.is_active, data.is_personalization_required, data.is_swappable, data.is_timeslotted, optionalArray_default(data.time_slots, EventAdapter.parseTimeSlot) ?? [], data.remaining_stock, optional_default(data.stock_pool, EventAdapter.parseStockPool), data.has_sales, optional_default(data.image, FileSystemAdapter.parsePicture), optionalArray_default(data.images, FileSystemAdapter.parsePicture), optional_default(data.tickets_released_on, DateTimeAdapter.parseDateTime), data.show_when_unavailable, optional_default(data.sale_starts_on, DateTimeAdapter.parseDateTime), optional_default(data.sale_ends_on, DateTimeAdapter.parseDateTime), data.availability, data.sold, data.is_scannable ?? true);
|
|
8554
|
+
return new ProductDto(data.id, data.type, data.name, data.description, data.description_plaintext, optional_default(data.price, PaymentAdapter.parseCost), data.max_quantity, data.is_active, data.is_personalization_required, data.is_swappable, data.is_timeslotted, optionalArray_default(data.time_slots, EventAdapter.parseTimeSlot) ?? [], data.remaining_stock, optional_default(data.stock_pool, EventAdapter.parseStockPool), data.has_sales, optional_default(data.image, FileSystemAdapter.parsePicture), optionalArray_default(data.images, FileSystemAdapter.parsePicture), optional_default(data.tickets_released_on, DateTimeAdapter.parseDateTime), data.show_when_unavailable, optional_default(data.sale_starts_on, DateTimeAdapter.parseDateTime), optional_default(data.sale_ends_on, DateTimeAdapter.parseDateTime), data.availability, data.sold, data.is_scannable ?? true);
|
|
8523
8555
|
}
|
|
8524
8556
|
};
|
|
8525
8557
|
ProductAdapter = __decorate([adapter], ProductAdapter);
|
|
@@ -8556,13 +8588,13 @@ let PublicShopAdapter = _PublicShopAdapter = class PublicShopAdapter {
|
|
|
8556
8588
|
throw new Error("Unknown shop element.");
|
|
8557
8589
|
}
|
|
8558
8590
|
static parsePublicShopEvent(data) {
|
|
8559
|
-
return new PublicShopEventDto(data.id, data.name, data.description, data.status, AddressAdapter.parseAddress(data.address), optional_default(data.header_file, FileSystemAdapter.parsePicture), data.minimum_age, DateTimeAdapter.parseDateTime(data.starts_on), DateTimeAdapter.parseDateTime(data.ends_on));
|
|
8591
|
+
return new PublicShopEventDto(data.id, data.name, data.description, data.description_plaintext, data.status, AddressAdapter.parseAddress(data.address), optional_default(data.header_file, FileSystemAdapter.parsePicture), data.minimum_age, DateTimeAdapter.parseDateTime(data.starts_on), DateTimeAdapter.parseDateTime(data.ends_on));
|
|
8560
8592
|
}
|
|
8561
8593
|
static parsePublicShopMerchant(data) {
|
|
8562
8594
|
return new PublicShopMerchantDto(data.id, data.name);
|
|
8563
8595
|
}
|
|
8564
8596
|
static parsePublicShopProduct(data) {
|
|
8565
|
-
return new PublicShopProductDto(data.id, data.type, data.name, data.description, PaymentAdapter.parseCost(data.price), data.max_quantity, data.is_active, data.is_timeslotted, optionalArray_default(data.time_slots, _PublicShopAdapter.parsePublicShopTimeSlot), optional_default(data.image, FileSystemAdapter.parsePicture), optionalArray_default(data.images, FileSystemAdapter.parsePicture), data.availability, optional_default(data.sale_starts_on, DateTimeAdapter.parseDateTime), optional_default(data.sale_ends_on, DateTimeAdapter.parseDateTime));
|
|
8597
|
+
return new PublicShopProductDto(data.id, data.type, data.name, data.description, data.description_plaintext, PaymentAdapter.parseCost(data.price), data.max_quantity, data.is_active, data.is_timeslotted, optionalArray_default(data.time_slots, _PublicShopAdapter.parsePublicShopTimeSlot), optional_default(data.image, FileSystemAdapter.parsePicture), optionalArray_default(data.images, FileSystemAdapter.parsePicture), data.availability, optional_default(data.sale_starts_on, DateTimeAdapter.parseDateTime), optional_default(data.sale_ends_on, DateTimeAdapter.parseDateTime));
|
|
8566
8598
|
}
|
|
8567
8599
|
static parsePublicShopReservation(data) {
|
|
8568
8600
|
return new PublicShopReservationDto(data.id, DateTimeAdapter.parseDateTime(data.created_on), DateTimeAdapter.parseDateTime(data.expires_on), data.products.map(_PublicShopAdapter.parsePublicShopReservationProduct));
|