@myronsi/messenger-api 2.1.0-alpha.30.next.115 → 2.1.0-alpha.31.next.117
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 +11 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +414 -5
- package/dist/schema.d.ts +834 -2
- package/dist/ws-events.d.ts +10 -1
- package/dist/ws-events.schema.json +178 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.31
|
|
6
|
+
|
|
7
|
+
- Custom emoji: `CustomEmoji`, `EmojiPack` and the `emoji` tag with `GET`/`POST /emoji/packs`, `GET`/`PATCH`/`DELETE
|
|
8
|
+
/emoji/packs/{pack_id}`, `PUT`/`DELETE /emoji/packs/{pack_id}/installation`, `POST /emoji/packs/{pack_id}/emoji`,
|
|
9
|
+
`PATCH`/`DELETE /emoji/packs/{pack_id}/emoji/{emoji_id}`, `POST /emoji/packs/{pack_id}/report`, `GET /emoji/links/{slug}`,
|
|
10
|
+
`GET /emoji/items/{emoji_id}`, `GET /emoji/items/{emoji_id}/image` and `GET /groups/{chat_id}/emoji` (one set per group, edited by the
|
|
11
|
+
owner and admins).
|
|
12
|
+
- Message text, captions, display names and bios may hold the tokens `<:shortcode:id>` and `<a:shortcode:id>`; the
|
|
13
|
+
server turns tokens the sender may not use into `:shortcode:`. `Reaction.emoji` may be `c:<id>`.
|
|
14
|
+
- `UploadPurpose` gains `emoji`. `UpdateMeRequest.display_name` allows up to 400 characters and `bio` up to 4000 (the
|
|
15
|
+
visible text keeps its limits of 64 and 500, counting each token as its `:shortcode:`).
|
|
5
16
|
## 2.1.0-alpha.30
|
|
6
17
|
|
|
7
18
|
- Connected accounts (`Connection`, `ConnectionList`, `ConnectionProvider`): `GET /me/connections`,
|
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.31. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.1.0-alpha.31";
|
|
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.31";
|
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.31
|
|
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
|
|
@@ -56,6 +56,8 @@ tags:
|
|
|
56
56
|
description: File and voice uploads
|
|
57
57
|
- name: stickers
|
|
58
58
|
description: Sticker packs, the sticker panel and recently sent stickers
|
|
59
|
+
- name: emoji
|
|
60
|
+
description: Custom emoji packs and group emoji
|
|
59
61
|
- name: requests
|
|
60
62
|
description: Approval requests (direct messages and group invites)
|
|
61
63
|
- name: websocket
|
|
@@ -2607,6 +2609,311 @@ paths:
|
|
|
2607
2609
|
schema: { $ref: "#/components/schemas/StickerPack" }
|
|
2608
2610
|
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2609
2611
|
"404": { $ref: "#/components/responses/NotFound" }
|
|
2612
|
+
/emoji/packs:
|
|
2613
|
+
parameters:
|
|
2614
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2615
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2616
|
+
get:
|
|
2617
|
+
tags: [emoji]
|
|
2618
|
+
operationId: listEmojiPacks
|
|
2619
|
+
summary: The custom emoji the user can use
|
|
2620
|
+
description: |
|
|
2621
|
+
The user's own packs, the packs they added, and the group emoji of every group they are in (`chat_id`
|
|
2622
|
+
set). Each pack lists its emoji in order. At most 100 packs.
|
|
2623
|
+
responses:
|
|
2624
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2625
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2626
|
+
"200":
|
|
2627
|
+
description: The packs
|
|
2628
|
+
content:
|
|
2629
|
+
application/json:
|
|
2630
|
+
schema: { $ref: "#/components/schemas/EmojiPackList" }
|
|
2631
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2632
|
+
post:
|
|
2633
|
+
tags: [emoji]
|
|
2634
|
+
operationId: createEmojiPack
|
|
2635
|
+
summary: Create an emoji pack
|
|
2636
|
+
description: A new, empty pack owned by the user. Its `slug` is the share link (`/emoji/links/{slug}`).
|
|
2637
|
+
requestBody:
|
|
2638
|
+
required: true
|
|
2639
|
+
content:
|
|
2640
|
+
application/json:
|
|
2641
|
+
schema: { $ref: "#/components/schemas/EmojiPackTitleRequest" }
|
|
2642
|
+
responses:
|
|
2643
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2644
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2645
|
+
"201":
|
|
2646
|
+
description: The new pack
|
|
2647
|
+
content:
|
|
2648
|
+
application/json:
|
|
2649
|
+
schema: { $ref: "#/components/schemas/EmojiPack" }
|
|
2650
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2651
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
2652
|
+
/emoji/packs/{pack_id}:
|
|
2653
|
+
parameters:
|
|
2654
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2655
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2656
|
+
- $ref: "#/components/parameters/EmojiPackId"
|
|
2657
|
+
get:
|
|
2658
|
+
tags: [emoji]
|
|
2659
|
+
operationId: getEmojiPack
|
|
2660
|
+
summary: An emoji pack
|
|
2661
|
+
description: |
|
|
2662
|
+
The user's own pack, a pack they added, or the group emoji of a group they are in (`404` otherwise, so
|
|
2663
|
+
packs cannot be found by guessing IDs). Open other packs with `GET /emoji/links/{slug}`.
|
|
2664
|
+
responses:
|
|
2665
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2666
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2667
|
+
"200":
|
|
2668
|
+
description: The pack
|
|
2669
|
+
content:
|
|
2670
|
+
application/json:
|
|
2671
|
+
schema: { $ref: "#/components/schemas/EmojiPack" }
|
|
2672
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2673
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2674
|
+
patch:
|
|
2675
|
+
tags: [emoji]
|
|
2676
|
+
operationId: updateEmojiPack
|
|
2677
|
+
summary: Rename an emoji pack
|
|
2678
|
+
description: Only the owner (`403` otherwise). Group emoji take the group's name and cannot be renamed.
|
|
2679
|
+
requestBody:
|
|
2680
|
+
required: true
|
|
2681
|
+
content:
|
|
2682
|
+
application/json:
|
|
2683
|
+
schema: { $ref: "#/components/schemas/EmojiPackTitleRequest" }
|
|
2684
|
+
responses:
|
|
2685
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2686
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2687
|
+
"200":
|
|
2688
|
+
description: The pack
|
|
2689
|
+
content:
|
|
2690
|
+
application/json:
|
|
2691
|
+
schema: { $ref: "#/components/schemas/EmojiPack" }
|
|
2692
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2693
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2694
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2695
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
2696
|
+
delete:
|
|
2697
|
+
tags: [emoji]
|
|
2698
|
+
operationId: deleteEmojiPack
|
|
2699
|
+
summary: Delete an emoji pack
|
|
2700
|
+
description: Only the owner. Emoji already sent from it turn into their `:shortcode:` text in clients.
|
|
2701
|
+
responses:
|
|
2702
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2703
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2704
|
+
"204":
|
|
2705
|
+
description: Deleted
|
|
2706
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2707
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2708
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2709
|
+
/emoji/packs/{pack_id}/installation:
|
|
2710
|
+
parameters:
|
|
2711
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2712
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2713
|
+
- $ref: "#/components/parameters/EmojiPackId"
|
|
2714
|
+
put:
|
|
2715
|
+
tags: [emoji]
|
|
2716
|
+
operationId: addEmojiPack
|
|
2717
|
+
summary: Add an emoji pack
|
|
2718
|
+
description: Lets the user use the pack's emoji. A pack of another user is found by its link first.
|
|
2719
|
+
responses:
|
|
2720
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2721
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2722
|
+
"204":
|
|
2723
|
+
description: Added
|
|
2724
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2725
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2726
|
+
delete:
|
|
2727
|
+
tags: [emoji]
|
|
2728
|
+
operationId: removeEmojiPack
|
|
2729
|
+
summary: Remove an added emoji pack
|
|
2730
|
+
responses:
|
|
2731
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2732
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2733
|
+
"204":
|
|
2734
|
+
description: Removed
|
|
2735
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2736
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2737
|
+
/emoji/packs/{pack_id}/emoji:
|
|
2738
|
+
parameters:
|
|
2739
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2740
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2741
|
+
- $ref: "#/components/parameters/EmojiPackId"
|
|
2742
|
+
post:
|
|
2743
|
+
tags: [emoji]
|
|
2744
|
+
operationId: addCustomEmoji
|
|
2745
|
+
summary: Add an emoji to a pack
|
|
2746
|
+
description: |
|
|
2747
|
+
The owner of a pack, or the owner and admins of a group for its group emoji. Upload the image with
|
|
2748
|
+
`POST /attachments` (`purpose: emoji`) first. At most 200 emoji per pack and 50 per group (`409`), and a
|
|
2749
|
+
shortcode once per pack (`409`).
|
|
2750
|
+
requestBody:
|
|
2751
|
+
required: true
|
|
2752
|
+
content:
|
|
2753
|
+
application/json:
|
|
2754
|
+
schema: { $ref: "#/components/schemas/AddCustomEmojiRequest" }
|
|
2755
|
+
responses:
|
|
2756
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2757
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2758
|
+
"201":
|
|
2759
|
+
description: The emoji
|
|
2760
|
+
content:
|
|
2761
|
+
application/json:
|
|
2762
|
+
schema: { $ref: "#/components/schemas/CustomEmoji" }
|
|
2763
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2764
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2765
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2766
|
+
"409": { $ref: "#/components/responses/Conflict" }
|
|
2767
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
2768
|
+
/emoji/packs/{pack_id}/emoji/{emoji_id}:
|
|
2769
|
+
parameters:
|
|
2770
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2771
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2772
|
+
- $ref: "#/components/parameters/EmojiPackId"
|
|
2773
|
+
- $ref: "#/components/parameters/EmojiId"
|
|
2774
|
+
patch:
|
|
2775
|
+
tags: [emoji]
|
|
2776
|
+
operationId: updateCustomEmoji
|
|
2777
|
+
summary: Change an emoji's shortcode
|
|
2778
|
+
requestBody:
|
|
2779
|
+
required: true
|
|
2780
|
+
content:
|
|
2781
|
+
application/json:
|
|
2782
|
+
schema: { $ref: "#/components/schemas/UpdateCustomEmojiRequest" }
|
|
2783
|
+
responses:
|
|
2784
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2785
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2786
|
+
"200":
|
|
2787
|
+
description: The emoji
|
|
2788
|
+
content:
|
|
2789
|
+
application/json:
|
|
2790
|
+
schema: { $ref: "#/components/schemas/CustomEmoji" }
|
|
2791
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2792
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2793
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2794
|
+
"409": { $ref: "#/components/responses/Conflict" }
|
|
2795
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
2796
|
+
delete:
|
|
2797
|
+
tags: [emoji]
|
|
2798
|
+
operationId: deleteCustomEmoji
|
|
2799
|
+
summary: Remove an emoji from a pack
|
|
2800
|
+
responses:
|
|
2801
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2802
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2803
|
+
"204":
|
|
2804
|
+
description: Removed
|
|
2805
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2806
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2807
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2808
|
+
/emoji/packs/{pack_id}/report:
|
|
2809
|
+
parameters:
|
|
2810
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2811
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2812
|
+
- $ref: "#/components/parameters/EmojiPackId"
|
|
2813
|
+
post:
|
|
2814
|
+
tags: [emoji]
|
|
2815
|
+
operationId: reportEmojiPack
|
|
2816
|
+
summary: Report an emoji pack
|
|
2817
|
+
description: Packs with enough reports are hidden. At most 20 reports per user and day (`429`).
|
|
2818
|
+
requestBody:
|
|
2819
|
+
required: true
|
|
2820
|
+
content:
|
|
2821
|
+
application/json:
|
|
2822
|
+
schema: { $ref: "#/components/schemas/ReportStickerPackRequest" }
|
|
2823
|
+
responses:
|
|
2824
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2825
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2826
|
+
"204":
|
|
2827
|
+
description: Reported
|
|
2828
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2829
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2830
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2831
|
+
"429": { $ref: "#/components/responses/TooManyRequests" }
|
|
2832
|
+
/emoji/links/{slug}:
|
|
2833
|
+
parameters:
|
|
2834
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2835
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2836
|
+
- $ref: "#/components/parameters/StickerPackSlug"
|
|
2837
|
+
get:
|
|
2838
|
+
tags: [emoji]
|
|
2839
|
+
operationId: getEmojiPackByLink
|
|
2840
|
+
summary: An emoji pack by its share link
|
|
2841
|
+
responses:
|
|
2842
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2843
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2844
|
+
"200":
|
|
2845
|
+
description: The pack
|
|
2846
|
+
content:
|
|
2847
|
+
application/json:
|
|
2848
|
+
schema: { $ref: "#/components/schemas/EmojiPack" }
|
|
2849
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2850
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2851
|
+
/emoji/items/{emoji_id}:
|
|
2852
|
+
parameters:
|
|
2853
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2854
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2855
|
+
- $ref: "#/components/parameters/EmojiId"
|
|
2856
|
+
get:
|
|
2857
|
+
tags: [emoji]
|
|
2858
|
+
operationId: getCustomEmoji
|
|
2859
|
+
summary: One custom emoji
|
|
2860
|
+
description: "Any signed-in user. For tooltips of `c:<id>` reactions and to open the pack (`pack_slug`)."
|
|
2861
|
+
responses:
|
|
2862
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2863
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2864
|
+
"200":
|
|
2865
|
+
description: The emoji
|
|
2866
|
+
content:
|
|
2867
|
+
application/json:
|
|
2868
|
+
schema: { $ref: "#/components/schemas/CustomEmoji" }
|
|
2869
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2870
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2871
|
+
/emoji/items/{emoji_id}/image:
|
|
2872
|
+
parameters:
|
|
2873
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2874
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2875
|
+
- $ref: "#/components/parameters/EmojiId"
|
|
2876
|
+
get:
|
|
2877
|
+
tags: [emoji]
|
|
2878
|
+
operationId: getCustomEmojiImage
|
|
2879
|
+
summary: The image of a custom emoji
|
|
2880
|
+
description: |
|
|
2881
|
+
Any signed-in user; a PNG of 128 x 128 px or a GIF. Cached as immutable. `404` once the emoji or its pack
|
|
2882
|
+
is deleted: clients then show the token's `:shortcode:` text.
|
|
2883
|
+
responses:
|
|
2884
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2885
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2886
|
+
"200":
|
|
2887
|
+
description: Image
|
|
2888
|
+
content:
|
|
2889
|
+
image/*:
|
|
2890
|
+
schema: { type: string, format: binary }
|
|
2891
|
+
"302":
|
|
2892
|
+
description: Redirect to a short-lived signed URL in object storage
|
|
2893
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2894
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2895
|
+
/groups/{chat_id}/emoji:
|
|
2896
|
+
parameters:
|
|
2897
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2898
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2899
|
+
- $ref: "#/components/parameters/ChatId"
|
|
2900
|
+
get:
|
|
2901
|
+
tags: [emoji]
|
|
2902
|
+
operationId: getGroupEmoji
|
|
2903
|
+
summary: The group's emoji
|
|
2904
|
+
description: |
|
|
2905
|
+
Members only. Created empty on first use; owner and admins add and remove emoji through
|
|
2906
|
+
`/emoji/packs/{pack_id}/emoji` (`can_edit`). Members can use them in any chat while they are members.
|
|
2907
|
+
responses:
|
|
2908
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2909
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2910
|
+
"200":
|
|
2911
|
+
description: The group's pack
|
|
2912
|
+
content:
|
|
2913
|
+
application/json:
|
|
2914
|
+
schema: { $ref: "#/components/schemas/EmojiPack" }
|
|
2915
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2916
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2610
2917
|
/stickers/recent:
|
|
2611
2918
|
parameters:
|
|
2612
2919
|
- $ref: "#/components/parameters/ClientVersion"
|
|
@@ -4654,6 +4961,16 @@ components:
|
|
|
4654
4961
|
in: path
|
|
4655
4962
|
required: true
|
|
4656
4963
|
schema: { $ref: "#/components/schemas/Id" }
|
|
4964
|
+
EmojiPackId:
|
|
4965
|
+
name: pack_id
|
|
4966
|
+
in: path
|
|
4967
|
+
required: true
|
|
4968
|
+
schema: { $ref: "#/components/schemas/Id" }
|
|
4969
|
+
EmojiId:
|
|
4970
|
+
name: emoji_id
|
|
4971
|
+
in: path
|
|
4972
|
+
required: true
|
|
4973
|
+
schema: { $ref: "#/components/schemas/Id" }
|
|
4657
4974
|
StickerPackSlug:
|
|
4658
4975
|
name: slug
|
|
4659
4976
|
in: path
|
|
@@ -5160,8 +5477,17 @@ components:
|
|
|
5160
5477
|
type: object
|
|
5161
5478
|
minProperties: 1
|
|
5162
5479
|
properties:
|
|
5163
|
-
display_name:
|
|
5164
|
-
|
|
5480
|
+
display_name:
|
|
5481
|
+
type: string
|
|
5482
|
+
minLength: 1
|
|
5483
|
+
maxLength: 400
|
|
5484
|
+
description: |
|
|
5485
|
+
At most 64 characters, counting each custom emoji token (`<:shortcode:id>`) as its `:shortcode:` text.
|
|
5486
|
+
Tokens the user may not use become `:shortcode:`.
|
|
5487
|
+
bio:
|
|
5488
|
+
type: [string, "null"]
|
|
5489
|
+
maxLength: 4000
|
|
5490
|
+
description: At most 500 characters, counting custom emoji tokens as their `:shortcode:` text.
|
|
5165
5491
|
pronouns:
|
|
5166
5492
|
type: [string, "null"]
|
|
5167
5493
|
maxLength: 40
|
|
@@ -5521,7 +5847,11 @@ components:
|
|
|
5521
5847
|
|
|
5522
5848
|
`profile_background`: an image (10 MB), an animated GIF (15 MB) or a video of at most 15 s (15 MB). Use it
|
|
5523
5849
|
with `PUT /me/background` or `PUT /groups/{chat_id}/background`.
|
|
5524
|
-
|
|
5850
|
+
|
|
5851
|
+
`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
|
|
5852
|
+
by frame) and refuses it with `413` when the result is still over 256 KB. Use it with
|
|
5853
|
+
`POST /emoji/packs/{pack_id}/emoji`.
|
|
5854
|
+
enum: [message, avatar, sticker, profile_music, profile_background, emoji]
|
|
5525
5855
|
UploadAttachmentRequest:
|
|
5526
5856
|
type: object
|
|
5527
5857
|
required: [file, purpose]
|
|
@@ -5774,6 +6104,81 @@ components:
|
|
|
5774
6104
|
type: array
|
|
5775
6105
|
maxItems: 120
|
|
5776
6106
|
items: { $ref: "#/components/schemas/Id" }
|
|
6107
|
+
CustomEmoji:
|
|
6108
|
+
type: object
|
|
6109
|
+
description: |
|
|
6110
|
+
A custom emoji. In text it is written as the token `<:shortcode:id>` (`<a:shortcode:id>` when animated) and
|
|
6111
|
+
drawn with `GET /emoji/items/{id}/image`; in reactions as `c:<id>`.
|
|
6112
|
+
required: [id, pack_id, shortcode, is_animated, url]
|
|
6113
|
+
properties:
|
|
6114
|
+
id: { $ref: "#/components/schemas/Id" }
|
|
6115
|
+
pack_id: { $ref: "#/components/schemas/Id" }
|
|
6116
|
+
shortcode: { $ref: "#/components/schemas/EmojiShortcode" }
|
|
6117
|
+
is_animated: { type: boolean }
|
|
6118
|
+
url:
|
|
6119
|
+
type: string
|
|
6120
|
+
description: Same-origin path of the image (`/api/v2/emoji/items/{id}/image`).
|
|
6121
|
+
pack_slug:
|
|
6122
|
+
allOf: [{ $ref: "#/components/schemas/StickerPackSlug" }]
|
|
6123
|
+
description: The share link of the emoji's pack; missing for group emoji.
|
|
6124
|
+
EmojiShortcode:
|
|
6125
|
+
type: string
|
|
6126
|
+
pattern: "^[a-z0-9_]{2,32}$"
|
|
6127
|
+
EmojiPack:
|
|
6128
|
+
type: object
|
|
6129
|
+
required: [id, title, version, is_mine, is_installed, is_hidden, can_edit, emoji]
|
|
6130
|
+
properties:
|
|
6131
|
+
id: { $ref: "#/components/schemas/Id" }
|
|
6132
|
+
title: { type: string, minLength: 1, maxLength: 64 }
|
|
6133
|
+
version:
|
|
6134
|
+
type: integer
|
|
6135
|
+
minimum: 0
|
|
6136
|
+
description: Grows whenever the title or the emoji of the pack change.
|
|
6137
|
+
slug:
|
|
6138
|
+
allOf: [{ $ref: "#/components/schemas/StickerPackSlug" }]
|
|
6139
|
+
description: The share link; missing for group emoji.
|
|
6140
|
+
chat_id:
|
|
6141
|
+
allOf: [{ $ref: "#/components/schemas/Id" }]
|
|
6142
|
+
description: Set for the group emoji of that group.
|
|
6143
|
+
owner_id: { $ref: "#/components/schemas/Id" }
|
|
6144
|
+
is_mine: { type: boolean }
|
|
6145
|
+
is_installed: { type: boolean }
|
|
6146
|
+
is_hidden:
|
|
6147
|
+
type: boolean
|
|
6148
|
+
description: Hidden after reports; only the owner sees and uses it.
|
|
6149
|
+
can_edit:
|
|
6150
|
+
type: boolean
|
|
6151
|
+
description: The user may add, rename and remove emoji (owner of the pack, or owner or admin of the group).
|
|
6152
|
+
emoji:
|
|
6153
|
+
type: array
|
|
6154
|
+
maxItems: 200
|
|
6155
|
+
items: { $ref: "#/components/schemas/CustomEmoji" }
|
|
6156
|
+
EmojiPackList:
|
|
6157
|
+
type: object
|
|
6158
|
+
required: [items]
|
|
6159
|
+
properties:
|
|
6160
|
+
items:
|
|
6161
|
+
type: array
|
|
6162
|
+
items: { $ref: "#/components/schemas/EmojiPack" }
|
|
6163
|
+
EmojiPackTitleRequest:
|
|
6164
|
+
type: object
|
|
6165
|
+
additionalProperties: false
|
|
6166
|
+
required: [title]
|
|
6167
|
+
properties:
|
|
6168
|
+
title: { type: string, minLength: 1, maxLength: 64 }
|
|
6169
|
+
AddCustomEmojiRequest:
|
|
6170
|
+
type: object
|
|
6171
|
+
additionalProperties: false
|
|
6172
|
+
required: [attachment_id, shortcode]
|
|
6173
|
+
properties:
|
|
6174
|
+
attachment_id: { $ref: "#/components/schemas/AttachmentRef" }
|
|
6175
|
+
shortcode: { $ref: "#/components/schemas/EmojiShortcode" }
|
|
6176
|
+
UpdateCustomEmojiRequest:
|
|
6177
|
+
type: object
|
|
6178
|
+
additionalProperties: false
|
|
6179
|
+
required: [shortcode]
|
|
6180
|
+
properties:
|
|
6181
|
+
shortcode: { $ref: "#/components/schemas/EmojiShortcode" }
|
|
5777
6182
|
StickerPackReportReason:
|
|
5778
6183
|
type: string
|
|
5779
6184
|
enum: [spam, violence, sexual, hate, copyright, other]
|
|
@@ -5795,7 +6200,11 @@ components:
|
|
|
5795
6200
|
type: object
|
|
5796
6201
|
required: [emoji, user_id]
|
|
5797
6202
|
properties:
|
|
5798
|
-
emoji:
|
|
6203
|
+
emoji:
|
|
6204
|
+
type: string
|
|
6205
|
+
minLength: 1
|
|
6206
|
+
maxLength: 32
|
|
6207
|
+
description: A Unicode emoji, or `c:<id>` for a custom emoji (`GET /emoji/items/{id}/image`).
|
|
5799
6208
|
user_id: { $ref: "#/components/schemas/Id" }
|
|
5800
6209
|
ReadReceipt:
|
|
5801
6210
|
type: object
|