@msm-platform/customer-sdk 0.2.0 → 0.3.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,26 @@ All notable changes to `@msm-platform/customer-sdk`. The format follows [Keep a
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.3.1] - 2026-11-16
8
+
9
+ ### Added
10
+
11
+ - `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.
12
+
13
+ ## [0.3.0] - 2026-11-16
14
+
15
+ ### Added
16
+
17
+ - The businesses `getPublicBusiness` and `listPublicBusinesses` return `cover`, `description` and `brandColor`, each null when the business has not set one. `cover` is the same image object as `logo`, `{ url, width, height, small: { url, width, height } }`: a wide image fitting inside 1600×1600 as WebP, with `small` inside 640×640, and its URLs are immutable like the logo's. `description` is plain text of at most 1000 characters, and `brandColor` is a hint for your pages as lower-case `#rrggbb`, not a theme: you decide how to use it and keep your own contrast.
18
+ - Each resource in `listPublicEventTypes`' `resources` has `image`: null, or `{ url, width, height, small: { url, width, height } }`, the resource's photo as WebP fitting inside 1024×1024 with `small` inside 640×640 (the original itself when it is no larger). The URLs are immutable, and a replaced photo's URL keeps working for 48 hours.
19
+
20
+ ### Changed
21
+
22
+ - **Breaking:** the event types `listPublicEventTypes` returns no longer have `imageAssetId`. They have `image` instead: null, or `{ url, width, height, small: { url, width, height } }`, where `url` is the event type's image as WebP, fitting inside 1600×1600, and `small` fits inside 640×640 (the original itself when it is no larger). As with the business logo, the URLs are immutable, and a replaced image's URL keeps working for 48 hours.
23
+ - **Breaking:** the businesses `getPublicBusiness` and `listPublicBusinesses` return no longer have `logoAssetId`. They have `logo` instead: null, or `{ url, width, height, small: { url, width, height } }`, where `url` is the business's logo as WebP, fitting inside 1024×1024, and `small` fits inside 640×640 (the original itself when it is no larger). The URLs are immutable: a new logo has a new URL, so they can be cached for as long as you like, and a replaced logo's URL keeps working for 48 hours.
24
+ - **Breaking:** customers sign in by phone first. `POST /web/identity/initiateRegistration` and `POST /web/identity/registerCustomer` are removed (404); use `initiateLogin` for every phone, which now sends a code whether or not the phone has an account. `customerLogin` answers 200 either `{ result: "session", sessionId, sessionToken, expiresAt }`, today's session with `result` added, or `{ result: "registrationRequired", registrationTicket, nameRequired, registrationExpiresAt }` when the phone has no customer yet; check `result` before reading the session. The new `POST /web/identity/completeRegistration` takes `{ registrationTicket, name? }` and returns the session. Send `name` when `nameRequired` is true: without it the engine answers 422 `NameRequired` and the ticket stays usable for a retry with the name. A name sent when it isn't needed is ignored, and the person keeps theirs. The ticket is used once, with your client, within 10 minutes; a spent, expired or other client's ticket is 401 `NotAuthenticated`.
25
+ - A business can now set opening hours. Once it does, `GET /web/businesses/{businessId}/availability` offers no time slot outside them and `POST /web/businesses/{businessId}/reservations` answers 422 `NotATimeSlot` for one; a business without opening hours is unchanged, and no field changes.
26
+
7
27
  ## [0.2.0] - 2026-11-15
8
28
 
9
29
  ### Changed
package/README.md CHANGED
@@ -38,9 +38,21 @@ import { sessionHeaders } from "@msm-platform/customer-sdk";
38
38
  const { data: started } = await msm.POST("/web/identity/initiateLogin", {
39
39
  body: { phone: "+3545550004", botCheckToken, clientIp },
40
40
  });
41
- const { data: session } = await msm.POST("/web/identity/customerLogin", {
41
+ const { data: login } = await msm.POST("/web/identity/customerLogin", {
42
42
  body: { challenge: started!.challenge, code: "123456" },
43
43
  });
44
+ // A phone with no customer yet gets a registration ticket instead of a session.
45
+ const session =
46
+ login!.result === "session"
47
+ ? login!
48
+ : (
49
+ await msm.POST("/web/identity/completeRegistration", {
50
+ body: {
51
+ registrationTicket: login!.registrationTicket,
52
+ ...(login!.nameRequired && { name: "Kata" }),
53
+ },
54
+ })
55
+ ).data;
44
56
 
45
57
  const headers = sessionHeaders(session!.sessionToken);
46
58
  const { data: reservation } = await msm.POST(
@@ -53,7 +65,7 @@ const { data: booking } = await msm.POST(
53
65
  );
54
66
  ```
55
67
 
56
- The engine sends a code only after checking `botCheckToken` with the Turnstile widget MSM owns for your website (403 `BotCheckFailed`, or 503 `BotCheckUnavailable` when it cannot) and counting the request against `clientIp` (by default 5 code requests per address per 10 minutes, then 429 `TooManyAttempts` with `Retry-After`; 503 `LimiterUnavailable` when it cannot count). Never take `clientIp` from a header the customer can set, such as the leftmost `X-Forwarded-For` entry. A new customer registers the same way with `POST /web/identity/initiateRegistration` (`{ phone, name, botCheckToken, clientIp }`) and `POST /web/identity/registerCustomer`. `POST /web/identity/logout` with `{ sessionToken }` ends a session of your client. Sign-in, registration and logout are on `/web` and need your client's credentials, so call them from server mode or through your proxy; `/api` is not for website clients. A reservation holds the seat or slot for a few minutes; confirming it makes the booking.
68
+ The engine sends a code only after checking `botCheckToken` with the Turnstile widget MSM owns for your website (403 `BotCheckFailed`, or 503 `BotCheckUnavailable` when it cannot) and counting the request against `clientIp` (by default 5 code requests per address per 10 minutes, then 429 `TooManyAttempts` with `Retry-After`; 503 `LimiterUnavailable` when it cannot count). Never take `clientIp` from a header the customer can set, such as the leftmost `X-Forwarded-For` entry. Every phone gets a code, so the answer never tells whether it has an account. With the right code, `customerLogin` answers `{ result: "session", sessionId, sessionToken, expiresAt }` for a customer, or `{ result: "registrationRequired", registrationTicket, nameRequired, registrationExpiresAt }` when the phone has no customer yet. Then `POST /web/identity/completeRegistration` with `{ registrationTicket, name? }` returns the session. Send `name` when `nameRequired` is true: without it the engine answers 422 `NameRequired` and the ticket stays usable for a retry with the name. A name sent when it isn't needed is ignored, and the person keeps theirs. The ticket is used once, with your client, within 10 minutes; otherwise it is 401 `NotAuthenticated`, as a wrong code is. `POST /web/identity/logout` with `{ sessionToken }` ends a session of your client. Sign-in, registration and logout are on `/web` and need your client's credentials, so call them from server mode or through your proxy; `/api` is not for website clients. A reservation holds the seat or slot for a few minutes; confirming it makes the booking.
57
69
 
58
70
  The same session reads the customer's own details, bookings and passes with every business of your partner, and ends all their sessions with your client:
59
71
 
@@ -135,7 +135,7 @@ export interface paths {
135
135
  patch?: never;
136
136
  trace?: never;
137
137
  };
138
- "/web/identity/customerLogin": {
138
+ "/web/identity/completeRegistration": {
139
139
  parameters: {
140
140
  query?: never;
141
141
  header?: never;
@@ -144,15 +144,15 @@ export interface paths {
144
144
  };
145
145
  get?: never;
146
146
  put?: never;
147
- /** Redeem a sign-in code for a customer session */
148
- post: operations["identityCustomerLogin"];
147
+ /** Spend a registration ticket for a new customer's session, with their name when it is needed */
148
+ post: operations["identityCompleteRegistration"];
149
149
  delete?: never;
150
150
  options?: never;
151
151
  head?: never;
152
152
  patch?: never;
153
153
  trace?: never;
154
154
  };
155
- "/web/identity/initiateLogin": {
155
+ "/web/identity/customerLogin": {
156
156
  parameters: {
157
157
  query?: never;
158
158
  header?: never;
@@ -161,15 +161,15 @@ export interface paths {
161
161
  };
162
162
  get?: never;
163
163
  put?: never;
164
- /** Send a sign-in code to a customer's phone */
165
- post: operations["identityInitiateLogin"];
164
+ /** Redeem a sign-in code for a customer session, or a registration ticket when the phone has no customer */
165
+ post: operations["identityCustomerLogin"];
166
166
  delete?: never;
167
167
  options?: never;
168
168
  head?: never;
169
169
  patch?: never;
170
170
  trace?: never;
171
171
  };
172
- "/web/identity/initiateRegistration": {
172
+ "/web/identity/initiateLogin": {
173
173
  parameters: {
174
174
  query?: never;
175
175
  header?: never;
@@ -178,8 +178,8 @@ export interface paths {
178
178
  };
179
179
  get?: never;
180
180
  put?: never;
181
- /** Send a registration code to a new customer's phone */
182
- post: operations["identityInitiateRegistration"];
181
+ /** Send a sign-in code to a customer's phone */
182
+ post: operations["identityInitiateLogin"];
183
183
  delete?: never;
184
184
  options?: never;
185
185
  head?: never;
@@ -203,39 +203,39 @@ export interface paths {
203
203
  patch?: never;
204
204
  trace?: never;
205
205
  };
206
- "/web/identity/registerCustomer": {
206
+ "/web/me": {
207
207
  parameters: {
208
208
  query?: never;
209
209
  header?: never;
210
210
  path?: never;
211
211
  cookie?: never;
212
212
  };
213
- get?: never;
213
+ /** Get your own name, email and newest verified phone; phone and email are read-only */
214
+ get: operations["getMyDetails"];
214
215
  put?: never;
215
- /** Redeem a registration code for a new customer's session */
216
- post: operations["identityRegisterCustomer"];
216
+ post?: never;
217
217
  delete?: never;
218
218
  options?: never;
219
219
  head?: never;
220
- patch?: never;
220
+ /** Change your own name, which every business sees; bookings keep the name they were made with */
221
+ patch: operations["updateMyName"];
221
222
  trace?: never;
222
223
  };
223
- "/web/me": {
224
+ "/web/me/backoffice": {
224
225
  parameters: {
225
226
  query?: never;
226
227
  header?: never;
227
228
  path?: never;
228
229
  cookie?: never;
229
230
  };
230
- /** Get your own name, email and newest verified phone; phone and email are read-only */
231
- get: operations["getMyDetails"];
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"];
232
233
  put?: never;
233
234
  post?: never;
234
235
  delete?: never;
235
236
  options?: never;
236
237
  head?: never;
237
- /** Change your own name, which every business sees; bookings keep the name they were made with */
238
- patch: operations["updateMyName"];
238
+ patch?: never;
239
239
  trace?: never;
240
240
  };
241
241
  "/web/me/bookings": {
@@ -335,14 +335,38 @@ export interface operations {
335
335
  "application/json": {
336
336
  items: {
337
337
  address: string | null;
338
+ brandColor: string | null;
339
+ cover: {
340
+ height: number;
341
+ small: {
342
+ height: number;
343
+ /** Format: uri */
344
+ url: string;
345
+ width: number;
346
+ };
347
+ /** Format: uri */
348
+ url: string;
349
+ width: number;
350
+ } | null;
351
+ description: string | null;
338
352
  displayName: string;
339
353
  /** Format: email */
340
354
  email: string | null;
341
355
  /** Format: uuid */
342
356
  id: string;
343
357
  latitude: number | null;
344
- /** Format: uuid */
345
- logoAssetId: string | null;
358
+ logo: {
359
+ height: number;
360
+ small: {
361
+ height: number;
362
+ /** Format: uri */
363
+ url: string;
364
+ width: number;
365
+ };
366
+ /** Format: uri */
367
+ url: string;
368
+ width: number;
369
+ } | null;
346
370
  longitude: number | null;
347
371
  phone: string | null;
348
372
  timezone: string;
@@ -425,14 +449,38 @@ export interface operations {
425
449
  content: {
426
450
  "application/json": {
427
451
  address: string | null;
452
+ brandColor: string | null;
453
+ cover: {
454
+ height: number;
455
+ small: {
456
+ height: number;
457
+ /** Format: uri */
458
+ url: string;
459
+ width: number;
460
+ };
461
+ /** Format: uri */
462
+ url: string;
463
+ width: number;
464
+ } | null;
465
+ description: string | null;
428
466
  displayName: string;
429
467
  /** Format: email */
430
468
  email: string | null;
431
469
  /** Format: uuid */
432
470
  id: string;
433
471
  latitude: number | null;
434
- /** Format: uuid */
435
- logoAssetId: string | null;
472
+ logo: {
473
+ height: number;
474
+ small: {
475
+ height: number;
476
+ /** Format: uri */
477
+ url: string;
478
+ width: number;
479
+ };
480
+ /** Format: uri */
481
+ url: string;
482
+ width: number;
483
+ } | null;
436
484
  longitude: number | null;
437
485
  phone: string | null;
438
486
  timezone: string;
@@ -929,7 +977,7 @@ export interface operations {
929
977
  };
930
978
  };
931
979
  };
932
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
980
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
933
981
  415: {
934
982
  headers: {
935
983
  [name: string]: unknown;
@@ -1008,8 +1056,18 @@ export interface operations {
1008
1056
  durationMinutes: number;
1009
1057
  /** Format: uuid */
1010
1058
  id: string;
1011
- /** Format: uuid */
1012
- imageAssetId: string | null;
1059
+ image: {
1060
+ height: number;
1061
+ small: {
1062
+ height: number;
1063
+ /** Format: uri */
1064
+ url: string;
1065
+ width: number;
1066
+ };
1067
+ /** Format: uri */
1068
+ url: string;
1069
+ width: number;
1070
+ } | null;
1013
1071
  requiresAccess: boolean;
1014
1072
  resources: {
1015
1073
  /** @description The resource's own description, null without one */
@@ -1017,6 +1075,19 @@ export interface operations {
1017
1075
  displayName: string;
1018
1076
  /** Format: uuid */
1019
1077
  id: string;
1078
+ /** @description The resource's photo (MVP-226), null without one */
1079
+ image: {
1080
+ height: number;
1081
+ small: {
1082
+ height: number;
1083
+ /** Format: uri */
1084
+ url: string;
1085
+ width: number;
1086
+ };
1087
+ /** Format: uri */
1088
+ url: string;
1089
+ width: number;
1090
+ } | null;
1020
1091
  }[];
1021
1092
  timeSlotBooking: boolean;
1022
1093
  }[];
@@ -1239,7 +1310,7 @@ export interface operations {
1239
1310
  };
1240
1311
  };
1241
1312
  };
1242
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
1313
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
1243
1314
  415: {
1244
1315
  headers: {
1245
1316
  [name: string]: unknown;
@@ -1426,7 +1497,7 @@ export interface operations {
1426
1497
  };
1427
1498
  };
1428
1499
  };
1429
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
1500
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
1430
1501
  415: {
1431
1502
  headers: {
1432
1503
  [name: string]: unknown;
@@ -1482,7 +1553,7 @@ export interface operations {
1482
1553
  };
1483
1554
  };
1484
1555
  };
1485
- identityCustomerLogin: {
1556
+ identityCompleteRegistration: {
1486
1557
  parameters: {
1487
1558
  query?: never;
1488
1559
  header?: never;
@@ -1492,9 +1563,8 @@ export interface operations {
1492
1563
  requestBody: {
1493
1564
  content: {
1494
1565
  "application/json": {
1495
- /** Format: uuid */
1496
- challenge: string;
1497
- code: string;
1566
+ name?: string;
1567
+ registrationTicket: string;
1498
1568
  };
1499
1569
  };
1500
1570
  };
@@ -1568,7 +1638,7 @@ export interface operations {
1568
1638
  };
1569
1639
  };
1570
1640
  };
1571
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
1641
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
1572
1642
  415: {
1573
1643
  headers: {
1574
1644
  [name: string]: unknown;
@@ -1580,6 +1650,18 @@ export interface operations {
1580
1650
  };
1581
1651
  };
1582
1652
  };
1653
+ /** @description - `NameRequired`: A new customer's registration needs their name; the ticket can be sent again with it */
1654
+ 422: {
1655
+ headers: {
1656
+ [name: string]: unknown;
1657
+ };
1658
+ content: {
1659
+ "application/json": components["schemas"]["ErrorResponse"] & {
1660
+ /** @enum {string} */
1661
+ code: "NameRequired";
1662
+ };
1663
+ };
1664
+ };
1583
1665
  /** @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 */
1584
1666
  429: {
1585
1667
  headers: {
@@ -1608,7 +1690,7 @@ export interface operations {
1608
1690
  };
1609
1691
  };
1610
1692
  };
1611
- identityInitiateLogin: {
1693
+ identityCustomerLogin: {
1612
1694
  parameters: {
1613
1695
  query?: never;
1614
1696
  header?: never;
@@ -1618,11 +1700,9 @@ export interface operations {
1618
1700
  requestBody: {
1619
1701
  content: {
1620
1702
  "application/json": {
1621
- /** @description The Turnstile token the visitor's browser received from the application's widget */
1622
- botCheckToken: string;
1623
- /** @description The visitor's IP address, as the application's own trusted proxy reports it */
1624
- clientIp: string;
1625
- phone: string;
1703
+ /** Format: uuid */
1704
+ challenge: string;
1705
+ code: string;
1626
1706
  };
1627
1707
  };
1628
1708
  };
@@ -1634,10 +1714,22 @@ export interface operations {
1634
1714
  };
1635
1715
  content: {
1636
1716
  "application/json": {
1637
- /** Format: uuid */
1638
- challenge: string;
1639
1717
  /** Format: date-time */
1640
1718
  expiresAt: string;
1719
+ /** @enum {string} */
1720
+ result: "session";
1721
+ /** Format: uuid */
1722
+ sessionId: string;
1723
+ sessionToken: string;
1724
+ } | {
1725
+ /** @description Whether completeRegistration needs the customer's name: false when the phone already has a person */
1726
+ nameRequired: boolean;
1727
+ /** Format: date-time */
1728
+ registrationExpiresAt: string;
1729
+ /** @description Single use, for this client and phone; send it to completeRegistration */
1730
+ registrationTicket: string;
1731
+ /** @enum {string} */
1732
+ result: "registrationRequired";
1641
1733
  };
1642
1734
  };
1643
1735
  };
@@ -1671,10 +1763,7 @@ export interface operations {
1671
1763
  };
1672
1764
  };
1673
1765
  };
1674
- /**
1675
- * @description - `BotCheckFailed`: The visitor's bot-check token did not pass the calling application's Turnstile widget
1676
- * - `NotAuthorized`: The actor is not permitted to perform this operation
1677
- */
1766
+ /** @description - `NotAuthorized`: The actor is not permitted to perform this operation */
1678
1767
  403: {
1679
1768
  headers: {
1680
1769
  [name: string]: unknown;
@@ -1682,7 +1771,7 @@ export interface operations {
1682
1771
  content: {
1683
1772
  "application/json": components["schemas"]["ErrorResponse"] & {
1684
1773
  /** @enum {string} */
1685
- code: "BotCheckFailed" | "NotAuthorized";
1774
+ code: "NotAuthorized";
1686
1775
  };
1687
1776
  };
1688
1777
  };
@@ -1698,7 +1787,7 @@ export interface operations {
1698
1787
  };
1699
1788
  };
1700
1789
  };
1701
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
1790
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
1702
1791
  415: {
1703
1792
  headers: {
1704
1793
  [name: string]: unknown;
@@ -1710,23 +1799,7 @@ export interface operations {
1710
1799
  };
1711
1800
  };
1712
1801
  };
1713
- /** @description - `PhoneDestinationNotAllowed`: SMS is not sent to this phone number's country */
1714
- 422: {
1715
- headers: {
1716
- [name: string]: unknown;
1717
- };
1718
- content: {
1719
- "application/json": components["schemas"]["ErrorResponse"] & {
1720
- /** @enum {string} */
1721
- code: "PhoneDestinationNotAllowed";
1722
- };
1723
- };
1724
- };
1725
- /**
1726
- * @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
1727
- * - `TooManyAttempts`: Too many sign-in codes were requested from this address; retry after `Retry-After` seconds
1728
- * - `TooManyChallenges`: Too many sign-in codes were sent to this number; retry after `Retry-After` seconds
1729
- */
1802
+ /** @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 */
1730
1803
  429: {
1731
1804
  headers: {
1732
1805
  /** @description Seconds to wait before sending the request again */
@@ -1736,7 +1809,7 @@ export interface operations {
1736
1809
  content: {
1737
1810
  "application/json": components["schemas"]["ErrorResponse"] & {
1738
1811
  /** @enum {string} */
1739
- code: "RateLimited" | "TooManyAttempts" | "TooManyChallenges";
1812
+ code: "RateLimited";
1740
1813
  };
1741
1814
  };
1742
1815
  };
@@ -1752,28 +1825,9 @@ export interface operations {
1752
1825
  };
1753
1826
  };
1754
1827
  };
1755
- /**
1756
- * @description - `BotCheckUnavailable`: The bot check could not be made: Turnstile did not answer in time, or the calling application has no widget secret; retry after `Retry-After` seconds
1757
- * - `LimiterUnavailable`: The per-address sign-in limit could not be counted; retry after `Retry-After` seconds
1758
- * - `SmsBudgetExhausted`: The client's hourly SMS budget is used up; retry after `Retry-After` seconds
1759
- * - `SmsDeliveryUnavailable`: The SMS could not be confirmed as sent; retry after `Retry-After` seconds
1760
- */
1761
- 503: {
1762
- headers: {
1763
- /** @description Seconds to wait before sending the request again */
1764
- "Retry-After"?: number;
1765
- [name: string]: unknown;
1766
- };
1767
- content: {
1768
- "application/json": components["schemas"]["ErrorResponse"] & {
1769
- /** @enum {string} */
1770
- code: "BotCheckUnavailable" | "LimiterUnavailable" | "SmsBudgetExhausted" | "SmsDeliveryUnavailable";
1771
- };
1772
- };
1773
- };
1774
1828
  };
1775
1829
  };
1776
- identityInitiateRegistration: {
1830
+ identityInitiateLogin: {
1777
1831
  parameters: {
1778
1832
  query?: never;
1779
1833
  header?: never;
@@ -1787,7 +1841,6 @@ export interface operations {
1787
1841
  botCheckToken: string;
1788
1842
  /** @description The visitor's IP address, as the application's own trusted proxy reports it */
1789
1843
  clientIp: string;
1790
- name: string;
1791
1844
  phone: string;
1792
1845
  };
1793
1846
  };
@@ -1864,7 +1917,7 @@ export interface operations {
1864
1917
  };
1865
1918
  };
1866
1919
  };
1867
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
1920
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
1868
1921
  415: {
1869
1922
  headers: {
1870
1923
  [name: string]: unknown;
@@ -2020,7 +2073,7 @@ export interface operations {
2020
2073
  };
2021
2074
  };
2022
2075
  };
2023
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
2076
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
2024
2077
  415: {
2025
2078
  headers: {
2026
2079
  [name: string]: unknown;
@@ -2060,22 +2113,14 @@ export interface operations {
2060
2113
  };
2061
2114
  };
2062
2115
  };
2063
- identityRegisterCustomer: {
2116
+ getMyDetails: {
2064
2117
  parameters: {
2065
2118
  query?: never;
2066
2119
  header?: never;
2067
2120
  path?: never;
2068
2121
  cookie?: never;
2069
2122
  };
2070
- requestBody: {
2071
- content: {
2072
- "application/json": {
2073
- /** Format: uuid */
2074
- challenge: string;
2075
- code: string;
2076
- };
2077
- };
2078
- };
2123
+ requestBody?: never;
2079
2124
  responses: {
2080
2125
  /** @description OK */
2081
2126
  200: {
@@ -2084,31 +2129,17 @@ export interface operations {
2084
2129
  };
2085
2130
  content: {
2086
2131
  "application/json": {
2087
- /** Format: date-time */
2088
- expiresAt: string;
2089
- /** Format: uuid */
2090
- sessionId: string;
2091
- sessionToken: string;
2092
- };
2093
- };
2094
- };
2095
- /**
2096
- * @description - `MalformedBody`: The JSON body cannot be parsed
2097
- * - `ValidationFailed`: The path, query or body does not match the operation's schema; `issues` lists each problem with its path
2098
- */
2099
- 400: {
2100
- headers: {
2101
- [name: string]: unknown;
2102
- };
2103
- content: {
2104
- "application/json": components["schemas"]["ValidationErrorResponse"] & {
2105
- /** @enum {string} */
2106
- code: "MalformedBody" | "ValidationFailed";
2132
+ /** Format: email */
2133
+ email: string | null;
2134
+ name: string;
2135
+ /** @description The newest verified phone; read-only */
2136
+ phone: string | null;
2107
2137
  };
2108
2138
  };
2109
2139
  };
2110
2140
  /**
2111
- * @description - `NotAuthenticated`: The credentials are missing, invalid or expired, or do not fit this surface
2141
+ * @description - `CustomerSessionRequired`: The operation needs a customer's session
2142
+ * - `NotAuthenticated`: The credentials are missing, invalid or expired, or do not fit this surface
2112
2143
  * - `SessionExpired`: The session has expired or its client's session policy ended it; sign in again
2113
2144
  */
2114
2145
  401: {
@@ -2118,7 +2149,7 @@ export interface operations {
2118
2149
  content: {
2119
2150
  "application/json": components["schemas"]["ErrorResponse"] & {
2120
2151
  /** @enum {string} */
2121
- code: "NotAuthenticated" | "SessionExpired";
2152
+ code: "CustomerSessionRequired" | "NotAuthenticated" | "SessionExpired";
2122
2153
  };
2123
2154
  };
2124
2155
  };
@@ -2134,42 +2165,6 @@ export interface operations {
2134
2165
  };
2135
2166
  };
2136
2167
  };
2137
- /** @description - `ActorUnavailable`: A live registered actor is required */
2138
- 409: {
2139
- headers: {
2140
- [name: string]: unknown;
2141
- };
2142
- content: {
2143
- "application/json": components["schemas"]["ErrorResponse"] & {
2144
- /** @enum {string} */
2145
- code: "ActorUnavailable";
2146
- };
2147
- };
2148
- };
2149
- /** @description - `BodyTooLarge`: The body is larger than the engine accepts */
2150
- 413: {
2151
- headers: {
2152
- [name: string]: unknown;
2153
- };
2154
- content: {
2155
- "application/json": components["schemas"]["ErrorResponse"] & {
2156
- /** @enum {string} */
2157
- code: "BodyTooLarge";
2158
- };
2159
- };
2160
- };
2161
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
2162
- 415: {
2163
- headers: {
2164
- [name: string]: unknown;
2165
- };
2166
- content: {
2167
- "application/json": components["schemas"]["ErrorResponse"] & {
2168
- /** @enum {string} */
2169
- code: "UnsupportedMediaType";
2170
- };
2171
- };
2172
- };
2173
2168
  /** @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 */
2174
2169
  429: {
2175
2170
  headers: {
@@ -2198,14 +2193,20 @@ export interface operations {
2198
2193
  };
2199
2194
  };
2200
2195
  };
2201
- getMyDetails: {
2196
+ updateMyName: {
2202
2197
  parameters: {
2203
2198
  query?: never;
2204
2199
  header?: never;
2205
2200
  path?: never;
2206
2201
  cookie?: never;
2207
2202
  };
2208
- requestBody?: never;
2203
+ requestBody: {
2204
+ content: {
2205
+ "application/json": {
2206
+ name: string;
2207
+ };
2208
+ };
2209
+ };
2209
2210
  responses: {
2210
2211
  /** @description OK */
2211
2212
  200: {
@@ -2222,6 +2223,21 @@ export interface operations {
2222
2223
  };
2223
2224
  };
2224
2225
  };
2226
+ /**
2227
+ * @description - `MalformedBody`: The JSON body cannot be parsed
2228
+ * - `ValidationFailed`: The path, query or body does not match the operation's schema; `issues` lists each problem with its path
2229
+ */
2230
+ 400: {
2231
+ headers: {
2232
+ [name: string]: unknown;
2233
+ };
2234
+ content: {
2235
+ "application/json": components["schemas"]["ValidationErrorResponse"] & {
2236
+ /** @enum {string} */
2237
+ code: "MalformedBody" | "ValidationFailed";
2238
+ };
2239
+ };
2240
+ };
2225
2241
  /**
2226
2242
  * @description - `CustomerSessionRequired`: The operation needs a customer's session
2227
2243
  * - `NotAuthenticated`: The credentials are missing, invalid or expired, or do not fit this surface
@@ -2250,6 +2266,30 @@ export interface operations {
2250
2266
  };
2251
2267
  };
2252
2268
  };
2269
+ /** @description - `BodyTooLarge`: The body is larger than the engine accepts */
2270
+ 413: {
2271
+ headers: {
2272
+ [name: string]: unknown;
2273
+ };
2274
+ content: {
2275
+ "application/json": components["schemas"]["ErrorResponse"] & {
2276
+ /** @enum {string} */
2277
+ code: "BodyTooLarge";
2278
+ };
2279
+ };
2280
+ };
2281
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
2282
+ 415: {
2283
+ headers: {
2284
+ [name: string]: unknown;
2285
+ };
2286
+ content: {
2287
+ "application/json": components["schemas"]["ErrorResponse"] & {
2288
+ /** @enum {string} */
2289
+ code: "UnsupportedMediaType";
2290
+ };
2291
+ };
2292
+ };
2253
2293
  /** @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 */
2254
2294
  429: {
2255
2295
  headers: {
@@ -2278,20 +2318,14 @@ export interface operations {
2278
2318
  };
2279
2319
  };
2280
2320
  };
2281
- updateMyName: {
2321
+ getMyBackofficeAccess: {
2282
2322
  parameters: {
2283
2323
  query?: never;
2284
2324
  header?: never;
2285
2325
  path?: never;
2286
2326
  cookie?: never;
2287
2327
  };
2288
- requestBody: {
2289
- content: {
2290
- "application/json": {
2291
- name: string;
2292
- };
2293
- };
2294
- };
2328
+ requestBody?: never;
2295
2329
  responses: {
2296
2330
  /** @description OK */
2297
2331
  200: {
@@ -2300,26 +2334,7 @@ export interface operations {
2300
2334
  };
2301
2335
  content: {
2302
2336
  "application/json": {
2303
- /** Format: email */
2304
- email: string | null;
2305
- name: string;
2306
- /** @description The newest verified phone; read-only */
2307
- phone: string | null;
2308
- };
2309
- };
2310
- };
2311
- /**
2312
- * @description - `MalformedBody`: The JSON body cannot be parsed
2313
- * - `ValidationFailed`: The path, query or body does not match the operation's schema; `issues` lists each problem with its path
2314
- */
2315
- 400: {
2316
- headers: {
2317
- [name: string]: unknown;
2318
- };
2319
- content: {
2320
- "application/json": components["schemas"]["ValidationErrorResponse"] & {
2321
- /** @enum {string} */
2322
- code: "MalformedBody" | "ValidationFailed";
2337
+ available: boolean;
2323
2338
  };
2324
2339
  };
2325
2340
  };
@@ -2351,30 +2366,6 @@ export interface operations {
2351
2366
  };
2352
2367
  };
2353
2368
  };
2354
- /** @description - `BodyTooLarge`: The body is larger than the engine accepts */
2355
- 413: {
2356
- headers: {
2357
- [name: string]: unknown;
2358
- };
2359
- content: {
2360
- "application/json": components["schemas"]["ErrorResponse"] & {
2361
- /** @enum {string} */
2362
- code: "BodyTooLarge";
2363
- };
2364
- };
2365
- };
2366
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
2367
- 415: {
2368
- headers: {
2369
- [name: string]: unknown;
2370
- };
2371
- content: {
2372
- "application/json": components["schemas"]["ErrorResponse"] & {
2373
- /** @enum {string} */
2374
- code: "UnsupportedMediaType";
2375
- };
2376
- };
2377
- };
2378
2369
  /** @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 */
2379
2370
  429: {
2380
2371
  headers: {
@@ -2701,7 +2692,7 @@ export interface operations {
2701
2692
  };
2702
2693
  };
2703
2694
  };
2704
- /** @description - `UnsupportedMediaType`: The body's content type is not `application/json` */
2695
+ /** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
2705
2696
  415: {
2706
2697
  headers: {
2707
2698
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msm-platform/customer-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Typed server-side client for MSM's customer API (/web)",
5
5
  "license": "MIT",
6
6
  "repository": {