@msm-platform/customer-sdk 0.3.2 → 0.4.1

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,29 @@ All notable changes to `@msm-platform/customer-sdk`. The format follows [Keep a
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.1] - 2026-11-20
8
+
9
+ ### Added
10
+
11
+ - The businesses `getPublicBusiness` and `listPublicBusinesses` return have `kind`: `organization`, or `contractor` for a business of one, such as an instructor working on their own, whose only staff member and only resource is that person. A contractor's resource can also appear on other businesses' events.
12
+
13
+ ## [0.4.0] - 2026-11-20
14
+
15
+ ### Added
16
+
17
+ - Each event type `GET /web/businesses/{businessId}/event-types` returns has `tags`: its partner's tags in the event type's order, the first the most important, each `{ id, slug, name, colour }`. `colour` is a palette name (`red`, `orange`, `amber`, `lime`, `green`, `teal`, `cyan`, `blue`, `indigo`, `purple`, `pink` or `slate`) for a site to style with its own values.
18
+ - Each of an availability item's `resources` in `GET /web/businesses/{businessId}/availability` has `presentedAs`, `{ label, name }`: how the business's staff present the resource on the event. Show `label` before `name`, or `name` alone when `label` is null, in `resources`' order. `label` and `name` are the resource's own (`name` its `displayName`) unless staff set others for the event type, or for the event or its series, which comes first.
19
+ - `GET /web/businesses/{businessId}/availability`, `GET /web/businesses/{businessId}/event-types` and `GET /web/businesses` take a repeatable `tag` query parameter of tag slugs (`tag=yoga&tag=pilates`): availability and event types keep only the event types that carry any of the business's partner's tags with those slugs, combined with the other filters, and the business list keeps the client's partner's businesses with an event type that does. A slug the partner does not have gives an empty result, not an error.
20
+ - `reserveCandidate` and `confirmReservation` can answer 403 `BookingBanned` when the business's no-show ban policy bars the customer from booking online, with `bannedUntil`, the date-time the ban ends, in the error body (`BookingBannedErrorResponse`). Staff can still book the customer.
21
+
22
+ ### Changed
23
+
24
+ - A tag's `colour` in an event type's `tags` is now per business: the colour the event type's business shows the tag in, its own when it set one and the partner's otherwise. Two businesses of one partner can show the same tag in different colours.
25
+
26
+ ### Removed
27
+
28
+ - **Breaking:** an event type's `categoryId` in `GET /web/businesses/{businessId}/event-types` is gone, with the platform's global categories; its `tags` replace it.
29
+
7
30
  ## [0.3.2] - 2026-11-20
8
31
 
9
32
  ### Added
@@ -6,7 +6,7 @@ export interface paths {
6
6
  path?: never;
7
7
  cookie?: never;
8
8
  };
9
- /** List the calling client's partner's public businesses */
9
+ /** List the calling client's partner's public businesses, only those with a live event type with any of the tags when `tag` is given */
10
10
  get: operations["listPublicBusinesses"];
11
11
  put?: never;
12
12
  post?: never;
@@ -91,7 +91,7 @@ export interface paths {
91
91
  path?: never;
92
92
  cookie?: never;
93
93
  };
94
- /** List public event types */
94
+ /** List a public business's event types, only those with any of the tags when `tag` is given */
95
95
  get: operations["listPublicEventTypes"];
96
96
  put?: never;
97
97
  post?: never;
@@ -110,7 +110,7 @@ export interface paths {
110
110
  };
111
111
  get?: never;
112
112
  put?: never;
113
- /** 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) */
113
+ /** 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` */
114
114
  post: operations["reserveCandidate"];
115
115
  delete?: never;
116
116
  options?: never;
@@ -127,7 +127,7 @@ export interface paths {
127
127
  };
128
128
  get?: never;
129
129
  put?: never;
130
- /** Confirm your own reservation into exactly one booking, spending one pass credit when a pass covers the event type; a retry returns the same booking, 409 ReservationExpired after its deadline, 403 NotAuthorized without access at the event's start or when the passes for an event type that requires access have run out of credits */
130
+ /** Confirm your own reservation into exactly one booking, spending one pass credit when a pass covers the event type; a retry returns the same booking, 409 ReservationExpired after its deadline, 403 NotAuthorized without access at the event's start or when the passes for an event type that requires access have run out of credits, 403 BookingBanned with `bannedUntil` when the business's no-show ban policy bans you */
131
131
  post: operations["confirmReservation"];
132
132
  delete?: never;
133
133
  options?: never;
@@ -293,6 +293,12 @@ export interface paths {
293
293
  export type webhooks = Record<string, never>;
294
294
  export interface components {
295
295
  schemas: {
296
+ BookingBannedErrorResponse: {
297
+ /** Format: date-time */
298
+ bannedUntil?: string;
299
+ code: string;
300
+ message: string;
301
+ };
296
302
  ErrorResponse: {
297
303
  code: string;
298
304
  message: string;
@@ -319,6 +325,8 @@ export interface operations {
319
325
  query?: {
320
326
  cursor?: string;
321
327
  limit?: number;
328
+ /** @description Tag slugs, repeated as tag=yoga&tag=pilates: only event types that carry any of the partner's tags with these slugs. A slug the partner does not have matches nothing */
329
+ tag?: string[];
322
330
  };
323
331
  header?: never;
324
332
  path?: never;
@@ -354,6 +362,8 @@ export interface operations {
354
362
  email: string | null;
355
363
  /** Format: uuid */
356
364
  id: string;
365
+ /** @enum {string} */
366
+ kind: "organization" | "contractor";
357
367
  latitude: number | null;
358
368
  logo: {
359
369
  height: number;
@@ -468,6 +478,8 @@ export interface operations {
468
478
  email: string | null;
469
479
  /** Format: uuid */
470
480
  id: string;
481
+ /** @enum {string} */
482
+ kind: "organization" | "contractor";
471
483
  latitude: number | null;
472
484
  logo: {
473
485
  height: number;
@@ -572,6 +584,8 @@ export interface operations {
572
584
  eventTypeId?: string;
573
585
  from?: string;
574
586
  resourceId?: string;
587
+ /** @description Tag slugs, repeated as tag=yoga&tag=pilates: only event types that carry any of the partner's tags with these slugs. A slug the partner does not have matches nothing */
588
+ tag?: string[];
575
589
  to?: string;
576
590
  };
577
591
  header?: never;
@@ -610,6 +624,10 @@ export interface operations {
610
624
  /** Format: uuid */
611
625
  id: string;
612
626
  person: boolean;
627
+ presentedAs: {
628
+ label: string | null;
629
+ name: string;
630
+ };
613
631
  }[];
614
632
  seatsLeft: number;
615
633
  /** Format: date-time */
@@ -1037,7 +1055,10 @@ export interface operations {
1037
1055
  };
1038
1056
  listPublicEventTypes: {
1039
1057
  parameters: {
1040
- query?: never;
1058
+ query?: {
1059
+ /** @description Tag slugs, repeated as tag=yoga&tag=pilates: only event types that carry any of the partner's tags with these slugs. A slug the partner does not have matches nothing */
1060
+ tag?: string[];
1061
+ };
1041
1062
  header?: never;
1042
1063
  path: {
1043
1064
  businessId: string;
@@ -1055,8 +1076,6 @@ export interface operations {
1055
1076
  "application/json": {
1056
1077
  items: {
1057
1078
  cancellationCutoffMinutes: number | null;
1058
- /** Format: uuid */
1059
- categoryId: string | null;
1060
1079
  description: string | null;
1061
1080
  displayName: string;
1062
1081
  durationMinutes: number;
@@ -1095,6 +1114,18 @@ export interface operations {
1095
1114
  width: number;
1096
1115
  } | null;
1097
1116
  }[];
1117
+ tags: {
1118
+ /**
1119
+ * @description The palette name the event type's business shows the tag in: its own colour for the tag when it set one, else the partner's
1120
+ * @enum {string}
1121
+ */
1122
+ colour: "red" | "orange" | "amber" | "lime" | "green" | "teal" | "cyan" | "blue" | "indigo" | "purple" | "pink" | "slate";
1123
+ /** Format: uuid */
1124
+ id: string;
1125
+ name: string;
1126
+ /** @description Lower-case letters and digits in words joined by single hyphens; unique within the partner */
1127
+ slug: string;
1128
+ }[];
1098
1129
  timeSlotBooking: boolean;
1099
1130
  }[];
1100
1131
  };
@@ -1258,7 +1289,8 @@ export interface operations {
1258
1289
  };
1259
1290
  };
1260
1291
  /**
1261
- * @description - `NotAuthorized`: The actor is not permitted to perform this operation
1292
+ * @description - `BookingBanned`: The customer's no-shows at the business ban them from booking online until `bannedUntil`; staff can still book them
1293
+ * - `NotAuthorized`: The actor is not permitted to perform this operation
1262
1294
  * - `OutsideClientScope`: The application client serves only its own partner's businesses
1263
1295
  */
1264
1296
  403: {
@@ -1266,9 +1298,9 @@ export interface operations {
1266
1298
  [name: string]: unknown;
1267
1299
  };
1268
1300
  content: {
1269
- "application/json": components["schemas"]["ErrorResponse"] & {
1301
+ "application/json": components["schemas"]["BookingBannedErrorResponse"] & {
1270
1302
  /** @enum {string} */
1271
- code: "NotAuthorized" | "OutsideClientScope";
1303
+ code: "BookingBanned" | "NotAuthorized" | "OutsideClientScope";
1272
1304
  };
1273
1305
  };
1274
1306
  };
@@ -1450,7 +1482,8 @@ export interface operations {
1450
1482
  };
1451
1483
  };
1452
1484
  /**
1453
- * @description - `NotAuthorized`: The actor is not permitted to perform this operation
1485
+ * @description - `BookingBanned`: The customer's no-shows at the business ban them from booking online until `bannedUntil`; staff can still book them
1486
+ * - `NotAuthorized`: The actor is not permitted to perform this operation
1454
1487
  * - `OutsideClientScope`: The application client serves only its own partner's businesses
1455
1488
  */
1456
1489
  403: {
@@ -1458,9 +1491,9 @@ export interface operations {
1458
1491
  [name: string]: unknown;
1459
1492
  };
1460
1493
  content: {
1461
- "application/json": components["schemas"]["ErrorResponse"] & {
1494
+ "application/json": components["schemas"]["BookingBannedErrorResponse"] & {
1462
1495
  /** @enum {string} */
1463
- code: "NotAuthorized" | "OutsideClientScope";
1496
+ code: "BookingBanned" | "NotAuthorized" | "OutsideClientScope";
1464
1497
  };
1465
1498
  };
1466
1499
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msm-platform/customer-sdk",
3
- "version": "0.3.2",
3
+ "version": "0.4.1",
4
4
  "description": "Typed server-side client for MSM's customer API (/web)",
5
5
  "license": "MIT",
6
6
  "repository": {