@myronsi/messenger-api 2.1.0-alpha.32.next.119 → 2.1.0-alpha.33
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/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +35 -7
- package/dist/schema.d.ts +42 -9
- package/dist/ws-events.d.ts +1 -1
- package/dist/ws-events.schema.json +32 -4
- package/package.json +1 -1
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.33. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.1.0-alpha.33";
|
|
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.33";
|
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.33
|
|
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
|
|
@@ -726,7 +726,7 @@ paths:
|
|
|
726
726
|
required: true
|
|
727
727
|
schema:
|
|
728
728
|
type: string
|
|
729
|
-
enum: [avatar_visibility, profile_visibility, presence_visibility, last_seen_visibility, birthday_visibility, group_invites, direct_messages, search_visibility]
|
|
729
|
+
enum: [avatar_visibility, profile_visibility, presence_visibility, last_seen_visibility, birthday_visibility, group_invites, direct_messages, search_visibility, calls_from]
|
|
730
730
|
- name: effect
|
|
731
731
|
in: path
|
|
732
732
|
required: true
|
|
@@ -5768,15 +5768,31 @@ components:
|
|
|
5768
5768
|
Visibility:
|
|
5769
5769
|
type: string
|
|
5770
5770
|
description: |
|
|
5771
|
-
Who may see the item. The exception lists apply to every value
|
|
5772
|
-
`contacts` are the users you share a
|
|
5771
|
+
Who may see the item. The exception lists apply to every value.
|
|
5772
|
+
`contacts` are the users you share a direct chat with that you opened or read in, or a group you created,
|
|
5773
|
+
joined by accepting an invitation, or read or wrote in. Being added to a group alone does not make its
|
|
5774
|
+
members your contacts.
|
|
5775
|
+
Deprecated: `everyone_except` and `nobody_except` are still accepted and stored as `everyone` and `nobody`;
|
|
5776
|
+
they are never returned.
|
|
5773
5777
|
enum: [everyone, contacts, everyone_except, nobody_except, nobody]
|
|
5774
5778
|
DirectMessagePolicy:
|
|
5775
5779
|
type: string
|
|
5776
|
-
|
|
5780
|
+
description: |
|
|
5781
|
+
Who may open a direct chat with the user. `everyone`; `contacts` (see `Visibility`); `wait_approval`: others
|
|
5782
|
+
send a request the user approves; `nobody`: no new direct chats and no requests (existing chats stay).
|
|
5783
|
+
Allow exceptions still let the listed users in.
|
|
5784
|
+
Deprecated: `shared_chats` is the old name of `contacts`; it is still accepted and never returned.
|
|
5785
|
+
enum: [everyone, shared_chats, wait_approval, contacts, nobody]
|
|
5777
5786
|
GroupInvitePolicy:
|
|
5778
5787
|
type: string
|
|
5788
|
+
description: |
|
|
5789
|
+
Who may add the user to a group. Defaults to `contacts`. Deprecated: `everyone_except` and `nobody_except`
|
|
5790
|
+
are still accepted and stored as `everyone` and `nobody`; they are never returned.
|
|
5779
5791
|
enum: [everyone, contacts, everyone_except, nobody_except, nobody, wait_approval]
|
|
5792
|
+
CallPolicy:
|
|
5793
|
+
type: string
|
|
5794
|
+
description: Who may ring the user (`contacts` as in `Visibility`).
|
|
5795
|
+
enum: [everyone, contacts, nobody]
|
|
5780
5796
|
SearchVisibility:
|
|
5781
5797
|
type: string
|
|
5782
5798
|
enum: [everyone, nobody]
|
|
@@ -5806,6 +5822,7 @@ components:
|
|
|
5806
5822
|
- group_invites
|
|
5807
5823
|
- search_visibility
|
|
5808
5824
|
- calls_enabled
|
|
5825
|
+
- calls_from
|
|
5809
5826
|
- typing_indicators_enabled
|
|
5810
5827
|
- exceptions
|
|
5811
5828
|
properties:
|
|
@@ -5826,7 +5843,14 @@ components:
|
|
|
5826
5843
|
search_visibility: { $ref: "#/components/schemas/SearchVisibility" }
|
|
5827
5844
|
calls_enabled:
|
|
5828
5845
|
type: boolean
|
|
5829
|
-
|
|
5846
|
+
deprecated: true
|
|
5847
|
+
description: "`false` exactly when `calls_from` is `nobody`. Use `calls_from`."
|
|
5848
|
+
calls_from:
|
|
5849
|
+
description: |
|
|
5850
|
+
Who may ring this user, with the `calls_from` exceptions. Calls are only possible from an existing direct
|
|
5851
|
+
chat or a shared group. A direct call to a user who does not allow the caller is refused; in a group call
|
|
5852
|
+
only the members who allow the caller are rung, the others can still join.
|
|
5853
|
+
allOf: [{ $ref: "#/components/schemas/CallPolicy" }]
|
|
5830
5854
|
typing_indicators_enabled:
|
|
5831
5855
|
type: boolean
|
|
5832
5856
|
description: Whether other members see that this user is typing or recording a voice message. The user still sees theirs.
|
|
@@ -5844,7 +5868,11 @@ components:
|
|
|
5844
5868
|
direct_messages: { $ref: "#/components/schemas/DirectMessagePolicy" }
|
|
5845
5869
|
group_invites: { $ref: "#/components/schemas/GroupInvitePolicy" }
|
|
5846
5870
|
search_visibility: { $ref: "#/components/schemas/SearchVisibility" }
|
|
5847
|
-
calls_enabled:
|
|
5871
|
+
calls_enabled:
|
|
5872
|
+
type: boolean
|
|
5873
|
+
deprecated: true
|
|
5874
|
+
description: "`false` sets `calls_from` to `nobody`; `true` sets it to `everyone` when it was `nobody`. Ignored when `calls_from` is sent."
|
|
5875
|
+
calls_from: { $ref: "#/components/schemas/CallPolicy" }
|
|
5848
5876
|
typing_indicators_enabled: { type: boolean }
|
|
5849
5877
|
PrivacyExceptionsRequest:
|
|
5850
5878
|
type: object
|
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.33. Do not edit. */
|
|
2
2
|
export interface paths {
|
|
3
3
|
"/meta": {
|
|
4
4
|
parameters: {
|
|
@@ -563,7 +563,7 @@ export interface paths {
|
|
|
563
563
|
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
564
564
|
};
|
|
565
565
|
path: {
|
|
566
|
-
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "last_seen_visibility" | "birthday_visibility" | "group_invites" | "direct_messages" | "search_visibility";
|
|
566
|
+
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "last_seen_visibility" | "birthday_visibility" | "group_invites" | "direct_messages" | "search_visibility" | "calls_from";
|
|
567
567
|
effect: "allow" | "deny";
|
|
568
568
|
};
|
|
569
569
|
cookie?: never;
|
|
@@ -3996,15 +3996,34 @@ export interface components {
|
|
|
3996
3996
|
code?: string;
|
|
3997
3997
|
};
|
|
3998
3998
|
/**
|
|
3999
|
-
* @description Who may see the item. The exception lists apply to every value
|
|
4000
|
-
* `contacts` are the users you share a
|
|
3999
|
+
* @description Who may see the item. The exception lists apply to every value.
|
|
4000
|
+
* `contacts` are the users you share a direct chat with that you opened or read in, or a group you created,
|
|
4001
|
+
* joined by accepting an invitation, or read or wrote in. Being added to a group alone does not make its
|
|
4002
|
+
* members your contacts.
|
|
4003
|
+
* Deprecated: `everyone_except` and `nobody_except` are still accepted and stored as `everyone` and `nobody`;
|
|
4004
|
+
* they are never returned.
|
|
4001
4005
|
* @enum {string}
|
|
4002
4006
|
*/
|
|
4003
4007
|
Visibility: "everyone" | "contacts" | "everyone_except" | "nobody_except" | "nobody";
|
|
4004
|
-
/**
|
|
4005
|
-
|
|
4006
|
-
|
|
4008
|
+
/**
|
|
4009
|
+
* @description Who may open a direct chat with the user. `everyone`; `contacts` (see `Visibility`); `wait_approval`: others
|
|
4010
|
+
* send a request the user approves; `nobody`: no new direct chats and no requests (existing chats stay).
|
|
4011
|
+
* Allow exceptions still let the listed users in.
|
|
4012
|
+
* Deprecated: `shared_chats` is the old name of `contacts`; it is still accepted and never returned.
|
|
4013
|
+
* @enum {string}
|
|
4014
|
+
*/
|
|
4015
|
+
DirectMessagePolicy: "everyone" | "shared_chats" | "wait_approval" | "contacts" | "nobody";
|
|
4016
|
+
/**
|
|
4017
|
+
* @description Who may add the user to a group. Defaults to `contacts`. Deprecated: `everyone_except` and `nobody_except`
|
|
4018
|
+
* are still accepted and stored as `everyone` and `nobody`; they are never returned.
|
|
4019
|
+
* @enum {string}
|
|
4020
|
+
*/
|
|
4007
4021
|
GroupInvitePolicy: "everyone" | "contacts" | "everyone_except" | "nobody_except" | "nobody" | "wait_approval";
|
|
4022
|
+
/**
|
|
4023
|
+
* @description Who may ring the user (`contacts` as in `Visibility`).
|
|
4024
|
+
* @enum {string}
|
|
4025
|
+
*/
|
|
4026
|
+
CallPolicy: "everyone" | "contacts" | "nobody";
|
|
4008
4027
|
/** @enum {string} */
|
|
4009
4028
|
SearchVisibility: "everyone" | "nobody";
|
|
4010
4029
|
/** @description User IDs per setting. An exception wins over the setting whatever its value; `allow` always lets the user in, `deny` always keeps them out. */
|
|
@@ -4027,8 +4046,17 @@ export interface components {
|
|
|
4027
4046
|
direct_messages: components["schemas"]["DirectMessagePolicy"];
|
|
4028
4047
|
group_invites: components["schemas"]["GroupInvitePolicy"];
|
|
4029
4048
|
search_visibility: components["schemas"]["SearchVisibility"];
|
|
4030
|
-
/**
|
|
4049
|
+
/**
|
|
4050
|
+
* @deprecated
|
|
4051
|
+
* @description `false` exactly when `calls_from` is `nobody`. Use `calls_from`.
|
|
4052
|
+
*/
|
|
4031
4053
|
calls_enabled: boolean;
|
|
4054
|
+
/**
|
|
4055
|
+
* @description Who may ring this user, with the `calls_from` exceptions. Calls are only possible from an existing direct
|
|
4056
|
+
* chat or a shared group. A direct call to a user who does not allow the caller is refused; in a group call
|
|
4057
|
+
* only the members who allow the caller are rung, the others can still join.
|
|
4058
|
+
*/
|
|
4059
|
+
calls_from: components["schemas"]["CallPolicy"];
|
|
4032
4060
|
/** @description Whether other members see that this user is typing or recording a voice message. The user still sees theirs. */
|
|
4033
4061
|
typing_indicators_enabled: boolean;
|
|
4034
4062
|
exceptions: components["schemas"]["PrivacyExceptions"];
|
|
@@ -4043,7 +4071,12 @@ export interface components {
|
|
|
4043
4071
|
direct_messages?: components["schemas"]["DirectMessagePolicy"];
|
|
4044
4072
|
group_invites?: components["schemas"]["GroupInvitePolicy"];
|
|
4045
4073
|
search_visibility?: components["schemas"]["SearchVisibility"];
|
|
4074
|
+
/**
|
|
4075
|
+
* @deprecated
|
|
4076
|
+
* @description `false` sets `calls_from` to `nobody`; `true` sets it to `everyone` when it was `nobody`. Ignored when `calls_from` is sent.
|
|
4077
|
+
*/
|
|
4046
4078
|
calls_enabled?: boolean;
|
|
4079
|
+
calls_from?: components["schemas"]["CallPolicy"];
|
|
4047
4080
|
typing_indicators_enabled?: boolean;
|
|
4048
4081
|
};
|
|
4049
4082
|
PrivacyExceptionsRequest: {
|
|
@@ -6147,7 +6180,7 @@ export interface operations {
|
|
|
6147
6180
|
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
6148
6181
|
};
|
|
6149
6182
|
path: {
|
|
6150
|
-
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "last_seen_visibility" | "birthday_visibility" | "group_invites" | "direct_messages" | "search_visibility";
|
|
6183
|
+
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "last_seen_visibility" | "birthday_visibility" | "group_invites" | "direct_messages" | "search_visibility" | "calls_from";
|
|
6151
6184
|
effect: "allow" | "deny";
|
|
6152
6185
|
};
|
|
6153
6186
|
cookie?: never;
|
package/dist/ws-events.d.ts
CHANGED
|
@@ -991,7 +991,7 @@
|
|
|
991
991
|
},
|
|
992
992
|
"Visibility": {
|
|
993
993
|
"type": "string",
|
|
994
|
-
"description": "Who may see the item. The exception lists apply to every value
|
|
994
|
+
"description": "Who may see the item. The exception lists apply to every value.\n`contacts` are the users you share a direct chat with that you opened or read in, or a group you created,\njoined by accepting an invitation, or read or wrote in. Being added to a group alone does not make its\nmembers your contacts.\nDeprecated: `everyone_except` and `nobody_except` are still accepted and stored as `everyone` and `nobody`;\nthey are never returned.\n",
|
|
995
995
|
"enum": [
|
|
996
996
|
"everyone",
|
|
997
997
|
"contacts",
|
|
@@ -1002,14 +1002,18 @@
|
|
|
1002
1002
|
},
|
|
1003
1003
|
"DirectMessagePolicy": {
|
|
1004
1004
|
"type": "string",
|
|
1005
|
+
"description": "Who may open a direct chat with the user. `everyone`; `contacts` (see `Visibility`); `wait_approval`: others\nsend a request the user approves; `nobody`: no new direct chats and no requests (existing chats stay).\nAllow exceptions still let the listed users in.\nDeprecated: `shared_chats` is the old name of `contacts`; it is still accepted and never returned.\n",
|
|
1005
1006
|
"enum": [
|
|
1006
1007
|
"everyone",
|
|
1007
1008
|
"shared_chats",
|
|
1008
|
-
"wait_approval"
|
|
1009
|
+
"wait_approval",
|
|
1010
|
+
"contacts",
|
|
1011
|
+
"nobody"
|
|
1009
1012
|
]
|
|
1010
1013
|
},
|
|
1011
1014
|
"GroupInvitePolicy": {
|
|
1012
1015
|
"type": "string",
|
|
1016
|
+
"description": "Who may add the user to a group. Defaults to `contacts`. Deprecated: `everyone_except` and `nobody_except`\nare still accepted and stored as `everyone` and `nobody`; they are never returned.\n",
|
|
1013
1017
|
"enum": [
|
|
1014
1018
|
"everyone",
|
|
1015
1019
|
"contacts",
|
|
@@ -1019,6 +1023,15 @@
|
|
|
1019
1023
|
"wait_approval"
|
|
1020
1024
|
]
|
|
1021
1025
|
},
|
|
1026
|
+
"CallPolicy": {
|
|
1027
|
+
"type": "string",
|
|
1028
|
+
"description": "Who may ring the user (`contacts` as in `Visibility`).",
|
|
1029
|
+
"enum": [
|
|
1030
|
+
"everyone",
|
|
1031
|
+
"contacts",
|
|
1032
|
+
"nobody"
|
|
1033
|
+
]
|
|
1034
|
+
},
|
|
1022
1035
|
"SearchVisibility": {
|
|
1023
1036
|
"type": "string",
|
|
1024
1037
|
"enum": [
|
|
@@ -1064,6 +1077,7 @@
|
|
|
1064
1077
|
"group_invites",
|
|
1065
1078
|
"search_visibility",
|
|
1066
1079
|
"calls_enabled",
|
|
1080
|
+
"calls_from",
|
|
1067
1081
|
"typing_indicators_enabled",
|
|
1068
1082
|
"exceptions"
|
|
1069
1083
|
],
|
|
@@ -1112,7 +1126,16 @@
|
|
|
1112
1126
|
},
|
|
1113
1127
|
"calls_enabled": {
|
|
1114
1128
|
"type": "boolean",
|
|
1115
|
-
"
|
|
1129
|
+
"deprecated": true,
|
|
1130
|
+
"description": "`false` exactly when `calls_from` is `nobody`. Use `calls_from`."
|
|
1131
|
+
},
|
|
1132
|
+
"calls_from": {
|
|
1133
|
+
"description": "Who may ring this user, with the `calls_from` exceptions. Calls are only possible from an existing direct\nchat or a shared group. A direct call to a user who does not allow the caller is refused; in a group call\nonly the members who allow the caller are rung, the others can still join.\n",
|
|
1134
|
+
"allOf": [
|
|
1135
|
+
{
|
|
1136
|
+
"$ref": "#/$defs/CallPolicy"
|
|
1137
|
+
}
|
|
1138
|
+
]
|
|
1116
1139
|
},
|
|
1117
1140
|
"typing_indicators_enabled": {
|
|
1118
1141
|
"type": "boolean",
|
|
@@ -1155,7 +1178,12 @@
|
|
|
1155
1178
|
"$ref": "#/$defs/SearchVisibility"
|
|
1156
1179
|
},
|
|
1157
1180
|
"calls_enabled": {
|
|
1158
|
-
"type": "boolean"
|
|
1181
|
+
"type": "boolean",
|
|
1182
|
+
"deprecated": true,
|
|
1183
|
+
"description": "`false` sets `calls_from` to `nobody`; `true` sets it to `everyone` when it was `nobody`. Ignored when `calls_from` is sent."
|
|
1184
|
+
},
|
|
1185
|
+
"calls_from": {
|
|
1186
|
+
"$ref": "#/$defs/CallPolicy"
|
|
1159
1187
|
},
|
|
1160
1188
|
"typing_indicators_enabled": {
|
|
1161
1189
|
"type": "boolean"
|
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.33",
|
|
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": {
|