@myronsi/messenger-api 2.1.0-alpha.20.next.97 → 2.1.0-alpha.21.next.98
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 +17 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +303 -7
- package/dist/schema.d.ts +531 -12
- package/dist/ws-events.d.ts +9 -1
- package/dist/ws-events.schema.json +136 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
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.21
|
|
6
|
+
|
|
7
|
+
- User sticker packs: `POST /attachments` takes `purpose: sticker` (PNG, JPEG or still WebP up to 5 MB, stored as a
|
|
8
|
+
512 x 512 WebP of at most 512 KB). `POST /stickers/packs` creates a pack; `PATCH` and `DELETE
|
|
9
|
+
/stickers/packs/{pack_id}` rename and delete it; `POST /stickers/packs/{pack_id}/stickers`, `PATCH` and `DELETE
|
|
10
|
+
/stickers/packs/{pack_id}/stickers/{sticker_id}` and `PUT /stickers/packs/{pack_id}/order` manage its stickers.
|
|
11
|
+
Only the owner may change a pack (`403`). Limits: 50 packs per user and 120 stickers per pack
|
|
12
|
+
(`409 limit_reached`).
|
|
13
|
+
- `GET /stickers/packs?owned=true` lists the packs the user made. `GET /stickers/links/{slug}` opens a pack by its
|
|
14
|
+
share link. A user pack is reachable by its ID (`GET`, add, report, sending its stickers) only for its owner and
|
|
15
|
+
for users who opened its link; `Sticker.pack_slug` carries the link, so receivers of a sticker can open its pack.
|
|
16
|
+
- `StickerPack` gains the required `is_mine` and `is_hidden` and the optional `owner_id` and `slug`.
|
|
17
|
+
- `POST /stickers/packs/{pack_id}/report` reports a pack; after 5 reports it is hidden for everybody but its owner
|
|
18
|
+
and stickers cannot be sent from it.
|
|
19
|
+
- `ErrorCode` gains `limit_reached`.
|
|
20
|
+
- A sticker upload not yet in a pack can be loaded only by its uploader.
|
|
21
|
+
|
|
5
22
|
## 2.1.0-alpha.20
|
|
6
23
|
|
|
7
24
|
- Stickers: `MessageType` and `SendMessageRequest.type` gain `sticker`. A sticker message is sent with `sticker_id`
|
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.21. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.1.0-alpha.21";
|
|
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.21";
|
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.21
|
|
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
|
|
@@ -1814,7 +1814,13 @@ paths:
|
|
|
1814
1814
|
summary: The user's sticker packs
|
|
1815
1815
|
description: |
|
|
1816
1816
|
The packs of the sticker panel: packs the user added, most recently added first, then the built-in default
|
|
1817
|
-
packs the user has not removed. Each pack lists its stickers in order. At most 200 packs.
|
|
1817
|
+
packs the user has not removed. Each pack lists its stickers in order. At most 200 packs. With
|
|
1818
|
+
`owned=true`, the packs the user made instead, newest first, whether in the panel or not.
|
|
1819
|
+
parameters:
|
|
1820
|
+
- name: owned
|
|
1821
|
+
in: query
|
|
1822
|
+
required: false
|
|
1823
|
+
schema: { type: boolean, default: false }
|
|
1818
1824
|
responses:
|
|
1819
1825
|
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1820
1826
|
"400": { $ref: "#/components/responses/BadRequest" }
|
|
@@ -1824,6 +1830,29 @@ paths:
|
|
|
1824
1830
|
application/json:
|
|
1825
1831
|
schema: { $ref: "#/components/schemas/StickerPackList" }
|
|
1826
1832
|
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1833
|
+
post:
|
|
1834
|
+
tags: [stickers]
|
|
1835
|
+
operationId: createStickerPack
|
|
1836
|
+
summary: Create a sticker pack
|
|
1837
|
+
description: |
|
|
1838
|
+
A new, empty pack owned by the user, added to the top of their panel. Its `slug` is the share link
|
|
1839
|
+
(`/stickers/links/{slug}`). At most 50 packs per user (`409 limit_reached`).
|
|
1840
|
+
requestBody:
|
|
1841
|
+
required: true
|
|
1842
|
+
content:
|
|
1843
|
+
application/json:
|
|
1844
|
+
schema: { $ref: "#/components/schemas/CreateStickerPackRequest" }
|
|
1845
|
+
responses:
|
|
1846
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1847
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
1848
|
+
"201":
|
|
1849
|
+
description: The new pack
|
|
1850
|
+
content:
|
|
1851
|
+
application/json:
|
|
1852
|
+
schema: { $ref: "#/components/schemas/StickerPack" }
|
|
1853
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1854
|
+
"409": { $ref: "#/components/responses/Conflict" }
|
|
1855
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
1827
1856
|
/stickers/packs/{pack_id}:
|
|
1828
1857
|
parameters:
|
|
1829
1858
|
- $ref: "#/components/parameters/ClientVersion"
|
|
@@ -1834,8 +1863,10 @@ paths:
|
|
|
1834
1863
|
operationId: getStickerPack
|
|
1835
1864
|
summary: A sticker pack
|
|
1836
1865
|
description: |
|
|
1837
|
-
|
|
1838
|
-
|
|
1866
|
+
A built-in pack, the user's own pack, or a user pack the user opened by its link before (`404` otherwise,
|
|
1867
|
+
so packs cannot be found by guessing IDs). To preview the pack of a sticker someone sent, open
|
|
1868
|
+
`Sticker.pack_slug` with `GET /stickers/links/{slug}` instead. `is_installed` tells whether it is in the
|
|
1869
|
+
user's panel. A hidden pack is found only by its owner.
|
|
1839
1870
|
responses:
|
|
1840
1871
|
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1841
1872
|
"400": { $ref: "#/components/responses/BadRequest" }
|
|
@@ -1846,6 +1877,43 @@ paths:
|
|
|
1846
1877
|
schema: { $ref: "#/components/schemas/StickerPack" }
|
|
1847
1878
|
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1848
1879
|
"404": { $ref: "#/components/responses/NotFound" }
|
|
1880
|
+
patch:
|
|
1881
|
+
tags: [stickers]
|
|
1882
|
+
operationId: updateStickerPack
|
|
1883
|
+
summary: Rename a sticker pack
|
|
1884
|
+
description: Only the owner of the pack (`403` otherwise). Built-in packs cannot be changed.
|
|
1885
|
+
requestBody:
|
|
1886
|
+
required: true
|
|
1887
|
+
content:
|
|
1888
|
+
application/json:
|
|
1889
|
+
schema: { $ref: "#/components/schemas/UpdateStickerPackRequest" }
|
|
1890
|
+
responses:
|
|
1891
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1892
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
1893
|
+
"200":
|
|
1894
|
+
description: The pack
|
|
1895
|
+
content:
|
|
1896
|
+
application/json:
|
|
1897
|
+
schema: { $ref: "#/components/schemas/StickerPack" }
|
|
1898
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1899
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
1900
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
1901
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
1902
|
+
delete:
|
|
1903
|
+
tags: [stickers]
|
|
1904
|
+
operationId: deleteStickerPack
|
|
1905
|
+
summary: Delete a sticker pack
|
|
1906
|
+
description: |
|
|
1907
|
+
Only the owner. The pack leaves every panel and its link stops working; stickers already sent from it keep
|
|
1908
|
+
showing in chats.
|
|
1909
|
+
responses:
|
|
1910
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1911
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
1912
|
+
"204":
|
|
1913
|
+
description: Deleted
|
|
1914
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1915
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
1916
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
1849
1917
|
/stickers/packs/{pack_id}/installation:
|
|
1850
1918
|
parameters:
|
|
1851
1919
|
- $ref: "#/components/parameters/ClientVersion"
|
|
@@ -1855,7 +1923,9 @@ paths:
|
|
|
1855
1923
|
tags: [stickers]
|
|
1856
1924
|
operationId: addStickerPack
|
|
1857
1925
|
summary: Add a sticker pack to the user's panel
|
|
1858
|
-
description:
|
|
1926
|
+
description: |
|
|
1927
|
+
Adding a pack the user has moves it to the top of the panel. User packs can be added only after opening
|
|
1928
|
+
them by their link (`404` otherwise).
|
|
1859
1929
|
responses:
|
|
1860
1930
|
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1861
1931
|
"400": { $ref: "#/components/responses/BadRequest" }
|
|
@@ -1877,6 +1947,156 @@ paths:
|
|
|
1877
1947
|
description: Removed
|
|
1878
1948
|
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1879
1949
|
"404": { $ref: "#/components/responses/NotFound" }
|
|
1950
|
+
/stickers/packs/{pack_id}/stickers:
|
|
1951
|
+
parameters:
|
|
1952
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
1953
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
1954
|
+
- $ref: "#/components/parameters/StickerPackId"
|
|
1955
|
+
post:
|
|
1956
|
+
tags: [stickers]
|
|
1957
|
+
operationId: addSticker
|
|
1958
|
+
summary: Add a sticker to a pack
|
|
1959
|
+
description: |
|
|
1960
|
+
Only the owner. Upload the image with `POST /attachments` (`purpose: sticker`) first; the server has already
|
|
1961
|
+
fitted it into 512 x 512 px. The sticker goes to the end of the pack. At most 120 stickers per pack
|
|
1962
|
+
(`409 limit_reached`). `422` when the image is not a sticker upload of the caller.
|
|
1963
|
+
requestBody:
|
|
1964
|
+
required: true
|
|
1965
|
+
content:
|
|
1966
|
+
application/json:
|
|
1967
|
+
schema: { $ref: "#/components/schemas/AddStickerRequest" }
|
|
1968
|
+
responses:
|
|
1969
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1970
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
1971
|
+
"201":
|
|
1972
|
+
description: The new sticker
|
|
1973
|
+
content:
|
|
1974
|
+
application/json:
|
|
1975
|
+
schema: { $ref: "#/components/schemas/Sticker" }
|
|
1976
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1977
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
1978
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
1979
|
+
"409": { $ref: "#/components/responses/Conflict" }
|
|
1980
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
1981
|
+
/stickers/packs/{pack_id}/stickers/{sticker_id}:
|
|
1982
|
+
parameters:
|
|
1983
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
1984
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
1985
|
+
- $ref: "#/components/parameters/StickerPackId"
|
|
1986
|
+
- $ref: "#/components/parameters/StickerId"
|
|
1987
|
+
patch:
|
|
1988
|
+
tags: [stickers]
|
|
1989
|
+
operationId: updateSticker
|
|
1990
|
+
summary: Change the emoji of a sticker
|
|
1991
|
+
description: Only the owner of the pack.
|
|
1992
|
+
requestBody:
|
|
1993
|
+
required: true
|
|
1994
|
+
content:
|
|
1995
|
+
application/json:
|
|
1996
|
+
schema: { $ref: "#/components/schemas/UpdateStickerRequest" }
|
|
1997
|
+
responses:
|
|
1998
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
1999
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2000
|
+
"200":
|
|
2001
|
+
description: The sticker
|
|
2002
|
+
content:
|
|
2003
|
+
application/json:
|
|
2004
|
+
schema: { $ref: "#/components/schemas/Sticker" }
|
|
2005
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2006
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2007
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2008
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
2009
|
+
delete:
|
|
2010
|
+
tags: [stickers]
|
|
2011
|
+
operationId: deleteSticker
|
|
2012
|
+
summary: Remove a sticker from a pack
|
|
2013
|
+
description: Only the owner of the pack. Messages that sent the sticker keep showing it.
|
|
2014
|
+
responses:
|
|
2015
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2016
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2017
|
+
"204":
|
|
2018
|
+
description: Removed
|
|
2019
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2020
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2021
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2022
|
+
/stickers/packs/{pack_id}/order:
|
|
2023
|
+
parameters:
|
|
2024
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2025
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2026
|
+
- $ref: "#/components/parameters/StickerPackId"
|
|
2027
|
+
put:
|
|
2028
|
+
tags: [stickers]
|
|
2029
|
+
operationId: reorderStickers
|
|
2030
|
+
summary: Reorder the stickers of a pack
|
|
2031
|
+
description: |
|
|
2032
|
+
Only the owner of the pack. `sticker_ids` lists every sticker of the pack exactly once, in the new order
|
|
2033
|
+
(`422` otherwise).
|
|
2034
|
+
requestBody:
|
|
2035
|
+
required: true
|
|
2036
|
+
content:
|
|
2037
|
+
application/json:
|
|
2038
|
+
schema: { $ref: "#/components/schemas/ReorderStickersRequest" }
|
|
2039
|
+
responses:
|
|
2040
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2041
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2042
|
+
"204":
|
|
2043
|
+
description: Reordered
|
|
2044
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2045
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2046
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2047
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
2048
|
+
/stickers/packs/{pack_id}/report:
|
|
2049
|
+
parameters:
|
|
2050
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2051
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2052
|
+
- $ref: "#/components/parameters/StickerPackId"
|
|
2053
|
+
post:
|
|
2054
|
+
tags: [stickers]
|
|
2055
|
+
operationId: reportStickerPack
|
|
2056
|
+
summary: Report a sticker pack
|
|
2057
|
+
description: |
|
|
2058
|
+
One report per user and pack; reporting again changes nothing. After 5 reports from different users the
|
|
2059
|
+
pack is hidden until a moderator restores it: it leaves every panel, cannot be added or sent from, and only
|
|
2060
|
+
its owner still sees it (`is_hidden`). Stickers already sent keep showing. Built-in packs and the user's own
|
|
2061
|
+
packs cannot be reported (`403`). User packs can be reported only after opening them by their link (`404`
|
|
2062
|
+
otherwise). At most 20 new reports per user a day (`429`); reporting a pack again changes nothing.
|
|
2063
|
+
requestBody:
|
|
2064
|
+
required: true
|
|
2065
|
+
content:
|
|
2066
|
+
application/json:
|
|
2067
|
+
schema: { $ref: "#/components/schemas/ReportStickerPackRequest" }
|
|
2068
|
+
responses:
|
|
2069
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2070
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2071
|
+
"204":
|
|
2072
|
+
description: Reported
|
|
2073
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2074
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
2075
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
2076
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
2077
|
+
"429": { $ref: "#/components/responses/TooManyRequests" }
|
|
2078
|
+
/stickers/links/{slug}:
|
|
2079
|
+
parameters:
|
|
2080
|
+
- $ref: "#/components/parameters/ClientVersion"
|
|
2081
|
+
- $ref: "#/components/parameters/ClientApiVersion"
|
|
2082
|
+
- $ref: "#/components/parameters/StickerPackSlug"
|
|
2083
|
+
get:
|
|
2084
|
+
tags: [stickers]
|
|
2085
|
+
operationId: getStickerPackByLink
|
|
2086
|
+
summary: A sticker pack by its share link
|
|
2087
|
+
description: |
|
|
2088
|
+
The same as `GET /stickers/packs/{pack_id}`, found by the pack's `slug`. Opening a link lets the user use
|
|
2089
|
+
the pack by its ID from then on: add it, report it and send its stickers.
|
|
2090
|
+
responses:
|
|
2091
|
+
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
2092
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
2093
|
+
"200":
|
|
2094
|
+
description: The pack
|
|
2095
|
+
content:
|
|
2096
|
+
application/json:
|
|
2097
|
+
schema: { $ref: "#/components/schemas/StickerPack" }
|
|
2098
|
+
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
2099
|
+
"404": { $ref: "#/components/responses/NotFound" }
|
|
1880
2100
|
/stickers/recent:
|
|
1881
2101
|
parameters:
|
|
1882
2102
|
- $ref: "#/components/parameters/ClientVersion"
|
|
@@ -3914,6 +4134,16 @@ components:
|
|
|
3914
4134
|
in: path
|
|
3915
4135
|
required: true
|
|
3916
4136
|
schema: { $ref: "#/components/schemas/Id" }
|
|
4137
|
+
StickerId:
|
|
4138
|
+
name: sticker_id
|
|
4139
|
+
in: path
|
|
4140
|
+
required: true
|
|
4141
|
+
schema: { $ref: "#/components/schemas/Id" }
|
|
4142
|
+
StickerPackSlug:
|
|
4143
|
+
name: slug
|
|
4144
|
+
in: path
|
|
4145
|
+
required: true
|
|
4146
|
+
schema: { $ref: "#/components/schemas/StickerPackSlug" }
|
|
3917
4147
|
SessionId:
|
|
3918
4148
|
name: session_id
|
|
3919
4149
|
in: path
|
|
@@ -4177,6 +4407,7 @@ components:
|
|
|
4177
4407
|
- call_ended
|
|
4178
4408
|
- already_in_call
|
|
4179
4409
|
- stale_epoch
|
|
4410
|
+
- limit_reached
|
|
4180
4411
|
- internal_error
|
|
4181
4412
|
Problem:
|
|
4182
4413
|
type: object
|
|
@@ -4554,7 +4785,11 @@ components:
|
|
|
4554
4785
|
enum: [image, audio, voice, video, file]
|
|
4555
4786
|
UploadPurpose:
|
|
4556
4787
|
type: string
|
|
4557
|
-
|
|
4788
|
+
description: |
|
|
4789
|
+
`sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent
|
|
4790
|
+
border and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is
|
|
4791
|
+
added to a pack.
|
|
4792
|
+
enum: [message, avatar, sticker]
|
|
4558
4793
|
UploadAttachmentRequest:
|
|
4559
4794
|
type: object
|
|
4560
4795
|
required: [file, purpose]
|
|
@@ -4700,6 +4935,11 @@ components:
|
|
|
4700
4935
|
properties:
|
|
4701
4936
|
id: { $ref: "#/components/schemas/Id" }
|
|
4702
4937
|
pack_id: { $ref: "#/components/schemas/Id" }
|
|
4938
|
+
pack_slug:
|
|
4939
|
+
allOf: [{ $ref: "#/components/schemas/StickerPackSlug" }]
|
|
4940
|
+
description: |
|
|
4941
|
+
The share link of the sticker's pack when a user made it; missing for built-in packs. A client that
|
|
4942
|
+
shows the pack of a sticker someone sent opens it with `GET /stickers/links/{slug}`.
|
|
4703
4943
|
emoji:
|
|
4704
4944
|
type: string
|
|
4705
4945
|
minLength: 1
|
|
@@ -4707,9 +4947,12 @@ components:
|
|
|
4707
4947
|
description: The emoji the sticker stands for, for previews, notifications and search.
|
|
4708
4948
|
is_animated: { type: boolean }
|
|
4709
4949
|
image: { $ref: "#/components/schemas/Attachment" }
|
|
4950
|
+
StickerPackSlug:
|
|
4951
|
+
type: string
|
|
4952
|
+
pattern: "^[A-Za-z0-9]{8,32}$"
|
|
4710
4953
|
StickerPack:
|
|
4711
4954
|
type: object
|
|
4712
|
-
required: [id, title, is_official, is_installed, stickers]
|
|
4955
|
+
required: [id, title, is_official, is_installed, is_mine, is_hidden, stickers]
|
|
4713
4956
|
properties:
|
|
4714
4957
|
id: { $ref: "#/components/schemas/Id" }
|
|
4715
4958
|
title: { type: string, minLength: 1, maxLength: 64 }
|
|
@@ -4719,6 +4962,16 @@ components:
|
|
|
4719
4962
|
is_installed:
|
|
4720
4963
|
type: boolean
|
|
4721
4964
|
description: The pack is in the user's sticker panel.
|
|
4965
|
+
is_mine:
|
|
4966
|
+
type: boolean
|
|
4967
|
+
description: The user made the pack and may change it.
|
|
4968
|
+
is_hidden:
|
|
4969
|
+
type: boolean
|
|
4970
|
+
description: Hidden after reports; only the owner sees such a pack, and nobody can send from it.
|
|
4971
|
+
owner_id: { $ref: "#/components/schemas/Id" }
|
|
4972
|
+
slug:
|
|
4973
|
+
allOf: [{ $ref: "#/components/schemas/StickerPackSlug" }]
|
|
4974
|
+
description: The share link of a pack a user made; missing for built-in packs.
|
|
4722
4975
|
stickers:
|
|
4723
4976
|
type: array
|
|
4724
4977
|
maxItems: 120
|
|
@@ -4731,6 +4984,49 @@ components:
|
|
|
4731
4984
|
type: array
|
|
4732
4985
|
maxItems: 200
|
|
4733
4986
|
items: { $ref: "#/components/schemas/StickerPack" }
|
|
4987
|
+
CreateStickerPackRequest:
|
|
4988
|
+
type: object
|
|
4989
|
+
additionalProperties: false
|
|
4990
|
+
required: [title]
|
|
4991
|
+
properties:
|
|
4992
|
+
title: { type: string, minLength: 1, maxLength: 64 }
|
|
4993
|
+
UpdateStickerPackRequest:
|
|
4994
|
+
type: object
|
|
4995
|
+
additionalProperties: false
|
|
4996
|
+
required: [title]
|
|
4997
|
+
properties:
|
|
4998
|
+
title: { type: string, minLength: 1, maxLength: 64 }
|
|
4999
|
+
AddStickerRequest:
|
|
5000
|
+
type: object
|
|
5001
|
+
additionalProperties: false
|
|
5002
|
+
required: [attachment_id, emoji]
|
|
5003
|
+
properties:
|
|
5004
|
+
attachment_id: { $ref: "#/components/schemas/AttachmentRef" }
|
|
5005
|
+
emoji: { type: string, minLength: 1, maxLength: 32 }
|
|
5006
|
+
UpdateStickerRequest:
|
|
5007
|
+
type: object
|
|
5008
|
+
additionalProperties: false
|
|
5009
|
+
required: [emoji]
|
|
5010
|
+
properties:
|
|
5011
|
+
emoji: { type: string, minLength: 1, maxLength: 32 }
|
|
5012
|
+
ReorderStickersRequest:
|
|
5013
|
+
type: object
|
|
5014
|
+
additionalProperties: false
|
|
5015
|
+
required: [sticker_ids]
|
|
5016
|
+
properties:
|
|
5017
|
+
sticker_ids:
|
|
5018
|
+
type: array
|
|
5019
|
+
maxItems: 120
|
|
5020
|
+
items: { $ref: "#/components/schemas/Id" }
|
|
5021
|
+
StickerPackReportReason:
|
|
5022
|
+
type: string
|
|
5023
|
+
enum: [spam, violence, sexual, hate, copyright, other]
|
|
5024
|
+
ReportStickerPackRequest:
|
|
5025
|
+
type: object
|
|
5026
|
+
additionalProperties: false
|
|
5027
|
+
required: [reason]
|
|
5028
|
+
properties:
|
|
5029
|
+
reason: { $ref: "#/components/schemas/StickerPackReportReason" }
|
|
4734
5030
|
StickerList:
|
|
4735
5031
|
type: object
|
|
4736
5032
|
required: [items]
|
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.21. Do not edit. */
|
|
2
2
|
export interface paths {
|
|
3
3
|
"/meta": {
|
|
4
4
|
parameters: {
|
|
@@ -1443,11 +1443,17 @@ export interface paths {
|
|
|
1443
1443
|
/**
|
|
1444
1444
|
* The user's sticker packs
|
|
1445
1445
|
* @description The packs of the sticker panel: packs the user added, most recently added first, then the built-in default
|
|
1446
|
-
* packs the user has not removed. Each pack lists its stickers in order. At most 200 packs.
|
|
1446
|
+
* packs the user has not removed. Each pack lists its stickers in order. At most 200 packs. With
|
|
1447
|
+
* `owned=true`, the packs the user made instead, newest first, whether in the panel or not.
|
|
1447
1448
|
*/
|
|
1448
1449
|
get: operations["listStickerPacks"];
|
|
1449
1450
|
put?: never;
|
|
1450
|
-
|
|
1451
|
+
/**
|
|
1452
|
+
* Create a sticker pack
|
|
1453
|
+
* @description A new, empty pack owned by the user, added to the top of their panel. Its `slug` is the share link
|
|
1454
|
+
* (`/stickers/links/{slug}`). At most 50 packs per user (`409 limit_reached`).
|
|
1455
|
+
*/
|
|
1456
|
+
post: operations["createStickerPack"];
|
|
1451
1457
|
delete?: never;
|
|
1452
1458
|
options?: never;
|
|
1453
1459
|
head?: never;
|
|
@@ -1470,16 +1476,27 @@ export interface paths {
|
|
|
1470
1476
|
};
|
|
1471
1477
|
/**
|
|
1472
1478
|
* A sticker pack
|
|
1473
|
-
* @description
|
|
1474
|
-
*
|
|
1479
|
+
* @description A built-in pack, the user's own pack, or a user pack the user opened by its link before (`404` otherwise,
|
|
1480
|
+
* so packs cannot be found by guessing IDs). To preview the pack of a sticker someone sent, open
|
|
1481
|
+
* `Sticker.pack_slug` with `GET /stickers/links/{slug}` instead. `is_installed` tells whether it is in the
|
|
1482
|
+
* user's panel. A hidden pack is found only by its owner.
|
|
1475
1483
|
*/
|
|
1476
1484
|
get: operations["getStickerPack"];
|
|
1477
1485
|
put?: never;
|
|
1478
1486
|
post?: never;
|
|
1479
|
-
|
|
1487
|
+
/**
|
|
1488
|
+
* Delete a sticker pack
|
|
1489
|
+
* @description Only the owner. The pack leaves every panel and its link stops working; stickers already sent from it keep
|
|
1490
|
+
* showing in chats.
|
|
1491
|
+
*/
|
|
1492
|
+
delete: operations["deleteStickerPack"];
|
|
1480
1493
|
options?: never;
|
|
1481
1494
|
head?: never;
|
|
1482
|
-
|
|
1495
|
+
/**
|
|
1496
|
+
* Rename a sticker pack
|
|
1497
|
+
* @description Only the owner of the pack (`403` otherwise). Built-in packs cannot be changed.
|
|
1498
|
+
*/
|
|
1499
|
+
patch: operations["updateStickerPack"];
|
|
1483
1500
|
trace?: never;
|
|
1484
1501
|
};
|
|
1485
1502
|
"/stickers/packs/{pack_id}/installation": {
|
|
@@ -1499,7 +1516,8 @@ export interface paths {
|
|
|
1499
1516
|
get?: never;
|
|
1500
1517
|
/**
|
|
1501
1518
|
* Add a sticker pack to the user's panel
|
|
1502
|
-
* @description Adding a pack the user has moves it to the top of the panel.
|
|
1519
|
+
* @description Adding a pack the user has moves it to the top of the panel. User packs can be added only after opening
|
|
1520
|
+
* them by their link (`404` otherwise).
|
|
1503
1521
|
*/
|
|
1504
1522
|
put: operations["addStickerPack"];
|
|
1505
1523
|
post?: never;
|
|
@@ -1514,6 +1532,154 @@ export interface paths {
|
|
|
1514
1532
|
patch?: never;
|
|
1515
1533
|
trace?: never;
|
|
1516
1534
|
};
|
|
1535
|
+
"/stickers/packs/{pack_id}/stickers": {
|
|
1536
|
+
parameters: {
|
|
1537
|
+
query?: never;
|
|
1538
|
+
header?: {
|
|
1539
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1540
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1541
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1542
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1543
|
+
};
|
|
1544
|
+
path: {
|
|
1545
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
1546
|
+
};
|
|
1547
|
+
cookie?: never;
|
|
1548
|
+
};
|
|
1549
|
+
get?: never;
|
|
1550
|
+
put?: never;
|
|
1551
|
+
/**
|
|
1552
|
+
* Add a sticker to a pack
|
|
1553
|
+
* @description Only the owner. Upload the image with `POST /attachments` (`purpose: sticker`) first; the server has already
|
|
1554
|
+
* fitted it into 512 x 512 px. The sticker goes to the end of the pack. At most 120 stickers per pack
|
|
1555
|
+
* (`409 limit_reached`). `422` when the image is not a sticker upload of the caller.
|
|
1556
|
+
*/
|
|
1557
|
+
post: operations["addSticker"];
|
|
1558
|
+
delete?: never;
|
|
1559
|
+
options?: never;
|
|
1560
|
+
head?: never;
|
|
1561
|
+
patch?: never;
|
|
1562
|
+
trace?: never;
|
|
1563
|
+
};
|
|
1564
|
+
"/stickers/packs/{pack_id}/stickers/{sticker_id}": {
|
|
1565
|
+
parameters: {
|
|
1566
|
+
query?: never;
|
|
1567
|
+
header?: {
|
|
1568
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1569
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1570
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1571
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1572
|
+
};
|
|
1573
|
+
path: {
|
|
1574
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
1575
|
+
sticker_id: components["parameters"]["StickerId"];
|
|
1576
|
+
};
|
|
1577
|
+
cookie?: never;
|
|
1578
|
+
};
|
|
1579
|
+
get?: never;
|
|
1580
|
+
put?: never;
|
|
1581
|
+
post?: never;
|
|
1582
|
+
/**
|
|
1583
|
+
* Remove a sticker from a pack
|
|
1584
|
+
* @description Only the owner of the pack. Messages that sent the sticker keep showing it.
|
|
1585
|
+
*/
|
|
1586
|
+
delete: operations["deleteSticker"];
|
|
1587
|
+
options?: never;
|
|
1588
|
+
head?: never;
|
|
1589
|
+
/**
|
|
1590
|
+
* Change the emoji of a sticker
|
|
1591
|
+
* @description Only the owner of the pack.
|
|
1592
|
+
*/
|
|
1593
|
+
patch: operations["updateSticker"];
|
|
1594
|
+
trace?: never;
|
|
1595
|
+
};
|
|
1596
|
+
"/stickers/packs/{pack_id}/order": {
|
|
1597
|
+
parameters: {
|
|
1598
|
+
query?: never;
|
|
1599
|
+
header?: {
|
|
1600
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1601
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1602
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1603
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1604
|
+
};
|
|
1605
|
+
path: {
|
|
1606
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
1607
|
+
};
|
|
1608
|
+
cookie?: never;
|
|
1609
|
+
};
|
|
1610
|
+
get?: never;
|
|
1611
|
+
/**
|
|
1612
|
+
* Reorder the stickers of a pack
|
|
1613
|
+
* @description Only the owner of the pack. `sticker_ids` lists every sticker of the pack exactly once, in the new order
|
|
1614
|
+
* (`422` otherwise).
|
|
1615
|
+
*/
|
|
1616
|
+
put: operations["reorderStickers"];
|
|
1617
|
+
post?: never;
|
|
1618
|
+
delete?: never;
|
|
1619
|
+
options?: never;
|
|
1620
|
+
head?: never;
|
|
1621
|
+
patch?: never;
|
|
1622
|
+
trace?: never;
|
|
1623
|
+
};
|
|
1624
|
+
"/stickers/packs/{pack_id}/report": {
|
|
1625
|
+
parameters: {
|
|
1626
|
+
query?: never;
|
|
1627
|
+
header?: {
|
|
1628
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1629
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1630
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1631
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1632
|
+
};
|
|
1633
|
+
path: {
|
|
1634
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
1635
|
+
};
|
|
1636
|
+
cookie?: never;
|
|
1637
|
+
};
|
|
1638
|
+
get?: never;
|
|
1639
|
+
put?: never;
|
|
1640
|
+
/**
|
|
1641
|
+
* Report a sticker pack
|
|
1642
|
+
* @description One report per user and pack; reporting again changes nothing. After 5 reports from different users the
|
|
1643
|
+
* pack is hidden until a moderator restores it: it leaves every panel, cannot be added or sent from, and only
|
|
1644
|
+
* its owner still sees it (`is_hidden`). Stickers already sent keep showing. Built-in packs and the user's own
|
|
1645
|
+
* packs cannot be reported (`403`). User packs can be reported only after opening them by their link (`404`
|
|
1646
|
+
* otherwise). At most 20 new reports per user a day (`429`); reporting a pack again changes nothing.
|
|
1647
|
+
*/
|
|
1648
|
+
post: operations["reportStickerPack"];
|
|
1649
|
+
delete?: never;
|
|
1650
|
+
options?: never;
|
|
1651
|
+
head?: never;
|
|
1652
|
+
patch?: never;
|
|
1653
|
+
trace?: never;
|
|
1654
|
+
};
|
|
1655
|
+
"/stickers/links/{slug}": {
|
|
1656
|
+
parameters: {
|
|
1657
|
+
query?: never;
|
|
1658
|
+
header?: {
|
|
1659
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1660
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1661
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1662
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1663
|
+
};
|
|
1664
|
+
path: {
|
|
1665
|
+
slug: components["parameters"]["StickerPackSlug"];
|
|
1666
|
+
};
|
|
1667
|
+
cookie?: never;
|
|
1668
|
+
};
|
|
1669
|
+
/**
|
|
1670
|
+
* A sticker pack by its share link
|
|
1671
|
+
* @description The same as `GET /stickers/packs/{pack_id}`, found by the pack's `slug`. Opening a link lets the user use
|
|
1672
|
+
* the pack by its ID from then on: add it, report it and send its stickers.
|
|
1673
|
+
*/
|
|
1674
|
+
get: operations["getStickerPackByLink"];
|
|
1675
|
+
put?: never;
|
|
1676
|
+
post?: never;
|
|
1677
|
+
delete?: never;
|
|
1678
|
+
options?: never;
|
|
1679
|
+
head?: never;
|
|
1680
|
+
patch?: never;
|
|
1681
|
+
trace?: never;
|
|
1682
|
+
};
|
|
1517
1683
|
"/stickers/recent": {
|
|
1518
1684
|
parameters: {
|
|
1519
1685
|
query?: never;
|
|
@@ -2708,7 +2874,7 @@ export interface components {
|
|
|
2708
2874
|
* codes must be treated like `internal_error`.
|
|
2709
2875
|
* @enum {string}
|
|
2710
2876
|
*/
|
|
2711
|
-
ErrorCode: "invalid_request" | "validation_failed" | "unauthenticated" | "invalid_credentials" | "two_factor_required" | "invalid_two_factor_code" | "token_expired" | "forbidden" | "not_found" | "conflict" | "already_exists" | "payload_too_large" | "unsupported_media_type" | "rate_limited" | "client_outdated" | "invalid_client_version" | "blocked_by_user" | "approval_required" | "user_verification_required" | "session_too_new" | "calls_unavailable" | "calls_not_allowed" | "call_identity_required" | "call_full" | "call_ended" | "already_in_call" | "stale_epoch" | "internal_error";
|
|
2877
|
+
ErrorCode: "invalid_request" | "validation_failed" | "unauthenticated" | "invalid_credentials" | "two_factor_required" | "invalid_two_factor_code" | "token_expired" | "forbidden" | "not_found" | "conflict" | "already_exists" | "payload_too_large" | "unsupported_media_type" | "rate_limited" | "client_outdated" | "invalid_client_version" | "blocked_by_user" | "approval_required" | "user_verification_required" | "session_too_new" | "calls_unavailable" | "calls_not_allowed" | "call_identity_required" | "call_full" | "call_ended" | "already_in_call" | "stale_epoch" | "limit_reached" | "internal_error";
|
|
2712
2878
|
/** @description RFC 9457 problem details. `426 Upgrade Required` (`client_outdated`) uses the same format. */
|
|
2713
2879
|
Problem: {
|
|
2714
2880
|
/**
|
|
@@ -2954,8 +3120,13 @@ export interface components {
|
|
|
2954
3120
|
};
|
|
2955
3121
|
/** @enum {string} */
|
|
2956
3122
|
AttachmentKind: "image" | "audio" | "voice" | "video" | "file";
|
|
2957
|
-
/**
|
|
2958
|
-
|
|
3123
|
+
/**
|
|
3124
|
+
* @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
|
|
3125
|
+
* border and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is
|
|
3126
|
+
* added to a pack.
|
|
3127
|
+
* @enum {string}
|
|
3128
|
+
*/
|
|
3129
|
+
UploadPurpose: "message" | "avatar" | "sticker";
|
|
2959
3130
|
UploadAttachmentRequest: {
|
|
2960
3131
|
/** Format: binary */
|
|
2961
3132
|
file: string;
|
|
@@ -3043,11 +3214,17 @@ export interface components {
|
|
|
3043
3214
|
Sticker: {
|
|
3044
3215
|
id: components["schemas"]["Id"];
|
|
3045
3216
|
pack_id: components["schemas"]["Id"];
|
|
3217
|
+
/**
|
|
3218
|
+
* @description The share link of the sticker's pack when a user made it; missing for built-in packs. A client that
|
|
3219
|
+
* shows the pack of a sticker someone sent opens it with `GET /stickers/links/{slug}`.
|
|
3220
|
+
*/
|
|
3221
|
+
pack_slug?: components["schemas"]["StickerPackSlug"];
|
|
3046
3222
|
/** @description The emoji the sticker stands for, for previews, notifications and search. */
|
|
3047
3223
|
emoji: string;
|
|
3048
3224
|
is_animated: boolean;
|
|
3049
3225
|
image: components["schemas"]["Attachment"];
|
|
3050
3226
|
};
|
|
3227
|
+
StickerPackSlug: string;
|
|
3051
3228
|
StickerPack: {
|
|
3052
3229
|
id: components["schemas"]["Id"];
|
|
3053
3230
|
title: string;
|
|
@@ -3055,11 +3232,39 @@ export interface components {
|
|
|
3055
3232
|
is_official: boolean;
|
|
3056
3233
|
/** @description The pack is in the user's sticker panel. */
|
|
3057
3234
|
is_installed: boolean;
|
|
3235
|
+
/** @description The user made the pack and may change it. */
|
|
3236
|
+
is_mine: boolean;
|
|
3237
|
+
/** @description Hidden after reports; only the owner sees such a pack, and nobody can send from it. */
|
|
3238
|
+
is_hidden: boolean;
|
|
3239
|
+
owner_id?: components["schemas"]["Id"];
|
|
3240
|
+
/** @description The share link of a pack a user made; missing for built-in packs. */
|
|
3241
|
+
slug?: components["schemas"]["StickerPackSlug"];
|
|
3058
3242
|
stickers: components["schemas"]["Sticker"][];
|
|
3059
3243
|
};
|
|
3060
3244
|
StickerPackList: {
|
|
3061
3245
|
items: components["schemas"]["StickerPack"][];
|
|
3062
3246
|
};
|
|
3247
|
+
CreateStickerPackRequest: {
|
|
3248
|
+
title: string;
|
|
3249
|
+
};
|
|
3250
|
+
UpdateStickerPackRequest: {
|
|
3251
|
+
title: string;
|
|
3252
|
+
};
|
|
3253
|
+
AddStickerRequest: {
|
|
3254
|
+
attachment_id: components["schemas"]["AttachmentRef"];
|
|
3255
|
+
emoji: string;
|
|
3256
|
+
};
|
|
3257
|
+
UpdateStickerRequest: {
|
|
3258
|
+
emoji: string;
|
|
3259
|
+
};
|
|
3260
|
+
ReorderStickersRequest: {
|
|
3261
|
+
sticker_ids: components["schemas"]["Id"][];
|
|
3262
|
+
};
|
|
3263
|
+
/** @enum {string} */
|
|
3264
|
+
StickerPackReportReason: "spam" | "violence" | "sexual" | "hate" | "copyright" | "other";
|
|
3265
|
+
ReportStickerPackRequest: {
|
|
3266
|
+
reason: components["schemas"]["StickerPackReportReason"];
|
|
3267
|
+
};
|
|
3063
3268
|
StickerList: {
|
|
3064
3269
|
items: components["schemas"]["Sticker"][];
|
|
3065
3270
|
};
|
|
@@ -3727,6 +3932,8 @@ export interface components {
|
|
|
3727
3932
|
RequestId: components["schemas"]["Id"];
|
|
3728
3933
|
AttachmentId: components["schemas"]["AttachmentRef"];
|
|
3729
3934
|
StickerPackId: components["schemas"]["Id"];
|
|
3935
|
+
StickerId: components["schemas"]["Id"];
|
|
3936
|
+
StickerPackSlug: components["schemas"]["StickerPackSlug"];
|
|
3730
3937
|
SessionId: string;
|
|
3731
3938
|
CallId: components["schemas"]["Id"];
|
|
3732
3939
|
/** @description Version of the client app, for logs and the per-client metric. */
|
|
@@ -6234,7 +6441,9 @@ export interface operations {
|
|
|
6234
6441
|
};
|
|
6235
6442
|
listStickerPacks: {
|
|
6236
6443
|
parameters: {
|
|
6237
|
-
query?:
|
|
6444
|
+
query?: {
|
|
6445
|
+
owned?: boolean;
|
|
6446
|
+
};
|
|
6238
6447
|
header?: {
|
|
6239
6448
|
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6240
6449
|
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
@@ -6260,6 +6469,40 @@ export interface operations {
|
|
|
6260
6469
|
426: components["responses"]["ClientOutdated"];
|
|
6261
6470
|
};
|
|
6262
6471
|
};
|
|
6472
|
+
createStickerPack: {
|
|
6473
|
+
parameters: {
|
|
6474
|
+
query?: never;
|
|
6475
|
+
header?: {
|
|
6476
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6477
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6478
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6479
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6480
|
+
};
|
|
6481
|
+
path?: never;
|
|
6482
|
+
cookie?: never;
|
|
6483
|
+
};
|
|
6484
|
+
requestBody: {
|
|
6485
|
+
content: {
|
|
6486
|
+
"application/json": components["schemas"]["CreateStickerPackRequest"];
|
|
6487
|
+
};
|
|
6488
|
+
};
|
|
6489
|
+
responses: {
|
|
6490
|
+
/** @description The new pack */
|
|
6491
|
+
201: {
|
|
6492
|
+
headers: {
|
|
6493
|
+
[name: string]: unknown;
|
|
6494
|
+
};
|
|
6495
|
+
content: {
|
|
6496
|
+
"application/json": components["schemas"]["StickerPack"];
|
|
6497
|
+
};
|
|
6498
|
+
};
|
|
6499
|
+
400: components["responses"]["BadRequest"];
|
|
6500
|
+
401: components["responses"]["Unauthorized"];
|
|
6501
|
+
409: components["responses"]["Conflict"];
|
|
6502
|
+
422: components["responses"]["ValidationFailed"];
|
|
6503
|
+
426: components["responses"]["ClientOutdated"];
|
|
6504
|
+
};
|
|
6505
|
+
};
|
|
6263
6506
|
getStickerPack: {
|
|
6264
6507
|
parameters: {
|
|
6265
6508
|
query?: never;
|
|
@@ -6291,6 +6534,73 @@ export interface operations {
|
|
|
6291
6534
|
426: components["responses"]["ClientOutdated"];
|
|
6292
6535
|
};
|
|
6293
6536
|
};
|
|
6537
|
+
deleteStickerPack: {
|
|
6538
|
+
parameters: {
|
|
6539
|
+
query?: never;
|
|
6540
|
+
header?: {
|
|
6541
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6542
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6543
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6544
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6545
|
+
};
|
|
6546
|
+
path: {
|
|
6547
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
6548
|
+
};
|
|
6549
|
+
cookie?: never;
|
|
6550
|
+
};
|
|
6551
|
+
requestBody?: never;
|
|
6552
|
+
responses: {
|
|
6553
|
+
/** @description Deleted */
|
|
6554
|
+
204: {
|
|
6555
|
+
headers: {
|
|
6556
|
+
[name: string]: unknown;
|
|
6557
|
+
};
|
|
6558
|
+
content?: never;
|
|
6559
|
+
};
|
|
6560
|
+
400: components["responses"]["BadRequest"];
|
|
6561
|
+
401: components["responses"]["Unauthorized"];
|
|
6562
|
+
403: components["responses"]["Forbidden"];
|
|
6563
|
+
404: components["responses"]["NotFound"];
|
|
6564
|
+
426: components["responses"]["ClientOutdated"];
|
|
6565
|
+
};
|
|
6566
|
+
};
|
|
6567
|
+
updateStickerPack: {
|
|
6568
|
+
parameters: {
|
|
6569
|
+
query?: never;
|
|
6570
|
+
header?: {
|
|
6571
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6572
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6573
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6574
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6575
|
+
};
|
|
6576
|
+
path: {
|
|
6577
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
6578
|
+
};
|
|
6579
|
+
cookie?: never;
|
|
6580
|
+
};
|
|
6581
|
+
requestBody: {
|
|
6582
|
+
content: {
|
|
6583
|
+
"application/json": components["schemas"]["UpdateStickerPackRequest"];
|
|
6584
|
+
};
|
|
6585
|
+
};
|
|
6586
|
+
responses: {
|
|
6587
|
+
/** @description The pack */
|
|
6588
|
+
200: {
|
|
6589
|
+
headers: {
|
|
6590
|
+
[name: string]: unknown;
|
|
6591
|
+
};
|
|
6592
|
+
content: {
|
|
6593
|
+
"application/json": components["schemas"]["StickerPack"];
|
|
6594
|
+
};
|
|
6595
|
+
};
|
|
6596
|
+
400: components["responses"]["BadRequest"];
|
|
6597
|
+
401: components["responses"]["Unauthorized"];
|
|
6598
|
+
403: components["responses"]["Forbidden"];
|
|
6599
|
+
404: components["responses"]["NotFound"];
|
|
6600
|
+
422: components["responses"]["ValidationFailed"];
|
|
6601
|
+
426: components["responses"]["ClientOutdated"];
|
|
6602
|
+
};
|
|
6603
|
+
};
|
|
6294
6604
|
addStickerPack: {
|
|
6295
6605
|
parameters: {
|
|
6296
6606
|
query?: never;
|
|
@@ -6349,6 +6659,215 @@ export interface operations {
|
|
|
6349
6659
|
426: components["responses"]["ClientOutdated"];
|
|
6350
6660
|
};
|
|
6351
6661
|
};
|
|
6662
|
+
addSticker: {
|
|
6663
|
+
parameters: {
|
|
6664
|
+
query?: never;
|
|
6665
|
+
header?: {
|
|
6666
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6667
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6668
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6669
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6670
|
+
};
|
|
6671
|
+
path: {
|
|
6672
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
6673
|
+
};
|
|
6674
|
+
cookie?: never;
|
|
6675
|
+
};
|
|
6676
|
+
requestBody: {
|
|
6677
|
+
content: {
|
|
6678
|
+
"application/json": components["schemas"]["AddStickerRequest"];
|
|
6679
|
+
};
|
|
6680
|
+
};
|
|
6681
|
+
responses: {
|
|
6682
|
+
/** @description The new sticker */
|
|
6683
|
+
201: {
|
|
6684
|
+
headers: {
|
|
6685
|
+
[name: string]: unknown;
|
|
6686
|
+
};
|
|
6687
|
+
content: {
|
|
6688
|
+
"application/json": components["schemas"]["Sticker"];
|
|
6689
|
+
};
|
|
6690
|
+
};
|
|
6691
|
+
400: components["responses"]["BadRequest"];
|
|
6692
|
+
401: components["responses"]["Unauthorized"];
|
|
6693
|
+
403: components["responses"]["Forbidden"];
|
|
6694
|
+
404: components["responses"]["NotFound"];
|
|
6695
|
+
409: components["responses"]["Conflict"];
|
|
6696
|
+
422: components["responses"]["ValidationFailed"];
|
|
6697
|
+
426: components["responses"]["ClientOutdated"];
|
|
6698
|
+
};
|
|
6699
|
+
};
|
|
6700
|
+
deleteSticker: {
|
|
6701
|
+
parameters: {
|
|
6702
|
+
query?: never;
|
|
6703
|
+
header?: {
|
|
6704
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6705
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6706
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6707
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6708
|
+
};
|
|
6709
|
+
path: {
|
|
6710
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
6711
|
+
sticker_id: components["parameters"]["StickerId"];
|
|
6712
|
+
};
|
|
6713
|
+
cookie?: never;
|
|
6714
|
+
};
|
|
6715
|
+
requestBody?: never;
|
|
6716
|
+
responses: {
|
|
6717
|
+
/** @description Removed */
|
|
6718
|
+
204: {
|
|
6719
|
+
headers: {
|
|
6720
|
+
[name: string]: unknown;
|
|
6721
|
+
};
|
|
6722
|
+
content?: never;
|
|
6723
|
+
};
|
|
6724
|
+
400: components["responses"]["BadRequest"];
|
|
6725
|
+
401: components["responses"]["Unauthorized"];
|
|
6726
|
+
403: components["responses"]["Forbidden"];
|
|
6727
|
+
404: components["responses"]["NotFound"];
|
|
6728
|
+
426: components["responses"]["ClientOutdated"];
|
|
6729
|
+
};
|
|
6730
|
+
};
|
|
6731
|
+
updateSticker: {
|
|
6732
|
+
parameters: {
|
|
6733
|
+
query?: never;
|
|
6734
|
+
header?: {
|
|
6735
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6736
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6737
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6738
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6739
|
+
};
|
|
6740
|
+
path: {
|
|
6741
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
6742
|
+
sticker_id: components["parameters"]["StickerId"];
|
|
6743
|
+
};
|
|
6744
|
+
cookie?: never;
|
|
6745
|
+
};
|
|
6746
|
+
requestBody: {
|
|
6747
|
+
content: {
|
|
6748
|
+
"application/json": components["schemas"]["UpdateStickerRequest"];
|
|
6749
|
+
};
|
|
6750
|
+
};
|
|
6751
|
+
responses: {
|
|
6752
|
+
/** @description The sticker */
|
|
6753
|
+
200: {
|
|
6754
|
+
headers: {
|
|
6755
|
+
[name: string]: unknown;
|
|
6756
|
+
};
|
|
6757
|
+
content: {
|
|
6758
|
+
"application/json": components["schemas"]["Sticker"];
|
|
6759
|
+
};
|
|
6760
|
+
};
|
|
6761
|
+
400: components["responses"]["BadRequest"];
|
|
6762
|
+
401: components["responses"]["Unauthorized"];
|
|
6763
|
+
403: components["responses"]["Forbidden"];
|
|
6764
|
+
404: components["responses"]["NotFound"];
|
|
6765
|
+
422: components["responses"]["ValidationFailed"];
|
|
6766
|
+
426: components["responses"]["ClientOutdated"];
|
|
6767
|
+
};
|
|
6768
|
+
};
|
|
6769
|
+
reorderStickers: {
|
|
6770
|
+
parameters: {
|
|
6771
|
+
query?: never;
|
|
6772
|
+
header?: {
|
|
6773
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6774
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6775
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6776
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6777
|
+
};
|
|
6778
|
+
path: {
|
|
6779
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
6780
|
+
};
|
|
6781
|
+
cookie?: never;
|
|
6782
|
+
};
|
|
6783
|
+
requestBody: {
|
|
6784
|
+
content: {
|
|
6785
|
+
"application/json": components["schemas"]["ReorderStickersRequest"];
|
|
6786
|
+
};
|
|
6787
|
+
};
|
|
6788
|
+
responses: {
|
|
6789
|
+
/** @description Reordered */
|
|
6790
|
+
204: {
|
|
6791
|
+
headers: {
|
|
6792
|
+
[name: string]: unknown;
|
|
6793
|
+
};
|
|
6794
|
+
content?: never;
|
|
6795
|
+
};
|
|
6796
|
+
400: components["responses"]["BadRequest"];
|
|
6797
|
+
401: components["responses"]["Unauthorized"];
|
|
6798
|
+
403: components["responses"]["Forbidden"];
|
|
6799
|
+
404: components["responses"]["NotFound"];
|
|
6800
|
+
422: components["responses"]["ValidationFailed"];
|
|
6801
|
+
426: components["responses"]["ClientOutdated"];
|
|
6802
|
+
};
|
|
6803
|
+
};
|
|
6804
|
+
reportStickerPack: {
|
|
6805
|
+
parameters: {
|
|
6806
|
+
query?: never;
|
|
6807
|
+
header?: {
|
|
6808
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6809
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6810
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6811
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6812
|
+
};
|
|
6813
|
+
path: {
|
|
6814
|
+
pack_id: components["parameters"]["StickerPackId"];
|
|
6815
|
+
};
|
|
6816
|
+
cookie?: never;
|
|
6817
|
+
};
|
|
6818
|
+
requestBody: {
|
|
6819
|
+
content: {
|
|
6820
|
+
"application/json": components["schemas"]["ReportStickerPackRequest"];
|
|
6821
|
+
};
|
|
6822
|
+
};
|
|
6823
|
+
responses: {
|
|
6824
|
+
/** @description Reported */
|
|
6825
|
+
204: {
|
|
6826
|
+
headers: {
|
|
6827
|
+
[name: string]: unknown;
|
|
6828
|
+
};
|
|
6829
|
+
content?: never;
|
|
6830
|
+
};
|
|
6831
|
+
400: components["responses"]["BadRequest"];
|
|
6832
|
+
401: components["responses"]["Unauthorized"];
|
|
6833
|
+
403: components["responses"]["Forbidden"];
|
|
6834
|
+
404: components["responses"]["NotFound"];
|
|
6835
|
+
422: components["responses"]["ValidationFailed"];
|
|
6836
|
+
426: components["responses"]["ClientOutdated"];
|
|
6837
|
+
429: components["responses"]["TooManyRequests"];
|
|
6838
|
+
};
|
|
6839
|
+
};
|
|
6840
|
+
getStickerPackByLink: {
|
|
6841
|
+
parameters: {
|
|
6842
|
+
query?: never;
|
|
6843
|
+
header?: {
|
|
6844
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
6845
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
6846
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
6847
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6848
|
+
};
|
|
6849
|
+
path: {
|
|
6850
|
+
slug: components["parameters"]["StickerPackSlug"];
|
|
6851
|
+
};
|
|
6852
|
+
cookie?: never;
|
|
6853
|
+
};
|
|
6854
|
+
requestBody?: never;
|
|
6855
|
+
responses: {
|
|
6856
|
+
/** @description The pack */
|
|
6857
|
+
200: {
|
|
6858
|
+
headers: {
|
|
6859
|
+
[name: string]: unknown;
|
|
6860
|
+
};
|
|
6861
|
+
content: {
|
|
6862
|
+
"application/json": components["schemas"]["StickerPack"];
|
|
6863
|
+
};
|
|
6864
|
+
};
|
|
6865
|
+
400: components["responses"]["BadRequest"];
|
|
6866
|
+
401: components["responses"]["Unauthorized"];
|
|
6867
|
+
404: components["responses"]["NotFound"];
|
|
6868
|
+
426: components["responses"]["ClientOutdated"];
|
|
6869
|
+
};
|
|
6870
|
+
};
|
|
6352
6871
|
listRecentStickers: {
|
|
6353
6872
|
parameters: {
|
|
6354
6873
|
query?: never;
|
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.21. Do not edit. */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Any WebSocket event, in either direction.
|
|
@@ -81,6 +81,7 @@ export type CallIdentityKey = string;
|
|
|
81
81
|
export type ChatType = "direct" | "group";
|
|
82
82
|
export type MessageType = "text" | "file" | "voice" | "system" | "sticker";
|
|
83
83
|
export type AttachmentKind = "image" | "audio" | "voice" | "video" | "file";
|
|
84
|
+
export type StickerPackSlug = string;
|
|
84
85
|
export type SystemEventKind =
|
|
85
86
|
"group_created" | "member_added" | "member_joined" | "member_removed" | "member_left" | "call";
|
|
86
87
|
/**
|
|
@@ -120,6 +121,7 @@ export type ErrorCode =
|
|
|
120
121
|
| "call_ended"
|
|
121
122
|
| "already_in_call"
|
|
122
123
|
| "stale_epoch"
|
|
124
|
+
| "limit_reached"
|
|
123
125
|
| "internal_error";
|
|
124
126
|
|
|
125
127
|
/**
|
|
@@ -578,6 +580,12 @@ export interface ForwardedFrom {
|
|
|
578
580
|
export interface Sticker {
|
|
579
581
|
id: Id;
|
|
580
582
|
pack_id: Id;
|
|
583
|
+
/**
|
|
584
|
+
* The share link of the sticker's pack when a user made it; missing for built-in packs. A client that
|
|
585
|
+
* shows the pack of a sticker someone sent opens it with `GET /stickers/links/{slug}`.
|
|
586
|
+
*
|
|
587
|
+
*/
|
|
588
|
+
pack_slug?: StickerPackSlug;
|
|
581
589
|
/**
|
|
582
590
|
* The emoji the sticker stands for, for previews, notifications and search.
|
|
583
591
|
*/
|
|
@@ -211,6 +211,7 @@
|
|
|
211
211
|
"call_ended",
|
|
212
212
|
"already_in_call",
|
|
213
213
|
"stale_epoch",
|
|
214
|
+
"limit_reached",
|
|
214
215
|
"internal_error"
|
|
215
216
|
]
|
|
216
217
|
},
|
|
@@ -1127,9 +1128,11 @@
|
|
|
1127
1128
|
},
|
|
1128
1129
|
"UploadPurpose": {
|
|
1129
1130
|
"type": "string",
|
|
1131
|
+
"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",
|
|
1130
1132
|
"enum": [
|
|
1131
1133
|
"message",
|
|
1132
|
-
"avatar"
|
|
1134
|
+
"avatar",
|
|
1135
|
+
"sticker"
|
|
1133
1136
|
]
|
|
1134
1137
|
},
|
|
1135
1138
|
"UploadAttachmentRequest": {
|
|
@@ -1456,6 +1459,14 @@
|
|
|
1456
1459
|
"pack_id": {
|
|
1457
1460
|
"$ref": "#/$defs/Id"
|
|
1458
1461
|
},
|
|
1462
|
+
"pack_slug": {
|
|
1463
|
+
"allOf": [
|
|
1464
|
+
{
|
|
1465
|
+
"$ref": "#/$defs/StickerPackSlug"
|
|
1466
|
+
}
|
|
1467
|
+
],
|
|
1468
|
+
"description": "The share link of the sticker's pack when a user made it; missing for built-in packs. A client that\nshows the pack of a sticker someone sent opens it with `GET /stickers/links/{slug}`.\n"
|
|
1469
|
+
},
|
|
1459
1470
|
"emoji": {
|
|
1460
1471
|
"type": "string",
|
|
1461
1472
|
"minLength": 1,
|
|
@@ -1470,6 +1481,10 @@
|
|
|
1470
1481
|
}
|
|
1471
1482
|
}
|
|
1472
1483
|
},
|
|
1484
|
+
"StickerPackSlug": {
|
|
1485
|
+
"type": "string",
|
|
1486
|
+
"pattern": "^[A-Za-z0-9]{8,32}$"
|
|
1487
|
+
},
|
|
1473
1488
|
"StickerPack": {
|
|
1474
1489
|
"type": "object",
|
|
1475
1490
|
"required": [
|
|
@@ -1477,6 +1492,8 @@
|
|
|
1477
1492
|
"title",
|
|
1478
1493
|
"is_official",
|
|
1479
1494
|
"is_installed",
|
|
1495
|
+
"is_mine",
|
|
1496
|
+
"is_hidden",
|
|
1480
1497
|
"stickers"
|
|
1481
1498
|
],
|
|
1482
1499
|
"properties": {
|
|
@@ -1496,6 +1513,25 @@
|
|
|
1496
1513
|
"type": "boolean",
|
|
1497
1514
|
"description": "The pack is in the user's sticker panel."
|
|
1498
1515
|
},
|
|
1516
|
+
"is_mine": {
|
|
1517
|
+
"type": "boolean",
|
|
1518
|
+
"description": "The user made the pack and may change it."
|
|
1519
|
+
},
|
|
1520
|
+
"is_hidden": {
|
|
1521
|
+
"type": "boolean",
|
|
1522
|
+
"description": "Hidden after reports; only the owner sees such a pack, and nobody can send from it."
|
|
1523
|
+
},
|
|
1524
|
+
"owner_id": {
|
|
1525
|
+
"$ref": "#/$defs/Id"
|
|
1526
|
+
},
|
|
1527
|
+
"slug": {
|
|
1528
|
+
"allOf": [
|
|
1529
|
+
{
|
|
1530
|
+
"$ref": "#/$defs/StickerPackSlug"
|
|
1531
|
+
}
|
|
1532
|
+
],
|
|
1533
|
+
"description": "The share link of a pack a user made; missing for built-in packs."
|
|
1534
|
+
},
|
|
1499
1535
|
"stickers": {
|
|
1500
1536
|
"type": "array",
|
|
1501
1537
|
"maxItems": 120,
|
|
@@ -1520,6 +1556,105 @@
|
|
|
1520
1556
|
}
|
|
1521
1557
|
}
|
|
1522
1558
|
},
|
|
1559
|
+
"CreateStickerPackRequest": {
|
|
1560
|
+
"type": "object",
|
|
1561
|
+
"additionalProperties": false,
|
|
1562
|
+
"required": [
|
|
1563
|
+
"title"
|
|
1564
|
+
],
|
|
1565
|
+
"properties": {
|
|
1566
|
+
"title": {
|
|
1567
|
+
"type": "string",
|
|
1568
|
+
"minLength": 1,
|
|
1569
|
+
"maxLength": 64
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
"UpdateStickerPackRequest": {
|
|
1574
|
+
"type": "object",
|
|
1575
|
+
"additionalProperties": false,
|
|
1576
|
+
"required": [
|
|
1577
|
+
"title"
|
|
1578
|
+
],
|
|
1579
|
+
"properties": {
|
|
1580
|
+
"title": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"minLength": 1,
|
|
1583
|
+
"maxLength": 64
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
},
|
|
1587
|
+
"AddStickerRequest": {
|
|
1588
|
+
"type": "object",
|
|
1589
|
+
"additionalProperties": false,
|
|
1590
|
+
"required": [
|
|
1591
|
+
"attachment_id",
|
|
1592
|
+
"emoji"
|
|
1593
|
+
],
|
|
1594
|
+
"properties": {
|
|
1595
|
+
"attachment_id": {
|
|
1596
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
1597
|
+
},
|
|
1598
|
+
"emoji": {
|
|
1599
|
+
"type": "string",
|
|
1600
|
+
"minLength": 1,
|
|
1601
|
+
"maxLength": 32
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
},
|
|
1605
|
+
"UpdateStickerRequest": {
|
|
1606
|
+
"type": "object",
|
|
1607
|
+
"additionalProperties": false,
|
|
1608
|
+
"required": [
|
|
1609
|
+
"emoji"
|
|
1610
|
+
],
|
|
1611
|
+
"properties": {
|
|
1612
|
+
"emoji": {
|
|
1613
|
+
"type": "string",
|
|
1614
|
+
"minLength": 1,
|
|
1615
|
+
"maxLength": 32
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
"ReorderStickersRequest": {
|
|
1620
|
+
"type": "object",
|
|
1621
|
+
"additionalProperties": false,
|
|
1622
|
+
"required": [
|
|
1623
|
+
"sticker_ids"
|
|
1624
|
+
],
|
|
1625
|
+
"properties": {
|
|
1626
|
+
"sticker_ids": {
|
|
1627
|
+
"type": "array",
|
|
1628
|
+
"maxItems": 120,
|
|
1629
|
+
"items": {
|
|
1630
|
+
"$ref": "#/$defs/Id"
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
"StickerPackReportReason": {
|
|
1636
|
+
"type": "string",
|
|
1637
|
+
"enum": [
|
|
1638
|
+
"spam",
|
|
1639
|
+
"violence",
|
|
1640
|
+
"sexual",
|
|
1641
|
+
"hate",
|
|
1642
|
+
"copyright",
|
|
1643
|
+
"other"
|
|
1644
|
+
]
|
|
1645
|
+
},
|
|
1646
|
+
"ReportStickerPackRequest": {
|
|
1647
|
+
"type": "object",
|
|
1648
|
+
"additionalProperties": false,
|
|
1649
|
+
"required": [
|
|
1650
|
+
"reason"
|
|
1651
|
+
],
|
|
1652
|
+
"properties": {
|
|
1653
|
+
"reason": {
|
|
1654
|
+
"$ref": "#/$defs/StickerPackReportReason"
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1523
1658
|
"StickerList": {
|
|
1524
1659
|
"type": "object",
|
|
1525
1660
|
"required": [
|
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.21.next.98",
|
|
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": {
|