@myronsi/messenger-api 2.1.0-alpha.30 → 2.1.0-alpha.31

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.
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.30. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.31. Do not edit. */
2
2
 
3
3
  /**
4
4
  * Any WebSocket event, in either direction.
@@ -196,6 +196,9 @@ export interface ClientReactionAddEvent {
196
196
  chat_id: Id;
197
197
  data: {
198
198
  message_id: Id;
199
+ /**
200
+ * A Unicode emoji, or c:<id> for a custom emoji the user may use (custom ones are only checked when added).
201
+ */
199
202
  emoji: string;
200
203
  };
201
204
  }
@@ -208,6 +211,9 @@ export interface ClientReactionRemoveEvent {
208
211
  chat_id: Id;
209
212
  data: {
210
213
  message_id: Id;
214
+ /**
215
+ * A Unicode emoji, or c:<id> for a custom emoji the user may use (custom ones are only checked when added).
216
+ */
211
217
  emoji: string;
212
218
  };
213
219
  }
@@ -688,6 +694,9 @@ export interface Sticker {
688
694
  image: Attachment;
689
695
  }
690
696
  export interface Reaction {
697
+ /**
698
+ * A Unicode emoji, or `c:<id>` for a custom emoji (`GET /emoji/items/{id}/image`).
699
+ */
691
700
  emoji: string;
692
701
  user_id: Id;
693
702
  }
@@ -774,14 +774,16 @@
774
774
  "display_name": {
775
775
  "type": "string",
776
776
  "minLength": 1,
777
- "maxLength": 64
777
+ "maxLength": 400,
778
+ "description": "At most 64 characters, counting each custom emoji token (`<:shortcode:id>`) as its `:shortcode:` text.\nTokens the user may not use become `:shortcode:`.\n"
778
779
  },
779
780
  "bio": {
780
781
  "type": [
781
782
  "string",
782
783
  "null"
783
784
  ],
784
- "maxLength": 500
785
+ "maxLength": 4000,
786
+ "description": "At most 500 characters, counting custom emoji tokens as their `:shortcode:` text."
785
787
  },
786
788
  "pronouns": {
787
789
  "type": [
@@ -1558,13 +1560,14 @@
1558
1560
  },
1559
1561
  "UploadPurpose": {
1560
1562
  "type": "string",
1561
- "description": "`sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent\nborder and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is\nadded to a pack.\n\n`profile_music`: an audio file of at most 20 MB. The server keeps at most 30 s of it (from `start_ms` to\n`end_ms`, or the first 30 s), stored as AAC, reads the title and artist into `tags` and the embedded cover\ninto `thumbnail_url`. Use it with `PUT /me/music`.\n\n`profile_background`: an image (10 MB), an animated GIF (15 MB) or a video of at most 15 s (15 MB). Use it\nwith `PUT /me/background` or `PUT /groups/{chat_id}/background`.\n",
1563
+ "description": "`sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent\nborder and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is\nadded to a pack.\n\n`profile_music`: an audio file of at most 20 MB. The server keeps at most 30 s of it (from `start_ms` to\n`end_ms`, or the first 30 s), stored as AAC, reads the title and artist into `tags` and the embedded cover\ninto `thumbnail_url`. Use it with `PUT /me/music`.\n\n`profile_background`: an image (10 MB), an animated GIF (15 MB) or a video of at most 15 s (15 MB). Use it\nwith `PUT /me/background` or `PUT /groups/{chat_id}/background`.\n\n`emoji`: a PNG, JPEG, still WebP or GIF of at most 8 MB. The server scales it into 128 x 128 px (a GIF frame\nby frame) and refuses it with `413` when the result is still over 256 KB. Use it with\n`POST /emoji/packs/{pack_id}/emoji`.\n",
1562
1564
  "enum": [
1563
1565
  "message",
1564
1566
  "avatar",
1565
1567
  "sticker",
1566
1568
  "profile_music",
1567
- "profile_background"
1569
+ "profile_background",
1570
+ "emoji"
1568
1571
  ]
1569
1572
  },
1570
1573
  "UploadAttachmentRequest": {
@@ -2111,6 +2114,171 @@
2111
2114
  }
2112
2115
  }
2113
2116
  },
2117
+ "CustomEmoji": {
2118
+ "type": "object",
2119
+ "description": "A custom emoji. In text it is written as the token `<:shortcode:id>` (`<a:shortcode:id>` when animated) and\ndrawn with `GET /emoji/items/{id}/image`; in reactions as `c:<id>`.\n",
2120
+ "required": [
2121
+ "id",
2122
+ "pack_id",
2123
+ "shortcode",
2124
+ "is_animated",
2125
+ "url"
2126
+ ],
2127
+ "properties": {
2128
+ "id": {
2129
+ "$ref": "#/$defs/Id"
2130
+ },
2131
+ "pack_id": {
2132
+ "$ref": "#/$defs/Id"
2133
+ },
2134
+ "shortcode": {
2135
+ "$ref": "#/$defs/EmojiShortcode"
2136
+ },
2137
+ "is_animated": {
2138
+ "type": "boolean"
2139
+ },
2140
+ "url": {
2141
+ "type": "string",
2142
+ "description": "Same-origin path of the image (`/api/v2/emoji/items/{id}/image`)."
2143
+ },
2144
+ "pack_slug": {
2145
+ "allOf": [
2146
+ {
2147
+ "$ref": "#/$defs/StickerPackSlug"
2148
+ }
2149
+ ],
2150
+ "description": "The share link of the emoji's pack; missing for group emoji."
2151
+ }
2152
+ }
2153
+ },
2154
+ "EmojiShortcode": {
2155
+ "type": "string",
2156
+ "pattern": "^[a-z0-9_]{2,32}$"
2157
+ },
2158
+ "EmojiPack": {
2159
+ "type": "object",
2160
+ "required": [
2161
+ "id",
2162
+ "title",
2163
+ "version",
2164
+ "is_mine",
2165
+ "is_installed",
2166
+ "is_hidden",
2167
+ "can_edit",
2168
+ "emoji"
2169
+ ],
2170
+ "properties": {
2171
+ "id": {
2172
+ "$ref": "#/$defs/Id"
2173
+ },
2174
+ "title": {
2175
+ "type": "string",
2176
+ "minLength": 1,
2177
+ "maxLength": 64
2178
+ },
2179
+ "version": {
2180
+ "type": "integer",
2181
+ "minimum": 0,
2182
+ "description": "Grows whenever the title or the emoji of the pack change."
2183
+ },
2184
+ "slug": {
2185
+ "allOf": [
2186
+ {
2187
+ "$ref": "#/$defs/StickerPackSlug"
2188
+ }
2189
+ ],
2190
+ "description": "The share link; missing for group emoji."
2191
+ },
2192
+ "chat_id": {
2193
+ "allOf": [
2194
+ {
2195
+ "$ref": "#/$defs/Id"
2196
+ }
2197
+ ],
2198
+ "description": "Set for the group emoji of that group."
2199
+ },
2200
+ "owner_id": {
2201
+ "$ref": "#/$defs/Id"
2202
+ },
2203
+ "is_mine": {
2204
+ "type": "boolean"
2205
+ },
2206
+ "is_installed": {
2207
+ "type": "boolean"
2208
+ },
2209
+ "is_hidden": {
2210
+ "type": "boolean",
2211
+ "description": "Hidden after reports; only the owner sees and uses it."
2212
+ },
2213
+ "can_edit": {
2214
+ "type": "boolean",
2215
+ "description": "The user may add, rename and remove emoji (owner of the pack, or owner or admin of the group)."
2216
+ },
2217
+ "emoji": {
2218
+ "type": "array",
2219
+ "maxItems": 200,
2220
+ "items": {
2221
+ "$ref": "#/$defs/CustomEmoji"
2222
+ }
2223
+ }
2224
+ }
2225
+ },
2226
+ "EmojiPackList": {
2227
+ "type": "object",
2228
+ "required": [
2229
+ "items"
2230
+ ],
2231
+ "properties": {
2232
+ "items": {
2233
+ "type": "array",
2234
+ "items": {
2235
+ "$ref": "#/$defs/EmojiPack"
2236
+ }
2237
+ }
2238
+ }
2239
+ },
2240
+ "EmojiPackTitleRequest": {
2241
+ "type": "object",
2242
+ "additionalProperties": false,
2243
+ "required": [
2244
+ "title"
2245
+ ],
2246
+ "properties": {
2247
+ "title": {
2248
+ "type": "string",
2249
+ "minLength": 1,
2250
+ "maxLength": 64
2251
+ }
2252
+ }
2253
+ },
2254
+ "AddCustomEmojiRequest": {
2255
+ "type": "object",
2256
+ "additionalProperties": false,
2257
+ "required": [
2258
+ "attachment_id",
2259
+ "shortcode"
2260
+ ],
2261
+ "properties": {
2262
+ "attachment_id": {
2263
+ "$ref": "#/$defs/AttachmentRef"
2264
+ },
2265
+ "shortcode": {
2266
+ "$ref": "#/$defs/EmojiShortcode"
2267
+ }
2268
+ }
2269
+ },
2270
+ "UpdateCustomEmojiRequest": {
2271
+ "type": "object",
2272
+ "additionalProperties": false,
2273
+ "required": [
2274
+ "shortcode"
2275
+ ],
2276
+ "properties": {
2277
+ "shortcode": {
2278
+ "$ref": "#/$defs/EmojiShortcode"
2279
+ }
2280
+ }
2281
+ },
2114
2282
  "StickerPackReportReason": {
2115
2283
  "type": "string",
2116
2284
  "enum": [
@@ -2159,7 +2327,8 @@
2159
2327
  "emoji": {
2160
2328
  "type": "string",
2161
2329
  "minLength": 1,
2162
- "maxLength": 32
2330
+ "maxLength": 32,
2331
+ "description": "A Unicode emoji, or `c:<id>` for a custom emoji (`GET /emoji/items/{id}/image`)."
2163
2332
  },
2164
2333
  "user_id": {
2165
2334
  "$ref": "#/$defs/Id"
@@ -4664,7 +4833,8 @@
4664
4833
  "emoji": {
4665
4834
  "type": "string",
4666
4835
  "minLength": 1,
4667
- "maxLength": 32
4836
+ "maxLength": 32,
4837
+ "description": "A Unicode emoji, or c:<id> for a custom emoji the user may use (custom ones are only checked when added)."
4668
4838
  }
4669
4839
  },
4670
4840
  "required": [
@@ -4705,7 +4875,8 @@
4705
4875
  "emoji": {
4706
4876
  "type": "string",
4707
4877
  "minLength": 1,
4708
- "maxLength": 32
4878
+ "maxLength": 32,
4879
+ "description": "A Unicode emoji, or c:<id> for a custom emoji the user may use (custom ones are only checked when added)."
4709
4880
  }
4710
4881
  },
4711
4882
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myronsi/messenger-api",
3
- "version": "2.1.0-alpha.30",
3
+ "version": "2.1.0-alpha.31",
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": {