@myronsi/messenger-api 2.1.0-alpha.60.next.209 → 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 +12 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +28 -2
- package/dist/schema.d.ts +21 -2
- package/dist/ws-events.d.ts +20 -2
- package/dist/ws-events.schema.json +36 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
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
|
+
|
|
11
|
+
## 2.1.0-alpha.61
|
|
12
|
+
|
|
13
|
+
- Channel settings `sensitive` (18+) and `recommendable` (on by default) on `Group` and `UpdateGroupRequest`; only the
|
|
14
|
+
owner changes them (`403` for admins). `PublicGroup` gains `sensitive`. Staff can mark a channel sensitive later
|
|
15
|
+
through the internal API.
|
|
16
|
+
|
|
5
17
|
## 2.1.0-alpha.60
|
|
6
18
|
|
|
7
19
|
- Channel category and tags (C11): `ChannelCategory` (16 values); `Group`, `UpdateGroupRequest` and `PublicGroup` gain
|
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,15 @@ 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.
|
|
9994
|
+
sensitive:
|
|
9995
|
+
type: boolean
|
|
9996
|
+
description: Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+.
|
|
9997
|
+
recommendable:
|
|
9998
|
+
type: boolean
|
|
9999
|
+
description: Channels only - whether the channel may be recommended to people who do not follow it. On by default; only the owner changes it.
|
|
9986
10000
|
notify_comments:
|
|
9987
10001
|
type: boolean
|
|
9988
10002
|
description: Channels only - whether the caller gets a push for every new comment on their own posts.
|
|
@@ -10050,6 +10064,15 @@ components:
|
|
|
10050
10064
|
dropped and letters are lowercased, so `#Game Dev` becomes `gamedev`. After cleaning a tag has 1 to 24
|
|
10051
10065
|
letters or digits; duplicates collapse. A tag on the staff blocklist is `422`.
|
|
10052
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.
|
|
10070
|
+
sensitive:
|
|
10071
|
+
type: boolean
|
|
10072
|
+
description: Channels only - 18+ content. Owner only (`403` for admins); apps label the channel 18+.
|
|
10073
|
+
recommendable:
|
|
10074
|
+
type: boolean
|
|
10075
|
+
description: Channels only - whether the channel may be recommended to people who do not follow it. On by default; only the owner changes it.
|
|
10053
10076
|
ChannelCategory:
|
|
10054
10077
|
type: string
|
|
10055
10078
|
description: The fixed list of channel categories. Unknown values must be treated like `other`.
|
|
@@ -10137,6 +10160,9 @@ components:
|
|
|
10137
10160
|
description: Public channels only - up to 5 tags (lowercase letters and digits, at most 24 characters).
|
|
10138
10161
|
items: { type: string, minLength: 1, maxLength: 24 }
|
|
10139
10162
|
group_mode: { $ref: "#/components/schemas/GroupMode" }
|
|
10163
|
+
sensitive:
|
|
10164
|
+
type: boolean
|
|
10165
|
+
description: Channels only - 18+ content; apps show an 18+ label.
|
|
10140
10166
|
public_name:
|
|
10141
10167
|
description: Set for a public group.
|
|
10142
10168
|
oneOf:
|
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,12 @@ 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;
|
|
7232
|
+
/** @description Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+. */
|
|
7233
|
+
sensitive?: boolean;
|
|
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. */
|
|
7235
|
+
recommendable?: boolean;
|
|
7225
7236
|
/** @description Channels only - whether the caller gets a push for every new comment on their own posts. */
|
|
7226
7237
|
notify_comments?: boolean;
|
|
7227
7238
|
/** @description Everyone in the group, the owner included (the subscribers of a channel). */
|
|
@@ -7263,6 +7274,12 @@ export interface components {
|
|
|
7263
7274
|
* letters or digits; duplicates collapse. A tag on the staff blocklist is `422`.
|
|
7264
7275
|
*/
|
|
7265
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;
|
|
7279
|
+
/** @description Channels only - 18+ content. Owner only (`403` for admins); apps label the channel 18+. */
|
|
7280
|
+
sensitive?: boolean;
|
|
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. */
|
|
7282
|
+
recommendable?: boolean;
|
|
7266
7283
|
};
|
|
7267
7284
|
/**
|
|
7268
7285
|
* @description The fixed list of channel categories. Unknown values must be treated like `other`.
|
|
@@ -7328,6 +7345,8 @@ export interface components {
|
|
|
7328
7345
|
/** @description Public channels only - up to 5 tags (lowercase letters and digits, at most 24 characters). */
|
|
7329
7346
|
tags?: string[];
|
|
7330
7347
|
group_mode: components["schemas"]["GroupMode"];
|
|
7348
|
+
/** @description Channels only - 18+ content; apps show an 18+ label. */
|
|
7349
|
+
sensitive?: boolean;
|
|
7331
7350
|
/** @description Set for a public group. */
|
|
7332
7351
|
public_name: components["schemas"]["PublicName"] | null;
|
|
7333
7352
|
description: string | null;
|
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,18 @@ 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;
|
|
1460
|
+
/**
|
|
1461
|
+
* Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+.
|
|
1462
|
+
*/
|
|
1463
|
+
sensitive?: boolean;
|
|
1464
|
+
/**
|
|
1465
|
+
* Channels only - whether the channel may be recommended to people who do not follow it. On by default; only the owner changes it.
|
|
1466
|
+
*/
|
|
1467
|
+
recommendable?: boolean;
|
|
1450
1468
|
/**
|
|
1451
1469
|
* Channels only - whether the caller gets a push for every new comment on their own posts.
|
|
1452
1470
|
*/
|
|
@@ -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,18 @@
|
|
|
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
|
+
},
|
|
5866
|
+
"sensitive": {
|
|
5867
|
+
"type": "boolean",
|
|
5868
|
+
"description": "Channels only - 18+ content. Set by the owner (staff can set it too); apps label the channel 18+."
|
|
5869
|
+
},
|
|
5870
|
+
"recommendable": {
|
|
5871
|
+
"type": "boolean",
|
|
5872
|
+
"description": "Channels only - whether the channel may be recommended to people who do not follow it. On by default; only the owner changes it."
|
|
5873
|
+
},
|
|
5855
5874
|
"notify_comments": {
|
|
5856
5875
|
"type": "boolean",
|
|
5857
5876
|
"description": "Channels only - whether the caller gets a push for every new comment on their own posts."
|
|
@@ -5995,6 +6014,18 @@
|
|
|
5995
6014
|
"minLength": 1,
|
|
5996
6015
|
"maxLength": 64
|
|
5997
6016
|
}
|
|
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
|
+
},
|
|
6022
|
+
"sensitive": {
|
|
6023
|
+
"type": "boolean",
|
|
6024
|
+
"description": "Channels only - 18+ content. Owner only (`403` for admins); apps label the channel 18+."
|
|
6025
|
+
},
|
|
6026
|
+
"recommendable": {
|
|
6027
|
+
"type": "boolean",
|
|
6028
|
+
"description": "Channels only - whether the channel may be recommended to people who do not follow it. On by default; only the owner changes it."
|
|
5998
6029
|
}
|
|
5999
6030
|
}
|
|
6000
6031
|
},
|
|
@@ -6187,6 +6218,10 @@
|
|
|
6187
6218
|
"group_mode": {
|
|
6188
6219
|
"$ref": "#/$defs/GroupMode"
|
|
6189
6220
|
},
|
|
6221
|
+
"sensitive": {
|
|
6222
|
+
"type": "boolean",
|
|
6223
|
+
"description": "Channels only - 18+ content; apps show an 18+ label."
|
|
6224
|
+
},
|
|
6190
6225
|
"public_name": {
|
|
6191
6226
|
"description": "Set for a public group.",
|
|
6192
6227
|
"oneOf": [
|
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": {
|