@msm-platform/customer-sdk 0.5.0 → 0.5.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,30 @@ All notable changes to `@msm-platform/customer-sdk`. The format follows [Keep a
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.5.2] - 2026-11-24
8
+
9
+ ### Added
10
+
11
+ - Each booking `listOwnBookings` and `getOwnBooking` return has `event.resources` and `event.location`, the event's resources in its order, each `{ id, displayName, person, presentedAs }`, and where it is, `{ name, address, latitude, longitude }` or null, resolved as `listAvailability`'s items are, read live, and also for a cancelled event.
12
+ - `reserveCandidate` returns the hold with `price`, its event type's current price as its checkout charges it (`{ amount, currency, vatRateBp, advanceAmount }`), or null for a time with no price. `releaseReservation`, `DELETE /web/businesses/{businessId}/reservations/{reservationId}`, lets go of your own hold so its seat or slot is free again and it no longer counts toward your 5 holds, answering 204; while its payment is still open at the provider it answers 409 `ReservationPaymentOpen` and keeps the hold, so paying still books the time.
13
+ - Each business `getPublicBusiness`, `getPublicBusinessBySlug` and `listPublicBusinesses` return has `openingHours`: its open weekdays (1 Monday to 7 Sunday), each `{ weekday, periods }` with `{ startsAt, endsAt }` periods in business-local `HH:MM`, where a weekday not listed is closed, or null when the business has not set opening hours. `listPublicPeople`, `GET /web/businesses/{businessId}/people`, lists the people a public business presents, its active staff and those placed with it, by the business's order, each `{ id, displayName, role, bio, image, eventTypeIds }`, where `eventTypeIds` are the business's event types they are on; it answers 404 `BusinessNotFound` for a business that is not public.
14
+ - A business an admin has disabled answers every booking, checkout, purchase and other customer write with 409 `BusinessDisabled` until it is enabled again; payments already under way still complete. Its reads answer as for a business that is not public (404 `BusinessNotFound`, and `listPublicBusinesses` leaves it out), while `cancelOwnBooking` and the customer's own bookings still work, now also in a business that is not public.
15
+ - Each business `getPublicBusiness`, `getPublicBusinessBySlug` and `listPublicBusinesses` return has `gallery`, its photos in the order the business set, each `{ id, image }` where `image` has the same shape as `cover` (empty when it has none, at most 12), and its social links `instagramUrl`, `facebookUrl`, `tiktokUrl` and `websiteUrl`, each an http(s) URL or null when not set.
16
+ - Each `listPublicAvailability` item has `location`, where the event is, as `{ name, address, latitude, longitude }` or null: the location of its first place resource (one that is not a person) that has one, such as `{ name: "Iðnó", … }`; otherwise the address of the business that owns its first place resource, which for a placed resource is the providing business, with `name` null; otherwise, when it has no place resource, its own business's address, with `name` null; null when that business has no address. `name` null shows the address alone, and `latitude` and `longitude` are null when the business has no coordinates. A slot has a place resource only when the query names one. The location is read live, so a business's change shows at once.
17
+
18
+ ### Changed
19
+
20
+ - Through Miðgarður's client without `X-Partner`, a business of a partner that Miðgarður's directory does not list answers every `/web/businesses/{businessId}` route, such as `getPublicBusiness`, its event types, people, availability, reservations and the customer's own booking there, with 403 `OutsideClientScope` instead of answering, as `listPublicBusinesses` already leaves it out; the customer's bookings and memberships there leave `GET /web/me/bookings` and `GET /web/me/memberships`. The partner's own host, with `X-Partner`, still reaches it all.
21
+
22
+ ## [0.5.1] - 2026-11-23
23
+
24
+ ### Added
25
+
26
+ - Each public business `getPublicBusiness` and `listPublicBusinesses` return has `slug`, its URL slug, unique within the partner and kept when the business is renamed. `getPublicBusinessBySlug`, `GET /web/businesses/by-slug/{slug}`, finds the calling client's partner's public business by a slug it has or had; the answer's `slug` is the current one, so a site that asked for an earlier slug can redirect to it. An unknown slug is 404 `BusinessNotFound`.
27
+ - Each tag of an event type `GET /web/businesses/{businessId}/event-types` returns has `group`: the partner's group the tag is in, such as Kind or Level, as `{ slug, name }`, or null when it is in none. A site shows an event type's kind or level from its tags' groups and filters by a level with the `tag` filter as before, such as `tag=beginner`.
28
+ - Each business `getPublicBusiness`, `getPublicBusinessBySlug` and `listPublicBusinesses` return has `person` and `teachesAt`: for a contractor, `person` is `{ resourceId, displayName, image }`, the one person the business is, and `teachesAt` lists the partner's public businesses that have an accepted placement of that person, by name, each `{ id, slug, displayName, logo }`, whether or not any event is scheduled. For an organization `person` is null and `teachesAt` is empty.
29
+ - A signed-in customer keeps favourite tags for the client's partner, so they follow the customer to another device: `getMyPreferences`, `GET /web/me/preferences`, returns `{ tagSlugs }`, slugs of the partner's tags with the favourite first, and `replaceMyPreferences`, `PUT /web/me/preferences`, replaces the list with the `tagSlugs` it is given, in their order (at most 100; a repeat keeps its first place). A slug of none of the partner's tags is 422 `UnknownTagSlug` and changes nothing. A tag whose slug the partner changes stays on the list under its new slug, and a tag the partner deletes leaves it.
30
+
7
31
  ## [0.5.0] - 2026-11-23
8
32
 
9
33
  ### Added
@@ -118,6 +118,23 @@ export interface paths {
118
118
  patch?: never;
119
119
  trace?: never;
120
120
  };
121
+ "/web/businesses/{businessId}/people": {
122
+ parameters: {
123
+ query?: never;
124
+ header?: never;
125
+ path?: never;
126
+ cookie?: never;
127
+ };
128
+ /** List the people a public business presents: its active staff resources and those placed with it, each with its role, bio, portrait and the business's event types they are on */
129
+ get: operations["listPublicPeople"];
130
+ put?: never;
131
+ post?: never;
132
+ delete?: never;
133
+ options?: never;
134
+ head?: never;
135
+ patch?: never;
136
+ trace?: never;
137
+ };
121
138
  "/web/businesses/{businessId}/products": {
122
139
  parameters: {
123
140
  query?: never;
@@ -162,7 +179,7 @@ export interface paths {
162
179
  };
163
180
  get?: never;
164
181
  put?: never;
165
- /** Hold a booking candidate for yourself for the platform hold duration: a seat in a scheduled event (409 EventFull when none is free) or an open time slot (422 NotATimeSlot, 409 SlotTaken). A customer holds at most 5 active reservations at once across the businesses this client reaches (409 ReservationLimitReached). A customer the business's no-show ban policy bans is 403 BookingBanned with `bannedUntil` */
182
+ /** Hold a booking candidate for yourself for the platform hold duration: a seat in a scheduled event (409 EventFull when none is free) or an open time slot (422 NotATimeSlot, 409 SlotTaken). A customer holds at most 5 active reservations at once across the businesses this client reaches (409 ReservationLimitReached). A customer the business's no-show ban policy bans is 403 BookingBanned with `bannedUntil`. The hold comes with its event type's current `price`, the one its checkout charges, or null for a time with no price */
166
183
  post: operations["reserveCandidate"];
167
184
  delete?: never;
168
185
  options?: never;
@@ -170,6 +187,23 @@ export interface paths {
170
187
  patch?: never;
171
188
  trace?: never;
172
189
  };
190
+ "/web/businesses/{businessId}/reservations/{reservationId}": {
191
+ parameters: {
192
+ query?: never;
193
+ header?: never;
194
+ path?: never;
195
+ cookie?: never;
196
+ };
197
+ get?: never;
198
+ put?: never;
199
+ post?: never;
200
+ /** Let go of your own hold, as when you choose another time, so its seat or slot is free again and it no longer counts toward your 5 holds; its checkout is released with it. While the hold's payment is still open at the provider it is refused with 409 ReservationPaymentOpen and the hold stays until the payment ends, so paying still books the time. A hold that has already ended or was booked stays as it is */
201
+ delete: operations["releaseReservation"];
202
+ options?: never;
203
+ head?: never;
204
+ patch?: never;
205
+ trace?: never;
206
+ };
173
207
  "/web/businesses/{businessId}/reservations/{reservationId}/checkout": {
174
208
  parameters: {
175
209
  query?: never;
@@ -205,6 +239,23 @@ export interface paths {
205
239
  patch?: never;
206
240
  trace?: never;
207
241
  };
242
+ "/web/businesses/by-slug/{slug}": {
243
+ parameters: {
244
+ query?: never;
245
+ header?: never;
246
+ path?: never;
247
+ cookie?: never;
248
+ };
249
+ /** Get the calling client's partner's public business by a slug it has or had. The answer's `slug` is the current one: when it differs from the one asked for, redirect to it. MSM's clients, which serve several partners, find none */
250
+ get: operations["getPublicBusinessBySlug"];
251
+ put?: never;
252
+ post?: never;
253
+ delete?: never;
254
+ options?: never;
255
+ head?: never;
256
+ patch?: never;
257
+ trace?: never;
258
+ };
208
259
  "/web/identity/completeRegistration": {
209
260
  parameters: {
210
261
  query?: never;
@@ -342,6 +393,24 @@ export interface paths {
342
393
  patch?: never;
343
394
  trace?: never;
344
395
  };
396
+ "/web/me/preferences": {
397
+ parameters: {
398
+ query?: never;
399
+ header?: never;
400
+ path?: never;
401
+ cookie?: never;
402
+ };
403
+ /** Get your own preferences for the client's partner: your favourite tags, as slugs of the partner's tags, the first the favourite */
404
+ get: operations["getMyPreferences"];
405
+ /** Replace your own preferences for the client's partner: `tagSlugs` becomes your favourite tags in its order; a slug of none of the partner's tags is 422 UnknownTagSlug. A tag the partner deletes leaves the list */
406
+ put: operations["replaceMyPreferences"];
407
+ post?: never;
408
+ delete?: never;
409
+ options?: never;
410
+ head?: never;
411
+ patch?: never;
412
+ trace?: never;
413
+ };
345
414
  "/web/me/sessions": {
346
415
  parameters: {
347
416
  query?: never;
@@ -472,6 +541,99 @@ export interface components {
472
541
  };
473
542
  };
474
543
  };
544
+ /** @description - `BusinessDisabled`: The business is disabled: until an admin enables it, only reads and winding down work, such as cancelling bookings, refunds and settling payments already under way */
545
+ BusinessDisabled: {
546
+ headers: {
547
+ [name: string]: unknown;
548
+ };
549
+ content: {
550
+ "application/json": components["schemas"]["ErrorResponse"] & {
551
+ /** @enum {string} */
552
+ code: "BusinessDisabled";
553
+ };
554
+ };
555
+ };
556
+ /**
557
+ * @description - `BusinessDisabled`: The business is disabled: until an admin enables it, only reads and winding down work, such as cancelling bookings, refunds and settling payments already under way
558
+ * - `DeliveryLimitReached`: The customer already has as many of this product's memberships as one customer may get
559
+ * - `PaymentAlreadySucceeded`: This part of the agreement was already paid, with another amount, collector or provider
560
+ * - `PaymentInProgress`: This part of the agreement has an open payment attempt for another amount, collector or provider; wait until it ends
561
+ */
562
+ "BusinessDisabled-DeliveryLimitReached-PaymentAlreadySucceeded-PaymentInProgress": {
563
+ headers: {
564
+ [name: string]: unknown;
565
+ };
566
+ content: {
567
+ "application/json": components["schemas"]["ErrorResponse"] & {
568
+ /** @enum {string} */
569
+ code: "BusinessDisabled" | "DeliveryLimitReached" | "PaymentAlreadySucceeded" | "PaymentInProgress";
570
+ };
571
+ };
572
+ };
573
+ /**
574
+ * @description - `BusinessDisabled`: The business is disabled: until an admin enables it, only reads and winding down work, such as cancelling bookings, refunds and settling payments already under way
575
+ * - `EventFull`: The event has no free seat
576
+ * - `ReservationLimitReached`: The customer already holds the most active reservations allowed on Web (5, across the businesses this client reaches); reserve again once a hold lapses or is confirmed
577
+ * - `SlotTaken`: The time slot is taken on every resource that could provide it
578
+ */
579
+ "BusinessDisabled-EventFull-ReservationLimitReached-SlotTaken": {
580
+ headers: {
581
+ [name: string]: unknown;
582
+ };
583
+ content: {
584
+ "application/json": components["schemas"]["ErrorResponse"] & {
585
+ /** @enum {string} */
586
+ code: "BusinessDisabled" | "EventFull" | "ReservationLimitReached" | "SlotTaken";
587
+ };
588
+ };
589
+ };
590
+ /**
591
+ * @description - `BusinessDisabled`: The business is disabled: until an admin enables it, only reads and winding down work, such as cancelling bookings, refunds and settling payments already under way
592
+ * - `PaymentAlreadySucceeded`: This part of the agreement was already paid, with another amount, collector or provider
593
+ * - `PaymentInProgress`: This part of the agreement has an open payment attempt for another amount, collector or provider; wait until it ends
594
+ * - `ReservationExpired`: The reservation expired and no longer holds its seat or slot
595
+ */
596
+ "BusinessDisabled-PaymentAlreadySucceeded-PaymentInProgress-ReservationExpired": {
597
+ headers: {
598
+ [name: string]: unknown;
599
+ };
600
+ content: {
601
+ "application/json": components["schemas"]["ErrorResponse"] & {
602
+ /** @enum {string} */
603
+ code: "BusinessDisabled" | "PaymentAlreadySucceeded" | "PaymentInProgress" | "ReservationExpired";
604
+ };
605
+ };
606
+ };
607
+ /**
608
+ * @description - `BusinessDisabled`: The business is disabled: until an admin enables it, only reads and winding down work, such as cancelling bookings, refunds and settling payments already under way
609
+ * - `ReservationExpired`: The reservation expired and no longer holds its seat or slot
610
+ */
611
+ "BusinessDisabled-ReservationExpired": {
612
+ headers: {
613
+ [name: string]: unknown;
614
+ };
615
+ content: {
616
+ "application/json": components["schemas"]["ErrorResponse"] & {
617
+ /** @enum {string} */
618
+ code: "BusinessDisabled" | "ReservationExpired";
619
+ };
620
+ };
621
+ };
622
+ /**
623
+ * @description - `BusinessDisabled`: The business is disabled: until an admin enables it, only reads and winding down work, such as cancelling bookings, refunds and settling payments already under way
624
+ * - `ReservationPaymentOpen`: The reservation's payment is still open at the provider, so it keeps its seat or slot until the payment ends; paying it still books the time
625
+ */
626
+ "BusinessDisabled-ReservationPaymentOpen": {
627
+ headers: {
628
+ [name: string]: unknown;
629
+ };
630
+ content: {
631
+ "application/json": components["schemas"]["ErrorResponse"] & {
632
+ /** @enum {string} */
633
+ code: "BusinessDisabled" | "ReservationPaymentOpen";
634
+ };
635
+ };
636
+ };
475
637
  /** @description - `BusinessNotFound`: The business does not exist or is not public */
476
638
  BusinessNotFound: {
477
639
  headers: {
@@ -616,38 +778,6 @@ export interface components {
616
778
  };
617
779
  };
618
780
  };
619
- /**
620
- * @description - `DeliveryLimitReached`: The customer already has as many of this product's memberships as one customer may get
621
- * - `PaymentAlreadySucceeded`: This part of the agreement was already paid, with another amount, collector or provider
622
- * - `PaymentInProgress`: This part of the agreement has an open payment attempt for another amount, collector or provider; wait until it ends
623
- */
624
- "DeliveryLimitReached-PaymentAlreadySucceeded-PaymentInProgress": {
625
- headers: {
626
- [name: string]: unknown;
627
- };
628
- content: {
629
- "application/json": components["schemas"]["ErrorResponse"] & {
630
- /** @enum {string} */
631
- code: "DeliveryLimitReached" | "PaymentAlreadySucceeded" | "PaymentInProgress";
632
- };
633
- };
634
- };
635
- /**
636
- * @description - `EventFull`: The event has no free seat
637
- * - `ReservationLimitReached`: The customer already holds the most active reservations allowed on Web (5, across the businesses this client reaches); reserve again once a hold lapses or is confirmed
638
- * - `SlotTaken`: The time slot is taken on every resource that could provide it
639
- */
640
- "EventFull-ReservationLimitReached-SlotTaken": {
641
- headers: {
642
- [name: string]: unknown;
643
- };
644
- content: {
645
- "application/json": components["schemas"]["ErrorResponse"] & {
646
- /** @enum {string} */
647
- code: "EventFull" | "ReservationLimitReached" | "SlotTaken";
648
- };
649
- };
650
- };
651
781
  /**
652
782
  * @description - `EventNotBookable`: Only a scheduled event with a live event type can be reserved or booked
653
783
  * - `EventStarted`: The event has started
@@ -796,22 +926,6 @@ export interface components {
796
926
  };
797
927
  };
798
928
  };
799
- /**
800
- * @description - `PaymentAlreadySucceeded`: This part of the agreement was already paid, with another amount, collector or provider
801
- * - `PaymentInProgress`: This part of the agreement has an open payment attempt for another amount, collector or provider; wait until it ends
802
- * - `ReservationExpired`: The reservation expired and no longer holds its seat or slot
803
- */
804
- "PaymentAlreadySucceeded-PaymentInProgress-ReservationExpired": {
805
- headers: {
806
- [name: string]: unknown;
807
- };
808
- content: {
809
- "application/json": components["schemas"]["ErrorResponse"] & {
810
- /** @enum {string} */
811
- code: "PaymentAlreadySucceeded" | "PaymentInProgress" | "ReservationExpired";
812
- };
813
- };
814
- };
815
929
  /**
816
930
  * @description - `PaymentCredentialsUnavailable`: The engine cannot store or read payment provider credentials now; retry after `Retry-After` seconds
817
931
  * - `PaymentProviderUnavailable`: The payment provider did not answer, or it is not configured here; the same request retries the same attempt after `Retry-After` seconds
@@ -885,15 +999,27 @@ export interface components {
885
999
  };
886
1000
  };
887
1001
  };
888
- /** @description - `ReservationExpired`: The reservation expired and no longer holds its seat or slot */
889
- ReservationExpired: {
1002
+ /** @description - `ReservationNotFound`: The reservation does not exist, or is not the caller's */
1003
+ ReservationNotFound: {
890
1004
  headers: {
891
1005
  [name: string]: unknown;
892
1006
  };
893
1007
  content: {
894
1008
  "application/json": components["schemas"]["ErrorResponse"] & {
895
1009
  /** @enum {string} */
896
- code: "ReservationExpired";
1010
+ code: "ReservationNotFound";
1011
+ };
1012
+ };
1013
+ };
1014
+ /** @description - `UnknownTagSlug`: A slug names none of the partner's tags */
1015
+ UnknownTagSlug: {
1016
+ headers: {
1017
+ [name: string]: unknown;
1018
+ };
1019
+ content: {
1020
+ "application/json": components["schemas"]["ErrorResponse"] & {
1021
+ /** @enum {string} */
1022
+ code: "UnknownTagSlug";
897
1023
  };
898
1024
  };
899
1025
  };
@@ -969,8 +1095,34 @@ export interface operations {
969
1095
  displayName: string;
970
1096
  /** Format: email */
971
1097
  email: string | null;
1098
+ /**
1099
+ * Format: uri
1100
+ * @description The business's Facebook page, an https URL
1101
+ */
1102
+ facebookUrl: string | null;
1103
+ gallery: {
1104
+ /** Format: uuid */
1105
+ id: string;
1106
+ image: {
1107
+ height: number;
1108
+ small: {
1109
+ height: number;
1110
+ /** Format: uri */
1111
+ url: string;
1112
+ width: number;
1113
+ };
1114
+ /** Format: uri */
1115
+ url: string;
1116
+ width: number;
1117
+ };
1118
+ }[];
972
1119
  /** Format: uuid */
973
1120
  id: string;
1121
+ /**
1122
+ * Format: uri
1123
+ * @description The business's Instagram page, an https URL
1124
+ */
1125
+ instagramUrl: string | null;
974
1126
  /** @enum {string} */
975
1127
  kind: "organization" | "contractor";
976
1128
  latitude: number | null;
@@ -987,8 +1139,66 @@ export interface operations {
987
1139
  width: number;
988
1140
  } | null;
989
1141
  longitude: number | null;
1142
+ /** @description The open weekdays (1 Monday to 7 Sunday) with their periods, business-local; unlisted days are closed. Null when the business has not set opening hours */
1143
+ openingHours: {
1144
+ periods: {
1145
+ /** @description HH:MM, business-local; 24:00 is midnight */
1146
+ endsAt: string;
1147
+ /** @description HH:MM, business-local */
1148
+ startsAt: string;
1149
+ }[];
1150
+ weekday: number;
1151
+ }[] | null;
1152
+ person: {
1153
+ displayName: string;
1154
+ image: {
1155
+ height: number;
1156
+ small: {
1157
+ height: number;
1158
+ /** Format: uri */
1159
+ url: string;
1160
+ width: number;
1161
+ };
1162
+ /** Format: uri */
1163
+ url: string;
1164
+ width: number;
1165
+ } | null;
1166
+ /** Format: uuid */
1167
+ resourceId: string;
1168
+ } | null;
990
1169
  phone: string | null;
1170
+ /** @description The business's URL slug: lower-case letters and digits in words joined by single hyphens, unique within the partner. Set from the name when the business is created; a rename keeps it */
1171
+ slug: string;
1172
+ teachesAt: {
1173
+ displayName: string;
1174
+ /** Format: uuid */
1175
+ id: string;
1176
+ logo: {
1177
+ height: number;
1178
+ small: {
1179
+ height: number;
1180
+ /** Format: uri */
1181
+ url: string;
1182
+ width: number;
1183
+ };
1184
+ /** Format: uri */
1185
+ url: string;
1186
+ width: number;
1187
+ } | null;
1188
+ /** @description The business's URL slug: lower-case letters and digits in words joined by single hyphens, unique within the partner. Set from the name when the business is created; a rename keeps it */
1189
+ slug: string;
1190
+ }[];
1191
+ /**
1192
+ * Format: uri
1193
+ * @description The business's TikTok page, an https URL
1194
+ */
1195
+ tiktokUrl: string | null;
991
1196
  timezone: string;
1197
+ /**
1198
+ * Format: uri
1199
+ * @description The business's own website, an http or https URL
1200
+ */
1201
+ websiteUrl: string | null;
992
1202
  }[];
993
1203
  nextCursor: string | null;
994
1204
  };
@@ -1036,8 +1246,34 @@ export interface operations {
1036
1246
  displayName: string;
1037
1247
  /** Format: email */
1038
1248
  email: string | null;
1249
+ /**
1250
+ * Format: uri
1251
+ * @description The business's Facebook page, an https URL
1252
+ */
1253
+ facebookUrl: string | null;
1254
+ gallery: {
1255
+ /** Format: uuid */
1256
+ id: string;
1257
+ image: {
1258
+ height: number;
1259
+ small: {
1260
+ height: number;
1261
+ /** Format: uri */
1262
+ url: string;
1263
+ width: number;
1264
+ };
1265
+ /** Format: uri */
1266
+ url: string;
1267
+ width: number;
1268
+ };
1269
+ }[];
1039
1270
  /** Format: uuid */
1040
1271
  id: string;
1272
+ /**
1273
+ * Format: uri
1274
+ * @description The business's Instagram page, an https URL
1275
+ */
1276
+ instagramUrl: string | null;
1041
1277
  /** @enum {string} */
1042
1278
  kind: "organization" | "contractor";
1043
1279
  latitude: number | null;
@@ -1054,8 +1290,66 @@ export interface operations {
1054
1290
  width: number;
1055
1291
  } | null;
1056
1292
  longitude: number | null;
1293
+ /** @description The open weekdays (1 Monday to 7 Sunday) with their periods, business-local; unlisted days are closed. Null when the business has not set opening hours */
1294
+ openingHours: {
1295
+ periods: {
1296
+ /** @description HH:MM, business-local; 24:00 is midnight */
1297
+ endsAt: string;
1298
+ /** @description HH:MM, business-local */
1299
+ startsAt: string;
1300
+ }[];
1301
+ weekday: number;
1302
+ }[] | null;
1303
+ person: {
1304
+ displayName: string;
1305
+ image: {
1306
+ height: number;
1307
+ small: {
1308
+ height: number;
1309
+ /** Format: uri */
1310
+ url: string;
1311
+ width: number;
1312
+ };
1313
+ /** Format: uri */
1314
+ url: string;
1315
+ width: number;
1316
+ } | null;
1317
+ /** Format: uuid */
1318
+ resourceId: string;
1319
+ } | null;
1057
1320
  phone: string | null;
1321
+ /** @description The business's URL slug: lower-case letters and digits in words joined by single hyphens, unique within the partner. Set from the name when the business is created; a rename keeps it */
1322
+ slug: string;
1323
+ teachesAt: {
1324
+ displayName: string;
1325
+ /** Format: uuid */
1326
+ id: string;
1327
+ logo: {
1328
+ height: number;
1329
+ small: {
1330
+ height: number;
1331
+ /** Format: uri */
1332
+ url: string;
1333
+ width: number;
1334
+ };
1335
+ /** Format: uri */
1336
+ url: string;
1337
+ width: number;
1338
+ } | null;
1339
+ /** @description The business's URL slug: lower-case letters and digits in words joined by single hyphens, unique within the partner. Set from the name when the business is created; a rename keeps it */
1340
+ slug: string;
1341
+ }[];
1342
+ /**
1343
+ * Format: uri
1344
+ * @description The business's TikTok page, an https URL
1345
+ */
1346
+ tiktokUrl: string | null;
1058
1347
  timezone: string;
1348
+ /**
1349
+ * Format: uri
1350
+ * @description The business's own website, an http or https URL
1351
+ */
1352
+ websiteUrl: string | null;
1059
1353
  };
1060
1354
  };
1061
1355
  };
@@ -1103,6 +1397,12 @@ export interface operations {
1103
1397
  full: boolean;
1104
1398
  /** @enum {string} */
1105
1399
  kind: "event" | "slot";
1400
+ location: {
1401
+ address: string;
1402
+ latitude: number | null;
1403
+ longitude: number | null;
1404
+ name: string | null;
1405
+ } | null;
1106
1406
  resource: {
1107
1407
  displayName: string;
1108
1408
  /** Format: uuid */
@@ -1186,6 +1486,24 @@ export interface operations {
1186
1486
  /** Format: uuid */
1187
1487
  eventTypeId: string | null;
1188
1488
  eventTypeName: string | null;
1489
+ /** @description Where the event is, resolved as /web availability's `location` is and read live: its first place resource's location, else the address of the business that owns that resource, else its own business's address; null without any */
1490
+ location: {
1491
+ address: string;
1492
+ latitude: number | null;
1493
+ longitude: number | null;
1494
+ name: string | null;
1495
+ } | null;
1496
+ /** @description The event's resources in its order, as /web availability gives them, read live; a cancelled event still has them */
1497
+ resources: {
1498
+ displayName: string;
1499
+ /** Format: uuid */
1500
+ id: string;
1501
+ person: boolean;
1502
+ presentedAs: {
1503
+ label: string | null;
1504
+ name: string;
1505
+ };
1506
+ }[];
1189
1507
  /** Format: date-time */
1190
1508
  startsAt: string;
1191
1509
  };
@@ -1261,6 +1579,7 @@ export interface operations {
1261
1579
  401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
1262
1580
  403: components["responses"]["NotAuthorized-OutsideClientScope"];
1263
1581
  404: components["responses"]["BookingNotFound-BusinessNotFound"];
1582
+ 409: components["responses"]["BusinessDisabled"];
1264
1583
  413: components["responses"]["BodyTooLarge"];
1265
1584
  415: components["responses"]["UnsupportedMediaType"];
1266
1585
  422: components["responses"]["EventStarted"];
@@ -1353,6 +1672,12 @@ export interface operations {
1353
1672
  * @enum {string}
1354
1673
  */
1355
1674
  colour: "red" | "orange" | "amber" | "lime" | "green" | "teal" | "cyan" | "blue" | "indigo" | "purple" | "pink" | "slate";
1675
+ /** @description #666: the partner's group the tag is in, such as Kind or Level, or null for none */
1676
+ group: {
1677
+ name: string;
1678
+ /** @description Lower-case letters and digits in words joined by single hyphens; unique within the partner */
1679
+ slug: string;
1680
+ } | null;
1356
1681
  /** Format: uuid */
1357
1682
  id: string;
1358
1683
  name: string;
@@ -1372,7 +1697,43 @@ export interface operations {
1372
1697
  500: components["responses"]["InternalError"];
1373
1698
  };
1374
1699
  };
1375
- listOnlinePaymentMethods: {
1700
+ listOnlinePaymentMethods: {
1701
+ parameters: {
1702
+ query?: never;
1703
+ header?: never;
1704
+ path: {
1705
+ businessId: string;
1706
+ };
1707
+ cookie?: never;
1708
+ };
1709
+ requestBody?: never;
1710
+ responses: {
1711
+ /** @description OK */
1712
+ 200: {
1713
+ headers: {
1714
+ [name: string]: unknown;
1715
+ };
1716
+ content: {
1717
+ "application/json": {
1718
+ items: {
1719
+ /** Format: uuid */
1720
+ id: string;
1721
+ /** @enum {string} */
1722
+ kind: "CARD_ONLINE" | "PAY_BY_PHONE";
1723
+ label: string;
1724
+ }[];
1725
+ };
1726
+ };
1727
+ };
1728
+ 400: components["responses"]["ValidationFailed"];
1729
+ 401: components["responses"]["NotAuthenticated-SessionExpired"];
1730
+ 403: components["responses"]["OutsideClientScope"];
1731
+ 404: components["responses"]["BusinessNotFound"];
1732
+ 429: components["responses"]["RateLimited"];
1733
+ 500: components["responses"]["InternalError"];
1734
+ };
1735
+ };
1736
+ listPublicPeople: {
1376
1737
  parameters: {
1377
1738
  query?: never;
1378
1739
  header?: never;
@@ -1391,11 +1752,28 @@ export interface operations {
1391
1752
  content: {
1392
1753
  "application/json": {
1393
1754
  items: {
1755
+ /** @description The person's bio (#686), null without one */
1756
+ bio: string | null;
1757
+ displayName: string;
1758
+ /** @description The business's event types the person is on, by name; as listed by listPublicEventTypes */
1759
+ eventTypeIds: string[];
1394
1760
  /** Format: uuid */
1395
1761
  id: string;
1396
- /** @enum {string} */
1397
- kind: "CARD_ONLINE" | "PAY_BY_PHONE";
1398
- label: string;
1762
+ /** @description The resource's photo (MVP-226), null without one */
1763
+ image: {
1764
+ height: number;
1765
+ small: {
1766
+ height: number;
1767
+ /** Format: uri */
1768
+ url: string;
1769
+ width: number;
1770
+ };
1771
+ /** Format: uri */
1772
+ url: string;
1773
+ width: number;
1774
+ } | null;
1775
+ /** @description The person's role, such as Barber (#686), null without one */
1776
+ role: string | null;
1399
1777
  }[];
1400
1778
  };
1401
1779
  };
@@ -1596,7 +1974,7 @@ export interface operations {
1596
1974
  401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
1597
1975
  403: components["responses"]["NotAuthorized-OutsideClientScope"];
1598
1976
  404: components["responses"]["BusinessNotFound-ProductNotFound"];
1599
- 409: components["responses"]["DeliveryLimitReached-PaymentAlreadySucceeded-PaymentInProgress"];
1977
+ 409: components["responses"]["BusinessDisabled-DeliveryLimitReached-PaymentAlreadySucceeded-PaymentInProgress"];
1600
1978
  413: components["responses"]["BodyTooLarge"];
1601
1979
  415: components["responses"]["UnsupportedMediaType"];
1602
1980
  422: components["responses"]["CustomerOutsideBusiness-PaymentProviderNotConnected-PaymentProviderNotOffered-PaymentProviderRejected-ProductInactive"];
@@ -1647,6 +2025,16 @@ export interface operations {
1647
2025
  expiresAt: string;
1648
2026
  /** Format: uuid */
1649
2027
  id: string;
2028
+ price: {
2029
+ /** @description In the currency's ISO 4217 minor unit; ISK has none, so 12.400 kr. is 12400 */
2030
+ advanceAmount: number;
2031
+ /** @description In the currency's ISO 4217 minor unit; ISK has none, so 12.400 kr. is 12400 */
2032
+ amount: number;
2033
+ /** @description The ISO 4217 currency code, such as ISK */
2034
+ currency: string;
2035
+ /** @description The VAT rate in basis points: 24 % is 2400 */
2036
+ vatRateBp: number;
2037
+ } | null;
1650
2038
  /** @enum {string} */
1651
2039
  status: "active" | "confirmed" | "expired";
1652
2040
  };
@@ -1656,7 +2044,7 @@ export interface operations {
1656
2044
  401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
1657
2045
  403: components["responses"]["BookingBanned-NotAuthorized-OutsideClientScope"];
1658
2046
  404: components["responses"]["BusinessNotFound-EventNotFound-EventTypeNotFound"];
1659
- 409: components["responses"]["EventFull-ReservationLimitReached-SlotTaken"];
2047
+ 409: components["responses"]["BusinessDisabled-EventFull-ReservationLimitReached-SlotTaken"];
1660
2048
  413: components["responses"]["BodyTooLarge"];
1661
2049
  415: components["responses"]["UnsupportedMediaType"];
1662
2050
  422: components["responses"]["EventNotBookable-EventStarted-NotATimeSlot"];
@@ -1664,6 +2052,38 @@ export interface operations {
1664
2052
  500: components["responses"]["InternalError"];
1665
2053
  };
1666
2054
  };
2055
+ releaseReservation: {
2056
+ parameters: {
2057
+ query?: never;
2058
+ header?: never;
2059
+ path: {
2060
+ businessId: string;
2061
+ reservationId: string;
2062
+ };
2063
+ cookie?: never;
2064
+ };
2065
+ requestBody?: never;
2066
+ responses: {
2067
+ /** @description No Content */
2068
+ 204: {
2069
+ headers: {
2070
+ [name: string]: unknown;
2071
+ };
2072
+ content: {
2073
+ "application/json": null;
2074
+ };
2075
+ };
2076
+ 400: components["responses"]["MalformedBody-ValidationFailed"];
2077
+ 401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
2078
+ 403: components["responses"]["NotAuthorized-OutsideClientScope"];
2079
+ 404: components["responses"]["ReservationNotFound"];
2080
+ 409: components["responses"]["BusinessDisabled-ReservationPaymentOpen"];
2081
+ 413: components["responses"]["BodyTooLarge"];
2082
+ 415: components["responses"]["UnsupportedMediaType"];
2083
+ 429: components["responses"]["RateLimited"];
2084
+ 500: components["responses"]["InternalError"];
2085
+ };
2086
+ };
1667
2087
  getCheckout: {
1668
2088
  parameters: {
1669
2089
  query?: never;
@@ -1816,7 +2236,7 @@ export interface operations {
1816
2236
  401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
1817
2237
  403: components["responses"]["BookingBanned-NotAuthorized-OutsideClientScope"];
1818
2238
  404: components["responses"]["BusinessNotFound-ReservationNotFound"];
1819
- 409: components["responses"]["PaymentAlreadySucceeded-PaymentInProgress-ReservationExpired"];
2239
+ 409: components["responses"]["BusinessDisabled-PaymentAlreadySucceeded-PaymentInProgress-ReservationExpired"];
1820
2240
  413: components["responses"]["BodyTooLarge"];
1821
2241
  415: components["responses"]["UnsupportedMediaType"];
1822
2242
  422: components["responses"]["CheckoutNotRequired-CustomerOutsideBusiness-EventNotBookable-EventStarted-PaymentProviderNotConnected-PaymentProviderNotOffered-PaymentProviderRejected"];
@@ -1875,7 +2295,7 @@ export interface operations {
1875
2295
  401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
1876
2296
  403: components["responses"]["BookingBanned-NotAuthorized-OutsideClientScope"];
1877
2297
  404: components["responses"]["BusinessNotFound-ReservationNotFound"];
1878
- 409: components["responses"]["ReservationExpired"];
2298
+ 409: components["responses"]["BusinessDisabled-ReservationExpired"];
1879
2299
  413: components["responses"]["BodyTooLarge"];
1880
2300
  415: components["responses"]["UnsupportedMediaType"];
1881
2301
  422: components["responses"]["CheckoutRequired-CustomerOutsideBusiness-EventNotBookable-EventStarted"];
@@ -1883,6 +2303,157 @@ export interface operations {
1883
2303
  500: components["responses"]["InternalError"];
1884
2304
  };
1885
2305
  };
2306
+ getPublicBusinessBySlug: {
2307
+ parameters: {
2308
+ query?: never;
2309
+ header?: never;
2310
+ path: {
2311
+ /** @description A slug the business has or had, such as `studio-220` */
2312
+ slug: string;
2313
+ };
2314
+ cookie?: never;
2315
+ };
2316
+ requestBody?: never;
2317
+ responses: {
2318
+ /** @description OK */
2319
+ 200: {
2320
+ headers: {
2321
+ [name: string]: unknown;
2322
+ };
2323
+ content: {
2324
+ "application/json": {
2325
+ address: string | null;
2326
+ brandColor: string | null;
2327
+ cover: {
2328
+ height: number;
2329
+ small: {
2330
+ height: number;
2331
+ /** Format: uri */
2332
+ url: string;
2333
+ width: number;
2334
+ };
2335
+ /** Format: uri */
2336
+ url: string;
2337
+ width: number;
2338
+ } | null;
2339
+ description: string | null;
2340
+ displayName: string;
2341
+ /** Format: email */
2342
+ email: string | null;
2343
+ /**
2344
+ * Format: uri
2345
+ * @description The business's Facebook page, an https URL
2346
+ */
2347
+ facebookUrl: string | null;
2348
+ gallery: {
2349
+ /** Format: uuid */
2350
+ id: string;
2351
+ image: {
2352
+ height: number;
2353
+ small: {
2354
+ height: number;
2355
+ /** Format: uri */
2356
+ url: string;
2357
+ width: number;
2358
+ };
2359
+ /** Format: uri */
2360
+ url: string;
2361
+ width: number;
2362
+ };
2363
+ }[];
2364
+ /** Format: uuid */
2365
+ id: string;
2366
+ /**
2367
+ * Format: uri
2368
+ * @description The business's Instagram page, an https URL
2369
+ */
2370
+ instagramUrl: string | null;
2371
+ /** @enum {string} */
2372
+ kind: "organization" | "contractor";
2373
+ latitude: number | null;
2374
+ logo: {
2375
+ height: number;
2376
+ small: {
2377
+ height: number;
2378
+ /** Format: uri */
2379
+ url: string;
2380
+ width: number;
2381
+ };
2382
+ /** Format: uri */
2383
+ url: string;
2384
+ width: number;
2385
+ } | null;
2386
+ longitude: number | null;
2387
+ /** @description The open weekdays (1 Monday to 7 Sunday) with their periods, business-local; unlisted days are closed. Null when the business has not set opening hours */
2388
+ openingHours: {
2389
+ periods: {
2390
+ /** @description HH:MM, business-local; 24:00 is midnight */
2391
+ endsAt: string;
2392
+ /** @description HH:MM, business-local */
2393
+ startsAt: string;
2394
+ }[];
2395
+ weekday: number;
2396
+ }[] | null;
2397
+ person: {
2398
+ displayName: string;
2399
+ image: {
2400
+ height: number;
2401
+ small: {
2402
+ height: number;
2403
+ /** Format: uri */
2404
+ url: string;
2405
+ width: number;
2406
+ };
2407
+ /** Format: uri */
2408
+ url: string;
2409
+ width: number;
2410
+ } | null;
2411
+ /** Format: uuid */
2412
+ resourceId: string;
2413
+ } | null;
2414
+ phone: string | null;
2415
+ /** @description The business's URL slug: lower-case letters and digits in words joined by single hyphens, unique within the partner. Set from the name when the business is created; a rename keeps it */
2416
+ slug: string;
2417
+ teachesAt: {
2418
+ displayName: string;
2419
+ /** Format: uuid */
2420
+ id: string;
2421
+ logo: {
2422
+ height: number;
2423
+ small: {
2424
+ height: number;
2425
+ /** Format: uri */
2426
+ url: string;
2427
+ width: number;
2428
+ };
2429
+ /** Format: uri */
2430
+ url: string;
2431
+ width: number;
2432
+ } | null;
2433
+ /** @description The business's URL slug: lower-case letters and digits in words joined by single hyphens, unique within the partner. Set from the name when the business is created; a rename keeps it */
2434
+ slug: string;
2435
+ }[];
2436
+ /**
2437
+ * Format: uri
2438
+ * @description The business's TikTok page, an https URL
2439
+ */
2440
+ tiktokUrl: string | null;
2441
+ timezone: string;
2442
+ /**
2443
+ * Format: uri
2444
+ * @description The business's own website, an http or https URL
2445
+ */
2446
+ websiteUrl: string | null;
2447
+ };
2448
+ };
2449
+ };
2450
+ 400: components["responses"]["ValidationFailed"];
2451
+ 401: components["responses"]["NotAuthenticated-SessionExpired"];
2452
+ 404: components["responses"]["BusinessNotFound"];
2453
+ 429: components["responses"]["RateLimited"];
2454
+ 500: components["responses"]["InternalError"];
2455
+ };
2456
+ };
1886
2457
  identityCompleteRegistration: {
1887
2458
  parameters: {
1888
2459
  query?: never;
@@ -2203,6 +2774,24 @@ export interface operations {
2203
2774
  /** Format: uuid */
2204
2775
  eventTypeId: string | null;
2205
2776
  eventTypeName: string | null;
2777
+ /** @description Where the event is, resolved as /web availability's `location` is and read live: its first place resource's location, else the address of the business that owns that resource, else its own business's address; null without any */
2778
+ location: {
2779
+ address: string;
2780
+ latitude: number | null;
2781
+ longitude: number | null;
2782
+ name: string | null;
2783
+ } | null;
2784
+ /** @description The event's resources in its order, as /web availability gives them, read live; a cancelled event still has them */
2785
+ resources: {
2786
+ displayName: string;
2787
+ /** Format: uuid */
2788
+ id: string;
2789
+ person: boolean;
2790
+ presentedAs: {
2791
+ label: string | null;
2792
+ name: string;
2793
+ };
2794
+ }[];
2206
2795
  /** Format: date-time */
2207
2796
  startsAt: string;
2208
2797
  };
@@ -2266,6 +2855,71 @@ export interface operations {
2266
2855
  500: components["responses"]["InternalError"];
2267
2856
  };
2268
2857
  };
2858
+ getMyPreferences: {
2859
+ parameters: {
2860
+ query?: never;
2861
+ header?: never;
2862
+ path?: never;
2863
+ cookie?: never;
2864
+ };
2865
+ requestBody?: never;
2866
+ responses: {
2867
+ /** @description OK */
2868
+ 200: {
2869
+ headers: {
2870
+ [name: string]: unknown;
2871
+ };
2872
+ content: {
2873
+ "application/json": {
2874
+ /** @description The customer's favourite tags of the client's partner, as slugs, the first the favourite; a repeat keeps its first place */
2875
+ tagSlugs: string[];
2876
+ };
2877
+ };
2878
+ };
2879
+ 401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
2880
+ 403: components["responses"]["NotAuthorized"];
2881
+ 429: components["responses"]["RateLimited"];
2882
+ 500: components["responses"]["InternalError"];
2883
+ };
2884
+ };
2885
+ replaceMyPreferences: {
2886
+ parameters: {
2887
+ query?: never;
2888
+ header?: never;
2889
+ path?: never;
2890
+ cookie?: never;
2891
+ };
2892
+ requestBody: {
2893
+ content: {
2894
+ "application/json": {
2895
+ /** @description The customer's favourite tags of the client's partner, as slugs, the first the favourite; a repeat keeps its first place */
2896
+ tagSlugs: string[];
2897
+ };
2898
+ };
2899
+ };
2900
+ responses: {
2901
+ /** @description OK */
2902
+ 200: {
2903
+ headers: {
2904
+ [name: string]: unknown;
2905
+ };
2906
+ content: {
2907
+ "application/json": {
2908
+ /** @description The customer's favourite tags of the client's partner, as slugs, the first the favourite; a repeat keeps its first place */
2909
+ tagSlugs: string[];
2910
+ };
2911
+ };
2912
+ };
2913
+ 400: components["responses"]["MalformedBody-ValidationFailed"];
2914
+ 401: components["responses"]["CustomerSessionRequired-NotAuthenticated-SessionExpired"];
2915
+ 403: components["responses"]["NotAuthorized"];
2916
+ 413: components["responses"]["BodyTooLarge"];
2917
+ 415: components["responses"]["UnsupportedMediaType"];
2918
+ 422: components["responses"]["UnknownTagSlug"];
2919
+ 429: components["responses"]["RateLimited"];
2920
+ 500: components["responses"]["InternalError"];
2921
+ };
2922
+ };
2269
2923
  signOutEverywhere: {
2270
2924
  parameters: {
2271
2925
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msm-platform/customer-sdk",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Typed server-side client for MSM's customer API (/web)",
5
5
  "license": "MIT",
6
6
  "repository": {