@myronsi/messenger-api 2.1.0-alpha.49.next.171 → 2.1.0-alpha.50

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 CHANGED
@@ -2,6 +2,20 @@
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.50
6
+
7
+ - Synced settings: `GET` and `PATCH /me/client-settings` (`ClientSettings`, `UpdateClientSettingsRequest`,
8
+ `AppearanceSettings`): appearance, recent emoji (24) and recent reactions (8) shared by all devices.
9
+ - Chat backgrounds: `GET /me/wallpapers` (`WallpaperList`), `PUT` and `DELETE /me/wallpapers/default`, `PUT` and
10
+ `DELETE /chats/{chat_id}/wallpaper` (`SetChatWallpaperRequest` with `for_both` for direct chats), `Wallpaper`,
11
+ `WallpaperEntry`, `WallpaperPattern`. `UploadPurpose` gains `chat_wallpaper`; `SystemEventKind` gains
12
+ `chat_wallpaper_set`.
13
+ - Playlists: `GET` and `POST /me/playlists`, `GET`, `PATCH` and `DELETE /me/playlists/{playlist_id}`,
14
+ `PUT /me/playlists/{playlist_id}/tracks` (`Playlist`, `PlaylistSummary`, `PlaylistTrack` with `available`). At most
15
+ 100 playlists and 1000 tracks each.
16
+ - WebSocket server events `client_settings_updated`, `wallpaper_updated` and `playlists_updated`, only to the user's
17
+ own sessions.
18
+
5
19
  ## 2.1.0-alpha.49
6
20
 
7
21
  - Chat imports hold up to 500,000 messages: `ChatImport.message_count` and `StartChatImportRequest.message_count`
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.49. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.49";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.50. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.50";
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.49";
1
+ export const API_VERSION = "2.1.0-alpha.50";
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.49
4
+ version: 2.1.0-alpha.50
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
@@ -515,6 +515,261 @@ paths:
515
515
  application/json:
516
516
  schema: { $ref: "#/components/schemas/Me" }
517
517
  "401": { $ref: "#/components/responses/Unauthorized" }
518
+ /me/client-settings:
519
+ parameters:
520
+ - $ref: "#/components/parameters/ClientVersion"
521
+ - $ref: "#/components/parameters/ClientApiVersion"
522
+ get:
523
+ tags: [me]
524
+ operationId: getClientSettings
525
+ summary: Appearance and recent emoji shared by all of the caller's devices
526
+ description: |
527
+ `appearance` is `null` until a device saved it once. Theme and language are not part of it; they stay on each
528
+ device.
529
+ responses:
530
+ "426": { $ref: "#/components/responses/ClientOutdated" }
531
+ "200":
532
+ description: Settings
533
+ content:
534
+ application/json:
535
+ schema: { $ref: "#/components/schemas/ClientSettings" }
536
+ "401": { $ref: "#/components/responses/Unauthorized" }
537
+ patch:
538
+ tags: [me]
539
+ operationId: updateClientSettings
540
+ summary: Change some of the synced settings
541
+ description: |
542
+ Send only the parts that changed; each part replaces the stored one (last write wins). `version` goes up on
543
+ every change. Sends `client_settings_updated` with the result to all of the caller's sessions.
544
+ requestBody:
545
+ required: true
546
+ content:
547
+ application/json:
548
+ schema: { $ref: "#/components/schemas/UpdateClientSettingsRequest" }
549
+ responses:
550
+ "426": { $ref: "#/components/responses/ClientOutdated" }
551
+ "200":
552
+ description: Settings after the change
553
+ content:
554
+ application/json:
555
+ schema: { $ref: "#/components/schemas/ClientSettings" }
556
+ "400": { $ref: "#/components/responses/BadRequest" }
557
+ "401": { $ref: "#/components/responses/Unauthorized" }
558
+ "422": { $ref: "#/components/responses/ValidationFailed" }
559
+ /me/wallpapers:
560
+ parameters:
561
+ - $ref: "#/components/parameters/ClientVersion"
562
+ - $ref: "#/components/parameters/ClientApiVersion"
563
+ get:
564
+ tags: [me]
565
+ operationId: listWallpapers
566
+ summary: The caller's chat backgrounds
567
+ description: |
568
+ The default background for all chats (`chat_id: null`) and every chat with its own background. A chat
569
+ without an entry uses the default; without a default, clients show their built-in plain background.
570
+ responses:
571
+ "426": { $ref: "#/components/responses/ClientOutdated" }
572
+ "200":
573
+ description: Backgrounds
574
+ content:
575
+ application/json:
576
+ schema: { $ref: "#/components/schemas/WallpaperList" }
577
+ "401": { $ref: "#/components/responses/Unauthorized" }
578
+ /me/wallpapers/default:
579
+ parameters:
580
+ - $ref: "#/components/parameters/ClientVersion"
581
+ - $ref: "#/components/parameters/ClientApiVersion"
582
+ put:
583
+ tags: [me]
584
+ operationId: setDefaultWallpaper
585
+ summary: Set the background for all chats
586
+ description: |
587
+ For `media`, upload the image with purpose `chat_wallpaper` first. Sends `wallpaper_updated` to the caller's
588
+ sessions.
589
+ requestBody:
590
+ required: true
591
+ content:
592
+ application/json:
593
+ schema: { $ref: "#/components/schemas/SetWallpaperRequest" }
594
+ responses:
595
+ "426": { $ref: "#/components/responses/ClientOutdated" }
596
+ "200":
597
+ description: The stored background
598
+ content:
599
+ application/json:
600
+ schema: { $ref: "#/components/schemas/WallpaperEntry" }
601
+ "400": { $ref: "#/components/responses/BadRequest" }
602
+ "401": { $ref: "#/components/responses/Unauthorized" }
603
+ "422": { $ref: "#/components/responses/ValidationFailed" }
604
+ delete:
605
+ tags: [me]
606
+ operationId: deleteDefaultWallpaper
607
+ summary: Go back to the built-in background for all chats
608
+ description: Chats with their own background keep it. Sends `wallpaper_updated` to the caller's sessions.
609
+ responses:
610
+ "426": { $ref: "#/components/responses/ClientOutdated" }
611
+ "204": { description: Removed }
612
+ "401": { $ref: "#/components/responses/Unauthorized" }
613
+ /chats/{chat_id}/wallpaper:
614
+ parameters:
615
+ - $ref: "#/components/parameters/ClientVersion"
616
+ - $ref: "#/components/parameters/ClientApiVersion"
617
+ - $ref: "#/components/parameters/ChatId"
618
+ put:
619
+ tags: [chats]
620
+ operationId: setChatWallpaper
621
+ summary: Set the background of one chat
622
+ description: |
623
+ Only the caller sees it, unless `for_both` is `true`: in a direct chat with another person this stores the
624
+ same background for both of them (each can change or reset their own copy afterwards), posts the system line
625
+ `chat_wallpaper_set` and sends `wallpaper_updated` to both. `for_both` is refused with `403` in groups and
626
+ Saved Messages, and with `403` `blocked_by_user` when either person blocked the other. For `media`, upload
627
+ the image with purpose `chat_wallpaper` first.
628
+ requestBody:
629
+ required: true
630
+ content:
631
+ application/json:
632
+ schema: { $ref: "#/components/schemas/SetChatWallpaperRequest" }
633
+ responses:
634
+ "426": { $ref: "#/components/responses/ClientOutdated" }
635
+ "200":
636
+ description: The caller's background of this chat
637
+ content:
638
+ application/json:
639
+ schema: { $ref: "#/components/schemas/WallpaperEntry" }
640
+ "400": { $ref: "#/components/responses/BadRequest" }
641
+ "401": { $ref: "#/components/responses/Unauthorized" }
642
+ "403": { $ref: "#/components/responses/Forbidden" }
643
+ "404": { $ref: "#/components/responses/NotFound" }
644
+ "422": { $ref: "#/components/responses/ValidationFailed" }
645
+ delete:
646
+ tags: [chats]
647
+ operationId: deleteChatWallpaper
648
+ summary: Use the default background in this chat again
649
+ description: Only the caller's copy is removed. Sends `wallpaper_updated` to the caller's sessions.
650
+ responses:
651
+ "426": { $ref: "#/components/responses/ClientOutdated" }
652
+ "204": { description: Removed }
653
+ "401": { $ref: "#/components/responses/Unauthorized" }
654
+ "404": { $ref: "#/components/responses/NotFound" }
655
+ /me/playlists:
656
+ parameters:
657
+ - $ref: "#/components/parameters/ClientVersion"
658
+ - $ref: "#/components/parameters/ClientApiVersion"
659
+ get:
660
+ tags: [me]
661
+ operationId: listPlaylists
662
+ summary: The caller's playlists, newest first, without their tracks
663
+ responses:
664
+ "426": { $ref: "#/components/responses/ClientOutdated" }
665
+ "200":
666
+ description: Playlists
667
+ content:
668
+ application/json:
669
+ schema: { $ref: "#/components/schemas/PlaylistList" }
670
+ "401": { $ref: "#/components/responses/Unauthorized" }
671
+ post:
672
+ tags: [me]
673
+ operationId: createPlaylist
674
+ summary: Create a playlist
675
+ description: |
676
+ At most 100 playlists per user (`409` `limit_reached`). Sends `playlists_updated` to the caller's sessions.
677
+ requestBody:
678
+ required: true
679
+ content:
680
+ application/json:
681
+ schema: { $ref: "#/components/schemas/CreatePlaylistRequest" }
682
+ responses:
683
+ "426": { $ref: "#/components/responses/ClientOutdated" }
684
+ "201":
685
+ description: Created playlist
686
+ content:
687
+ application/json:
688
+ schema: { $ref: "#/components/schemas/Playlist" }
689
+ "400": { $ref: "#/components/responses/BadRequest" }
690
+ "401": { $ref: "#/components/responses/Unauthorized" }
691
+ "409": { $ref: "#/components/responses/Conflict" }
692
+ "422": { $ref: "#/components/responses/ValidationFailed" }
693
+ /me/playlists/{playlist_id}:
694
+ parameters:
695
+ - $ref: "#/components/parameters/ClientVersion"
696
+ - $ref: "#/components/parameters/ClientApiVersion"
697
+ - $ref: "#/components/parameters/PlaylistId"
698
+ get:
699
+ tags: [me]
700
+ operationId: getPlaylist
701
+ summary: A playlist with its tracks
702
+ responses:
703
+ "426": { $ref: "#/components/responses/ClientOutdated" }
704
+ "200":
705
+ description: Playlist
706
+ content:
707
+ application/json:
708
+ schema: { $ref: "#/components/schemas/Playlist" }
709
+ "401": { $ref: "#/components/responses/Unauthorized" }
710
+ "404": { $ref: "#/components/responses/NotFound" }
711
+ patch:
712
+ tags: [me]
713
+ operationId: renamePlaylist
714
+ summary: Rename a playlist
715
+ description: Sends `playlists_updated` to the caller's sessions.
716
+ requestBody:
717
+ required: true
718
+ content:
719
+ application/json:
720
+ schema: { $ref: "#/components/schemas/RenamePlaylistRequest" }
721
+ responses:
722
+ "426": { $ref: "#/components/responses/ClientOutdated" }
723
+ "200":
724
+ description: Renamed playlist
725
+ content:
726
+ application/json:
727
+ schema: { $ref: "#/components/schemas/PlaylistSummary" }
728
+ "400": { $ref: "#/components/responses/BadRequest" }
729
+ "401": { $ref: "#/components/responses/Unauthorized" }
730
+ "404": { $ref: "#/components/responses/NotFound" }
731
+ "422": { $ref: "#/components/responses/ValidationFailed" }
732
+ delete:
733
+ tags: [me]
734
+ operationId: deletePlaylist
735
+ summary: Delete a playlist
736
+ description: Sends `playlists_updated` to the caller's sessions.
737
+ responses:
738
+ "426": { $ref: "#/components/responses/ClientOutdated" }
739
+ "204": { description: Deleted }
740
+ "401": { $ref: "#/components/responses/Unauthorized" }
741
+ "404": { $ref: "#/components/responses/NotFound" }
742
+ /me/playlists/{playlist_id}/tracks:
743
+ parameters:
744
+ - $ref: "#/components/parameters/ClientVersion"
745
+ - $ref: "#/components/parameters/ClientApiVersion"
746
+ - $ref: "#/components/parameters/PlaylistId"
747
+ put:
748
+ tags: [me]
749
+ operationId: replacePlaylistTracks
750
+ summary: Replace the tracks of a playlist
751
+ description: |
752
+ The full ordered list, so adding, removing and moving tracks are one call. `version` must be the playlist's
753
+ current version; otherwise `409` `conflict` and nothing changes (load the playlist again and reapply the
754
+ change). At most 1000 tracks and each attachment once (`422`). Sends `playlists_updated` to the caller's
755
+ sessions.
756
+ requestBody:
757
+ required: true
758
+ content:
759
+ application/json:
760
+ schema: { $ref: "#/components/schemas/ReplacePlaylistTracksRequest" }
761
+ responses:
762
+ "426": { $ref: "#/components/responses/ClientOutdated" }
763
+ "200":
764
+ description: Playlist after the change
765
+ content:
766
+ application/json:
767
+ schema: { $ref: "#/components/schemas/Playlist" }
768
+ "400": { $ref: "#/components/responses/BadRequest" }
769
+ "401": { $ref: "#/components/responses/Unauthorized" }
770
+ "404": { $ref: "#/components/responses/NotFound" }
771
+ "409": { $ref: "#/components/responses/Conflict" }
772
+ "422": { $ref: "#/components/responses/ValidationFailed" }
518
773
  /me/password:
519
774
  parameters:
520
775
  - $ref: "#/components/parameters/ClientVersion"
@@ -6473,6 +6728,11 @@ components:
6473
6728
  in: path
6474
6729
  required: true
6475
6730
  schema: { $ref: "#/components/schemas/Id" }
6731
+ PlaylistId:
6732
+ name: playlist_id
6733
+ in: path
6734
+ required: true
6735
+ schema: { $ref: "#/components/schemas/Id" }
6476
6736
  MessageId:
6477
6737
  name: message_id
6478
6738
  in: path
@@ -7615,6 +7875,226 @@ components:
7615
7875
  minItems: 1
7616
7876
  maxItems: 2
7617
7877
  items: { $ref: "#/components/schemas/BackgroundColor" }
7878
+ AppearanceSettings:
7879
+ type: object
7880
+ description: |
7881
+ The look of the app shared by the user's devices. A device may keep its own value for any field ("only on
7882
+ this device"); that choice is stored on the device, not here.
7883
+ required: [accent, font_size, density, corners]
7884
+ properties:
7885
+ accent:
7886
+ type: string
7887
+ pattern: "^[a-z0-9_-]{1,32}$"
7888
+ description: Name of a client accent color. Clients use their default for a name they do not know.
7889
+ font_size: { type: integer, minimum: 14, maximum: 20 }
7890
+ density: { type: string, enum: [comfortable, compact] }
7891
+ corners: { type: string, enum: [sharp, default, round] }
7892
+ RecentEmoji:
7893
+ type: string
7894
+ minLength: 1
7895
+ maxLength: 100
7896
+ description: A Unicode emoji or a custom emoji token, exactly as the client inserts it.
7897
+ ClientSettings:
7898
+ type: object
7899
+ required: [appearance, recent_emoji, recent_reactions, version, updated_at]
7900
+ properties:
7901
+ appearance:
7902
+ oneOf:
7903
+ - $ref: "#/components/schemas/AppearanceSettings"
7904
+ - type: "null"
7905
+ recent_emoji:
7906
+ type: array
7907
+ maxItems: 24
7908
+ description: Newest first.
7909
+ items: { $ref: "#/components/schemas/RecentEmoji" }
7910
+ recent_reactions:
7911
+ type: array
7912
+ maxItems: 8
7913
+ description: Newest first.
7914
+ items: { $ref: "#/components/schemas/RecentEmoji" }
7915
+ version:
7916
+ type: integer
7917
+ format: int64
7918
+ minimum: 0
7919
+ description: Goes up on every change; `0` when nothing was saved yet.
7920
+ updated_at:
7921
+ oneOf:
7922
+ - $ref: "#/components/schemas/Timestamp"
7923
+ - type: "null"
7924
+ UpdateClientSettingsRequest:
7925
+ type: object
7926
+ minProperties: 1
7927
+ description: Only the parts to replace. Duplicates in the lists are dropped, keeping the first.
7928
+ properties:
7929
+ appearance: { $ref: "#/components/schemas/AppearanceSettings" }
7930
+ recent_emoji:
7931
+ type: array
7932
+ maxItems: 24
7933
+ items: { $ref: "#/components/schemas/RecentEmoji" }
7934
+ recent_reactions:
7935
+ type: array
7936
+ maxItems: 8
7937
+ items: { $ref: "#/components/schemas/RecentEmoji" }
7938
+ WallpaperPattern:
7939
+ type: string
7940
+ description: Dots or a grid drawn over a `color` background.
7941
+ enum: [none, dots, grid]
7942
+ Wallpaper:
7943
+ type: object
7944
+ description: |
7945
+ `preset` a built-in background of the clients (`preset`), `color` one color or a gradient of two (`colors`,
7946
+ optional `pattern`), `media` an uploaded photo (`attachment`) with `blur` in px and `dim` in percent. A `media`
7947
+ background without `dim` is dimmed automatically by the client (20 % in a dark theme, none in a light one).
7948
+ required: [kind]
7949
+ properties:
7950
+ kind: { $ref: "#/components/schemas/ProfileBackgroundKind" }
7951
+ preset: { $ref: "#/components/schemas/BackgroundPreset" }
7952
+ colors:
7953
+ type: array
7954
+ minItems: 1
7955
+ maxItems: 2
7956
+ items: { $ref: "#/components/schemas/BackgroundColor" }
7957
+ pattern: { $ref: "#/components/schemas/WallpaperPattern" }
7958
+ attachment: { $ref: "#/components/schemas/Attachment" }
7959
+ blur: { type: integer, minimum: 0, maximum: 20 }
7960
+ dim: { type: integer, minimum: 0, maximum: 60 }
7961
+ SetWallpaperRequest:
7962
+ type: object
7963
+ required: [kind]
7964
+ description: |
7965
+ `preset` needs `preset`; `color` needs `colors` and may have `pattern`; `media` needs `attachment_id` (an
7966
+ upload of the caller with purpose `chat_wallpaper`) and may have `blur` (default `0`) and `dim` (absent:
7967
+ automatic, see `Wallpaper`). Other fields must be absent (`422` otherwise).
7968
+ properties:
7969
+ kind: { $ref: "#/components/schemas/ProfileBackgroundKind" }
7970
+ preset: { $ref: "#/components/schemas/BackgroundPreset" }
7971
+ colors:
7972
+ type: array
7973
+ minItems: 1
7974
+ maxItems: 2
7975
+ items: { $ref: "#/components/schemas/BackgroundColor" }
7976
+ pattern: { $ref: "#/components/schemas/WallpaperPattern" }
7977
+ attachment_id: { $ref: "#/components/schemas/AttachmentRef" }
7978
+ blur: { type: integer, minimum: 0, maximum: 20 }
7979
+ dim: { type: integer, minimum: 0, maximum: 60 }
7980
+ SetChatWallpaperRequest:
7981
+ allOf:
7982
+ - $ref: "#/components/schemas/SetWallpaperRequest"
7983
+ - type: object
7984
+ properties:
7985
+ for_both:
7986
+ type: boolean
7987
+ default: false
7988
+ description: Direct chats with another person only. Also sets it as the other person's background.
7989
+ WallpaperEntry:
7990
+ type: object
7991
+ required: [chat_id, wallpaper, set_by, updated_at]
7992
+ properties:
7993
+ chat_id:
7994
+ description: The chat, or `null` for the default of all chats.
7995
+ oneOf:
7996
+ - $ref: "#/components/schemas/Id"
7997
+ - type: "null"
7998
+ wallpaper: { $ref: "#/components/schemas/Wallpaper" }
7999
+ set_by:
8000
+ description: Who set it; the other person when they used `for_both`.
8001
+ allOf: [{ $ref: "#/components/schemas/Id" }]
8002
+ updated_at: { $ref: "#/components/schemas/Timestamp" }
8003
+ WallpaperList:
8004
+ type: object
8005
+ required: [items]
8006
+ properties:
8007
+ items:
8008
+ type: array
8009
+ items: { $ref: "#/components/schemas/WallpaperEntry" }
8010
+ PlaylistName:
8011
+ type: string
8012
+ minLength: 1
8013
+ maxLength: 60
8014
+ description: Trimmed by the server; empty after trimming is `422`.
8015
+ PlaylistSummary:
8016
+ type: object
8017
+ required: [id, name, track_count, version, created_at, updated_at]
8018
+ properties:
8019
+ id: { $ref: "#/components/schemas/Id" }
8020
+ name: { type: string }
8021
+ track_count: { type: integer, minimum: 0, maximum: 1000 }
8022
+ version:
8023
+ type: integer
8024
+ format: int64
8025
+ minimum: 1
8026
+ description: Goes up on every change of the name or the tracks.
8027
+ created_at: { $ref: "#/components/schemas/Timestamp" }
8028
+ updated_at: { $ref: "#/components/schemas/Timestamp" }
8029
+ PlaylistTrack:
8030
+ type: object
8031
+ required: [attachment_id, title, available]
8032
+ properties:
8033
+ attachment_id: { $ref: "#/components/schemas/AttachmentRef" }
8034
+ attachment:
8035
+ description: Set only when `available`.
8036
+ allOf: [{ $ref: "#/components/schemas/Attachment" }]
8037
+ available:
8038
+ type: boolean
8039
+ description: |
8040
+ `false` when the caller can no longer open the file (left the chat, the message was deleted). Clients show
8041
+ the track greyed out; the server does not serve it.
8042
+ chat_id: { $ref: "#/components/schemas/Id" }
8043
+ message_id: { $ref: "#/components/schemas/Id" }
8044
+ title: { type: string }
8045
+ artist: { type: string }
8046
+ duration_seconds: { type: number, minimum: 0 }
8047
+ Playlist:
8048
+ allOf:
8049
+ - $ref: "#/components/schemas/PlaylistSummary"
8050
+ - type: object
8051
+ required: [tracks]
8052
+ properties:
8053
+ tracks:
8054
+ type: array
8055
+ maxItems: 1000
8056
+ items: { $ref: "#/components/schemas/PlaylistTrack" }
8057
+ PlaylistList:
8058
+ type: object
8059
+ required: [items]
8060
+ properties:
8061
+ items:
8062
+ type: array
8063
+ maxItems: 100
8064
+ items: { $ref: "#/components/schemas/PlaylistSummary" }
8065
+ PlaylistTrackInput:
8066
+ type: object
8067
+ required: [attachment_id, title]
8068
+ properties:
8069
+ attachment_id: { $ref: "#/components/schemas/AttachmentRef" }
8070
+ chat_id: { $ref: "#/components/schemas/Id" }
8071
+ message_id: { $ref: "#/components/schemas/Id" }
8072
+ title: { type: string, minLength: 1, maxLength: 200 }
8073
+ artist: { type: string, maxLength: 200 }
8074
+ duration_seconds: { type: number, minimum: 0, maximum: 86400 }
8075
+ CreatePlaylistRequest:
8076
+ type: object
8077
+ required: [name]
8078
+ properties:
8079
+ name: { $ref: "#/components/schemas/PlaylistName" }
8080
+ tracks:
8081
+ type: array
8082
+ maxItems: 1000
8083
+ items: { $ref: "#/components/schemas/PlaylistTrackInput" }
8084
+ RenamePlaylistRequest:
8085
+ type: object
8086
+ required: [name]
8087
+ properties:
8088
+ name: { $ref: "#/components/schemas/PlaylistName" }
8089
+ ReplacePlaylistTracksRequest:
8090
+ type: object
8091
+ required: [version, tracks]
8092
+ properties:
8093
+ version: { type: integer, format: int64, minimum: 1 }
8094
+ tracks:
8095
+ type: array
8096
+ maxItems: 1000
8097
+ items: { $ref: "#/components/schemas/PlaylistTrackInput" }
7618
8098
  SetBackgroundRequest:
7619
8099
  type: object
7620
8100
  required: [kind]
@@ -7696,7 +8176,11 @@ components:
7696
8176
  `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
7697
8177
  by frame) and refuses it with `413` when the result is still over 256 KB. Use it with
7698
8178
  `POST /emoji/packs/{pack_id}/emoji`.
7699
- enum: [message, avatar, sticker, profile_music, profile_background, emoji]
8179
+
8180
+ `chat_wallpaper`: a still image (JPEG, PNG, WebP or HEIC) of at most 10 MB; no GIF or video. Use it with
8181
+ `PUT /me/wallpapers/default` or `PUT /chats/{chat_id}/wallpaper`. Its uploader can load it, and the other
8182
+ person of a direct chat once it was set there for both.
8183
+ enum: [message, avatar, sticker, profile_music, profile_background, emoji, chat_wallpaper]
7700
8184
  UploadAttachmentRequest:
7701
8185
  type: object
7702
8186
  required: [file, purpose]
@@ -8518,7 +9002,7 @@ components:
8518
9002
  height: { type: [integer, "null"], minimum: 1 }
8519
9003
  SystemEventKind:
8520
9004
  type: string
8521
- enum: [group_created, member_added, member_joined, member_removed, member_left, call, message_pinned, message_unpinned, history_imported, history_import_ended, imported_note, group_renamed, group_avatar_changed, owner_transferred]
9005
+ enum: [group_created, member_added, member_joined, member_removed, member_left, call, message_pinned, message_unpinned, history_imported, history_import_ended, imported_note, group_renamed, group_avatar_changed, owner_transferred, chat_wallpaper_set]
8522
9006
  SystemEvent:
8523
9007
  type: object
8524
9008
  description: |
@@ -8527,7 +9011,8 @@ components:
8527
9011
  `member_removed` and `owner_transferred` (the new owner; `actor` is the previous one). `call` is set for
8528
9012
  `call` messages: one per call, posted when the call ends, `actor` is the initiator. `message_id` and
8529
9013
  `snippet` are set for `message_pinned` and `message_unpinned`. `old_name` and `new_name` are set for
8530
- `group_renamed`, `avatar_removed` for `group_avatar_changed`.
9014
+ `group_renamed`, `avatar_removed` for `group_avatar_changed`. `chat_wallpaper_set`: `actor` set a background
9015
+ for both people of a direct chat.
8531
9016
  `history_imported` opens and `history_import_ended` closes an imported history; both carry `import`, and
8532
9017
  `actor` is the importer. `imported_note` is a line of the export that is not a message; its text is `text`.
8533
9018
  required: [kind, actor_id, actor_name]