@msm-platform/customer-sdk 0.2.0 → 0.3.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 +14 -0
- package/README.md +14 -2
- package/dist/generated/api.d.ts +133 -235
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to `@msm-platform/customer-sdk`. The format follows [Keep a
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.3.0] - 2026-11-16
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- 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.
|
|
12
|
+
- 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.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **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.
|
|
17
|
+
- **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.
|
|
18
|
+
- **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`.
|
|
19
|
+
- 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.
|
|
20
|
+
|
|
7
21
|
## [0.2.0] - 2026-11-15
|
|
8
22
|
|
|
9
23
|
### 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:
|
|
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.
|
|
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
|
|
package/dist/generated/api.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface paths {
|
|
|
135
135
|
patch?: never;
|
|
136
136
|
trace?: never;
|
|
137
137
|
};
|
|
138
|
-
"/web/identity/
|
|
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
|
-
/**
|
|
148
|
-
post: operations["
|
|
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/
|
|
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
|
-
/**
|
|
165
|
-
post: operations["
|
|
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/
|
|
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
|
|
182
|
-
post: operations["
|
|
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,23 +203,6 @@ export interface paths {
|
|
|
203
203
|
patch?: never;
|
|
204
204
|
trace?: never;
|
|
205
205
|
};
|
|
206
|
-
"/web/identity/registerCustomer": {
|
|
207
|
-
parameters: {
|
|
208
|
-
query?: never;
|
|
209
|
-
header?: never;
|
|
210
|
-
path?: never;
|
|
211
|
-
cookie?: never;
|
|
212
|
-
};
|
|
213
|
-
get?: never;
|
|
214
|
-
put?: never;
|
|
215
|
-
/** Redeem a registration code for a new customer's session */
|
|
216
|
-
post: operations["identityRegisterCustomer"];
|
|
217
|
-
delete?: never;
|
|
218
|
-
options?: never;
|
|
219
|
-
head?: never;
|
|
220
|
-
patch?: never;
|
|
221
|
-
trace?: never;
|
|
222
|
-
};
|
|
223
206
|
"/web/me": {
|
|
224
207
|
parameters: {
|
|
225
208
|
query?: never;
|
|
@@ -335,14 +318,38 @@ export interface operations {
|
|
|
335
318
|
"application/json": {
|
|
336
319
|
items: {
|
|
337
320
|
address: string | null;
|
|
321
|
+
brandColor: string | null;
|
|
322
|
+
cover: {
|
|
323
|
+
height: number;
|
|
324
|
+
small: {
|
|
325
|
+
height: number;
|
|
326
|
+
/** Format: uri */
|
|
327
|
+
url: string;
|
|
328
|
+
width: number;
|
|
329
|
+
};
|
|
330
|
+
/** Format: uri */
|
|
331
|
+
url: string;
|
|
332
|
+
width: number;
|
|
333
|
+
} | null;
|
|
334
|
+
description: string | null;
|
|
338
335
|
displayName: string;
|
|
339
336
|
/** Format: email */
|
|
340
337
|
email: string | null;
|
|
341
338
|
/** Format: uuid */
|
|
342
339
|
id: string;
|
|
343
340
|
latitude: number | null;
|
|
344
|
-
|
|
345
|
-
|
|
341
|
+
logo: {
|
|
342
|
+
height: number;
|
|
343
|
+
small: {
|
|
344
|
+
height: number;
|
|
345
|
+
/** Format: uri */
|
|
346
|
+
url: string;
|
|
347
|
+
width: number;
|
|
348
|
+
};
|
|
349
|
+
/** Format: uri */
|
|
350
|
+
url: string;
|
|
351
|
+
width: number;
|
|
352
|
+
} | null;
|
|
346
353
|
longitude: number | null;
|
|
347
354
|
phone: string | null;
|
|
348
355
|
timezone: string;
|
|
@@ -425,14 +432,38 @@ export interface operations {
|
|
|
425
432
|
content: {
|
|
426
433
|
"application/json": {
|
|
427
434
|
address: string | null;
|
|
435
|
+
brandColor: string | null;
|
|
436
|
+
cover: {
|
|
437
|
+
height: number;
|
|
438
|
+
small: {
|
|
439
|
+
height: number;
|
|
440
|
+
/** Format: uri */
|
|
441
|
+
url: string;
|
|
442
|
+
width: number;
|
|
443
|
+
};
|
|
444
|
+
/** Format: uri */
|
|
445
|
+
url: string;
|
|
446
|
+
width: number;
|
|
447
|
+
} | null;
|
|
448
|
+
description: string | null;
|
|
428
449
|
displayName: string;
|
|
429
450
|
/** Format: email */
|
|
430
451
|
email: string | null;
|
|
431
452
|
/** Format: uuid */
|
|
432
453
|
id: string;
|
|
433
454
|
latitude: number | null;
|
|
434
|
-
|
|
435
|
-
|
|
455
|
+
logo: {
|
|
456
|
+
height: number;
|
|
457
|
+
small: {
|
|
458
|
+
height: number;
|
|
459
|
+
/** Format: uri */
|
|
460
|
+
url: string;
|
|
461
|
+
width: number;
|
|
462
|
+
};
|
|
463
|
+
/** Format: uri */
|
|
464
|
+
url: string;
|
|
465
|
+
width: number;
|
|
466
|
+
} | null;
|
|
436
467
|
longitude: number | null;
|
|
437
468
|
phone: string | null;
|
|
438
469
|
timezone: string;
|
|
@@ -929,7 +960,7 @@ export interface operations {
|
|
|
929
960
|
};
|
|
930
961
|
};
|
|
931
962
|
};
|
|
932
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
963
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
933
964
|
415: {
|
|
934
965
|
headers: {
|
|
935
966
|
[name: string]: unknown;
|
|
@@ -1008,8 +1039,18 @@ export interface operations {
|
|
|
1008
1039
|
durationMinutes: number;
|
|
1009
1040
|
/** Format: uuid */
|
|
1010
1041
|
id: string;
|
|
1011
|
-
|
|
1012
|
-
|
|
1042
|
+
image: {
|
|
1043
|
+
height: number;
|
|
1044
|
+
small: {
|
|
1045
|
+
height: number;
|
|
1046
|
+
/** Format: uri */
|
|
1047
|
+
url: string;
|
|
1048
|
+
width: number;
|
|
1049
|
+
};
|
|
1050
|
+
/** Format: uri */
|
|
1051
|
+
url: string;
|
|
1052
|
+
width: number;
|
|
1053
|
+
} | null;
|
|
1013
1054
|
requiresAccess: boolean;
|
|
1014
1055
|
resources: {
|
|
1015
1056
|
/** @description The resource's own description, null without one */
|
|
@@ -1017,6 +1058,19 @@ export interface operations {
|
|
|
1017
1058
|
displayName: string;
|
|
1018
1059
|
/** Format: uuid */
|
|
1019
1060
|
id: string;
|
|
1061
|
+
/** @description The resource's photo (MVP-226), null without one */
|
|
1062
|
+
image: {
|
|
1063
|
+
height: number;
|
|
1064
|
+
small: {
|
|
1065
|
+
height: number;
|
|
1066
|
+
/** Format: uri */
|
|
1067
|
+
url: string;
|
|
1068
|
+
width: number;
|
|
1069
|
+
};
|
|
1070
|
+
/** Format: uri */
|
|
1071
|
+
url: string;
|
|
1072
|
+
width: number;
|
|
1073
|
+
} | null;
|
|
1020
1074
|
}[];
|
|
1021
1075
|
timeSlotBooking: boolean;
|
|
1022
1076
|
}[];
|
|
@@ -1239,7 +1293,7 @@ export interface operations {
|
|
|
1239
1293
|
};
|
|
1240
1294
|
};
|
|
1241
1295
|
};
|
|
1242
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
1296
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
1243
1297
|
415: {
|
|
1244
1298
|
headers: {
|
|
1245
1299
|
[name: string]: unknown;
|
|
@@ -1426,7 +1480,7 @@ export interface operations {
|
|
|
1426
1480
|
};
|
|
1427
1481
|
};
|
|
1428
1482
|
};
|
|
1429
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
1483
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
1430
1484
|
415: {
|
|
1431
1485
|
headers: {
|
|
1432
1486
|
[name: string]: unknown;
|
|
@@ -1482,7 +1536,7 @@ export interface operations {
|
|
|
1482
1536
|
};
|
|
1483
1537
|
};
|
|
1484
1538
|
};
|
|
1485
|
-
|
|
1539
|
+
identityCompleteRegistration: {
|
|
1486
1540
|
parameters: {
|
|
1487
1541
|
query?: never;
|
|
1488
1542
|
header?: never;
|
|
@@ -1492,9 +1546,8 @@ export interface operations {
|
|
|
1492
1546
|
requestBody: {
|
|
1493
1547
|
content: {
|
|
1494
1548
|
"application/json": {
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
code: string;
|
|
1549
|
+
name?: string;
|
|
1550
|
+
registrationTicket: string;
|
|
1498
1551
|
};
|
|
1499
1552
|
};
|
|
1500
1553
|
};
|
|
@@ -1568,7 +1621,7 @@ export interface operations {
|
|
|
1568
1621
|
};
|
|
1569
1622
|
};
|
|
1570
1623
|
};
|
|
1571
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
1624
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
1572
1625
|
415: {
|
|
1573
1626
|
headers: {
|
|
1574
1627
|
[name: string]: unknown;
|
|
@@ -1580,6 +1633,18 @@ export interface operations {
|
|
|
1580
1633
|
};
|
|
1581
1634
|
};
|
|
1582
1635
|
};
|
|
1636
|
+
/** @description - `NameRequired`: A new customer's registration needs their name; the ticket can be sent again with it */
|
|
1637
|
+
422: {
|
|
1638
|
+
headers: {
|
|
1639
|
+
[name: string]: unknown;
|
|
1640
|
+
};
|
|
1641
|
+
content: {
|
|
1642
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
1643
|
+
/** @enum {string} */
|
|
1644
|
+
code: "NameRequired";
|
|
1645
|
+
};
|
|
1646
|
+
};
|
|
1647
|
+
};
|
|
1583
1648
|
/** @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
1649
|
429: {
|
|
1585
1650
|
headers: {
|
|
@@ -1608,7 +1673,7 @@ export interface operations {
|
|
|
1608
1673
|
};
|
|
1609
1674
|
};
|
|
1610
1675
|
};
|
|
1611
|
-
|
|
1676
|
+
identityCustomerLogin: {
|
|
1612
1677
|
parameters: {
|
|
1613
1678
|
query?: never;
|
|
1614
1679
|
header?: never;
|
|
@@ -1618,11 +1683,9 @@ export interface operations {
|
|
|
1618
1683
|
requestBody: {
|
|
1619
1684
|
content: {
|
|
1620
1685
|
"application/json": {
|
|
1621
|
-
/**
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
clientIp: string;
|
|
1625
|
-
phone: string;
|
|
1686
|
+
/** Format: uuid */
|
|
1687
|
+
challenge: string;
|
|
1688
|
+
code: string;
|
|
1626
1689
|
};
|
|
1627
1690
|
};
|
|
1628
1691
|
};
|
|
@@ -1634,10 +1697,22 @@ export interface operations {
|
|
|
1634
1697
|
};
|
|
1635
1698
|
content: {
|
|
1636
1699
|
"application/json": {
|
|
1637
|
-
/** Format: uuid */
|
|
1638
|
-
challenge: string;
|
|
1639
1700
|
/** Format: date-time */
|
|
1640
1701
|
expiresAt: string;
|
|
1702
|
+
/** @enum {string} */
|
|
1703
|
+
result: "session";
|
|
1704
|
+
/** Format: uuid */
|
|
1705
|
+
sessionId: string;
|
|
1706
|
+
sessionToken: string;
|
|
1707
|
+
} | {
|
|
1708
|
+
/** @description Whether completeRegistration needs the customer's name: false when the phone already has a person */
|
|
1709
|
+
nameRequired: boolean;
|
|
1710
|
+
/** Format: date-time */
|
|
1711
|
+
registrationExpiresAt: string;
|
|
1712
|
+
/** @description Single use, for this client and phone; send it to completeRegistration */
|
|
1713
|
+
registrationTicket: string;
|
|
1714
|
+
/** @enum {string} */
|
|
1715
|
+
result: "registrationRequired";
|
|
1641
1716
|
};
|
|
1642
1717
|
};
|
|
1643
1718
|
};
|
|
@@ -1671,10 +1746,7 @@ export interface operations {
|
|
|
1671
1746
|
};
|
|
1672
1747
|
};
|
|
1673
1748
|
};
|
|
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
|
-
*/
|
|
1749
|
+
/** @description - `NotAuthorized`: The actor is not permitted to perform this operation */
|
|
1678
1750
|
403: {
|
|
1679
1751
|
headers: {
|
|
1680
1752
|
[name: string]: unknown;
|
|
@@ -1682,7 +1754,7 @@ export interface operations {
|
|
|
1682
1754
|
content: {
|
|
1683
1755
|
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
1684
1756
|
/** @enum {string} */
|
|
1685
|
-
code: "
|
|
1757
|
+
code: "NotAuthorized";
|
|
1686
1758
|
};
|
|
1687
1759
|
};
|
|
1688
1760
|
};
|
|
@@ -1698,7 +1770,7 @@ export interface operations {
|
|
|
1698
1770
|
};
|
|
1699
1771
|
};
|
|
1700
1772
|
};
|
|
1701
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
1773
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
1702
1774
|
415: {
|
|
1703
1775
|
headers: {
|
|
1704
1776
|
[name: string]: unknown;
|
|
@@ -1710,23 +1782,7 @@ export interface operations {
|
|
|
1710
1782
|
};
|
|
1711
1783
|
};
|
|
1712
1784
|
};
|
|
1713
|
-
/** @description - `
|
|
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
|
-
*/
|
|
1785
|
+
/** @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
1786
|
429: {
|
|
1731
1787
|
headers: {
|
|
1732
1788
|
/** @description Seconds to wait before sending the request again */
|
|
@@ -1736,7 +1792,7 @@ export interface operations {
|
|
|
1736
1792
|
content: {
|
|
1737
1793
|
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
1738
1794
|
/** @enum {string} */
|
|
1739
|
-
code: "RateLimited"
|
|
1795
|
+
code: "RateLimited";
|
|
1740
1796
|
};
|
|
1741
1797
|
};
|
|
1742
1798
|
};
|
|
@@ -1752,28 +1808,9 @@ export interface operations {
|
|
|
1752
1808
|
};
|
|
1753
1809
|
};
|
|
1754
1810
|
};
|
|
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
1811
|
};
|
|
1775
1812
|
};
|
|
1776
|
-
|
|
1813
|
+
identityInitiateLogin: {
|
|
1777
1814
|
parameters: {
|
|
1778
1815
|
query?: never;
|
|
1779
1816
|
header?: never;
|
|
@@ -1787,7 +1824,6 @@ export interface operations {
|
|
|
1787
1824
|
botCheckToken: string;
|
|
1788
1825
|
/** @description The visitor's IP address, as the application's own trusted proxy reports it */
|
|
1789
1826
|
clientIp: string;
|
|
1790
|
-
name: string;
|
|
1791
1827
|
phone: string;
|
|
1792
1828
|
};
|
|
1793
1829
|
};
|
|
@@ -1864,7 +1900,7 @@ export interface operations {
|
|
|
1864
1900
|
};
|
|
1865
1901
|
};
|
|
1866
1902
|
};
|
|
1867
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
1903
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
1868
1904
|
415: {
|
|
1869
1905
|
headers: {
|
|
1870
1906
|
[name: string]: unknown;
|
|
@@ -2020,145 +2056,7 @@ export interface operations {
|
|
|
2020
2056
|
};
|
|
2021
2057
|
};
|
|
2022
2058
|
};
|
|
2023
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
2024
|
-
415: {
|
|
2025
|
-
headers: {
|
|
2026
|
-
[name: string]: unknown;
|
|
2027
|
-
};
|
|
2028
|
-
content: {
|
|
2029
|
-
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
2030
|
-
/** @enum {string} */
|
|
2031
|
-
code: "UnsupportedMediaType";
|
|
2032
|
-
};
|
|
2033
|
-
};
|
|
2034
|
-
};
|
|
2035
|
-
/** @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 */
|
|
2036
|
-
429: {
|
|
2037
|
-
headers: {
|
|
2038
|
-
/** @description Seconds to wait before sending the request again */
|
|
2039
|
-
"Retry-After"?: number;
|
|
2040
|
-
[name: string]: unknown;
|
|
2041
|
-
};
|
|
2042
|
-
content: {
|
|
2043
|
-
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
2044
|
-
/** @enum {string} */
|
|
2045
|
-
code: "RateLimited";
|
|
2046
|
-
};
|
|
2047
|
-
};
|
|
2048
|
-
};
|
|
2049
|
-
/** @description - `InternalError`: The engine failed unexpectedly */
|
|
2050
|
-
500: {
|
|
2051
|
-
headers: {
|
|
2052
|
-
[name: string]: unknown;
|
|
2053
|
-
};
|
|
2054
|
-
content: {
|
|
2055
|
-
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
2056
|
-
/** @enum {string} */
|
|
2057
|
-
code: "InternalError";
|
|
2058
|
-
};
|
|
2059
|
-
};
|
|
2060
|
-
};
|
|
2061
|
-
};
|
|
2062
|
-
};
|
|
2063
|
-
identityRegisterCustomer: {
|
|
2064
|
-
parameters: {
|
|
2065
|
-
query?: never;
|
|
2066
|
-
header?: never;
|
|
2067
|
-
path?: never;
|
|
2068
|
-
cookie?: never;
|
|
2069
|
-
};
|
|
2070
|
-
requestBody: {
|
|
2071
|
-
content: {
|
|
2072
|
-
"application/json": {
|
|
2073
|
-
/** Format: uuid */
|
|
2074
|
-
challenge: string;
|
|
2075
|
-
code: string;
|
|
2076
|
-
};
|
|
2077
|
-
};
|
|
2078
|
-
};
|
|
2079
|
-
responses: {
|
|
2080
|
-
/** @description OK */
|
|
2081
|
-
200: {
|
|
2082
|
-
headers: {
|
|
2083
|
-
[name: string]: unknown;
|
|
2084
|
-
};
|
|
2085
|
-
content: {
|
|
2086
|
-
"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";
|
|
2107
|
-
};
|
|
2108
|
-
};
|
|
2109
|
-
};
|
|
2110
|
-
/**
|
|
2111
|
-
* @description - `NotAuthenticated`: The credentials are missing, invalid or expired, or do not fit this surface
|
|
2112
|
-
* - `SessionExpired`: The session has expired or its client's session policy ended it; sign in again
|
|
2113
|
-
*/
|
|
2114
|
-
401: {
|
|
2115
|
-
headers: {
|
|
2116
|
-
[name: string]: unknown;
|
|
2117
|
-
};
|
|
2118
|
-
content: {
|
|
2119
|
-
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
2120
|
-
/** @enum {string} */
|
|
2121
|
-
code: "NotAuthenticated" | "SessionExpired";
|
|
2122
|
-
};
|
|
2123
|
-
};
|
|
2124
|
-
};
|
|
2125
|
-
/** @description - `NotAuthorized`: The actor is not permitted to perform this operation */
|
|
2126
|
-
403: {
|
|
2127
|
-
headers: {
|
|
2128
|
-
[name: string]: unknown;
|
|
2129
|
-
};
|
|
2130
|
-
content: {
|
|
2131
|
-
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
2132
|
-
/** @enum {string} */
|
|
2133
|
-
code: "NotAuthorized";
|
|
2134
|
-
};
|
|
2135
|
-
};
|
|
2136
|
-
};
|
|
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` */
|
|
2059
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
2162
2060
|
415: {
|
|
2163
2061
|
headers: {
|
|
2164
2062
|
[name: string]: unknown;
|
|
@@ -2363,7 +2261,7 @@ export interface operations {
|
|
|
2363
2261
|
};
|
|
2364
2262
|
};
|
|
2365
2263
|
};
|
|
2366
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
2264
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
2367
2265
|
415: {
|
|
2368
2266
|
headers: {
|
|
2369
2267
|
[name: string]: unknown;
|
|
@@ -2701,7 +2599,7 @@ export interface operations {
|
|
|
2701
2599
|
};
|
|
2702
2600
|
};
|
|
2703
2601
|
};
|
|
2704
|
-
/** @description - `UnsupportedMediaType`: The body's content type is not `application/json
|
|
2602
|
+
/** @description - `UnsupportedMediaType`: The body's content type is not one the operation accepts: `application/json`, or the image types an image upload lists */
|
|
2705
2603
|
415: {
|
|
2706
2604
|
headers: {
|
|
2707
2605
|
[name: string]: unknown;
|