@myronsi/messenger-api 2.1.0-alpha.12 → 2.1.0-alpha.14
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 +48 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +1718 -105
- package/dist/schema.d.ts +4239 -1814
- package/dist/ws-docs.json +30 -0
- package/dist/ws-events.d.ts +69 -1
- package/dist/ws-events.schema.json +833 -153
- package/package.json +1 -1
package/dist/ws-docs.json
CHANGED
|
@@ -415,6 +415,36 @@
|
|
|
415
415
|
"read_at": "2026-10-04T12:00:00Z"
|
|
416
416
|
}
|
|
417
417
|
},
|
|
418
|
+
"server/recovery_request.json": {
|
|
419
|
+
"type": "recovery_request",
|
|
420
|
+
"event_id": "7217400317439950849",
|
|
421
|
+
"chat_id": null,
|
|
422
|
+
"data": {
|
|
423
|
+
"request_id": "z8uFZt0xFYtjm_iO3vI9xFYxsy7xM4K5uM1g1s8YbYI",
|
|
424
|
+
"user_agent": "Chrome on Windows",
|
|
425
|
+
"location": {
|
|
426
|
+
"city": "Berlin",
|
|
427
|
+
"country_code": "DE",
|
|
428
|
+
"country": "Germany"
|
|
429
|
+
},
|
|
430
|
+
"choices": [
|
|
431
|
+
17,
|
|
432
|
+
42,
|
|
433
|
+
85
|
|
434
|
+
],
|
|
435
|
+
"expires_at": "2026-11-05T20:00:00Z"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"server/security_alert.json": {
|
|
439
|
+
"type": "security_alert",
|
|
440
|
+
"event_id": "7217400317439950010",
|
|
441
|
+
"chat_id": null,
|
|
442
|
+
"data": {
|
|
443
|
+
"type": "login",
|
|
444
|
+
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/140.0",
|
|
445
|
+
"created_at": "2026-11-06T12:00:00Z"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
418
448
|
"server/security_notice.json": {
|
|
419
449
|
"type": "security_notice",
|
|
420
450
|
"event_id": "7217400317439950009",
|
package/dist/ws-events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from api/openapi.yaml 2.1.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.1.0-alpha.14. Do not edit. */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Any WebSocket event, in either direction.
|
|
@@ -48,6 +48,8 @@ export type ServerEvent =
|
|
|
48
48
|
| ServerReactionAddEvent
|
|
49
49
|
| ServerReactionRemoveEvent
|
|
50
50
|
| ServerReadEvent
|
|
51
|
+
| ServerRecoveryRequestEvent
|
|
52
|
+
| ServerSecurityAlertEvent
|
|
51
53
|
| ServerSecurityNoticeEvent
|
|
52
54
|
| ServerTypingEvent;
|
|
53
55
|
export type Timestamp = string;
|
|
@@ -557,6 +559,72 @@ export interface ServerReadEvent {
|
|
|
557
559
|
read_at: Timestamp;
|
|
558
560
|
};
|
|
559
561
|
}
|
|
562
|
+
export interface ServerRecoveryRequestEvent {
|
|
563
|
+
type: "recovery_request";
|
|
564
|
+
event_id: string;
|
|
565
|
+
chat_id: null;
|
|
566
|
+
data: {
|
|
567
|
+
/**
|
|
568
|
+
* Approval handle for POST /auth/recovery-requests/{requestId}/approve and /deny. It is not the requester's capability.
|
|
569
|
+
*/
|
|
570
|
+
request_id: string;
|
|
571
|
+
user_agent: string;
|
|
572
|
+
location: Location | null;
|
|
573
|
+
/**
|
|
574
|
+
* @minItems 3
|
|
575
|
+
* @maxItems 3
|
|
576
|
+
*/
|
|
577
|
+
choices: [number, number, number];
|
|
578
|
+
expires_at: string;
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Approximate location of a client address, looked up in an offline GeoIP database (IP geolocation by
|
|
583
|
+
* DB-IP, https://db-ip.com, CC BY 4.0). The address itself is never exposed. Each field is `null` when the
|
|
584
|
+
* database does not know it; clients localise the country name from `country_code`.
|
|
585
|
+
*
|
|
586
|
+
*/
|
|
587
|
+
export interface Location {
|
|
588
|
+
/**
|
|
589
|
+
* City name in English
|
|
590
|
+
*/
|
|
591
|
+
city: string | null;
|
|
592
|
+
/**
|
|
593
|
+
* ISO 3166-1 alpha-2 country code
|
|
594
|
+
*/
|
|
595
|
+
country_code: string | null;
|
|
596
|
+
/**
|
|
597
|
+
* Country name in English
|
|
598
|
+
*/
|
|
599
|
+
country: string | null;
|
|
600
|
+
}
|
|
601
|
+
export interface ServerSecurityAlertEvent {
|
|
602
|
+
type: "security_alert";
|
|
603
|
+
event_id: Id;
|
|
604
|
+
chat_id: null;
|
|
605
|
+
data: {
|
|
606
|
+
type:
|
|
607
|
+
| "password_changed"
|
|
608
|
+
| "recovery_key_changed"
|
|
609
|
+
| "2fa_enabled"
|
|
610
|
+
| "2fa_disabled"
|
|
611
|
+
| "passkey_added"
|
|
612
|
+
| "passkey_removed"
|
|
613
|
+
| "recovery_email_changed"
|
|
614
|
+
| "recovery_email_removed"
|
|
615
|
+
| "passkey_counter_warning"
|
|
616
|
+
| "login"
|
|
617
|
+
| "login_2fa"
|
|
618
|
+
| "passkey_login"
|
|
619
|
+
| "qr_login_approved";
|
|
620
|
+
user_agent?: string;
|
|
621
|
+
created_at?: string;
|
|
622
|
+
/**
|
|
623
|
+
* The session that made the change, when a signed-in session made it. Clients skip alerts for their own session.
|
|
624
|
+
*/
|
|
625
|
+
session_id?: string;
|
|
626
|
+
};
|
|
627
|
+
}
|
|
560
628
|
export interface ServerSecurityNoticeEvent {
|
|
561
629
|
type: "security_notice";
|
|
562
630
|
event_id: Id;
|