@msm-platform/customer-sdk 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/generated/api.d.ts +42 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to `@msm-platform/customer-sdk`. The format follows [Keep a
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.4.0] - 2026-11-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- 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.
|
|
12
|
+
- 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.
|
|
13
|
+
- `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.
|
|
14
|
+
- `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.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- 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.
|
|
19
|
+
|
|
20
|
+
### Removed
|
|
21
|
+
|
|
22
|
+
- **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.
|
|
23
|
+
|
|
7
24
|
## [0.3.2] - 2026-11-20
|
|
8
25
|
|
|
9
26
|
### Added
|
package/dist/generated/api.d.ts
CHANGED
|
@@ -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;
|
|
@@ -572,6 +580,8 @@ export interface operations {
|
|
|
572
580
|
eventTypeId?: string;
|
|
573
581
|
from?: string;
|
|
574
582
|
resourceId?: string;
|
|
583
|
+
/** @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 */
|
|
584
|
+
tag?: string[];
|
|
575
585
|
to?: string;
|
|
576
586
|
};
|
|
577
587
|
header?: never;
|
|
@@ -610,6 +620,10 @@ export interface operations {
|
|
|
610
620
|
/** Format: uuid */
|
|
611
621
|
id: string;
|
|
612
622
|
person: boolean;
|
|
623
|
+
presentedAs: {
|
|
624
|
+
label: string | null;
|
|
625
|
+
name: string;
|
|
626
|
+
};
|
|
613
627
|
}[];
|
|
614
628
|
seatsLeft: number;
|
|
615
629
|
/** Format: date-time */
|
|
@@ -1037,7 +1051,10 @@ export interface operations {
|
|
|
1037
1051
|
};
|
|
1038
1052
|
listPublicEventTypes: {
|
|
1039
1053
|
parameters: {
|
|
1040
|
-
query?:
|
|
1054
|
+
query?: {
|
|
1055
|
+
/** @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 */
|
|
1056
|
+
tag?: string[];
|
|
1057
|
+
};
|
|
1041
1058
|
header?: never;
|
|
1042
1059
|
path: {
|
|
1043
1060
|
businessId: string;
|
|
@@ -1055,8 +1072,6 @@ export interface operations {
|
|
|
1055
1072
|
"application/json": {
|
|
1056
1073
|
items: {
|
|
1057
1074
|
cancellationCutoffMinutes: number | null;
|
|
1058
|
-
/** Format: uuid */
|
|
1059
|
-
categoryId: string | null;
|
|
1060
1075
|
description: string | null;
|
|
1061
1076
|
displayName: string;
|
|
1062
1077
|
durationMinutes: number;
|
|
@@ -1095,6 +1110,18 @@ export interface operations {
|
|
|
1095
1110
|
width: number;
|
|
1096
1111
|
} | null;
|
|
1097
1112
|
}[];
|
|
1113
|
+
tags: {
|
|
1114
|
+
/**
|
|
1115
|
+
* @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
|
|
1116
|
+
* @enum {string}
|
|
1117
|
+
*/
|
|
1118
|
+
colour: "red" | "orange" | "amber" | "lime" | "green" | "teal" | "cyan" | "blue" | "indigo" | "purple" | "pink" | "slate";
|
|
1119
|
+
/** Format: uuid */
|
|
1120
|
+
id: string;
|
|
1121
|
+
name: string;
|
|
1122
|
+
/** @description Lower-case letters and digits in words joined by single hyphens; unique within the partner */
|
|
1123
|
+
slug: string;
|
|
1124
|
+
}[];
|
|
1098
1125
|
timeSlotBooking: boolean;
|
|
1099
1126
|
}[];
|
|
1100
1127
|
};
|
|
@@ -1258,7 +1285,8 @@ export interface operations {
|
|
|
1258
1285
|
};
|
|
1259
1286
|
};
|
|
1260
1287
|
/**
|
|
1261
|
-
* @description - `
|
|
1288
|
+
* @description - `BookingBanned`: The customer's no-shows at the business ban them from booking online until `bannedUntil`; staff can still book them
|
|
1289
|
+
* - `NotAuthorized`: The actor is not permitted to perform this operation
|
|
1262
1290
|
* - `OutsideClientScope`: The application client serves only its own partner's businesses
|
|
1263
1291
|
*/
|
|
1264
1292
|
403: {
|
|
@@ -1266,9 +1294,9 @@ export interface operations {
|
|
|
1266
1294
|
[name: string]: unknown;
|
|
1267
1295
|
};
|
|
1268
1296
|
content: {
|
|
1269
|
-
"application/json": components["schemas"]["
|
|
1297
|
+
"application/json": components["schemas"]["BookingBannedErrorResponse"] & {
|
|
1270
1298
|
/** @enum {string} */
|
|
1271
|
-
code: "NotAuthorized" | "OutsideClientScope";
|
|
1299
|
+
code: "BookingBanned" | "NotAuthorized" | "OutsideClientScope";
|
|
1272
1300
|
};
|
|
1273
1301
|
};
|
|
1274
1302
|
};
|
|
@@ -1450,7 +1478,8 @@ export interface operations {
|
|
|
1450
1478
|
};
|
|
1451
1479
|
};
|
|
1452
1480
|
/**
|
|
1453
|
-
* @description - `
|
|
1481
|
+
* @description - `BookingBanned`: The customer's no-shows at the business ban them from booking online until `bannedUntil`; staff can still book them
|
|
1482
|
+
* - `NotAuthorized`: The actor is not permitted to perform this operation
|
|
1454
1483
|
* - `OutsideClientScope`: The application client serves only its own partner's businesses
|
|
1455
1484
|
*/
|
|
1456
1485
|
403: {
|
|
@@ -1458,9 +1487,9 @@ export interface operations {
|
|
|
1458
1487
|
[name: string]: unknown;
|
|
1459
1488
|
};
|
|
1460
1489
|
content: {
|
|
1461
|
-
"application/json": components["schemas"]["
|
|
1490
|
+
"application/json": components["schemas"]["BookingBannedErrorResponse"] & {
|
|
1462
1491
|
/** @enum {string} */
|
|
1463
|
-
code: "NotAuthorized" | "OutsideClientScope";
|
|
1492
|
+
code: "BookingBanned" | "NotAuthorized" | "OutsideClientScope";
|
|
1464
1493
|
};
|
|
1465
1494
|
};
|
|
1466
1495
|
};
|