@passly-nl/data 1.0.0-rc.1 → 1.0.0-rc.10

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.0.0-rc.1",
4
+ "version": "1.0.0-rc.10",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
@@ -50,15 +50,19 @@
50
50
  "./*": "./*"
51
51
  },
52
52
  "dependencies": {
53
- "@basmilius/http-client": "^3.8.0",
53
+ "@basmilius/http-client": "^3.10.0",
54
54
  "@flux-ui/types": "^3.0.0-next.28",
55
55
  "@fortawesome/fontawesome-common-types": "^7.2.0",
56
- "apexcharts": "^5.6.0",
56
+ "apexcharts": "^5.10.1",
57
57
  "luxon": "^3.7.2"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/luxon": "^3.7.1",
61
- "@typescript/native-preview": "^7.0.0-dev.20260227.1",
62
- "tsdown": "^0.21.0-beta.2"
61
+ "@typescript/native-preview": "^7.0.0-dev.20260305.1",
62
+ "tsdown": "^0.21.0-beta.5"
63
+ },
64
+ "overrides": {
65
+ "@disabled-basmilius/http-client": "link:@basmilius/http-client",
66
+ "@disabled-flux-ui/types": "link:@flux-ui/types"
63
67
  }
64
68
  }
@@ -61,6 +61,7 @@ export class EventAdapter {
61
61
  optional(data.starts_on, DateTimeAdapter.parseDateTime),
62
62
  optional(data.ends_on, DateTimeAdapter.parseDateTime),
63
63
  data.field_address,
64
+ data.field_address_mode,
64
65
  data.field_birthdate,
65
66
  data.field_gender,
66
67
  data.field_phone_number,
@@ -1,6 +1,7 @@
1
1
  import { adapter, ForeignData } from '@basmilius/http-client';
2
2
  import { DateTimeAdapter, FileSystemAdapter } from '#data/adapter';
3
3
  import { MerchantDashboardKeyMetricsDto, MerchantDashboardUpcomingEventDto } from '#data/dto';
4
+ import { optional } from '#data/util';
4
5
 
5
6
  @adapter
6
7
  export class MerchantDashboardAdapter {
@@ -18,7 +19,7 @@ export class MerchantDashboardAdapter {
18
19
  data.id,
19
20
  data.name,
20
21
  data.description,
21
- FileSystemAdapter.parsePicture(data.header_file),
22
+ optional(data.header_file, FileSystemAdapter.parsePicture),
22
23
  data.status,
23
24
  DateTimeAdapter.parseDateTime(data.starts_on),
24
25
  data.tickets_sold,
@@ -12,6 +12,7 @@ export class PublicShopAdapter {
12
12
  DateTimeAdapter.parseDateTime(data.starts_on),
13
13
  DateTimeAdapter.parseDateTime(data.ends_on),
14
14
  data.field_address,
15
+ data.field_address_mode,
15
16
  data.field_birthdate,
16
17
  data.field_gender,
17
18
  data.field_phone_number,
@@ -0,0 +1,13 @@
1
+ import { adapter, type ForeignData } from '@basmilius/http-client';
2
+ import { ServiceInfoDto } from '#data/dto';
3
+
4
+ @adapter
5
+ export class ServiceAdapter {
6
+ static parseInfo(data: ForeignData): ServiceInfoDto {
7
+ return new ServiceInfoDto(
8
+ data.connecting_ip,
9
+ data.country,
10
+ data.ray
11
+ );
12
+ }
13
+ }
@@ -0,0 +1,17 @@
1
+ import { adapter, type ForeignData } from '@basmilius/http-client';
2
+ import { DateTimeAdapter } from '#data/adapter';
3
+ import { ShortlinkDto } from '#data/dto';
4
+
5
+ @adapter
6
+ export class ShortlinkAdapter {
7
+ static parse(data: ForeignData): ShortlinkDto {
8
+ return new ShortlinkDto(
9
+ data.id,
10
+ data.identifier,
11
+ data.hits,
12
+ data.link,
13
+ data.target,
14
+ DateTimeAdapter.parseDateTime(data.createdOn)
15
+ );
16
+ }
17
+ }
@@ -15,6 +15,8 @@ export * from './ProductAdapter';
15
15
  export * from './PublicPayAdapter';
16
16
  export * from './PublicShopAdapter';
17
17
  export * from './ReservationAdapter';
18
+ export * from './ServiceAdapter';
19
+ export * from './ShortlinkAdapter';
18
20
  export * from './StatisticsAdapter';
19
21
  export * from './StatisticsBuyersAdapter';
20
22
  export * from './StatisticsEventsAdapter';
@@ -1,7 +1,7 @@
1
1
  import { dto } from '@basmilius/http-client';
2
2
  import type { DateTime } from 'luxon';
3
3
  import type { EventDto, MerchantDto, ShopDesignDto } from '#data/dto';
4
- import type { ShopFieldRequirement, ShopStatus } from '#data/types';
4
+ import type { ShopAddressMode, ShopFieldRequirement, ShopStatus } from '#data/types';
5
5
 
6
6
  @dto
7
7
  export class ShopDto {
@@ -61,6 +61,14 @@ export class ShopDto {
61
61
  this.#fieldAddress = value;
62
62
  }
63
63
 
64
+ get fieldAddressMode(): ShopAddressMode {
65
+ return this.#fieldAddressMode;
66
+ }
67
+
68
+ set fieldAddressMode(value: ShopAddressMode) {
69
+ this.#fieldAddressMode = value;
70
+ }
71
+
64
72
  get fieldBirthdate(): ShopFieldRequirement {
65
73
  return this.#fieldBirthdate;
66
74
  }
@@ -124,6 +132,7 @@ export class ShopDto {
124
132
  #startsOn: DateTime | null;
125
133
  #endsOn: DateTime | null;
126
134
  #fieldAddress: ShopFieldRequirement;
135
+ #fieldAddressMode: ShopAddressMode;
127
136
  #fieldBirthdate: ShopFieldRequirement;
128
137
  #fieldGender: ShopFieldRequirement;
129
138
  #fieldPhoneNumber: ShopFieldRequirement;
@@ -132,7 +141,7 @@ export class ShopDto {
132
141
  #event: EventDto;
133
142
  #merchant: MerchantDto;
134
143
 
135
- constructor(id: string, name: string, isPublished: boolean, password: string, startsOn: DateTime | null, endsOn: DateTime | null, fieldAddress: ShopFieldRequirement, fieldBirthdate: ShopFieldRequirement, fieldGender: ShopFieldRequirement, fieldPhoneNumber: ShopFieldRequirement, status: ShopStatus, design: ShopDesignDto, event: EventDto, merchant: MerchantDto) {
144
+ constructor(id: string, name: string, isPublished: boolean, password: string, startsOn: DateTime | null, endsOn: DateTime | null, fieldAddress: ShopFieldRequirement, fieldAddressMode: ShopAddressMode, fieldBirthdate: ShopFieldRequirement, fieldGender: ShopFieldRequirement, fieldPhoneNumber: ShopFieldRequirement, status: ShopStatus, design: ShopDesignDto, event: EventDto, merchant: MerchantDto) {
136
145
  this.#id = id;
137
146
  this.#name = name;
138
147
  this.#isPublished = isPublished;
@@ -140,6 +149,7 @@ export class ShopDto {
140
149
  this.#startsOn = startsOn;
141
150
  this.#endsOn = endsOn;
142
151
  this.#fieldAddress = fieldAddress;
152
+ this.#fieldAddressMode = fieldAddressMode;
143
153
  this.#fieldBirthdate = fieldBirthdate;
144
154
  this.#fieldGender = fieldGender;
145
155
  this.#fieldPhoneNumber = fieldPhoneNumber;
package/src/dto/index.ts CHANGED
@@ -11,5 +11,7 @@ export * from './product';
11
11
  export * from './publicPay';
12
12
  export * from './publicShop';
13
13
  export * from './reservation';
14
+ export * from './service';
15
+ export * from './shortlink';
14
16
  export * from './statistics';
15
17
  export * from './ticket';
@@ -1,7 +1,7 @@
1
1
  import { dto } from '@basmilius/http-client';
2
2
  import type { DateTime } from 'luxon';
3
3
  import type { PublicShopDesignDto, PublicShopElementDto, PublicShopEventDto, PublicShopMerchantDto } from '#data/dto';
4
- import type { ShopFieldRequirement } from '#data/types';
4
+ import type { ShopAddressMode, ShopFieldRequirement } from '#data/types';
5
5
 
6
6
  @dto
7
7
  export class PublicShopDto {
@@ -45,6 +45,14 @@ export class PublicShopDto {
45
45
  this.#fieldAddress = value;
46
46
  }
47
47
 
48
+ get fieldAddressMode(): ShopAddressMode {
49
+ return this.#fieldAddressMode;
50
+ }
51
+
52
+ set fieldAddressMode(value: ShopAddressMode) {
53
+ this.#fieldAddressMode = value;
54
+ }
55
+
48
56
  get fieldBirthdate(): ShopFieldRequirement {
49
57
  return this.#fieldBirthdate;
50
58
  }
@@ -106,6 +114,7 @@ export class PublicShopDto {
106
114
  #startsOn: DateTime;
107
115
  #endsOn: DateTime;
108
116
  #fieldAddress: ShopFieldRequirement;
117
+ #fieldAddressMode: ShopAddressMode;
109
118
  #fieldBirthdate: ShopFieldRequirement;
110
119
  #fieldGender: ShopFieldRequirement;
111
120
  #fieldPhoneNumber: ShopFieldRequirement;
@@ -114,12 +123,13 @@ export class PublicShopDto {
114
123
  #event: PublicShopEventDto;
115
124
  #merchant: PublicShopMerchantDto;
116
125
 
117
- constructor(id: string, name: string, startsOn: DateTime, endsOn: DateTime, fieldAddress: ShopFieldRequirement, fieldBirthdate: ShopFieldRequirement, fieldGender: ShopFieldRequirement, fieldPhoneNumber: ShopFieldRequirement, design: PublicShopDesignDto, elements: PublicShopElementDto[] | null, event: PublicShopEventDto, merchant: PublicShopMerchantDto) {
126
+ constructor(id: string, name: string, startsOn: DateTime, endsOn: DateTime, fieldAddress: ShopFieldRequirement, fieldAddressMode: ShopAddressMode, fieldBirthdate: ShopFieldRequirement, fieldGender: ShopFieldRequirement, fieldPhoneNumber: ShopFieldRequirement, design: PublicShopDesignDto, elements: PublicShopElementDto[] | null, event: PublicShopEventDto, merchant: PublicShopMerchantDto) {
118
127
  this.#id = id;
119
128
  this.#name = name;
120
129
  this.#startsOn = startsOn;
121
130
  this.#endsOn = endsOn;
122
131
  this.#fieldAddress = fieldAddress;
132
+ this.#fieldAddressMode = fieldAddressMode;
123
133
  this.#fieldBirthdate = fieldBirthdate;
124
134
  this.#fieldGender = fieldGender;
125
135
  this.#fieldPhoneNumber = fieldPhoneNumber;
@@ -0,0 +1,38 @@
1
+ import { dto } from '@basmilius/http-client';
2
+
3
+ @dto
4
+ export class ServiceInfoDto {
5
+ get connectingIp(): string {
6
+ return this.#connectingIp;
7
+ }
8
+
9
+ set connectingIp(value: string) {
10
+ this.#connectingIp = value;
11
+ }
12
+
13
+ get country(): string | null {
14
+ return this.#country;
15
+ }
16
+
17
+ set country(value: string | null) {
18
+ this.#country = value;
19
+ }
20
+
21
+ get ray(): string | null {
22
+ return this.#ray;
23
+ }
24
+
25
+ set ray(value: string | null) {
26
+ this.#ray = value;
27
+ }
28
+
29
+ #connectingIp: string;
30
+ #country: string | null;
31
+ #ray: string | null;
32
+
33
+ constructor(connectingIp: string, country: string | null, ray: string | null) {
34
+ this.#connectingIp = connectingIp;
35
+ this.#country = country;
36
+ this.#ray = ray;
37
+ }
38
+ }
@@ -0,0 +1 @@
1
+ export * from './ServiceInfoDto';
@@ -0,0 +1,69 @@
1
+ import { dto } from '@basmilius/http-client';
2
+ import type { DateTime } from 'luxon';
3
+
4
+ @dto
5
+ export class ShortlinkDto {
6
+ get id(): string {
7
+ return this.#id;
8
+ }
9
+
10
+ set id(value: string) {
11
+ this.#id = value;
12
+ }
13
+
14
+ get identifier(): string {
15
+ return this.#identifier;
16
+ }
17
+
18
+ set identifier(value: string) {
19
+ this.#identifier = value;
20
+ }
21
+
22
+ get hits(): number {
23
+ return this.#hits;
24
+ }
25
+
26
+ set hits(value: number) {
27
+ this.#hits = value;
28
+ }
29
+
30
+ get link(): string {
31
+ return this.#link;
32
+ }
33
+
34
+ set link(value: string) {
35
+ this.#link = value;
36
+ }
37
+
38
+ get target(): string {
39
+ return this.#target;
40
+ }
41
+
42
+ set target(value: string) {
43
+ this.#target = value;
44
+ }
45
+
46
+ get createdOn(): DateTime {
47
+ return this.#createdOn;
48
+ }
49
+
50
+ set createdOn(value: DateTime) {
51
+ this.#createdOn = value;
52
+ }
53
+
54
+ #id: string;
55
+ #identifier: string;
56
+ #hits: number;
57
+ #link: string;
58
+ #target: string;
59
+ #createdOn: DateTime;
60
+
61
+ constructor(id: string, identifier: string, hits: number, link: string, target: string, createdOn: DateTime) {
62
+ this.#id = id;
63
+ this.#identifier = identifier;
64
+ this.#hits = hits;
65
+ this.#link = link;
66
+ this.#target = target;
67
+ this.#createdOn = createdOn;
68
+ }
69
+ }
@@ -0,0 +1 @@
1
+ export * from './ShortlinkDto';
@@ -1,6 +1,6 @@
1
1
  import { BaseResponse, BaseService, QueryString } from '@basmilius/http-client';
2
- import { EventAdapter } from '#data/adapter';
3
- import type { ShopDesignDto, ShopDto, ShopElementDto } from '#data/dto';
2
+ import { EventAdapter, ShortlinkAdapter } from '#data/adapter';
3
+ import type { ShopDesignDto, ShopDto, ShopElementDto, ShortlinkDto } from '#data/dto';
4
4
 
5
5
  export class MerchantEventShopService extends BaseService {
6
6
  async get(merchantId: string, eventId: string, shopId: string): Promise<BaseResponse<ShopDto>> {
@@ -23,6 +23,16 @@ export class MerchantEventShopService extends BaseService {
23
23
  .runArrayAdapter(EventAdapter.parseShopElement);
24
24
  }
25
25
 
26
+ async getShortlink(merchantId: string, eventId: string, shopId: string): Promise<BaseResponse<ShortlinkDto>> {
27
+ return await this
28
+ .request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/shortlink`)
29
+ .method('get')
30
+ .queryString(QueryString.builder()
31
+ .append('language', 'nl'))
32
+ .bearerToken()
33
+ .runAdapter(ShortlinkAdapter.parse);
34
+ }
35
+
26
36
  async patch(merchantId: string, eventId: string, shop: ShopDto): Promise<BaseResponse<ShopDto>> {
27
37
  return await this
28
38
  .request(`/merchants/${merchantId}/events/${eventId}/shops/${shop.id}`)
@@ -44,6 +54,8 @@ export class MerchantEventShopService extends BaseService {
44
54
  return await this
45
55
  .request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/design`)
46
56
  .method('patch')
57
+ .queryString(QueryString.builder()
58
+ .append('language', 'nl'))
47
59
  .bearerToken()
48
60
  .body({
49
61
  background_color: design.backgroundColor,
@@ -57,10 +69,22 @@ export class MerchantEventShopService extends BaseService {
57
69
  return await this
58
70
  .request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/elements`)
59
71
  .method('patch')
72
+ .queryString(QueryString.builder()
73
+ .append('language', 'nl'))
60
74
  .bearerToken()
61
75
  .body({
62
76
  elements
63
77
  })
64
78
  .runArrayAdapter(EventAdapter.parseShopElement);
65
79
  }
80
+
81
+ async postShortlink(merchantId: string, eventId: string, shopId: string): Promise<BaseResponse<ShortlinkDto>> {
82
+ return await this
83
+ .request(`/merchants/${merchantId}/events/${eventId}/shops/${shopId}/shortlink`)
84
+ .method('post')
85
+ .queryString(QueryString.builder()
86
+ .append('language', 'nl'))
87
+ .bearerToken()
88
+ .runAdapter(ShortlinkAdapter.parse);
89
+ }
66
90
  }
@@ -15,14 +15,14 @@ export class MerchantService extends BaseService {
15
15
  .runAdapter(MerchantAdapter.parseMerchant);
16
16
  }
17
17
 
18
- async getAccountManager(merchantId: string): Promise<BaseResponse<UserDto | null>> {
18
+ async getAccountManagers(merchantId: string): Promise<BaseResponse<UserDto[]>> {
19
19
  return await this
20
- .request(`/merchants/${merchantId}/account-manager`)
20
+ .request(`/merchants/${merchantId}/account-managers`)
21
21
  .method('get')
22
22
  .queryString(QueryString.builder()
23
23
  .append('language', 'nl'))
24
24
  .bearerToken()
25
- .runAdapter(AuthAdapter.parseUser);
25
+ .runArrayAdapter(AuthAdapter.parseUser);
26
26
  }
27
27
 
28
28
  async getClaims(merchantId: string): Promise<BaseResponse<Claim[]>> {
@@ -0,0 +1,35 @@
1
+ import { BaseResponse, BaseService, QueryString } from '@basmilius/http-client';
2
+ import { EventAdapter, PublicShopAdapter } from '#data/adapter';
3
+ import type { PublicShopDto, ShopDto, ShopElementDto } from '#data/dto';
4
+
5
+ export class MerchantShopService extends BaseService {
6
+ async get(merchantId: string, shopId: string): Promise<BaseResponse<ShopDto>> {
7
+ return await this
8
+ .request(`/merchants/${merchantId}/shops/${shopId}`)
9
+ .method('get')
10
+ .queryString(QueryString.builder()
11
+ .append('language', 'nl'))
12
+ .bearerToken()
13
+ .runAdapter(EventAdapter.parseShop);
14
+ }
15
+
16
+ async getElements(merchantId: string, shopId: string): Promise<BaseResponse<ShopElementDto[]>> {
17
+ return await this
18
+ .request(`/merchants/${merchantId}/shops/${shopId}/elements`)
19
+ .method('get')
20
+ .queryString(QueryString.builder()
21
+ .append('language', 'nl'))
22
+ .bearerToken()
23
+ .runArrayAdapter(EventAdapter.parseShopElement);
24
+ }
25
+
26
+ async getPreview(merchantId: string, shopId: string): Promise<BaseResponse<PublicShopDto>> {
27
+ return await this
28
+ .request(`/merchants/${merchantId}/shops/${shopId}/preview`)
29
+ .method('get')
30
+ .queryString(QueryString.builder()
31
+ .append('language', 'nl'))
32
+ .bearerToken()
33
+ .runAdapter(PublicShopAdapter.parsePublicShop);
34
+ }
35
+ }
@@ -0,0 +1,17 @@
1
+ import { BaseResponse, BaseService, Paginated, QueryString } from '@basmilius/http-client';
2
+ import { EventAdapter } from '#data/adapter';
3
+ import type { ShopDto } from '#data/dto';
4
+
5
+ export class MerchantShopsService extends BaseService {
6
+ async get(merchantId: string, offset: number, limit: number): Promise<BaseResponse<Paginated<ShopDto>>> {
7
+ return await this
8
+ .request(`/merchants/${merchantId}/shops`)
9
+ .method('get')
10
+ .queryString(QueryString.builder()
11
+ .append('language', 'nl')
12
+ .append('offset', offset)
13
+ .append('limit', limit))
14
+ .bearerToken()
15
+ .runPaginatedAdapter(EventAdapter.parseShop);
16
+ }
17
+ }
@@ -3,7 +3,7 @@ import type { ApexOptions } from 'apexcharts';
3
3
 
4
4
  export class MerchantStatisticsService extends BaseService {
5
5
  async getRevenueTrend(merchantId: string): Promise<BaseResponse<ApexOptions>> {
6
- return this
6
+ return await this
7
7
  .request(`/merchants/${merchantId}/statistics/revenue-trend`)
8
8
  .method('get')
9
9
  .queryString(QueryString.builder()
@@ -11,4 +11,14 @@ export class MerchantStatisticsService extends BaseService {
11
11
  .bearerToken()
12
12
  .run();
13
13
  }
14
+
15
+ async getStatus(merchantId: string): Promise<BaseResponse<boolean>> {
16
+ return await this
17
+ .request(`/merchants/${merchantId}/statistics/status`)
18
+ .method('get')
19
+ .queryString(QueryString.builder()
20
+ .append('language', 'nl'))
21
+ .bearerToken()
22
+ .run();
23
+ }
14
24
  }
@@ -21,6 +21,15 @@ export class PublicOrderService extends BaseService {
21
21
  .runArrayAdapter(PublicPayAdapter.parsePublicPaymentMethod);
22
22
  }
23
23
 
24
+ async postCancel(orderId: string): Promise<BaseResponse<OrderDto>> {
25
+ return await this
26
+ .request(`/orders/${orderId}/cancel`)
27
+ .method('post')
28
+ .queryString(QueryString.builder()
29
+ .append('language', 'nl'))
30
+ .runAdapter(OrderAdapter.parseOrder);
31
+ }
32
+
24
33
  async postPay(orderId: string, paymentMethodId: string): Promise<BaseResponse<TransactionDto>> {
25
34
  return await this
26
35
  .request(`/orders/${orderId}/pay`)
@@ -3,6 +3,7 @@ import type { DateTime } from 'luxon';
3
3
  import { OrderAdapter, PublicShopAdapter } from '#data/adapter';
4
4
  import type { OrderDto, PublicShopCartProductDto, PublicShopDto, PublicShopReservationDto } from '#data/dto';
5
5
  import type { Gender } from '#data/types';
6
+ import { emptyNull } from '#data/util';
6
7
 
7
8
  export class PublicShopService extends BaseService {
8
9
  async get(shopId: string): Promise<BaseResponse<PublicShopDto>> {
@@ -14,7 +15,25 @@ export class PublicShopService extends BaseService {
14
15
  .runAdapter(PublicShopAdapter.parsePublicShop);
15
16
  }
16
17
 
17
- async buy(shopId: string, reservationId: string, firstName: string, lastName: string, email: string, phoneNumber: string, dateOfBirth: DateTime | null, gender: Gender | null): Promise<BaseResponse<OrderDto>> {
18
+ async buy(shopId: string, reservationId: string, firstName: string, lastName: string, email: string, phoneNumber: string, dateOfBirth: DateTime | null, gender: Gender | null, addressCity: string | null, addressCountry: string | null, addressNumber: string | null, addressPostalCode: string | null, addressStreet: string | null): Promise<BaseResponse<OrderDto>> {
19
+ let address: Record<string, string | null> = null;
20
+
21
+ addressCity = emptyNull(addressCity);
22
+ addressCountry = emptyNull(addressCountry);
23
+ addressNumber = emptyNull(addressNumber);
24
+ addressPostalCode = emptyNull(addressPostalCode);
25
+ addressStreet = emptyNull(addressStreet);
26
+
27
+ if (addressCity || addressCountry || addressNumber || addressPostalCode || addressStreet) {
28
+ address = {
29
+ city: addressCity,
30
+ country_code: addressCountry,
31
+ number: addressNumber,
32
+ postal_code: addressPostalCode,
33
+ street: addressStreet
34
+ }
35
+ }
36
+
18
37
  return await this
19
38
  .request(`/shops/${shopId}/buy/${reservationId}`)
20
39
  .method('post')
@@ -26,7 +45,8 @@ export class PublicShopService extends BaseService {
26
45
  email: email,
27
46
  phone_number: phoneNumber.trim() === '' ? null : phoneNumber.trim(),
28
47
  date_of_birth: dateOfBirth?.toISODate(),
29
- gender: gender
48
+ gender: gender,
49
+ address
30
50
  })
31
51
  .runAdapter(OrderAdapter.parseOrder);
32
52
  }
@@ -1,4 +1,5 @@
1
1
  import { type BaseResponse, BaseService, QueryString } from '@basmilius/http-client';
2
+ import { ServiceInfoDto } from '#data/dto';
2
3
 
3
4
  export class ServicesService extends BaseService {
4
5
  async checkEmail(email: string): Promise<BaseResponse<CheckEmailResponse>> {
@@ -10,6 +11,15 @@ export class ServicesService extends BaseService {
10
11
  .append('language', 'nl'))
11
12
  .run();
12
13
  }
14
+
15
+ async getInfo(): Promise<BaseResponse<ServiceInfoDto>> {
16
+ return await this
17
+ .request('/service/info')
18
+ .method('get')
19
+ .queryString(QueryString.builder()
20
+ .append('language', 'nl'))
21
+ .run();
22
+ }
13
23
  }
14
24
 
15
25
  type CheckEmailResponse = {
@@ -22,6 +22,8 @@ export * from './MerchantFinanceInvoicesService';
22
22
  export * from './MerchantFinanceService';
23
23
  export * from './MerchantOrderService';
24
24
  export * from './MerchantOrdersService';
25
+ export * from './MerchantShopService';
26
+ export * from './MerchantShopsService';
25
27
  export * from './MerchantStatisticsService';
26
28
  export * from './MerchantStatisticsBuyersService';
27
29
  export * from './MerchantStatisticsEventsService';
@@ -18,6 +18,11 @@ export type ShopElementType =
18
18
  | 'product'
19
19
  | 'text';
20
20
 
21
+ export type ShopAddressMode =
22
+ | 'full'
23
+ | 'city'
24
+ | 'postal_code_number';
25
+
21
26
  export type ShopFieldRequirement =
22
27
  | 'disabled'
23
28
  | 'enabled'