@myronsi/messenger-api 2.1.0-alpha.61.next.210 → 2.1.0-alpha.62.next.211
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 +6 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +13 -2
- package/dist/schema.d.ts +11 -2
- package/dist/ws-events.d.ts +12 -2
- package/dist/ws-events.schema.json +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Contract changes only. The backend changelog is `CHANGELOG.md` in the repository root. Rules: `docs/api-compatibility.md`.
|
|
4
4
|
|
|
5
|
+
## 2.1.0-alpha.62
|
|
6
|
+
|
|
7
|
+
- Signed channel posts (C4): `Group` and `UpdateGroupRequest` gain `sign_posts` (owner and admins). `Message` gains
|
|
8
|
+
`signature` (the author's display name on posts of a signing channel). Without signing, a channel post has
|
|
9
|
+
`sender: null` for everyone but its author (shown as the channel). Forwarded channel posts name the channel.
|
|
10
|
+
|
|
5
11
|
## 2.1.0-alpha.61
|
|
6
12
|
|
|
7
13
|
- Channel settings `sensitive` (18+) and `recommendable` (on by default) on `Group` and `UpdateGroupRequest`; only the
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from api/openapi.yaml 2.1.0-alpha.
|
|
2
|
-
export declare const API_VERSION: "2.1.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.1.0-alpha.62. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.1.0-alpha.62";
|
|
3
3
|
export type { paths, components, operations } from "./schema.js";
|
|
4
4
|
export * from "./ws-events.js";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const API_VERSION = "2.1.0-alpha.
|
|
1
|
+
export const API_VERSION = "2.1.0-alpha.62";
|
package/dist/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.1.0
|
|
2
2
|
info:
|
|
3
3
|
title: Messenger API
|
|
4
|
-
version: 2.1.0-alpha.
|
|
4
|
+
version: 2.1.0-alpha.62
|
|
5
5
|
summary: REST contract of the Messenger backend (v2).
|
|
6
6
|
description: |
|
|
7
7
|
Contract for the Go backend. The WebSocket protocol is described in `websocket/` and
|
|
@@ -8955,7 +8955,9 @@ components:
|
|
|
8955
8955
|
chat_id: { $ref: "#/components/schemas/Id" }
|
|
8956
8956
|
type: { $ref: "#/components/schemas/MessageType" }
|
|
8957
8957
|
sender:
|
|
8958
|
-
description:
|
|
8958
|
+
description: |
|
|
8959
|
+
`null` for system messages, and for channel posts when the channel does not sign posts (shown as the
|
|
8960
|
+
channel), except for the post's own author. Comments always carry their sender.
|
|
8959
8961
|
oneOf:
|
|
8960
8962
|
- $ref: "#/components/schemas/User"
|
|
8961
8963
|
- type: "null"
|
|
@@ -9010,6 +9012,9 @@ components:
|
|
|
9010
9012
|
author's own reads do not count. `post_stats` events update it.
|
|
9011
9013
|
type: [integer, "null"]
|
|
9012
9014
|
minimum: 0
|
|
9015
|
+
signature:
|
|
9016
|
+
description: Channel posts of a channel that signs posts - the author's display name; `null` otherwise.
|
|
9017
|
+
type: [string, "null"]
|
|
9013
9018
|
thread_root_id:
|
|
9014
9019
|
description: Set on a comment of a channel post (the post it belongs to); `null` for posts and other messages.
|
|
9015
9020
|
oneOf:
|
|
@@ -9983,6 +9988,9 @@ components:
|
|
|
9983
9988
|
maxItems: 5
|
|
9984
9989
|
description: Public channels only - up to 5 tags (lowercase letters and digits, at most 24 characters).
|
|
9985
9990
|
items: { type: string, minLength: 1, maxLength: 24 }
|
|
9991
|
+
sign_posts:
|
|
9992
|
+
type: boolean
|
|
9993
|
+
description: Channels only - posts carry the author's name (`Message.signature`); off shows posts as the channel. Owner and admins change it.
|
|
9986
9994
|
sensitive:
|
|
9987
9995
|
type: boolean
|
|
9988
9996
|
description: Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+.
|
|
@@ -10056,6 +10064,9 @@ components:
|
|
|
10056
10064
|
dropped and letters are lowercased, so `#Game Dev` becomes `gamedev`. After cleaning a tag has 1 to 24
|
|
10057
10065
|
letters or digits; duplicates collapse. A tag on the staff blocklist is `422`.
|
|
10058
10066
|
items: { type: string, minLength: 1, maxLength: 64 }
|
|
10067
|
+
sign_posts:
|
|
10068
|
+
type: boolean
|
|
10069
|
+
description: Channels only - posts carry the author's name (`Message.signature`); off shows posts as the channel. Owner and admins change it.
|
|
10059
10070
|
sensitive:
|
|
10060
10071
|
type: boolean
|
|
10061
10072
|
description: Channels only - 18+ content. Owner only (`403` for admins); apps label the channel 18+.
|
package/dist/schema.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.62. Do not edit. */
|
|
2
2
|
export interface paths {
|
|
3
3
|
"/meta": {
|
|
4
4
|
parameters: {
|
|
@@ -6641,7 +6641,10 @@ export interface components {
|
|
|
6641
6641
|
id: components["schemas"]["Id"];
|
|
6642
6642
|
chat_id: components["schemas"]["Id"];
|
|
6643
6643
|
type: components["schemas"]["MessageType"];
|
|
6644
|
-
/**
|
|
6644
|
+
/**
|
|
6645
|
+
* @description `null` for system messages, and for channel posts when the channel does not sign posts (shown as the
|
|
6646
|
+
* channel), except for the post's own author. Comments always carry their sender.
|
|
6647
|
+
*/
|
|
6645
6648
|
sender: components["schemas"]["User"] | null;
|
|
6646
6649
|
/**
|
|
6647
6650
|
* @description Text, the caption of a file, the emoji of a sticker, or the plain-text summary of a poll, contact or
|
|
@@ -6674,6 +6677,8 @@ export interface components {
|
|
|
6674
6677
|
* author's own reads do not count. `post_stats` events update it.
|
|
6675
6678
|
*/
|
|
6676
6679
|
view_count?: number | null;
|
|
6680
|
+
/** @description Channel posts of a channel that signs posts - the author's display name; `null` otherwise. */
|
|
6681
|
+
signature?: string | null;
|
|
6677
6682
|
/** @description Set on a comment of a channel post (the post it belongs to); `null` for posts and other messages. */
|
|
6678
6683
|
thread_root_id?: components["schemas"]["Id"] | null;
|
|
6679
6684
|
/** @description Set on a reply inside a comment thread (the top-level comment it hangs under); `null` otherwise. */
|
|
@@ -7222,6 +7227,8 @@ export interface components {
|
|
|
7222
7227
|
category?: components["schemas"]["ChannelCategory"] | null;
|
|
7223
7228
|
/** @description Public channels only - up to 5 tags (lowercase letters and digits, at most 24 characters). */
|
|
7224
7229
|
tags?: string[];
|
|
7230
|
+
/** @description Channels only - posts carry the author's name (`Message.signature`); off shows posts as the channel. Owner and admins change it. */
|
|
7231
|
+
sign_posts?: boolean;
|
|
7225
7232
|
/** @description Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+. */
|
|
7226
7233
|
sensitive?: boolean;
|
|
7227
7234
|
/** @description Channels only - whether the channel may be recommended to people who do not follow it. On by default; only the owner changes it. */
|
|
@@ -7267,6 +7274,8 @@ export interface components {
|
|
|
7267
7274
|
* letters or digits; duplicates collapse. A tag on the staff blocklist is `422`.
|
|
7268
7275
|
*/
|
|
7269
7276
|
tags?: string[];
|
|
7277
|
+
/** @description Channels only - posts carry the author's name (`Message.signature`); off shows posts as the channel. Owner and admins change it. */
|
|
7278
|
+
sign_posts?: boolean;
|
|
7270
7279
|
/** @description Channels only - 18+ content. Owner only (`403` for admins); apps label the channel 18+. */
|
|
7271
7280
|
sensitive?: boolean;
|
|
7272
7281
|
/** @description Channels only - whether the channel may be recommended to people who do not follow it. On by default; only the owner changes it. */
|
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.62. Do not edit. */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Any WebSocket event, in either direction.
|
|
@@ -901,7 +901,9 @@ export interface Message {
|
|
|
901
901
|
chat_id: Id;
|
|
902
902
|
type: MessageType;
|
|
903
903
|
/**
|
|
904
|
-
* `null` for system messages
|
|
904
|
+
* `null` for system messages, and for channel posts when the channel does not sign posts (shown as the
|
|
905
|
+
* channel), except for the post's own author. Comments always carry their sender.
|
|
906
|
+
*
|
|
905
907
|
*/
|
|
906
908
|
sender: User | null;
|
|
907
909
|
/**
|
|
@@ -960,6 +962,10 @@ export interface Message {
|
|
|
960
962
|
*
|
|
961
963
|
*/
|
|
962
964
|
view_count?: number | null;
|
|
965
|
+
/**
|
|
966
|
+
* Channel posts of a channel that signs posts - the author's display name; `null` otherwise.
|
|
967
|
+
*/
|
|
968
|
+
signature?: string | null;
|
|
963
969
|
/**
|
|
964
970
|
* Set on a comment of a channel post (the post it belongs to); `null` for posts and other messages.
|
|
965
971
|
*/
|
|
@@ -1447,6 +1453,10 @@ export interface Group {
|
|
|
1447
1453
|
| [string, string, string]
|
|
1448
1454
|
| [string, string, string, string]
|
|
1449
1455
|
| [string, string, string, string, string];
|
|
1456
|
+
/**
|
|
1457
|
+
* Channels only - posts carry the author's name (`Message.signature`); off shows posts as the channel. Owner and admins change it.
|
|
1458
|
+
*/
|
|
1459
|
+
sign_posts?: boolean;
|
|
1450
1460
|
/**
|
|
1451
1461
|
* Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+.
|
|
1452
1462
|
*/
|
|
@@ -3665,7 +3665,7 @@
|
|
|
3665
3665
|
"$ref": "#/$defs/MessageType"
|
|
3666
3666
|
},
|
|
3667
3667
|
"sender": {
|
|
3668
|
-
"description": "`null` for system messages.",
|
|
3668
|
+
"description": "`null` for system messages, and for channel posts when the channel does not sign posts (shown as the\nchannel), except for the post's own author. Comments always carry their sender.\n",
|
|
3669
3669
|
"oneOf": [
|
|
3670
3670
|
{
|
|
3671
3671
|
"$ref": "#/$defs/User"
|
|
@@ -3758,6 +3758,13 @@
|
|
|
3758
3758
|
],
|
|
3759
3759
|
"minimum": 0
|
|
3760
3760
|
},
|
|
3761
|
+
"signature": {
|
|
3762
|
+
"description": "Channel posts of a channel that signs posts - the author's display name; `null` otherwise.",
|
|
3763
|
+
"type": [
|
|
3764
|
+
"string",
|
|
3765
|
+
"null"
|
|
3766
|
+
]
|
|
3767
|
+
},
|
|
3761
3768
|
"thread_root_id": {
|
|
3762
3769
|
"description": "Set on a comment of a channel post (the post it belongs to); `null` for posts and other messages.",
|
|
3763
3770
|
"oneOf": [
|
|
@@ -5852,6 +5859,10 @@
|
|
|
5852
5859
|
"maxLength": 24
|
|
5853
5860
|
}
|
|
5854
5861
|
},
|
|
5862
|
+
"sign_posts": {
|
|
5863
|
+
"type": "boolean",
|
|
5864
|
+
"description": "Channels only - posts carry the author's name (`Message.signature`); off shows posts as the channel. Owner and admins change it."
|
|
5865
|
+
},
|
|
5855
5866
|
"sensitive": {
|
|
5856
5867
|
"type": "boolean",
|
|
5857
5868
|
"description": "Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+."
|
|
@@ -6004,6 +6015,10 @@
|
|
|
6004
6015
|
"maxLength": 64
|
|
6005
6016
|
}
|
|
6006
6017
|
},
|
|
6018
|
+
"sign_posts": {
|
|
6019
|
+
"type": "boolean",
|
|
6020
|
+
"description": "Channels only - posts carry the author's name (`Message.signature`); off shows posts as the channel. Owner and admins change it."
|
|
6021
|
+
},
|
|
6007
6022
|
"sensitive": {
|
|
6008
6023
|
"type": "boolean",
|
|
6009
6024
|
"description": "Channels only - 18+ content. Owner only (`403` for admins); apps label the channel 18+."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myronsi/messenger-api",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.62.next.211",
|
|
4
4
|
"description": "API contract of the Messenger backend: OpenAPI document, WebSocket event schemas and generated TypeScript types",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|