@passly-nl/data 1.4.2 → 1.5.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 (37) hide show
  1. package/dist/index.d.mts +49 -25
  2. package/dist/index.d.mts.map +1 -1
  3. package/dist/index.mjs +155 -60
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/src/adapter/EventAdapter.ts +12 -2
  7. package/src/adapter/OrderAdapter.ts +3 -2
  8. package/src/adapter/ProductAdapter.ts +2 -1
  9. package/src/adapter/PublicShopAdapter.ts +11 -2
  10. package/src/adapter/ReservationAdapter.ts +4 -2
  11. package/src/dto/event/ShopDesignDto.ts +22 -1
  12. package/src/dto/event/ShopElementButtonDto.ts +3 -2
  13. package/src/dto/event/ShopElementDividerDto.ts +3 -2
  14. package/src/dto/event/ShopElementDto.ts +12 -2
  15. package/src/dto/event/ShopElementHeadingDto.ts +3 -3
  16. package/src/dto/event/ShopElementInformationDto.ts +3 -2
  17. package/src/dto/event/ShopElementNoticeDto.ts +3 -3
  18. package/src/dto/event/ShopElementProductDto.ts +3 -2
  19. package/src/dto/event/ShopElementTextDto.ts +3 -2
  20. package/src/dto/order/OrderProductDto.ts +12 -1
  21. package/src/dto/product/ProductDto.ts +11 -1
  22. package/src/dto/publicShop/PublicShopDesignDto.ts +22 -1
  23. package/src/dto/publicShop/PublicShopElementButtonDto.ts +3 -2
  24. package/src/dto/publicShop/PublicShopElementDividerDto.ts +3 -2
  25. package/src/dto/publicShop/PublicShopElementDto.ts +12 -2
  26. package/src/dto/publicShop/PublicShopElementHeadingDto.ts +3 -3
  27. package/src/dto/publicShop/PublicShopElementInformationDto.ts +3 -2
  28. package/src/dto/publicShop/PublicShopElementNoticeDto.ts +3 -3
  29. package/src/dto/publicShop/PublicShopElementProductDto.ts +3 -2
  30. package/src/dto/publicShop/PublicShopElementTextDto.ts +3 -2
  31. package/src/dto/reservation/ReservationProductDto.ts +23 -2
  32. package/src/service/MerchantEventProductService.ts +3 -2
  33. package/src/service/MerchantEventProductsService.ts +5 -2
  34. package/src/service/MerchantEventShopService.ts +28 -3
  35. package/src/service/PublicShopService.ts +17 -2
  36. package/src/types/event.ts +4 -0
  37. package/src/types/product.ts +2 -1
package/dist/index.mjs CHANGED
@@ -1558,13 +1558,29 @@ let ShopDesignDto = class ShopDesignDto {
1558
1558
  set primaryColor(value) {
1559
1559
  this.#primaryColor = value;
1560
1560
  }
1561
+ get background() {
1562
+ return this.#background;
1563
+ }
1564
+ set background(value) {
1565
+ this.#background = value;
1566
+ }
1567
+ get backgroundScrim() {
1568
+ return this.#backgroundScrim;
1569
+ }
1570
+ set backgroundScrim(value) {
1571
+ this.#backgroundScrim = value;
1572
+ }
1561
1573
  #backgroundColor;
1562
1574
  #foregroundColor;
1563
1575
  #primaryColor;
1564
- constructor(backgroundColor, foregroundColor, primaryColor) {
1576
+ #background;
1577
+ #backgroundScrim;
1578
+ constructor(backgroundColor, foregroundColor, primaryColor, background, backgroundScrim) {
1565
1579
  this.#backgroundColor = backgroundColor;
1566
1580
  this.#foregroundColor = foregroundColor;
1567
1581
  this.#primaryColor = primaryColor;
1582
+ this.#background = background;
1583
+ this.#backgroundScrim = backgroundScrim;
1568
1584
  }
1569
1585
  };
1570
1586
  ShopDesignDto = __decorate([dto], ShopDesignDto);
@@ -1706,6 +1722,12 @@ var ShopElementDto = class {
1706
1722
  set id(value) {
1707
1723
  this.#id = value;
1708
1724
  }
1725
+ get page() {
1726
+ return this.#page;
1727
+ }
1728
+ set page(value) {
1729
+ this.#page = value;
1730
+ }
1709
1731
  get type() {
1710
1732
  return this.#type;
1711
1733
  }
@@ -1713,9 +1735,11 @@ var ShopElementDto = class {
1713
1735
  this.#type = value;
1714
1736
  }
1715
1737
  #id;
1738
+ #page;
1716
1739
  #type;
1717
- constructor(id, type) {
1740
+ constructor(id, type, page) {
1718
1741
  this.#id = id;
1742
+ this.#page = page;
1719
1743
  this.#type = type;
1720
1744
  }
1721
1745
  };
@@ -1744,8 +1768,8 @@ let ShopElementButtonDto = class ShopElementButtonDto extends ShopElementDto {
1744
1768
  #icon;
1745
1769
  #text;
1746
1770
  #url;
1747
- constructor(id, icon, text, url) {
1748
- super(id, "button");
1771
+ constructor(id, page, icon, text, url) {
1772
+ super(id, "button", page);
1749
1773
  this.#icon = icon;
1750
1774
  this.#text = text;
1751
1775
  this.#url = url;
@@ -1770,8 +1794,8 @@ let ShopElementDividerDto = class ShopElementDividerDto extends ShopElementDto {
1770
1794
  }
1771
1795
  #icon;
1772
1796
  #text;
1773
- constructor(id, icon, text) {
1774
- super(id, "divider");
1797
+ constructor(id, page, icon, text) {
1798
+ super(id, "divider", page);
1775
1799
  this.#icon = icon;
1776
1800
  this.#text = text;
1777
1801
  }
@@ -1795,8 +1819,8 @@ let ShopElementHeadingDto = class ShopElementHeadingDto extends ShopElementDto {
1795
1819
  }
1796
1820
  #headingLevel;
1797
1821
  #title;
1798
- constructor(id, headingLevel, title) {
1799
- super(id, "heading");
1822
+ constructor(id, page, headingLevel, title) {
1823
+ super(id, "heading", page);
1800
1824
  this.#headingLevel = headingLevel;
1801
1825
  this.#title = title;
1802
1826
  }
@@ -1806,8 +1830,8 @@ ShopElementHeadingDto = __decorate([dto], ShopElementHeadingDto);
1806
1830
  //#endregion
1807
1831
  //#region src/dto/event/ShopElementInformationDto.ts
1808
1832
  let ShopElementInformationDto = class ShopElementInformationDto extends ShopElementDto {
1809
- constructor(id) {
1810
- super(id, "information");
1833
+ constructor(id, page) {
1834
+ super(id, "information", page);
1811
1835
  }
1812
1836
  };
1813
1837
  ShopElementInformationDto = __decorate([dto], ShopElementInformationDto);
@@ -1843,8 +1867,8 @@ let ShopElementNoticeDto = class ShopElementNoticeDto extends ShopElementDto {
1843
1867
  #noticeType;
1844
1868
  #title;
1845
1869
  #text;
1846
- constructor(id, icon, noticeType, title, text) {
1847
- super(id, "notice");
1870
+ constructor(id, page, icon, noticeType, title, text) {
1871
+ super(id, "notice", page);
1848
1872
  this.#icon = icon;
1849
1873
  this.#noticeType = noticeType;
1850
1874
  this.#title = title;
@@ -1863,8 +1887,8 @@ let ShopElementProductDto = class ShopElementProductDto extends ShopElementDto {
1863
1887
  this.#product = value;
1864
1888
  }
1865
1889
  #product;
1866
- constructor(id, product) {
1867
- super(id, "product");
1890
+ constructor(id, page, product) {
1891
+ super(id, "product", page);
1868
1892
  this.#product = product;
1869
1893
  }
1870
1894
  };
@@ -1880,8 +1904,8 @@ let ShopElementTextDto = class ShopElementTextDto extends ShopElementDto {
1880
1904
  this.#text = value;
1881
1905
  }
1882
1906
  #text;
1883
- constructor(id, text) {
1884
- super(id, "text");
1907
+ constructor(id, page, text) {
1908
+ super(id, "text", page);
1885
1909
  this.#text = text;
1886
1910
  }
1887
1911
  };
@@ -3666,15 +3690,23 @@ let OrderProductDto = class OrderProductDto {
3666
3690
  set image(value) {
3667
3691
  this.#image = value;
3668
3692
  }
3693
+ get type() {
3694
+ return this.#type;
3695
+ }
3696
+ set type(value) {
3697
+ this.#type = value;
3698
+ }
3669
3699
  #id;
3670
3700
  #name;
3671
3701
  #description;
3672
3702
  #image;
3673
- constructor(id, name, description, image) {
3703
+ #type;
3704
+ constructor(id, name, description, image, type) {
3674
3705
  this.#id = id;
3675
3706
  this.#name = name;
3676
3707
  this.#description = description;
3677
3708
  this.#image = image;
3709
+ this.#type = type;
3678
3710
  }
3679
3711
  };
3680
3712
  OrderProductDto = __decorate([dto], OrderProductDto);
@@ -3930,6 +3962,12 @@ let ProductDto = class ProductDto {
3930
3962
  set isPersonalizationRequired(value) {
3931
3963
  this.#isPersonalizationRequired = value;
3932
3964
  }
3965
+ get isScannable() {
3966
+ return this.#isScannable;
3967
+ }
3968
+ set isScannable(value) {
3969
+ this.#isScannable = value;
3970
+ }
3933
3971
  get isSwappable() {
3934
3972
  return this.#isSwappable;
3935
3973
  }
@@ -4036,7 +4074,8 @@ let ProductDto = class ProductDto {
4036
4074
  #saleEndsOn;
4037
4075
  #availability;
4038
4076
  #sold;
4039
- constructor(id, type, name, description, price, maxQuantity, isActive, isPersonalizationRequired, isSwappable, isTimeslotted, timeSlots, remainingStock, stock, hasSales, image, images, ticketsReleasedOn, showWhenUnavailable, saleStartsOn, saleEndsOn, availability, sold) {
4077
+ #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) {
4040
4079
  this.#id = id;
4041
4080
  this.#type = type;
4042
4081
  this.#name = name;
@@ -4059,6 +4098,7 @@ let ProductDto = class ProductDto {
4059
4098
  this.#saleEndsOn = saleEndsOn;
4060
4099
  this.#availability = availability;
4061
4100
  this.#sold = sold;
4101
+ this.#isScannable = isScannable;
4062
4102
  }
4063
4103
  };
4064
4104
  ProductDto = __decorate([dto], ProductDto);
@@ -4140,13 +4180,29 @@ let PublicShopDesignDto = class PublicShopDesignDto {
4140
4180
  set primaryColor(value) {
4141
4181
  this.#primaryColor = value;
4142
4182
  }
4183
+ get background() {
4184
+ return this.#background;
4185
+ }
4186
+ set background(value) {
4187
+ this.#background = value;
4188
+ }
4189
+ get backgroundScrim() {
4190
+ return this.#backgroundScrim;
4191
+ }
4192
+ set backgroundScrim(value) {
4193
+ this.#backgroundScrim = value;
4194
+ }
4143
4195
  #backgroundColor;
4144
4196
  #foregroundColor;
4145
4197
  #primaryColor;
4146
- constructor(backgroundColor, foregroundColor, primaryColor) {
4198
+ #background;
4199
+ #backgroundScrim;
4200
+ constructor(backgroundColor, foregroundColor, primaryColor, background, backgroundScrim) {
4147
4201
  this.#backgroundColor = backgroundColor;
4148
4202
  this.#foregroundColor = foregroundColor;
4149
4203
  this.#primaryColor = primaryColor;
4204
+ this.#background = background;
4205
+ this.#backgroundScrim = backgroundScrim;
4150
4206
  }
4151
4207
  };
4152
4208
  PublicShopDesignDto = __decorate([dto], PublicShopDesignDto);
@@ -4272,6 +4328,12 @@ var PublicShopElementDto = class {
4272
4328
  set id(value) {
4273
4329
  this.#id = value;
4274
4330
  }
4331
+ get page() {
4332
+ return this.#page;
4333
+ }
4334
+ set page(value) {
4335
+ this.#page = value;
4336
+ }
4275
4337
  get type() {
4276
4338
  return this.#type;
4277
4339
  }
@@ -4279,9 +4341,11 @@ var PublicShopElementDto = class {
4279
4341
  this.#type = value;
4280
4342
  }
4281
4343
  #id;
4344
+ #page;
4282
4345
  #type;
4283
- constructor(id, type) {
4346
+ constructor(id, type, page) {
4284
4347
  this.#id = id;
4348
+ this.#page = page;
4285
4349
  this.#type = type;
4286
4350
  }
4287
4351
  };
@@ -4310,8 +4374,8 @@ let PublicShopElementButtonDto = class PublicShopElementButtonDto extends Public
4310
4374
  #icon;
4311
4375
  #text;
4312
4376
  #url;
4313
- constructor(id, icon, text, url) {
4314
- super(id, "button");
4377
+ constructor(id, page, icon, text, url) {
4378
+ super(id, "button", page);
4315
4379
  this.#icon = icon;
4316
4380
  this.#text = text;
4317
4381
  this.#url = url;
@@ -4336,8 +4400,8 @@ let PublicShopElementDividerDto = class PublicShopElementDividerDto extends Publ
4336
4400
  }
4337
4401
  #icon;
4338
4402
  #text;
4339
- constructor(id, icon, text) {
4340
- super(id, "divider");
4403
+ constructor(id, page, icon, text) {
4404
+ super(id, "divider", page);
4341
4405
  this.#icon = icon;
4342
4406
  this.#text = text;
4343
4407
  }
@@ -4361,8 +4425,8 @@ let PublicShopElementHeadingDto = class PublicShopElementHeadingDto extends Publ
4361
4425
  }
4362
4426
  #headingLevel;
4363
4427
  #title;
4364
- constructor(id, headingLevel, title) {
4365
- super(id, "heading");
4428
+ constructor(id, page, headingLevel, title) {
4429
+ super(id, "heading", page);
4366
4430
  this.#headingLevel = headingLevel;
4367
4431
  this.#title = title;
4368
4432
  }
@@ -4372,8 +4436,8 @@ PublicShopElementHeadingDto = __decorate([dto], PublicShopElementHeadingDto);
4372
4436
  //#endregion
4373
4437
  //#region src/dto/publicShop/PublicShopElementInformationDto.ts
4374
4438
  let PublicShopElementInformationDto = class PublicShopElementInformationDto extends PublicShopElementDto {
4375
- constructor(id) {
4376
- super(id, "information");
4439
+ constructor(id, page) {
4440
+ super(id, "information", page);
4377
4441
  }
4378
4442
  };
4379
4443
  PublicShopElementInformationDto = __decorate([dto], PublicShopElementInformationDto);
@@ -4409,8 +4473,8 @@ let PublicShopElementNoticeDto = class PublicShopElementNoticeDto extends Public
4409
4473
  #noticeType;
4410
4474
  #title;
4411
4475
  #text;
4412
- constructor(id, icon, noticeType, title, text) {
4413
- super(id, "notice");
4476
+ constructor(id, page, icon, noticeType, title, text) {
4477
+ super(id, "notice", page);
4414
4478
  this.#icon = icon;
4415
4479
  this.#noticeType = noticeType;
4416
4480
  this.#title = title;
@@ -4429,8 +4493,8 @@ let PublicShopElementProductDto = class PublicShopElementProductDto extends Publ
4429
4493
  this.#product = value;
4430
4494
  }
4431
4495
  #product;
4432
- constructor(id, product) {
4433
- super(id, "product");
4496
+ constructor(id, page, product) {
4497
+ super(id, "product", page);
4434
4498
  this.#product = product;
4435
4499
  }
4436
4500
  };
@@ -4446,8 +4510,8 @@ let PublicShopElementTextDto = class PublicShopElementTextDto extends PublicShop
4446
4510
  this.#text = value;
4447
4511
  }
4448
4512
  #text;
4449
- constructor(id, text) {
4450
- super(id, "text");
4513
+ constructor(id, page, text) {
4514
+ super(id, "text", page);
4451
4515
  this.#text = text;
4452
4516
  }
4453
4517
  };
@@ -5072,15 +5136,31 @@ let ReservationProductDto = class ReservationProductDto {
5072
5136
  set image(value) {
5073
5137
  this.#image = value;
5074
5138
  }
5139
+ get price() {
5140
+ return this.#price;
5141
+ }
5142
+ set price(value) {
5143
+ this.#price = value;
5144
+ }
5145
+ get type() {
5146
+ return this.#type;
5147
+ }
5148
+ set type(value) {
5149
+ this.#type = value;
5150
+ }
5075
5151
  #id;
5076
5152
  #name;
5077
5153
  #description;
5078
5154
  #image;
5079
- constructor(id, name, description, image) {
5155
+ #price;
5156
+ #type;
5157
+ constructor(id, name, description, image, price, type) {
5080
5158
  this.#id = id;
5081
5159
  this.#name = name;
5082
5160
  this.#description = description;
5083
5161
  this.#image = image;
5162
+ this.#price = price;
5163
+ this.#type = type;
5084
5164
  }
5085
5165
  };
5086
5166
  ReservationProductDto = __decorate([dto], ReservationProductDto);
@@ -8235,19 +8315,19 @@ let EventAdapter = _EventAdapter = class EventAdapter {
8235
8315
  return new ShopDto(data.id, data.name, data.is_published, data.password, optional_default(data.starts_on, DateTimeAdapter.parseDateTime), optional_default(data.ends_on, DateTimeAdapter.parseDateTime), data.field_address, data.field_address_mode, data.field_birthdate, data.field_gender, data.field_phone_number, data.status, optional_default(data.design, _EventAdapter.parseShopDesign), optional_default(data.event, _EventAdapter.parseEvent), optional_default(data.merchant, MerchantAdapter.parseMerchant));
8236
8316
  }
8237
8317
  static parseShopDesign(data) {
8238
- return new ShopDesignDto(data.background_color, data.foreground_color, data.primary_color);
8318
+ return new ShopDesignDto(data.background_color, data.foreground_color, data.primary_color, optional_default(data.background, FileSystemAdapter.parsePicture), data.background_scrim ?? 0);
8239
8319
  }
8240
8320
  static parseShopElement(data) {
8241
8321
  switch (data.type) {
8242
- case "button": return new ShopElementButtonDto(data.id, data.icon, data.text, data.url);
8243
- case "divider": return new ShopElementDividerDto(data.id, data.icon, data.text);
8244
- case "heading": return new ShopElementHeadingDto(data.id, data.heading_level, data.title);
8245
- case "information": return new ShopElementInformationDto(data.id);
8246
- case "notice": return new ShopElementNoticeDto(data.id, data.icon, data.notice_type, data.title, data.text);
8247
- case "product": return new ShopElementProductDto(data.id, ProductAdapter.parseProduct(data.product));
8248
- case "text": return new ShopElementTextDto(data.id, data.text);
8322
+ case "button": return new ShopElementButtonDto(data.id, data.page, data.icon, data.text, data.url);
8323
+ case "divider": return new ShopElementDividerDto(data.id, data.page, data.icon, data.text);
8324
+ case "heading": return new ShopElementHeadingDto(data.id, data.page, data.heading_level, data.title);
8325
+ case "information": return new ShopElementInformationDto(data.id, data.page);
8326
+ case "notice": return new ShopElementNoticeDto(data.id, data.page, data.icon, data.notice_type, data.title, data.text);
8327
+ case "product": return new ShopElementProductDto(data.id, data.page, ProductAdapter.parseProduct(data.product));
8328
+ case "text": return new ShopElementTextDto(data.id, data.page, data.text);
8249
8329
  }
8250
- return new ShopElementTextDto("unknown", "Unknown element type.");
8330
+ return new ShopElementTextDto("unknown", data.page, "Unknown element type.");
8251
8331
  }
8252
8332
  static parseStockOverview(data) {
8253
8333
  return new StockOverviewDto(data.total, data.sold, data.remaining, data.items.map(_EventAdapter.parseStockOverviewItem));
@@ -8411,7 +8491,7 @@ let OrderAdapter = _OrderAdapter = class OrderAdapter {
8411
8491
  return new OrderPaymentProviderDto(data.name, data.url);
8412
8492
  }
8413
8493
  static parseOrderProduct(data) {
8414
- return new OrderProductDto(data.id, data.name, data.description, data.image);
8494
+ return new OrderProductDto(data.id, data.name, data.description, optional_default(data.image, FileSystemAdapter.parsePicture), data.type ?? "ticket");
8415
8495
  }
8416
8496
  };
8417
8497
  OrderAdapter = _OrderAdapter = __decorate([adapter], OrderAdapter);
@@ -8439,7 +8519,7 @@ PaymentAdapter = _PaymentAdapter = __decorate([adapter], PaymentAdapter);
8439
8519
  //#region src/adapter/ProductAdapter.ts
8440
8520
  let ProductAdapter = class ProductAdapter {
8441
8521
  static parseProduct(data) {
8442
- 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);
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);
8443
8523
  }
8444
8524
  };
8445
8525
  ProductAdapter = __decorate([adapter], ProductAdapter);
@@ -8461,17 +8541,17 @@ let PublicShopAdapter = _PublicShopAdapter = class PublicShopAdapter {
8461
8541
  return new PublicShopDto(data.id, data.name, DateTimeAdapter.parseDateTime(data.starts_on), DateTimeAdapter.parseDateTime(data.ends_on), data.field_address, data.field_address_mode, data.field_birthdate, data.field_gender, data.field_phone_number, optional_default(data.design, _PublicShopAdapter.parsePublicShopDesign), optionalArray_default(data.elements, _PublicShopAdapter.parsePublicShopElement), _PublicShopAdapter.parsePublicShopEvent(data.event), _PublicShopAdapter.parsePublicShopMerchant(data.merchant));
8462
8542
  }
8463
8543
  static parsePublicShopDesign(data) {
8464
- return new PublicShopDesignDto(data.background_color, data.foreground_color, data.primary_color);
8544
+ return new PublicShopDesignDto(data.background_color, data.foreground_color, data.primary_color, optional_default(data.background, FileSystemAdapter.parsePicture), data.background_scrim ?? 0);
8465
8545
  }
8466
8546
  static parsePublicShopElement(data) {
8467
8547
  switch (data.type) {
8468
- case "button": return new PublicShopElementButtonDto(data.id, data.icon, data.text, data.url);
8469
- case "divider": return new PublicShopElementDividerDto(data.id, data.icon, data.text);
8470
- case "heading": return new PublicShopElementHeadingDto(data.id, data.heading_level, data.title);
8471
- case "information": return new PublicShopElementInformationDto(data.id);
8472
- case "notice": return new PublicShopElementNoticeDto(data.id, data.icon, data.notice_type, data.title, data.text);
8473
- case "product": return new PublicShopElementProductDto(data.id, _PublicShopAdapter.parsePublicShopProduct(data.product));
8474
- case "text": return new PublicShopElementTextDto(data.id, data.text);
8548
+ case "button": return new PublicShopElementButtonDto(data.id, data.page, data.icon, data.text, data.url);
8549
+ case "divider": return new PublicShopElementDividerDto(data.id, data.page, data.icon, data.text);
8550
+ case "heading": return new PublicShopElementHeadingDto(data.id, data.page, data.heading_level, data.title);
8551
+ case "information": return new PublicShopElementInformationDto(data.id, data.page);
8552
+ case "notice": return new PublicShopElementNoticeDto(data.id, data.page, data.icon, data.notice_type, data.title, data.text);
8553
+ case "product": return new PublicShopElementProductDto(data.id, data.page, _PublicShopAdapter.parsePublicShopProduct(data.product));
8554
+ case "text": return new PublicShopElementTextDto(data.id, data.page, data.text);
8475
8555
  }
8476
8556
  throw new Error("Unknown shop element.");
8477
8557
  }
@@ -8528,7 +8608,7 @@ let ReservationAdapter = _ReservationAdapter = class ReservationAdapter {
8528
8608
  return new ReservationItemDto(data.quantity, _ReservationAdapter.parseReservationProduct(data.product));
8529
8609
  }
8530
8610
  static parseReservationProduct(data) {
8531
- return new ReservationProductDto(data.id, data.name, data.description, optional_default(data.image, FileSystemAdapter.parsePicture));
8611
+ return new ReservationProductDto(data.id, data.name, data.description, optional_default(data.image, FileSystemAdapter.parsePicture), PaymentAdapter.parseCost(data.price), data.type ?? "ticket");
8532
8612
  }
8533
8613
  };
8534
8614
  ReservationAdapter = _ReservationAdapter = __decorate([adapter], ReservationAdapter);
@@ -9137,7 +9217,7 @@ var MerchantEventProductService = class extends BaseService {
9137
9217
  description
9138
9218
  }).runAdapter(ProductAdapter.parseProduct);
9139
9219
  }
9140
- async patchSales(merchantId, eventId, productId, price, maxQuantity, isSwappable, ticketsReleasedOn, showWhenUnavailable, saleStartsOn, saleEndsOn) {
9220
+ async patchSales(merchantId, eventId, productId, price, maxQuantity, isSwappable, ticketsReleasedOn, showWhenUnavailable, saleStartsOn, saleEndsOn, isScannable = null) {
9141
9221
  return await this.request(`/merchants/${merchantId}/events/${eventId}/products/${productId}/sales`).method("patch").bearerToken().queryString(QueryString.builder().append("language", "nl")).body({
9142
9222
  price,
9143
9223
  max_quantity: maxQuantity,
@@ -9145,7 +9225,8 @@ var MerchantEventProductService = class extends BaseService {
9145
9225
  tickets_released_on: ticketsReleasedOn?.toISO() ?? null,
9146
9226
  show_when_unavailable: showWhenUnavailable,
9147
9227
  sale_starts_on: saleStartsOn?.toISO() ?? null,
9148
- sale_ends_on: saleEndsOn?.toISO() ?? null
9228
+ sale_ends_on: saleEndsOn?.toISO() ?? null,
9229
+ is_scannable: isScannable
9149
9230
  }).runAdapter(ProductAdapter.parseProduct);
9150
9231
  }
9151
9232
  async patchValidity(merchantId, eventId, productId, timeSlotIds) {
@@ -9171,7 +9252,7 @@ var MerchantEventProductsService = class extends BaseService {
9171
9252
  async getSelectOptions(merchantId, eventId, searchQuery = null, ids = null) {
9172
9253
  return await this.request(`/merchants/${merchantId}/events/${eventId}/products/select-options`).method("get").bearerToken().queryString(QueryString.builder().append("language", "nl").appendArray("ids[]", ids).append("searchQuery", searchQuery)).runArrayAdapter(FluxAdapter.parseFluxFormSelectEntry);
9173
9254
  }
9174
- async post(merchantId, eventId, name, description, price, maxQuantity, stock, stockPoolId, ticketsReleasedOn = null, timeSlotIds = null) {
9255
+ async post(merchantId, eventId, name, description, price, maxQuantity, stock, stockPoolId, ticketsReleasedOn = null, timeSlotIds = null, type = "ticket", isScannable = null) {
9175
9256
  return await this.request(`/merchants/${merchantId}/events/${eventId}/products`).method("post").bearerToken().queryString(QueryString.builder().append("language", "nl")).body({
9176
9257
  name,
9177
9258
  description,
@@ -9180,7 +9261,9 @@ var MerchantEventProductsService = class extends BaseService {
9180
9261
  max_quantity: maxQuantity,
9181
9262
  stock_pool_id: stockPoolId,
9182
9263
  tickets_released_on: ticketsReleasedOn?.toISO() ?? null,
9183
- time_slot_ids: timeSlotIds
9264
+ time_slot_ids: timeSlotIds,
9265
+ type,
9266
+ is_scannable: isScannable
9184
9267
  }).runAdapter(ProductAdapter.parseProduct);
9185
9268
  }
9186
9269
  };
@@ -9383,7 +9466,8 @@ var MerchantEventShopService = class extends BaseService {
9383
9466
  return await this.request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/design`).method("patch").queryString(QueryString.builder().append("language", "nl")).bearerToken().body({
9384
9467
  background_color: design.backgroundColor,
9385
9468
  foreground_color: design.foregroundColor,
9386
- primary_color: design.primaryColor
9469
+ primary_color: design.primaryColor,
9470
+ background_scrim: design.backgroundScrim
9387
9471
  }).runAdapter(EventAdapter.parseShopDesign);
9388
9472
  }
9389
9473
  async patchElements(merchantId, eventId, shopId, elements) {
@@ -9398,9 +9482,17 @@ var MerchantEventShopService = class extends BaseService {
9398
9482
  field_phone_number: shop.fieldPhoneNumber
9399
9483
  }).runAdapter(EventAdapter.parseShop);
9400
9484
  }
9485
+ async postBackground(merchantId, eventId, shopId, picture) {
9486
+ const data = new FormData();
9487
+ data.append("file", picture);
9488
+ return await this.request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/design/background`).method("post").queryString(QueryString.builder().append("language", "nl")).bearerToken().body(data).runAdapter(CommonAdapter.parseStatusResponse);
9489
+ }
9401
9490
  async postShortlink(merchantId, eventId, shopId) {
9402
9491
  return await this.request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/shortlink`).method("post").queryString(QueryString.builder().append("language", "nl")).bearerToken().runAdapter(ShortlinkAdapter.parse);
9403
9492
  }
9493
+ async deleteBackground(merchantId, eventId, shopId) {
9494
+ return await this.request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/design/background`).method("delete").queryString(QueryString.builder().append("language", "nl")).bearerToken().runAdapter(CommonAdapter.parseStatusResponse);
9495
+ }
9404
9496
  };
9405
9497
 
9406
9498
  //#endregion
@@ -10230,6 +10322,9 @@ var PublicShopService = class extends BaseService {
10230
10322
  ...attributionBody(attribution)
10231
10323
  }).runAdapter(OrderAdapter.parseOrder);
10232
10324
  }
10325
+ async putReservationProducts(shopId, reservationId, products) {
10326
+ return await this.request(`/shops/${shopId}/reservations/${reservationId}/products`).method("put").queryString(QueryString.builder().append("language", "nl")).body({ products: products.map((product) => [product.productId, product.quantity]) }).runAdapter(ReservationAdapter.parseReservation);
10327
+ }
10233
10328
  async reserve(shopId, products, attribution = null) {
10234
10329
  return await this.request(`/shops/${shopId}/reserve`).method("post").queryString(QueryString.builder().append("language", "nl")).body({
10235
10330
  products: products.map((p) => [p.productId, p.quantity]),