@msm-platform/customer-sdk 0.3.0 → 0.3.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,22 @@ All notable changes to `@msm-platform/customer-sdk`. The format follows [Keep a
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.3.2] - 2026-11-20
8
+
9
+ ### Added
10
+
11
+ - Each item `GET /web/businesses/{businessId}/availability` returns has `resources`: the event's resources in its order, or a slot's resource when the query names one (empty otherwise), each `{ id, displayName, person }`. `person` is true for a resource linked to staff, such as an instructor, and false for a place, such as a room. An event can now have several resources: its first person is its instructor, its places are its room, and its other people are guest instructors.
12
+
13
+ ### Changed
14
+
15
+ - An event's `resource` in `GET /web/businesses/{businessId}/availability` is now its first resource, the first of `resources`, instead of null; a slot's is unchanged.
16
+
17
+ ## [0.3.1] - 2026-11-16
18
+
19
+ ### Added
20
+
21
+ - `GET /web/me/backoffice` (`getMyBackofficeAccess`) with a customer session answers `{ available }`: true when the signed-in person is one of your partner operators or staff of one of your businesses, so your back office has work for them, and false otherwise. Use it to show a link to your back office; it says nothing else about them, and the back office still asks them to sign in.
22
+
7
23
  ## [0.3.0] - 2026-11-16
8
24
 
9
25
  ### Added
package/README.md CHANGED
@@ -146,4 +146,4 @@ To run it against a local engine, see the example's README.
146
146
 
147
147
  ## Inside msm-platform
148
148
 
149
- `pnpm generate` writes `src/generated/api.ts` from the customer contract, `contracts/openapi/customer.json`, and `pnpm generate:check` fails when it is stale. Never edit it by hand. Publishing is manual and only Daníel does it: [docs/runbooks/customer-sdk.md](../../docs/runbooks/customer-sdk.md). Every changelog entry says its `Web impact:` on this package's users.
149
+ `pnpm generate` writes `src/generated/api.ts` from the customer contract, `contracts/openapi/customer.json`, and `pnpm generate:check` fails when it is stale. Never edit it by hand. Publishing is manual and only Daníel does it: [docs/runbooks/customer-sdk.md](../../docs/runbooks/customer-sdk.md). A pull request that changes this package or the customer contract adds an entry to its `CHANGELOG.md`, or says `Web impact: none` in its description.
@@ -221,6 +221,23 @@ export interface paths {
221
221
  patch: operations["updateMyName"];
222
222
  trace?: never;
223
223
  };
224
+ "/web/me/backoffice": {
225
+ parameters: {
226
+ query?: never;
227
+ header?: never;
228
+ path?: never;
229
+ cookie?: never;
230
+ };
231
+ /** Whether you are a partner operator of this client's partner or staff of one of its businesses, so its back office has work for you; yes or no only */
232
+ get: operations["getMyBackofficeAccess"];
233
+ put?: never;
234
+ post?: never;
235
+ delete?: never;
236
+ options?: never;
237
+ head?: never;
238
+ patch?: never;
239
+ trace?: never;
240
+ };
224
241
  "/web/me/bookings": {
225
242
  parameters: {
226
243
  query?: never;
@@ -588,6 +605,12 @@ export interface operations {
588
605
  /** Format: uuid */
589
606
  id: string;
590
607
  } | null;
608
+ resources: {
609
+ displayName: string;
610
+ /** Format: uuid */
611
+ id: string;
612
+ person: boolean;
613
+ }[];
591
614
  seatsLeft: number;
592
615
  /** Format: date-time */
593
616
  startsAt: string;
@@ -2301,6 +2324,82 @@ export interface operations {
2301
2324
  };
2302
2325
  };
2303
2326
  };
2327
+ getMyBackofficeAccess: {
2328
+ parameters: {
2329
+ query?: never;
2330
+ header?: never;
2331
+ path?: never;
2332
+ cookie?: never;
2333
+ };
2334
+ requestBody?: never;
2335
+ responses: {
2336
+ /** @description OK */
2337
+ 200: {
2338
+ headers: {
2339
+ [name: string]: unknown;
2340
+ };
2341
+ content: {
2342
+ "application/json": {
2343
+ available: boolean;
2344
+ };
2345
+ };
2346
+ };
2347
+ /**
2348
+ * @description - `CustomerSessionRequired`: The operation needs a customer's session
2349
+ * - `NotAuthenticated`: The credentials are missing, invalid or expired, or do not fit this surface
2350
+ * - `SessionExpired`: The session has expired or its client's session policy ended it; sign in again
2351
+ */
2352
+ 401: {
2353
+ headers: {
2354
+ [name: string]: unknown;
2355
+ };
2356
+ content: {
2357
+ "application/json": components["schemas"]["ErrorResponse"] & {
2358
+ /** @enum {string} */
2359
+ code: "CustomerSessionRequired" | "NotAuthenticated" | "SessionExpired";
2360
+ };
2361
+ };
2362
+ };
2363
+ /** @description - `NotAuthorized`: The actor is not permitted to perform this operation */
2364
+ 403: {
2365
+ headers: {
2366
+ [name: string]: unknown;
2367
+ };
2368
+ content: {
2369
+ "application/json": components["schemas"]["ErrorResponse"] & {
2370
+ /** @enum {string} */
2371
+ code: "NotAuthorized";
2372
+ };
2373
+ };
2374
+ };
2375
+ /** @description - `RateLimited`: A rate limit refused the request: the load balancer's per IP, or the engine's per application client; retry after `Retry-After` seconds */
2376
+ 429: {
2377
+ headers: {
2378
+ /** @description Seconds to wait before sending the request again */
2379
+ "Retry-After"?: number;
2380
+ [name: string]: unknown;
2381
+ };
2382
+ content: {
2383
+ "application/json": components["schemas"]["ErrorResponse"] & {
2384
+ /** @enum {string} */
2385
+ code: "RateLimited";
2386
+ };
2387
+ };
2388
+ };
2389
+ /** @description - `InternalError`: The engine failed unexpectedly */
2390
+ 500: {
2391
+ headers: {
2392
+ [name: string]: unknown;
2393
+ };
2394
+ content: {
2395
+ "application/json": components["schemas"]["ErrorResponse"] & {
2396
+ /** @enum {string} */
2397
+ code: "InternalError";
2398
+ };
2399
+ };
2400
+ };
2401
+ };
2402
+ };
2304
2403
  listOwnBookings: {
2305
2404
  parameters: {
2306
2405
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msm-platform/customer-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Typed server-side client for MSM's customer API (/web)",
5
5
  "license": "MIT",
6
6
  "repository": {