: NSObject, ARConsumer {
self.closure = closure
}
- func apply(withId t: Any!) {
+ open func apply(withId t: Any!) {
closure(t as? T)
}
}
-class PromiseConsumerEmpty: NSObject, ARConsumer {
+open class PromiseConsumerEmpty: NSObject, ARConsumer {
let closure: () -> ()
@@ -71,7 +74,7 @@ class PromiseConsumerEmpty: NSObject, ARConsumer {
self.closure = closure
}
- func apply(withId t: Any!) {
+ open func apply(withId t: Any!) {
closure()
}
}
diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift
index bc70feb3f2..f2d2cf6dbe 100644
--- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift
+++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift
@@ -7,7 +7,7 @@ import j2objc
public extension String {
- public var isEmpty: Bool { return self.characters.isEmpty }
+ //public var isEmpty: Bool { return self.characters.isEmpty }
public var length: Int { return self.characters.count }
@@ -82,9 +82,9 @@ public extension String {
return false
}
- public func contains(_ text: String) -> Bool {
+ /*public func contains(_ text: String) -> Bool {
return self.range(of: text, options: NSString.CompareOptions.caseInsensitive, range: nil, locale: nil) != nil
- }
+ }*/
public func startsWith(_ text: String) -> Bool {
let range = self.range(of: text)
@@ -137,6 +137,44 @@ public extension String {
}
public var asNS: NSString { return (self as NSString) }
+
+ var containsEmoji: Bool {
+ for scalar in unicodeScalars {
+ // print(scalar.value)
+ switch scalar.value {
+ case
+ 0x1F600...0x1F64F, // Emoticons
+ 0x1F300...0x1F5FF, // Misc Symbols and Pictographs
+ 0x1F680...0x1F6FF, // Transport and Map
+ 0x2600...0x26FF, // Misc symbols
+ 0x2700...0x27BF, // Dingbats
+ 0xFE00...0xFE0F, // Variation Selectors
+ 0x1F910...0x1F933, // New Emoticons
+ 0x1F1E6...0x1F1FF, // Flags
+ 0x1F980...0x1F984,
+ 0x1F191...0x1F19A,
+ 0x1F201...0x1F202,
+ 0x1F232...0x1F23A,
+ 0x1F250...0x1F251,
+ 0x23E9...0x23F3,
+ 0x23F8...0x23FA,
+ 0x1F170...0x1F171,
+ 0x1F17E,
+ 0xA9,
+ 0xAE,
+ 0x2122,
+ 0x2328,
+ 0x3030,
+ 0x1F0CF,
+ 0x1F18E,
+ 0x1F9C0:
+ return true
+ default:
+ continue
+ }
+ }
+ return false
+ }
}
public extension NSAttributedString {
diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift
index 04779a14ee..a3e5574622 100644
--- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift
+++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift
@@ -111,6 +111,26 @@ public extension UIView {
self.frame = CGRect(x: rect.origin.x + (rect.width - self.bounds.width) / 2, y: rect.origin.y,
width: self.bounds.width, height: self.bounds.height)
}
+
+ public func addConstraintsWithFormat(_ format: String, views: UIView...) {
+ var viewsDictionary = [String: UIView]()
+ for (index, view) in views.enumerated() {
+ let key = "v\(index)"
+ view.translatesAutoresizingMaskIntoConstraints = false
+ viewsDictionary[key] = view
+ }
+ addConstraints(NSLayoutConstraint.constraints(withVisualFormat: format, options: NSLayoutFormatOptions(), metrics: nil, views: viewsDictionary))
+ }
+
+ public func addConstraintsWithFormat(_ format: String, formatOptions: NSLayoutFormatOptions, views: UIView...) {
+ var viewsDictionary = [String: UIView]()
+ for (index, view) in views.enumerated() {
+ let key = "v\(index)"
+ view.translatesAutoresizingMaskIntoConstraints = false
+ viewsDictionary[key] = view
+ }
+ addConstraints(NSLayoutConstraint.constraints(withVisualFormat: format, options: formatOptions, metrics: nil, views: viewsDictionary))
+ }
}
// Text measuring
diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift
index 3619e33601..e5d0b92673 100644
--- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift
+++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift
@@ -5,17 +5,17 @@
import Foundation
import zipzap
-class AATools {
+open class AATools {
- class func copyFileCommand(_ from: String, to: String) -> ACCommand {
+ open class func copyFileCommand(_ from: String, to: String) -> ACCommand {
return CopyCommand(from: from, to: to)
}
- class func zipDirectoryCommand(_ from: String, to: String) -> ACCommand {
+ open class func zipDirectoryCommand(_ from: String, to: String) -> ACCommand {
return ZipCommand(dir: from, to: to)
}
- class func isValidEmail(_ testStr:String) -> Bool {
+ open class func isValidEmail(_ testStr:String) -> Bool {
let emailRegEx = "^[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}"
diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift
index 2349f4e431..fff955d1fd 100644
--- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift
+++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift
@@ -18,7 +18,7 @@ open class AABackgroundCellRenderer where T: AnyObject, P: AnyObject, P: E
self.receiver = receiver
}
- func requestRender(_ config: P) -> Bool {
+ public func requestRender(_ config: P) -> Bool {
// Ignore if not resized
if requestedConfig == config {
return false
@@ -72,7 +72,7 @@ open class AABackgroundCellRenderer
where T: AnyObject, P: AnyObject, P: E
receiver(renderer(config))
}
- func cancelRender(_ wasPresented: Bool = false) {
+ public func cancelRender(_ wasPresented: Bool = false) {
generation += 1
let oldConfig = requestedConfig
requestedConfig = nil
diff --git a/actor-sdk/sdk-core-ios/Podfile b/actor-sdk/sdk-core-ios/Podfile
index 149cff30ba..c4771d3279 100644
--- a/actor-sdk/sdk-core-ios/Podfile
+++ b/actor-sdk/sdk-core-ios/Podfile
@@ -25,6 +25,7 @@ target 'ActorApp' do
pod 'YYWebImage'
pod 'YYCategories'
pod 'DZNWebViewController'
+ pod 'AGEmojiKeyboard'
# Small UI
pod 'VBFPopFlatButton'
@@ -35,14 +36,16 @@ target 'ActorApp' do
pod 'MBProgressHUD'
# Calls
- # pod 'libjingle_peerconnection'
+ pod 'libjingle_peerconnection'
end
target 'ActorSDK' do
project 'ActorSDK.xcodeproj'
# J2Objc Runtime
- pod 'J2ObjC-Framework'
+ #pod 'J2ObjC-Framework'
+
+ pod 'J2ObjC-Framework', :podspec => 'https://raw.githubusercontent.com/dfsilva/J2ObjC-Framework/v1.2a/J2ObjC-Framework.podspec'
# Core Tools
pod 'RegexKitLite'
@@ -59,6 +62,7 @@ target 'ActorSDK' do
pod 'YYWebImage'
pod 'YYCategories'
pod 'DZNWebViewController'
+ #pod 'AGEmojiKeyboard'
# Small UI
pod 'VBFPopFlatButton'
diff --git a/actor-sdk/sdk-core-ios/Template/CommonCrypto.framework/module.map b/actor-sdk/sdk-core-ios/Template/CommonCrypto.framework/module.map
new file mode 100755
index 0000000000..6b6c8409b5
--- /dev/null
+++ b/actor-sdk/sdk-core-ios/Template/CommonCrypto.framework/module.map
@@ -0,0 +1,4 @@
+module CommonCrypto [system] {
+ header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h"
+ export *
+}
\ No newline at end of file
diff --git a/actor-sdk/sdk-core-ios/Template/LICENSE b/actor-sdk/sdk-core-ios/Template/LICENSE
new file mode 100755
index 0000000000..c612f4f7f6
--- /dev/null
+++ b/actor-sdk/sdk-core-ios/Template/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2014-2015 Actor LLC
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
diff --git a/actor-sdk/sdk-core-ios/VERSION b/actor-sdk/sdk-core-ios/VERSION
index 415b19fc36..f398a20612 100644
--- a/actor-sdk/sdk-core-ios/VERSION
+++ b/actor-sdk/sdk-core-ios/VERSION
@@ -1 +1 @@
-2.0
\ No newline at end of file
+3.0
\ No newline at end of file
diff --git a/actor-sdk/sdk-core-ios/buildFramework.sh b/actor-sdk/sdk-core-ios/buildFramework.sh
index aa08486af1..7f289ebe58 100755
--- a/actor-sdk/sdk-core-ios/buildFramework.sh
+++ b/actor-sdk/sdk-core-ios/buildFramework.sh
@@ -54,8 +54,19 @@ cp -a build/Build/Products/Release-iphonesimulator/ActorSDK.framework/Modules/Ac
# Copying dSYM
cp -a build/Build/Products/Release-iphoneos/ActorSDK.framework.dSYM/* build/Output/ActorSDK.framework.dSYM/
+# Making Bundle
+mkdir -p build/Podspec/
+
# Compressing Framework
-cd build/Output/
+rm -fr build/Podspec
+mkdir -p build/Podspec/ActorSDK.framework
+mkdir -p build/Podspec/ActorSDK.framework.dSYM
+cp -r build/Output/ActorSDK.framework build/Podspec/
+cp -r build/Output/ActorSDK.framework.dSYM build/Podspec/
+cp -r Template/ build/Podspec/
+
+cd build/Podspec/
rm -f ActorSDK.zip
-zip -r ActorSDK.zip ActorSDK.framework ActorSDK.framework.dSYM
+zip -r ActorSDK.zip *
+mv ActorSDK.zip ../
diff --git a/actor-sdk/sdk-core/.DS_Store b/actor-sdk/sdk-core/.DS_Store
new file mode 100644
index 0000000000..006b9ccb59
Binary files /dev/null and b/actor-sdk/sdk-core/.DS_Store differ
diff --git a/actor-sdk/sdk-core/core/.DS_Store b/actor-sdk/sdk-core/core/.DS_Store
new file mode 100644
index 0000000000..0215a3edba
Binary files /dev/null and b/actor-sdk/sdk-core/core/.DS_Store differ
diff --git a/actor-sdk/sdk-core/core/core-android/build.gradle b/actor-sdk/sdk-core/core/core-android/build.gradle
index 390b823d44..614a6907fc 100644
--- a/actor-sdk/sdk-core/core/core-android/build.gradle
+++ b/actor-sdk/sdk-core/core/core-android/build.gradle
@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.1.3'
+ classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
}
}
@@ -14,7 +14,7 @@ apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 24
- buildToolsVersion '24.0.0'
+ buildToolsVersion '24.0.2'
defaultConfig {
minSdkVersion 15
@@ -50,7 +50,7 @@ android {
dependencies {
compile project(':actor-sdk:sdk-core:runtime:runtime-android')
- compile 'com.android.support:recyclerview-v7:24.0.0'
+ compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.squareup.okhttp:okhttp:2+'
compile 'io.pristine:libjingle:11139@aar'
}
\ No newline at end of file
diff --git a/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java b/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java
index 7505a2d4ad..db9a1d1bfe 100644
--- a/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java
+++ b/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java
@@ -33,6 +33,7 @@
import im.actor.core.entity.Peer;
import im.actor.core.entity.SearchEntity;
import im.actor.core.entity.content.FastThumb;
+import im.actor.core.modules.ModuleContext;
import im.actor.core.network.NetworkState;
import im.actor.core.utils.AppStateActor;
import im.actor.core.utils.IOUtils;
@@ -40,6 +41,7 @@
import im.actor.core.viewmodel.AppStateVM;
import im.actor.core.viewmodel.Command;
import im.actor.core.viewmodel.GalleryVM;
+import im.actor.runtime.Log;
import im.actor.runtime.Runtime;
import im.actor.runtime.actors.Actor;
import im.actor.runtime.actors.ActorCreator;
@@ -482,7 +484,9 @@ public void onScrolledToEnd() {
@Override
public void onItemTouched(Dialog item) {
-
+ Log.d(AndroidMessenger.class.getName(), "Title"+item.getDialogTitle());
+ Log.d(AndroidMessenger.class.getName(), "IsBot"+item.isBot());
+ Log.d(AndroidMessenger.class.getName(), "IsChannel"+item.isChannel());
}
});
}
@@ -553,6 +557,11 @@ public AppStateVM getAppStateVM() {
public void startImport() {
modules.getContactsModule().startImport();
+
}
+ @Override
+ public void onLoggedIn() {
+ super.onLoggedIn();
+ }
}
\ No newline at end of file
diff --git a/actor-sdk/sdk-core/core/core-js/.DS_Store b/actor-sdk/sdk-core/core/core-js/.DS_Store
new file mode 100644
index 0000000000..d7a20d7771
Binary files /dev/null and b/actor-sdk/sdk-core/core/core-js/.DS_Store differ
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
index dcf2003780..996dd0a0bc 100644
--- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
@@ -1768,6 +1768,18 @@ public Promise joinGroup(int gid) {
return modules.getGroupsModule().joinGroup(gid);
}
+ /**
+ * Join group by Id
+ *
+ * @param gid group's id
+ * @return Promise of Void
+ */
+ @NotNull
+ @ObjectiveCName("joinGroupByGid:")
+ public Promise joinGroupById(int gid) {
+ return modules.getGroupsModule().joinGroupById(gid);
+ }
+
/**
* Request integration token for group
*
@@ -2735,7 +2747,8 @@ public void forceNetworkCheck() {
*
* @return Module Contexts
*/
- ModuleContext getModuleContext() {
+ @ObjectiveCName("getModulesContext")
+ public ModuleContext getModuleContext() {
return modules;
}
}
\ No newline at end of file
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiGroupPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiGroupPre.java
new file mode 100644
index 0000000000..2613e5a76d
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiGroupPre.java
@@ -0,0 +1,85 @@
+package im.actor.core.api;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+
+public class ApiGroupPre extends BserObject {
+
+ private ApiGroup group;
+ private int groupFatherId;
+ private List childrens;
+
+ public ApiGroupPre(@NotNull ApiGroup group, int groupFatherId, @NotNull List childrens) {
+ this.group = group;
+ this.groupFatherId = groupFatherId;
+ this.childrens = childrens;
+ }
+
+ public ApiGroupPre() {
+
+ }
+
+ @NotNull
+ public ApiGroup getGroup() {
+ return this.group;
+ }
+
+ public int getGroupFatherId() {
+ return this.groupFatherId;
+ }
+
+ @NotNull
+ public List getChildrens() {
+ return this.childrens;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.group = values.getObj(1, new ApiGroup());
+ this.groupFatherId = values.getInt(2);
+ List _childrens = new ArrayList();
+ for (int i = 0; i < values.getRepeatedCount(3); i ++) {
+ _childrens.add(new ApiGroup());
+ }
+ this.childrens = values.getRepeatedObj(3, _childrens);
+ if (values.hasRemaining()) {
+ setUnmappedObjects(values.buildRemaining());
+ }
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ if (this.group == null) {
+ throw new IOException();
+ }
+ writer.writeObject(1, this.group);
+ writer.writeInt(2, this.groupFatherId);
+ writer.writeRepeatedObj(3, this.childrens);
+ if (this.getUnmappedObjects() != null) {
+ SparseArray unmapped = this.getUnmappedObjects();
+ for (int i = 0; i < unmapped.size(); i++) {
+ int key = unmapped.keyAt(i);
+ writer.writeUnmapped(key, unmapped.get(key));
+ }
+ }
+ }
+
+ @Override
+ public String toString() {
+ String res = "struct GroupPre{";
+ res += "}";
+ return res;
+ }
+
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurvey.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurvey.java
new file mode 100644
index 0000000000..a1ab7670ba
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurvey.java
@@ -0,0 +1,97 @@
+package im.actor.core.api;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+
+public class ApiSurvey extends BserObject {
+
+ private long id;
+ private String title;
+ private String description;
+ private long creationTime;
+ private long endTime;
+ private int userId;
+
+ public ApiSurvey(long id, @NotNull String title, @Nullable String description, long creationTime, long endTime, int userId) {
+ this.id = id;
+ this.title = title;
+ this.description = description;
+ this.creationTime = creationTime;
+ this.endTime = endTime;
+ this.userId = userId;
+ }
+
+ public ApiSurvey() {
+
+ }
+
+ public long getId() {
+ return this.id;
+ }
+
+ @NotNull
+ public String getTitle() {
+ return this.title;
+ }
+
+ @Nullable
+ public String getDescription() {
+ return this.description;
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public long getEndTime() {
+ return this.endTime;
+ }
+
+ public int getUserId() {
+ return this.userId;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.id = values.getLong(1);
+ this.title = values.getString(2);
+ this.description = values.optString(3);
+ this.creationTime = values.getLong(4);
+ this.endTime = values.getLong(5);
+ this.userId = values.getInt(6);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeLong(1, this.id);
+ if (this.title == null) {
+ throw new IOException();
+ }
+ writer.writeString(2, this.title);
+ if (this.description != null) {
+ writer.writeString(3, this.description);
+ }
+ writer.writeLong(4, this.creationTime);
+ writer.writeLong(5, this.endTime);
+ writer.writeInt(6, this.userId);
+ }
+
+ @Override
+ public String toString() {
+ String res = "struct Survey{";
+ res += "}";
+ return res;
+ }
+
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurveyAnswer.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurveyAnswer.java
new file mode 100644
index 0000000000..b3e4be1f29
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurveyAnswer.java
@@ -0,0 +1,62 @@
+package im.actor.core.api;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+
+public class ApiSurveyAnswer extends BserObject {
+
+ private long id;
+ private String title;
+
+ public ApiSurveyAnswer(long id, @NotNull String title) {
+ this.id = id;
+ this.title = title;
+ }
+
+ public ApiSurveyAnswer() {
+
+ }
+
+ public long getId() {
+ return this.id;
+ }
+
+ @NotNull
+ public String getTitle() {
+ return this.title;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.id = values.getLong(1);
+ this.title = values.getString(2);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeLong(1, this.id);
+ if (this.title == null) {
+ throw new IOException();
+ }
+ writer.writeString(2, this.title);
+ }
+
+ @Override
+ public String toString() {
+ String res = "struct SurveyAnswer{";
+ res += "}";
+ return res;
+ }
+
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiUserSurveyAnswer.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiUserSurveyAnswer.java
new file mode 100644
index 0000000000..6d97cbeb85
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiUserSurveyAnswer.java
@@ -0,0 +1,58 @@
+package im.actor.core.api;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+
+public class ApiUserSurveyAnswer extends BserObject {
+
+ private int userId;
+ private long answerId;
+
+ public ApiUserSurveyAnswer(int userId, long answerId) {
+ this.userId = userId;
+ this.answerId = answerId;
+ }
+
+ public ApiUserSurveyAnswer() {
+
+ }
+
+ public int getUserId() {
+ return this.userId;
+ }
+
+ public long getAnswerId() {
+ return this.answerId;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.userId = values.getInt(1);
+ this.answerId = values.getLong(2);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeInt(1, this.userId);
+ writer.writeLong(2, this.answerId);
+ }
+
+ @Override
+ public String toString() {
+ String res = "struct UserSurveyAnswer{";
+ res += "}";
+ return res;
+ }
+
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java
index e628db24b1..1d6da1efb8 100644
--- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java
@@ -90,6 +90,7 @@ public RpcScope read(int type, byte[] payload) throws IOException {
case 2721: return RequestLeaveAndDelete.fromBytes(payload);
case 71: return RequestKickUser.fromBytes(payload);
case 2722: return RequestJoinGroupByPeer.fromBytes(payload);
+ case 44561: return RequestJoinGroupByGroupId.fromBytes(payload);
case 2784: return RequestMakeUserAdmin.fromBytes(payload);
case 2791: return RequestDismissUserAdmin.fromBytes(payload);
case 2789: return RequestTransferOwnership.fromBytes(payload);
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateGroupPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateGroupPre.java
new file mode 100644
index 0000000000..e0e6cda215
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateGroupPre.java
@@ -0,0 +1,68 @@
+package im.actor.core.api.rpc;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import im.actor.core.api.*;
+
+public class RequestCreateGroupPre extends Request {
+
+ public static final int HEADER = 0x13;
+ public static RequestCreateGroupPre fromBytes(byte[] data) throws IOException {
+ return Bser.parse(new RequestCreateGroupPre(), data);
+ }
+
+ private int groupId;
+ private int groupFatherId;
+
+ public RequestCreateGroupPre(int groupId, int groupFatherId) {
+ this.groupId = groupId;
+ this.groupFatherId = groupFatherId;
+ }
+
+ public RequestCreateGroupPre() {
+
+ }
+
+ public int getGroupId() {
+ return this.groupId;
+ }
+
+ public int getGroupFatherId() {
+ return this.groupFatherId;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.groupId = values.getInt(1);
+ this.groupFatherId = values.getInt(2);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeInt(1, this.groupId);
+ writer.writeInt(2, this.groupFatherId);
+ }
+
+ @Override
+ public String toString() {
+ String res = "rpc CreateGroupPre{";
+ res += "}";
+ return res;
+ }
+
+ @Override
+ public int getHeaderKey() {
+ return HEADER;
+ }
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateSurvey.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateSurvey.java
new file mode 100644
index 0000000000..4c8f56e221
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateSurvey.java
@@ -0,0 +1,77 @@
+package im.actor.core.api.rpc;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import im.actor.core.api.*;
+
+public class RequestCreateSurvey extends Request {
+
+ public static final int HEADER = 0x8b;
+ public static RequestCreateSurvey fromBytes(byte[] data) throws IOException {
+ return Bser.parse(new RequestCreateSurvey(), data);
+ }
+
+ private ApiSurvey survey;
+ private List answers;
+
+ public RequestCreateSurvey(@NotNull ApiSurvey survey, @NotNull List answers) {
+ this.survey = survey;
+ this.answers = answers;
+ }
+
+ public RequestCreateSurvey() {
+
+ }
+
+ @NotNull
+ public ApiSurvey getSurvey() {
+ return this.survey;
+ }
+
+ @NotNull
+ public List getAnswers() {
+ return this.answers;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.survey = values.getObj(1, new ApiSurvey());
+ List _answers = new ArrayList();
+ for (int i = 0; i < values.getRepeatedCount(2); i ++) {
+ _answers.add(new ApiSurveyAnswer());
+ }
+ this.answers = values.getRepeatedObj(2, _answers);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ if (this.survey == null) {
+ throw new IOException();
+ }
+ writer.writeObject(1, this.survey);
+ writer.writeRepeatedObj(2, this.answers);
+ }
+
+ @Override
+ public String toString() {
+ String res = "rpc CreateSurvey{";
+ res += "}";
+ return res;
+ }
+
+ @Override
+ public int getHeaderKey() {
+ return HEADER;
+ }
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestJoinGroupByGroupId.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestJoinGroupByGroupId.java
new file mode 100644
index 0000000000..130fd93a31
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestJoinGroupByGroupId.java
@@ -0,0 +1,60 @@
+package im.actor.core.api.rpc;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import im.actor.core.api.*;
+
+public class RequestJoinGroupByGroupId extends Request {
+
+ public static final int HEADER = 0xae11;
+ public static RequestJoinGroupByGroupId fromBytes(byte[] data) throws IOException {
+ return Bser.parse(new RequestJoinGroupByGroupId(), data);
+ }
+
+ private int groupId;
+
+ public RequestJoinGroupByGroupId(int groupId) {
+ this.groupId = groupId;
+ }
+
+ public RequestJoinGroupByGroupId() {
+
+ }
+
+ public int getGroupId() {
+ return this.groupId;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.groupId = values.getInt(1);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeInt(1, this.groupId);
+ }
+
+ @Override
+ public String toString() {
+ String res = "rpc JoinGroupByGroupId{";
+ res += "}";
+ return res;
+ }
+
+ @Override
+ public int getHeaderKey() {
+ return HEADER;
+ }
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestLoadGroupsPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestLoadGroupsPre.java
new file mode 100644
index 0000000000..00b3e33d3b
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestLoadGroupsPre.java
@@ -0,0 +1,60 @@
+package im.actor.core.api.rpc;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import im.actor.core.api.*;
+
+public class RequestLoadGroupsPre extends Request {
+
+ public static final int HEADER = 0x12;
+ public static RequestLoadGroupsPre fromBytes(byte[] data) throws IOException {
+ return Bser.parse(new RequestLoadGroupsPre(), data);
+ }
+
+ private int groupFatherId;
+
+ public RequestLoadGroupsPre(int groupFatherId) {
+ this.groupFatherId = groupFatherId;
+ }
+
+ public RequestLoadGroupsPre() {
+
+ }
+
+ public int getGroupFatherId() {
+ return this.groupFatherId;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.groupFatherId = values.getInt(1);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeInt(1, this.groupFatherId);
+ }
+
+ @Override
+ public String toString() {
+ String res = "rpc LoadGroupsPre{";
+ res += "}";
+ return res;
+ }
+
+ @Override
+ public int getHeaderKey() {
+ return HEADER;
+ }
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseCreateGroupPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseCreateGroupPre.java
new file mode 100644
index 0000000000..8939340032
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseCreateGroupPre.java
@@ -0,0 +1,84 @@
+package im.actor.core.api.rpc;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import im.actor.core.api.*;
+
+public class ResponseCreateGroupPre extends Response {
+
+ public static final int HEADER = 0x15;
+ public static ResponseCreateGroupPre fromBytes(byte[] data) throws IOException {
+ return Bser.parse(new ResponseCreateGroupPre(), data);
+ }
+
+ private int seq;
+ private byte[] state;
+ private ApiGroupPre groupPre;
+
+ public ResponseCreateGroupPre(int seq, @NotNull byte[] state, @NotNull ApiGroupPre groupPre) {
+ this.seq = seq;
+ this.state = state;
+ this.groupPre = groupPre;
+ }
+
+ public ResponseCreateGroupPre() {
+
+ }
+
+ public int getSeq() {
+ return this.seq;
+ }
+
+ @NotNull
+ public byte[] getState() {
+ return this.state;
+ }
+
+ @NotNull
+ public ApiGroupPre getGroupPre() {
+ return this.groupPre;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ this.seq = values.getInt(1);
+ this.state = values.getBytes(2);
+ this.groupPre = values.getObj(3, new ApiGroupPre());
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeInt(1, this.seq);
+ if (this.state == null) {
+ throw new IOException();
+ }
+ writer.writeBytes(2, this.state);
+ if (this.groupPre == null) {
+ throw new IOException();
+ }
+ writer.writeObject(3, this.groupPre);
+ }
+
+ @Override
+ public String toString() {
+ String res = "tuple CreateGroupPre{";
+ res += "}";
+ return res;
+ }
+
+ @Override
+ public int getHeaderKey() {
+ return HEADER;
+ }
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseLoadGroupsPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseLoadGroupsPre.java
new file mode 100644
index 0000000000..ce2c2d5c65
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseLoadGroupsPre.java
@@ -0,0 +1,65 @@
+package im.actor.core.api.rpc;
+/*
+ * Generated by the Actor API Scheme generator. DO NOT EDIT!
+ */
+
+import im.actor.runtime.bser.*;
+import im.actor.runtime.collections.*;
+import static im.actor.runtime.bser.Utils.*;
+import im.actor.core.network.parser.*;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import com.google.j2objc.annotations.ObjectiveCName;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import im.actor.core.api.*;
+
+public class ResponseLoadGroupsPre extends Response {
+
+ public static final int HEADER = 0x14;
+ public static ResponseLoadGroupsPre fromBytes(byte[] data) throws IOException {
+ return Bser.parse(new ResponseLoadGroupsPre(), data);
+ }
+
+ private List groups;
+
+ public ResponseLoadGroupsPre(@NotNull List groups) {
+ this.groups = groups;
+ }
+
+ public ResponseLoadGroupsPre() {
+
+ }
+
+ @NotNull
+ public List getGroups() {
+ return this.groups;
+ }
+
+ @Override
+ public void parse(BserValues values) throws IOException {
+ List _groups = new ArrayList();
+ for (int i = 0; i < values.getRepeatedCount(1); i ++) {
+ _groups.add(new ApiGroup());
+ }
+ this.groups = values.getRepeatedObj(1, _groups);
+ }
+
+ @Override
+ public void serialize(BserWriter writer) throws IOException {
+ writer.writeRepeatedObj(1, this.groups);
+ }
+
+ @Override
+ public String toString() {
+ String res = "tuple LoadGroupsPre{";
+ res += "}";
+ return res;
+ }
+
+ @Override
+ public int getHeaderKey() {
+ return HEADER;
+ }
+}
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java
index 3f4e982237..91edba2fe0 100644
--- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java
@@ -8,7 +8,6 @@
import java.util.HashMap;
import java.util.List;
-import im.actor.core.api.ApiAdminSettings;
import im.actor.core.api.ApiGroupOutPeer;
import im.actor.core.api.ApiGroupType;
import im.actor.core.api.ApiMember;
@@ -26,6 +25,7 @@
import im.actor.core.api.rpc.RequestGetIntegrationToken;
import im.actor.core.api.rpc.RequestInviteUser;
import im.actor.core.api.rpc.RequestJoinGroup;
+import im.actor.core.api.rpc.RequestJoinGroupByGroupId;
import im.actor.core.api.rpc.RequestJoinGroupByPeer;
import im.actor.core.api.rpc.RequestKickUser;
import im.actor.core.api.rpc.RequestLeaveAndDelete;
@@ -63,6 +63,7 @@
import im.actor.runtime.actors.messages.Void;
import im.actor.runtime.eventbus.BusSubscriber;
import im.actor.runtime.eventbus.Event;
+import im.actor.runtime.function.Consumer;
import im.actor.runtime.function.Function;
import im.actor.runtime.mvvm.MVVMCollection;
import im.actor.runtime.promise.Promise;
@@ -144,6 +145,14 @@ private Promise createGroup(String title, String avatarDescriptor, int[
.map((Function>) ints -> {
ArrayList peers = new ArrayList<>();
for (int u : uids) {
+
+// users().getValueAsync(u).then(new Consumer() {
+// @Override
+// public void apply(User user) {
+// peers.add(new ApiUserOutPeer(u, user.getAccessHash()));
+// }
+// });
+
User user = users().getValue(u);
if (user != null) {
peers.add(new ApiUserOutPeer(u, user.getAccessHash()));
@@ -362,6 +371,12 @@ public Promise joinGroup(int gid) {
.map(r -> null);
}
+ public Promise joinGroupById(int gid) {
+ return api(new RequestJoinGroupByGroupId(gid))
+ .chain(r -> updates().waitForUpdate(r.getSeq()))
+ .map(r -> null);
+ }
+
//
// Integration Token
//
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java
index ef3e642582..8fac3d4088 100644
--- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java
@@ -285,7 +285,8 @@ private Promise onHistoryLoaded(List history) {
.setDialogTitle(peerDesc.getTitle())
.setDialogAvatar(peerDesc.getAvatar())
.setSortKey(dialogHistory.getSortDate())
-
+ .setIsChannel(peerDesc.isChannel())
+ .setIsBot(peerDesc.isBot())
.setRid(dialogHistory.getRid())
.setTime(dialogHistory.getDate())
.setMessageType(description.getContentType())
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java
index 6e68474160..6d282b30cb 100644
--- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java
@@ -105,17 +105,25 @@ private void onPushSeqReceived(int seq, long authId) {
if (context().getApiModule() == null) {
return;
}
- context().getApiModule().checkIsCurrentAuthId(authId).then(same -> {
- if (same) {
- if (seq <= this.seq) {
- Log.d(TAG, "Ignored PushSeq {seq:" + seq + "}");
- } else {
- Log.w(TAG, "External Out of sequence: starting timer for invalidation");
- startInvalidationTimer();
+ if (authId != 0) {
+ context().getApiModule().checkIsCurrentAuthId(authId).then(same -> {
+ if (same) {
+ if (seq <= this.seq) {
+ Log.d(TAG, "Ignored PushSeq {seq:" + seq + "}");
+ } else {
+ Log.w(TAG, "External Out of sequence: starting timer for invalidation");
+ startInvalidationTimer();
+ }
}
+ });
+ } else {
+ if (seq <= this.seq) {
+ Log.d(TAG, "Ignored PushSeq {seq:" + seq + "}");
+ } else {
+ Log.w(TAG, "External Out of sequence: starting timer for invalidation");
+ startInvalidationTimer();
}
- });
-
+ }
}
@Deprecated
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/resources/AppText_Nl.json b/actor-sdk/sdk-core/core/core-shared/src/main/resources/AppText_Nl.json
new file mode 100644
index 0000000000..564e1e90ab
--- /dev/null
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/resources/AppText_Nl.json
@@ -0,0 +1,206 @@
+{
+ "app": {
+ "name": "{app_name}"
+ },
+
+ "language": {
+
+ "code": "Nl",
+
+ "format": {
+ "time": {
+ "yesterday":{
+ "short": "Gisteren",
+ "full": "Gisteren"
+ },
+ "now": "Nu",
+ "minutes": {
+ "short": "{minutes} min",
+ "full": "{minutes} minuten"
+ },
+ "hours": {
+ "short": "{hours} uur",
+ "full": "{hours} uren"
+ }
+ }
+ },
+
+ "file_size": {
+ "bytes": "{bytes} B",
+ "kbytes": "{kbytes} KB",
+ "mbytes": "{mbytes} MB",
+ "gbytes": "{gbytes} GB"
+ },
+
+ "referencing": {
+ "you": "Je",
+ "thee": "U"
+ },
+
+ "sequence": {
+ "or": ", ",
+ "and": " en "
+ }
+ },
+
+ "groups": {
+ "members": {
+ "one": "{count} lid",
+ "other": "{count} leden"
+ }
+ },
+
+ "presence": {
+ "online": "online",
+ "offline": "offline",
+ "now": "zojuist gezien",
+ "today": "laatst gezien vandaag om {time}",
+ "yesterday": "laatst gezien gisteren om {time}",
+ "at_day": "voor het laatst gezien op {date}",
+ "at_day_time": "laatst gezien op {date} om {time}",
+ "members": "{count} online"
+ },
+
+ "typing": {
+ "simple": "typt...",
+ "user": "{user} is aan het typen...",
+ "group": {
+ "sequenced": "{users} zijn aan het typen...",
+ "many": "{count} personen zijn aan het typen..."
+ }
+ },
+
+ "content": {
+
+ "unknown": "Niet ondersteunde inhoud",
+ "document": "Document",
+ "photo": "Foto",
+ "video": "Video",
+ "audio": "Geluid",
+ "contact": "Contact",
+ "location": "Locatie",
+ "sticker": "Sticker",
+
+ "service": {
+ "registered": {
+ "full": "{name} is lid geworden van {app_name}",
+ "compact": "{name} is nu lid"
+ },
+ "groups": {
+ "created": "{name} heeft een nieuwe groep gemaakt",
+ "invited": "{name} heeft {name_added} uitgenodigd",
+ "joined": "{name} is lid van de groep geworden",
+ "kicked": "{name} heeft {name_kicked} uit de group verwijderd",
+ "left": "{name} heeft de groep verlaten",
+ "title_changed": {
+ "full": "{name} heeft de groepsnaam gewijzigd naar \"{title}\"",
+ "compact": "{name} heeft de groepsnaam gewijzigd"
+ },
+ "topic_changed": {
+ "full": "{name} heeft het groepsonderwerp gewijzigd naar \"{topic}\"",
+ "compact": "{name} heeft het onderwerp gewijzigd"
+ },
+ "about_changed": {
+ "full": "{name} heeft de omschrijving van de groep gewijzigd naar \"{about}\"",
+ "compact": "{name} heeft de omschrijving gewijzigd"
+ },
+ "avatar_changed": "{name} heeft de groepsafbeelding gewijzigd",
+ "avatar_removed": "{name} heeft de groepsafbeelding verwijderd"
+ },
+ "channels": {
+ "created": "Kanaal aangemaakt",
+ "invited": "{name} heeft {name_added} uitgenodigd",
+ "joined": "{name} is aan het kanaal toegevoegd",
+ "kicked": "{name} heeft {name_kicked} uit het kanaal verwijderd",
+ "left": "{name} heeft het kanaal verlaten",
+ "title_changed": {
+ "full": "{name} heeft de naam van het kanaal gewijzigd naar \"{title}\"",
+ "compact": "{name} heeft de naam van het kanaal gewijzigd"
+ },
+ "topic_changed": {
+ "full": "{name} heeft het onderwerp van het kanaal gewijzigd naar \"{topic}\"",
+ "compact": "{name} heeft het onderwerp gewijzigd"
+ },
+ "about_changed": {
+ "full": "{name} heeft de beschrijving van het kanaal gewijzigd naar \"{about}\"",
+ "compact": "{name} heeft de beschrijving gewijzigd"
+ },
+ "avatar_changed": "{name} heeft de afbeelding bij het kanaal gewijzigd",
+ "avatar_removed": "{name} heeft de afbeelding bij het kanaal verwijderd"
+ },
+ "calls": {
+ "missed": "Gemiste oproep",
+ "ended": "Gesprek beeindigd"
+ }
+ }
+ },
+
+ "errors": {
+ "unknown": "Onbekende fout. Probeer het nog eens.",
+ "internal": "Interne server fout. Probeer het later nog eens.",
+ "phone": {
+ "empty": "Voer het telefoonnummer in.",
+ "incorrect": "Ingevoerd telefoonnummer is onjuist. Probeer het nog eens."
+ },
+ "code": {
+ "empty": "De code is ongeldig. Probeer het nog eens.",
+ "incorrect": "Ingevoerde code is niet juist. Probeer het nog eens.",
+ "expired": "De code is verlopen. Start de authenticatie opnieuw."
+ },
+ "groups": {
+ "already_joined": "Al lid van de groep.",
+ "unable_to_join": "Niet in staat lid te worden van de groep."
+ }
+ },
+
+ "months": {
+ "january": {
+ "compact": "jan",
+ "full":"januari"
+ },
+ "february": {
+ "compact": "feb",
+ "full":"februari"
+ },
+ "march": {
+ "compact": "mrt",
+ "full":"maart"
+ },
+ "april": {
+ "compact": "apr",
+ "full":"april"
+ },
+ "may": {
+ "compact": "mei",
+ "full":"mei"
+ },
+ "june": {
+ "compact": "jun",
+ "full":"juni"
+ },
+ "july": {
+ "compact": "jul",
+ "full":"juli"
+ },
+ "august": {
+ "compact": "aug",
+ "full":"augustus"
+ },
+ "september": {
+ "compact": "sep",
+ "full":"september"
+ },
+ "october": {
+ "compact": "okt",
+ "full":"oktober"
+ },
+ "november": {
+ "compact": "nov",
+ "full":"november"
+ },
+ "december": {
+ "compact": "dec",
+ "full":"december"
+ }
+ }
+}
\ No newline at end of file
diff --git a/actor-sdk/sdk-core/runtime/.DS_Store b/actor-sdk/sdk-core/runtime/.DS_Store
new file mode 100644
index 0000000000..1592f30fcf
Binary files /dev/null and b/actor-sdk/sdk-core/runtime/.DS_Store differ
diff --git a/actor-sdk/sdk-core/runtime/runtime-android/build.gradle b/actor-sdk/sdk-core/runtime/runtime-android/build.gradle
index ef3cd88fdd..81abc2815e 100644
--- a/actor-sdk/sdk-core/runtime/runtime-android/build.gradle
+++ b/actor-sdk/sdk-core/runtime/runtime-android/build.gradle
@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.1.3'
+ classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
}
}
diff --git a/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java b/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java
index 1d36a3ce94..a50297a5d5 100644
--- a/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java
+++ b/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java
@@ -1,10 +1,12 @@
package im.actor.runtime.android;
import android.content.Context;
+import android.os.Handler;
public final class AndroidContext {
private static Context context;
+ private static volatile Handler applicationHandler;
public static Context getContext() {
return context;
@@ -14,6 +16,13 @@ public static void setContext(Context context) {
AndroidContext.context = context;
}
+ public static Handler applicationHandler(){
+ if(applicationHandler == null)
+ applicationHandler = new Handler(getContext().getMainLooper());
+
+ return applicationHandler;
+ }
+
private AndroidContext() {
}
}
diff --git a/actor-sdk/sdk-core/runtime/runtime-js/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/.DS_Store
new file mode 100644
index 0000000000..feaacec666
Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/.DS_Store differ
diff --git a/actor-sdk/sdk-core/runtime/runtime-js/src/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/src/.DS_Store
new file mode 100644
index 0000000000..7b0d36729e
Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/src/.DS_Store differ
diff --git a/actor-sdk/sdk-core/runtime/runtime-js/src/main/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/src/main/.DS_Store
new file mode 100644
index 0000000000..87d6e12704
Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/src/main/.DS_Store differ
diff --git a/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/.DS_Store
new file mode 100644
index 0000000000..2b615a767f
Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/.DS_Store differ
diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java
index 8d7e5d8e20..ad93b89415 100644
--- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java
+++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java
@@ -17,8 +17,8 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.RetentionPolicy.SOURCE;
/**
* Annotation that indicates a local variable should be retained outside of any
diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java
index 1924d74db8..930be66883 100644
--- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java
+++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java
@@ -19,8 +19,10 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.CLASS;
/**
* Annotation that indicates a variable has a weak relationship to its owner.
diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java
index aa7c78b3d2..e5091fb6a6 100644
--- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java
+++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java
@@ -16,7 +16,18 @@
package org.jetbrains.annotations;
-import java.lang.annotation.*;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.Target;
+import java.lang.annotation.RetentionPolicy;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+
+
/**
* An element annotated with NotNull claims null
value is forbidden
@@ -28,7 +39,7 @@
*/
@Documented
@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
+@Target({METHOD, FIELD, PARAMETER, LOCAL_VARIABLE})
public @interface NotNull {
String value() default "";
}
diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java
index 1618621ad3..f7f8367e4a 100644
--- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java
+++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java
@@ -16,7 +16,14 @@
package org.jetbrains.annotations;
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.RetentionPolicy;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
/**
* An element annotated with Nullable claims null
value is perfectly valid
@@ -27,7 +34,7 @@
*/
@Documented
@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
+@Target({METHOD, FIELD, PARAMETER, LOCAL_VARIABLE})
public @interface Nullable {
String value() default "";
}
diff --git a/actor-server/.DS_Store b/actor-server/.DS_Store
new file mode 100644
index 0000000000..8b7cf707ea
Binary files /dev/null and b/actor-server/.DS_Store differ
diff --git a/actor-server/actor-activation/src/main/scala/im/actor/server/activation/fake/FakeSmsProvider.scala b/actor-server/actor-activation/src/main/scala/im/actor/server/activation/fake/FakeSmsProvider.scala
new file mode 100644
index 0000000000..7d072f522c
--- /dev/null
+++ b/actor-server/actor-activation/src/main/scala/im/actor/server/activation/fake/FakeSmsProvider.scala
@@ -0,0 +1,43 @@
+package im.actor.server.activation.fake
+
+import akka.actor.ActorSystem
+import akka.event.Logging
+import akka.http.scaladsl.util.FastFuture
+import cats.data.Xor
+import im.actor.server.activation.common._
+import im.actor.server.db.DbExtension
+import im.actor.server.persist.auth.GateAuthCodeRepo
+import spray.client.pipelining._
+import spray.http.HttpMethods.{ GET, POST }
+import spray.http._
+import spray.httpx.PlayJsonSupport
+import spray.httpx.marshalling._
+import spray.httpx.unmarshalling._
+
+import scala.concurrent.Future
+import scala.reflect.ClassTag
+
+import scala.concurrent.ExecutionContext.Implicits.global
+
+private[activation] final class FakeSmsProvider(implicit system: ActorSystem)
+ extends ActivationProvider
+ with PlayJsonSupport {
+
+ private val log = Logging(system, getClass)
+
+ override def send(txHash: String, code: Code): Future[CodeFailure Xor Unit] = {
+ Future {
+ Xor.right(None)
+ }
+ }
+
+ override def validate(txHash: String, code: String): Future[ValidationResponse] = {
+
+ Future {
+ Validated
+ }
+ }
+
+ override def cleanup(txHash: String): Future[Unit] = Future {}
+
+}
\ No newline at end of file
diff --git a/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala b/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala
index 294e3a7d95..8698f47854 100644
--- a/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala
+++ b/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala
@@ -374,6 +374,21 @@ object BotMessages {
@beanGetter userId: Int
) extends ResponseBody
+ @key("BotToken")
+ final case class BotToken(
+ @beanGetter token: String
+ ) extends ResponseBody
+
+ @key("GetBotToken")
+ final case class GetBotToken(
+ @beanGetter botUserId: Int
+ ) extends RequestBody {
+ override type Response = BotToken
+ override val service = Services.Bots
+
+ override def readResponse(obj: Js.Obj) = readJs[Response](obj)
+ }
+
@key("RegisterHook")
final case class RegisterHook(@beanGetter name: String) extends RequestBody {
override type Response = Container[String]
diff --git a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala
index 30ba47218e..eaa4e9b3db 100644
--- a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala
+++ b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala
@@ -23,8 +23,10 @@ import shardakka.keyvalue.SimpleKeyValue
import shardakka.{ Codec, IntCodec, ShardakkaExtension }
import slick.dbio.DBIO
-import scala.concurrent.Future
+import scala.concurrent.{ Await, Future }
import scala.concurrent.forkjoin.ThreadLocalRandom
+import scala.util.{ Failure, Success, Try }
+import scala.concurrent.duration._
object BotExtension extends ExtensionId[BotExtension] with ExtensionIdProvider {
private[bot] val tokensKV = "BotsTokens"
@@ -145,6 +147,20 @@ private[bot] final class BotExtension(_system: ActorSystem) extends Extension {
*/
def findToken(userId: UserId, name: String): Future[Option[String]] = hooksKV(userId).get(name)
+ /**
+ * Gets boot token by id
+ *
+ * @param userId
+ * @return bot token
+ */
+ def findBotToken(userId: UserId): Future[String] = {
+
+ for {
+ keys ← tokensKV.getKeys()
+ keysTokens = keys.map(k ⇒ (Await.result(tokensKV.get(k), Duration.Inf).get, k)).toMap
+ } yield (keysTokens.get(userId).getOrElse(""))
+ }
+
/**
* Finds bot webhook
*
diff --git a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala
index 98825e1ba9..56ab56ce25 100644
--- a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala
+++ b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala
@@ -24,7 +24,20 @@ private[bot] final class BotsBotService(system: ActorSystem) extends BotServiceB
}
)
+ private def getToken(botUserId: BotUserId) = RequestHandler[GetBotToken, GetBotToken#Response](
+ (botUserId: BotUserId, botAuthId: BotAuthId, botAuthSid: BotAuthSid) ⇒
+ ifIsAdmin(botUserId) {
+ (for {
+ token ← botExt.findBotToken(botUserId)
+ } yield Right(BotToken(token))) recover {
+ case _ ⇒
+ Left(BotError(400, "ERROR_GET_TOKEN", Js.Obj(), None))
+ }
+ }
+ )
+
override def handlers: PartialFunction[RequestBody, WeakRequestHandler] = {
case CreateBot(nickname, name) ⇒ createBot(nickname, name).toWeak
+ case GetBotToken(botUserId) ⇒ getToken(botUserId).toWeak
}
}
diff --git a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala
index 65b99fabb9..018e27133d 100644
--- a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala
+++ b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala
@@ -1,5 +1,6 @@
package im.actor.server.cli
+import java.lang.Throwable
import java.net.InetAddress
import akka.actor.{ ActorPath, ActorSystem }
@@ -17,6 +18,7 @@ import scala.reflect.ClassTag
private case class Config(
command: String = "help",
createBot: CreateBot = CreateBot(),
+ getBotToken: GetBotToken = GetBotToken(),
updateIsAdmin: UpdateIsAdmin = UpdateIsAdmin(),
httpToken: HttpToken = HttpToken(),
key: Key = Key(),
@@ -37,8 +39,16 @@ private[cli] case class CreateBot(
override type Response = CreateBotResponse
}
+private[cli] case class GetBotToken(
+ botUserId: Int = 0
+) extends Request {
+ override type Response = BotToken
+}
+
private[cli] case class CreateBotResponse(token: String)
+private[cli] case class BotToken(token: String)
+
private[cli] case class UpdateIsAdmin(
userId: Int = 0,
isAdmin: Boolean = false
@@ -61,6 +71,7 @@ private case class HttpTokenCreateResponse(token: String)
private object Commands {
val Help = "help"
val CreateBot = "create-bot"
+ val GetBotToken = "get-bot-token"
val AdminGrant = "admin-grant"
val AdminRevoke = "admin-revoke"
val MigrateUserSequence = "migrate-user-sequence"
@@ -89,6 +100,18 @@ object ActorCli extends App {
c.copy(createBot = c.createBot.copy(isAdmin = true))
}
)
+
+ cmd(Commands.GetBotToken) action { (_, c) ⇒
+ c.copy(command = Commands.GetBotToken)
+ } children (
+ opt[String]("host") abbr "h" optional () action { (x, c) ⇒
+ c.copy(host = Some(x))
+ },
+ opt[Int]("botUserId") abbr "u" required () action { (x, c) ⇒
+ c.copy(getBotToken = c.getBotToken.copy(botUserId = x))
+ }
+ )
+
cmd(Commands.AdminGrant) action { (_, c) ⇒
c.copy(command = Commands.AdminGrant)
} children (
@@ -155,6 +178,8 @@ object ActorCli extends App {
cmd(FastFuture.successful(parser.showUsage))
case Commands.CreateBot ⇒
cmd(handlers.createBot(config.createBot))
+ case Commands.GetBotToken ⇒
+ cmd(handlers.getBotToken(config.getBotToken))
case Commands.AdminGrant | Commands.AdminRevoke ⇒
cmd(handlers.updateIsAdmin(config.updateIsAdmin))
case Commands.MigrateUserSequence ⇒
@@ -167,9 +192,13 @@ object ActorCli extends App {
}
}
- def cmd(f: Future[Unit], timeout: Duration = 10.seconds): Unit = {
+ def cmd(f: Future[Unit], timeout: Duration = 60.seconds): Unit = {
try {
Await.result(f, timeout)
+ } catch {
+ case e: Exception ⇒ {
+ e.printStackTrace()
+ }
} finally {
handlers.shutdown()
}
@@ -197,7 +226,7 @@ final class CliHandlers(host: Option[String]) extends BotHandlers with UsersHand
protected implicit lazy val ec: ExecutionContext = system.dispatcher
- protected implicit val timeout: Timeout = Timeout(10.seconds)
+ protected implicit val timeout: Timeout = Timeout(60.seconds)
def shutdown(): Unit = {
system.terminate()
diff --git a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala
index 2038c984b4..975628cc87 100644
--- a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala
+++ b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala
@@ -9,4 +9,9 @@ private[cli] trait BotHandlers {
for (resp ← request(BotService, rq))
yield println(s"Bot user created, token: ${resp.token}")
}
+
+ def getBotToken(rq: GetBotToken): Future[Unit] = {
+ for (resp ← request(BotService, rq))
+ yield println(s"Bot token: ${resp.token}")
+ }
}
diff --git a/actor-server/actor-core/src/main/actor-api/actor.json b/actor-server/actor-core/src/main/actor-api/actor.json
index 544ad17482..5cb24ac55d 100644
--- a/actor-server/actor-core/src/main/actor-api/actor.json
+++ b/actor-server/actor-core/src/main/actor-api/actor.json
@@ -77,10 +77,9 @@
"name": "PASSWORD",
"id": 2
}
- ]
- }
- },
- {
+ ]
+ }
+ }, {
"type": "enum",
"content": {
"name": "EmailActivationType",
@@ -97,20521 +96,3862 @@
"name": "PASSWORD",
"id": 3
}
- ]
- }
- },
- {
- "type": "rpc",
+ ]
+ }
+ },{"type":"rpc","content":{
+"name":"StartPhoneAuth",
+"header":191,
+"response":{"type":"anonymous","header":193, "doc":[
+"Phone Activation response",{"type":"reference","argument":"transactionHash","category":"danger","description":" Hash of transaction"},{"type":"reference","argument":"isRegistered","category":"full","description":" Is User registered"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"bool","id":2,"name":"isRegistered"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"PhoneActivationType"}},"id":3,"name":"activationType"}
+]},
+"doc":[
+"Start Phone Activation",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number"},{"type":"reference","argument":"appId","category":"hidden","description":"Appication Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages of device"}],"attributes":[
+{"type":"int64","id":1,"name":"phoneNumber"}
+,{"type":"int32","id":2,"name":"appId"}
+,{"type":"string","id":3,"name":"apiKey"}
+,{"type":"bytes","id":4,"name":"deviceHash"}
+,{"type":"string","id":5,"name":"deviceTitle"}
+,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"}
+,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"}
+]}},{"type":"rpc","content":{
+"name":"SendCodeByPhoneCall",
+"header":197,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Dial phone and dictate auth code",{"type":"reference","argument":"transactionHash","category":"danger","description":"Transaction hash"}],"attributes":[
+{"type":"string","id":1,"name":"transactionHash"}
+]}},{"type":"rpc","content":{
+"name":"StartEmailAuth",
+"header":185,
+"response":{"type":"anonymous","header":186, "doc":[
+"Email Activation response",{"type":"reference","argument":"transactionHash","category":"danger","description":" Hash of activation transaction"},{"type":"reference","argument":"isRegistered","category":"full","description":" true if user is registered"},{"type":"reference","argument":"activationType","category":"full","description":" Email Activation type"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"bool","id":2,"name":"isRegistered"}
+,{"type":{"type":"enum","childType":"EmailActivationType"},"id":3,"name":"activationType"}
+]},
+"doc":[
+"Start EMail Activation",{"type":"reference","argument":"email","category":"full","description":"Email"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[
+{"type":"string","id":1,"name":"email"}
+,{"type":"int32","id":2,"name":"appId"}
+,{"type":"string","id":3,"name":"apiKey"}
+,{"type":"bytes","id":4,"name":"deviceHash"}
+,{"type":"string","id":5,"name":"deviceTitle"}
+,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"}
+,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"}
+]}},{"type":"rpc","content":{
+"name":"StartAnonymousAuth",
+"header":198,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Starting Anonymous login",{"type":"reference","argument":"name","category":"full","description":"Name of new user"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[
+{"type":"string","id":1,"name":"name"}
+,{"type":"int32","id":2,"name":"appId"}
+,{"type":"string","id":3,"name":"apiKey"}
+,{"type":"bytes","id":4,"name":"deviceHash"}
+,{"type":"string","id":5,"name":"deviceTitle"}
+,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"}
+,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"}
+]}},{"type":"rpc","content":{
+"name":"StartTokenAuth",
+"header":203,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Starting token-based login",{"type":"reference","argument":"token","category":"full","description":"Token for authentication"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[
+{"type":"string","id":1,"name":"token"}
+,{"type":"int32","id":2,"name":"appId"}
+,{"type":"string","id":3,"name":"apiKey"}
+,{"type":"bytes","id":4,"name":"deviceHash"}
+,{"type":"string","id":5,"name":"deviceTitle"}
+,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"}
+,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"}
+]}},{"type":"rpc","content":{
+"name":"StartUsernameAuth",
+"header":2571,
+"response":{"type":"anonymous","header":2572, "doc":[
+"Result of login auth start. If is not registered move to signup.",{"type":"reference","argument":"transactionHash","category":"danger","description":" Authentication transaction hash"},{"type":"reference","argument":"isRegistered","category":"full","description":" If user is registered with this username"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"bool","id":2,"name":"isRegistered"}
+]},
+"doc":[
+"Starting Login Authentication",{"type":"reference","argument":"username","category":"full","description":"Username for signing in"},{"type":"reference","argument":"appId","category":"hidden","description":"Application id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"Time Zone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages of device"}],"attributes":[
+{"type":"string","id":1,"name":"username"}
+,{"type":"int32","id":2,"name":"appId"}
+,{"type":"string","id":3,"name":"apiKey"}
+,{"type":"bytes","id":4,"name":"deviceHash"}
+,{"type":"string","id":5,"name":"deviceTitle"}
+,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"}
+,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"}
+]}},{"type":"rpc","content":{
+"name":"ValidateCode",
+"header":189,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Performing user sign in.",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"code","category":"hidden","description":"Activation code"}],"attributes":[
+{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"string","id":2,"name":"code"}
+]}},{"type":"rpc","content":{
+"name":"ValidatePassword",
+"header":207,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Validation of account password",{"type":"reference","argument":"transactionHash","category":"full","description":"Hash of transaction"},{"type":"reference","argument":"password","category":"full","description":"Password for account"}],"attributes":[
+{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"string","id":2,"name":"password"}
+]}},{"type":"rpc","content":{
+"name":"GetOAuth2Params",
+"header":194,
+"response":{"type":"anonymous","header":195, "doc":[
+{"type":"reference","argument":"authUrl","category":"hidden","description":" Authentication url"}] ,"attributes":[{"type":"string","id":1,"name":"authUrl"}
+]},
+"doc":[
+"Loading OAuth2 Parameters",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"redirectUrl","category":"full","description":"Redirect URL for Application"}],"attributes":[
+{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"string","id":2,"name":"redirectUrl"}
+]}},{"type":"rpc","content":{
+"name":"CompleteOAuth2",
+"header":196,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Complete OAuth2 Authentication",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"code","category":"danger","description":"Authentication Code"}],"attributes":[
+{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"string","id":2,"name":"code"}
+]}},{"type":"rpc","content":{
+"name":"SignUp",
+"header":190,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Perform user SignUp",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"name","category":"full","description":"User name"},{"type":"reference","argument":"sex","category":"full","description":"Optional user sex"},{"type":"reference","argument":"password","category":"full","description":"Password for password-based accounts"}],"attributes":[
+{"type":"string","id":1,"name":"transactionHash"}
+,{"type":"string","id":2,"name":"name"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"Sex"}},"id":3,"name":"sex"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"password"}
+]}},{"type":"response","content":{
+"name":"Auth",
+"header":5,
+"doc":[
+"Authentication result",{"type":"reference","argument":"user","category":"compact","description":" The authenticated User"},{"type":"reference","argument":"config","category":"full","description":" Current config of server"}],"attributes":[
+{"type":{"type":"struct","childType":"User"},"id":2,"name":"user"}
+,{"type":{"type":"struct","childType":"Config"},"id":3,"name":"config"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"AuthSession",
+"doc":[
+"Authentication session",{"type":"reference","argument":"id","category":"full","description":" Unuque ID of session"},{"type":"reference","argument":"authHolder","category":"full","description":" holder of session. 0 - this device, 1 - other."},{"type":"reference","argument":"appId","category":"full","description":" Application Id (user in SignIn/SignUp)"},{"type":"reference","argument":"appTitle","category":"full","description":" Title of application"},{"type":"reference","argument":"deviceTitle","category":"full","description":" Title of device"},{"type":"reference","argument":"authTime","category":"full","description":" Time of session creating"},{"type":"reference","argument":"authLocation","category":"hidden","description":" two-letter country code of session create"},{"type":"reference","argument":"latitude","category":"hidden","description":" optional latitude of auth if available"},{"type":"reference","argument":"longitude","category":"hidden","description":" optional longitude of auth if available"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":{"type":"enum","childType":"AuthHolder"},"id":2,"name":"authHolder"}
+,{"type":"int32","id":3,"name":"appId"}
+,{"type":"string","id":4,"name":"appTitle"}
+,{"type":"string","id":5,"name":"deviceTitle"}
+,{"type":"int32","id":6,"name":"authTime"}
+,{"type":"string","id":7,"name":"authLocation"}
+,{"type":{"type":"opt","childType":"double"},"id":8,"name":"latitude"}
+,{"type":{"type":"opt","childType":"double"},"id":9,"name":"longitude"}
+]}}, {
+ "type": "enum",
"content": {
- "name": "StartPhoneAuth",
- "header": 191,
- "response": {
- "type": "anonymous",
- "header": 193,
- "doc": [
- "Phone Activation response",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": " Hash of transaction"
- },
- {
- "type": "reference",
- "argument": "isRegistered",
- "category": "full",
- "description": " Is User registered"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "isRegistered"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "PhoneActivationType"
- }
- },
- "id": 3,
- "name": "activationType"
- }
- ]
- },
- "doc": [
- "Start Phone Activation",
- {
- "type": "reference",
- "argument": "phoneNumber",
- "category": "full",
- "description": "Phone number"
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Appication Id"
- },
+ "name": "AuthHolder",
+ "values": [
{
- "type": "reference",
- "argument": "apiKey",
- "category": "hidden",
- "description": "Application API key"
+ "name": "ThisDevice",
+ "id": 1
},
{
- "type": "reference",
- "argument": "deviceHash",
- "category": "full",
- "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"
- },
+ "name": "OtherDevice",
+ "id": 2
+ }
+ ]
+ }
+ },{"type":"rpc","content":{
+"name":"GetAuthSessions",
+"header":80,
+"response":{"type":"anonymous","header":81, "doc":[
+"Current Auth sessions",{"type":"reference","argument":"userAuths","category":"compact","description":" User authentications"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"AuthSession"}},"id":1,"name":"userAuths"}
+]},
+"doc":[
+"Getting of all active user's authentication sessions"],"attributes":[
+]}},{"type":"rpc","content":{
+"name":"TerminateSession",
+"header":82,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"SignOut on specified user's session",{"type":"reference","argument":"id","category":"full","description":"id from AuthItem"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+]}},{"type":"rpc","content":{
+"name":"TerminateAllSessions",
+"header":83,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"SignOut on all exept current sessions"],"attributes":[
+]}},{"type":"rpc","content":{
+"name":"SignOut",
+"header":84,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"SignOut current session"],"attributes":[
+]}},{"type":"comment","content":"OBSOLETE METHODS"},{"type":"rpc","content":{
+"name":"SignInObsolete",
+"header":3,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Performing user signin",{"type":"reference","argument":"phoneNumber","category":"danger","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"smsCode","category":"danger","description":"Confirmation code from SMS"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device title like 'Steven's iPhone'"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"appKey","category":"hidden","description":"Application API key"}],"attributes":[
+{"type":"int64","id":1,"name":"phoneNumber"}
+,{"type":"string","id":2,"name":"smsHash"}
+,{"type":"string","id":3,"name":"smsCode"}
+,{"type":"bytes","id":5,"name":"deviceHash"}
+,{"type":"string","id":6,"name":"deviceTitle"}
+,{"type":"int32","id":7,"name":"appId"}
+,{"type":"string","id":8,"name":"appKey"}
+]}},{"type":"rpc","content":{
+"name":"SignUpObsolete",
+"header":4,
+"response":{"type":"reference","name":"Auth"},
+"doc":[
+"Performing user signup. If user perform signup on already registered user it just override previous","profile information",{"type":"reference","argument":"phoneNumber","category":"danger","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"smsCode","category":"danger","description":"Confirmation code from SMS"},{"type":"reference","argument":"name","category":"full","description":"User name"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device title like 'Steven's iPhone'"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"appKey","category":"hidden","description":"pplication API key"}],"attributes":[
+{"type":"int64","id":1,"name":"phoneNumber"}
+,{"type":"string","id":2,"name":"smsHash"}
+,{"type":"string","id":3,"name":"smsCode"}
+,{"type":"string","id":4,"name":"name"}
+,{"type":"bytes","id":7,"name":"deviceHash"}
+,{"type":"string","id":8,"name":"deviceTitle"}
+,{"type":"int32","id":9,"name":"appId"}
+,{"type":"string","id":10,"name":"appKey"}
+,{"type":"bool","id":11,"name":"isSilent"}
+]}},{"type":"rpc","content":{
+"name":"SendAuthCodeObsolete",
+"header":1,
+"response":{"type":"anonymous","header":2, "doc":[
+"Sms Request response",{"type":"reference","argument":"smsHash","category":"danger","description":" Hash of SMS request"},{"type":"reference","argument":"isRegistered","category":"full","description":" true if user is registered"}] ,"attributes":[{"type":"string","id":1,"name":"smsHash"}
+,{"type":"bool","id":2,"name":"isRegistered"}
+]},
+"doc":[
+"Sending SMS with activation code",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number in international format"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"}],"attributes":[
+{"type":"int64","id":1,"name":"phoneNumber"}
+,{"type":"int32","id":2,"name":"appId"}
+,{"type":"string","id":3,"name":"apiKey"}
+]}},{"type":"rpc","content":{
+"name":"SendAuthCallObsolete",
+"header":90,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Requesting Phone activation",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"}],"attributes":[
+{"type":"int64","id":1,"name":"phoneNumber"}
+,{"type":"string","id":2,"name":"smsHash"}
+,{"type":"int32","id":3,"name":"appId"}
+,{"type":"string","id":4,"name":"apiKey"}
+]}}]}, {
+ "title": "Users",
+ "package": "users",
+ "doc": [
+ "Users are objects that secured by accessHash. You can't load user profile by it's id.",
+ "You can't send message to user without finding it's object in Updates or by calling",
+ "method for user search, contacts import or some other methods.",
+ "",
+ "Applications need to keep all Users information forever.",
+ "",
+ "Each User have optional localName - name of user that was set by current user and can be changed",
+ "any time by calling EditUserLocalName method."
+ ],
+ "items": [
+ {
+ "type": "enum",
+ "content": {
+ "name": "Sex",
+ "values": [
{
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": "Device Title"
+ "name": "Unknown",
+ "id": 1
},
{
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": "TimeZone of device"
+ "name": "Male",
+ "id": 2
},
{
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": "Preferred languages of device"
+ "name": "Female",
+ "id": 3
}
- ],
- "attributes": [
+ ]
+ }
+ }, {
+ "type": "enum",
+ "content": {
+ "name": "ContactType",
+ "values": [
{
- "type": "int64",
- "id": 1,
- "name": "phoneNumber"
+ "name": "Phone",
+ "id": 1
},
{
- "type": "int32",
- "id": 2,
- "name": "appId"
+ "name": "Email",
+ "id": 2
},
{
- "type": "string",
- "id": 3,
- "name": "apiKey"
+ "name": "Web",
+ "id": 3
},
{
- "type": "bytes",
- "id": 4,
- "name": "deviceHash"
- },
+ "name": "Social",
+ "id": 4
+ }
+ ]
+ }
+ }, {
+ "type":"struct",
+ "content": {
+ "name":"ContactRecord",
+"doc":[
+"Contact information record",{"type":"reference","argument":"type","category":"full","description":" Record type"},{"type":"reference","argument":"typeSpec","category":"hidden","description":" Value for specification type of contact, for example 'mobile/standalone/office' for phones or 'vk/fb/telegram' for extenrnal networks."},{"type":"reference","argument":"stringValue","category":"full","description":" String value of record"},{"type":"reference","argument":"longValue","category":"full","description":" Long value of record"},{"type":"reference","argument":"title","category":"full","description":" Title of record"},{"type":"reference","argument":"subtitle","category":"hidden","description":" Subtitle of record"}],"expandable":"true","attributes":[
+{"type":{"type":"enum","childType":"ContactType"},"id":1,"name":"type"}
+,{"type":{"type":"opt","childType":"string"},"id":6,"name":"typeSpec"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"stringValue"}
+,{"type":{"type":"opt","childType":"int64"},"id":3,"name":"longValue"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"title"}
+,{"type":{"type":"opt","childType":"string"},"id":5,"name":"subtitle"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"User",
+"doc":[
+"Main user object",{"type":"reference","argument":"id","category":"full","description":" uid"},{"type":"reference","argument":"accessHash","category":"danger","description":" user's access hash"},{"type":"reference","argument":"name","category":"full","description":" user's name"},{"type":"reference","argument":"localName","category":"full","description":" user's local name"},{"type":"reference","argument":"nick","category":"full","description":" User's nickname"},{"type":"reference","argument":"sex","category":"full","description":" optional sex of user"},{"type":"reference","argument":"avatar","category":"compact","description":" avatar of user"},{"type":"reference","argument":"isBot","category":"full","description":" Is user actually bot. By default is false."},{"type":"reference","argument":"ext","category":"full","description":" Extension values"},{"type":"reference","argument":"about","category":"full","description":" [DEPRECATED] User's about information"},{"type":"reference","argument":"contactInfo","category":"compact","description":" [DEPRECATED] Contact information of user"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" [DEPRECATED] Preferred user languages"},{"type":"reference","argument":"timeZone","category":"full","description":" [DEPRECATED] Time Zone of user in TZ format"},{"type":"reference","argument":"botCommands","category":"full","description":" [DEPRECATED] Available Bot Commands"}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+,{"type":"string","id":3,"name":"name"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"localName"}
+,{"type":{"type":"opt","childType":"string"},"id":13,"name":"nick"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"Sex"}},"id":5,"name":"sex"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":8,"name":"avatar"}
+,{"type":{"type":"opt","childType":"bool"},"id":11,"name":"isBot"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":20,"name":"ext"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":12,"name":"contactInfo", "deprecated":"true"}
+,{"type":{"type":"opt","childType":"string"},"id":14,"name":"about", "deprecated":"true"}
+,{"type":{"type":"list","childType":"string"},"id":16,"name":"preferredLanguages", "deprecated":"true"}
+,{"type":{"type":"opt","childType":"string"},"id":17,"name":"timeZone", "deprecated":"true"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":19,"name":"botCommands", "deprecated":"true"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"FullUser",
+"doc":[
+"Full User representation",{"type":"reference","argument":"id","category":"full","description":" User's Id"},{"type":"reference","argument":"contactInfo","category":"compact","description":" User's contact information"},{"type":"reference","argument":"about","category":"full","description":" User's about information"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" Preferred user languages"},{"type":"reference","argument":"timeZone","category":"full","description":" Time Zone of user in TZ format"},{"type":"reference","argument":"botCommands","category":"full","description":" Available Commands for Bot"},{"type":"reference","argument":"ext","category":"full","description":" Extension values. NOTE: This values are not related to ext field in User object."},{"type":"reference","argument":"isBlocked","category":"full","description":" Is user blocked. Default is false."}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"id"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":2,"name":"contactInfo"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"}
+,{"type":{"type":"list","childType":"string"},"id":4,"name":"preferredLanguages"}
+,{"type":{"type":"opt","childType":"string"},"id":5,"name":"timeZone"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":6,"name":"botCommands"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":7,"name":"ext"}
+,{"type":{"type":"opt","childType":"bool"},"id":8,"name":"isBlocked"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"BotCommand",
+"doc":[
+"Available bot commands",{"type":"reference","argument":"slashCommand","category":"full","description":" Slash command name (wihtout slash)"},{"type":"reference","argument":"description","category":"full","description":" Slash command description"},{"type":"reference","argument":"locKey","category":"full","description":" Optional Localization Key for i18n"}],"attributes":[
+{"type":"string","id":1,"name":"slashCommand"}
+,{"type":"string","id":2,"name":"description"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"locKey"}
+]}},{"type":"rpc","content":{
+"name":"EditUserLocalName",
+"header":96,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Renaming of user's visible name",{"type":"reference","argument":"uid","category":"full","description":"target User's uid"},{"type":"reference","argument":"accessHash","category":"danger","description":"User's accessHash"},{"type":"reference","argument":"name","category":"full","description":"New user name"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":"int64","id":2,"name":"accessHash"}
+,{"type":"string","id":3,"name":"name"}
+]}},{"type":"update","content":{
+"name":"UserAvatarChanged",
+"header":16,
+"doc":[
+"Update about avatar changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"avatar","category":"compact","description":" user's new avatar"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":2,"name":"avatar"}
+]}},{"type":"update","content":{
+"name":"UserNameChanged",
+"header":32,
+"doc":[
+"Update about name changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"name","category":"full","description":" user's name"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":"string","id":2,"name":"name"}
+]}},{"type":"update","content":{
+"name":"UserLocalNameChanged",
+"header":51,
+"doc":[
+"Update about local name changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"localName","category":"full","description":" new user's local name"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"localName"}
+]}},{"type":"update","content":{
+"name":"UserContactsChanged",
+"header":134,
+"doc":[
+"Update about contact information change",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"contactRecords","category":"compact","description":" new phones list"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":4,"name":"contactRecords"}
+]}},{"type":"update","content":{
+"name":"UserNickChanged",
+"header":209,
+"doc":[
+"Update about nick changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"nickname","category":"full","description":" user's new nickname"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"nickname"}
+]}},{"type":"update","content":{
+"name":"UserAboutChanged",
+"header":210,
+"doc":[
+"Update about user's about changed",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"about","category":"full","description":" User's about"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"}
+]}},{"type":"update","content":{
+"name":"UserPreferredLanguagesChanged",
+"header":212,
+"doc":[
+"Update about user's preferred languages",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" User's preferred languages. Can be empty."}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"list","childType":"string"},"id":2,"name":"preferredLanguages"}
+]}},{"type":"update","content":{
+"name":"UserTimeZoneChanged",
+"header":216,
+"doc":[
+"User TimeZone changed",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"timeZone","category":"full","description":" User's new time zone in TZ format"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"timeZone"}
+]}},{"type":"update","content":{
+"name":"UserBotCommandsChanged",
+"header":217,
+"doc":[
+"Update about bot commands changed",{"type":"reference","argument":"uid","category":"full","description":" User's Id"},{"type":"reference","argument":"commands","category":"full","description":" New List of commands"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":2,"name":"commands"}
+]}},{"type":"update","content":{
+"name":"UserExtChanged",
+"header":218,
+"doc":[
+"Update about user ext changed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"ext","category":"full","description":" New Ext Value in User (NOT FullUser) object."}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"}
+]}},{"type":"update","content":{
+"name":"UserFullExtChanged",
+"header":219,
+"doc":[
+"Update about user ext changed",{"type":"reference","argument":"uid","category":"full","description":" User's Id"},{"type":"reference","argument":"ext","category":"full","description":" New Ext Value in FullUser (NOT User) object."}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":3,"name":"ext"}
+]}},{"type":"rpc","content":{
+"name":"LoadFullUsers",
+"header":2649,
+"response":{"type":"anonymous","header":2650, "doc":[
+{"type":"reference","argument":"fullUsers","category":"compact","description":" Loaded users"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"FullUser"}},"id":1,"name":"fullUsers"}
+]},
+"doc":[
+"Loading Full User information",{"type":"reference","argument":"userPeers","category":"compact","description":"User's peers to load. Should be non-empy"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"userPeers"}
+]}}]}, {
+ "title": "Profile",
+ "package": "profile",
+ "items": [
+{"type":"rpc","content":{
+"name":"EditName",
+"header":53,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Changing account's name",{"type":"reference","argument":"name","category":"full","description":"New name"}],"attributes":[
+{"type":"string","id":1,"name":"name"}
+]}},{"type":"rpc","content":{
+"name":"EditNickName",
+"header":205,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Changing account's nickname",{"type":"reference","argument":"nickname","category":"full","description":"New Nickname"}],"attributes":[
+{"type":{"type":"opt","childType":"string"},"id":1,"name":"nickname"}
+]}},{"type":"rpc","content":{
+"name":"CheckNickName",
+"header":206,
+"response":{"type":"reference","name":"Bool"},
+"doc":[
+"Checking availability of nickname",{"type":"reference","argument":"nickname","category":"full","description":"Nickname for checking"}],"attributes":[
+{"type":"string","id":1,"name":"nickname"}
+]}},{"type":"rpc","content":{
+"name":"EditAbout",
+"header":212,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Changing about information",{"type":"reference","argument":"about","category":"full","description":"new about information"}],"attributes":[
+{"type":{"type":"opt","childType":"string"},"id":1,"name":"about"}
+]}},{"type":"rpc","content":{
+"name":"EditAvatar",
+"header":31,
+"response":{"type":"anonymous","header":103, "doc":[
+"Response for change account avatar",{"type":"reference","argument":"avatar","category":"full","description":" New avatar"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"}] ,"attributes":[{"type":{"type":"struct","childType":"Avatar"},"id":1,"name":"avatar"}
+,{"type":"int32","id":2,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"}
+]},
+"doc":[
+"Changing account's avatar",{"type":"reference","argument":"fileLocation","category":"compact","description":"File Location of uploaded unencrypted avatar"}],"attributes":[
+{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"}
+]}},{"type":"rpc","content":{
+"name":"RemoveAvatar",
+"header":91,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Removing account's avatar"],"attributes":[
+]}},{"type":"rpc","content":{
+"name":"EditMyTimeZone",
+"header":144,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Updating user's time zone",{"type":"reference","argument":"tz","category":"full","description":"New Time Zone"}],"attributes":[
+{"type":"string","id":1,"name":"tz"}
+]}},{"type":"rpc","content":{
+"name":"EditMyPreferredLanguages",
+"header":145,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Changing preffered languages",{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preffered Languages"}],"attributes":[
+{"type":{"type":"list","childType":"string"},"id":1,"name":"preferredLanguages"}
+]}}]}, {
+ "title": "Contacts",
+ "package": "contacts",
+ "doc": [
+ "Before working with contact list is is useful to import contacts from phone first by calling",
+ "method ImportContacts#0x07.",
+ "",
+ "All phone numbers MUST be preprocessed before import by some library (like libphonenumber)",
+ "and build international phone number depending on current users phone and/or locale.",
+ "",
+ "For loading contact list from server use GetContacts#0x57.",
+ "If during this call there are some updates about contact list change",
+ "it is recommended to call it again. Also applications need to sync contacts on application start.",
+ "",
+ "For searching for users without adding to contacts list use method FindContacts#0x70.",
+ "",
+ "For adding/deleting contacts AddContact#0x72 and DeleteContact#0x59."
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"PhoneToImport",
+"doc":[
+"Phone for import",{"type":"reference","argument":"phoneNumber","category":"full","description":" phone number for import in international format"},{"type":"reference","argument":"name","category":"full","description":" optional name for contact"}],"attributes":[
+{"type":"int64","id":1,"name":"phoneNumber"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EmailToImport",
+"doc":[
+"Email for import",{"type":"reference","argument":"email","category":"full","description":" email for importing"},{"type":"reference","argument":"name","category":"full","description":" optional name for contact"}],"attributes":[
+{"type":"string","id":1,"name":"email"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"}
+]}},{"type":"rpc","content":{
+"name":"ImportContacts",
+"header":7,
+"response":{"type":"anonymous","header":8, "doc":[
+"Imported contacts",{"type":"reference","argument":"users","category":"compact","description":" Imported users"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number if users are imported"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state if users are imported"},{"type":"reference","argument":"userPeers","category":"full","description":" Imported user peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"}
+,{"type":"int32","id":2,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"}
+]},
+"doc":[
+"Importing phones and emails for building contact list","Maximum amount of items for import per method call equals to 100.",{"type":"reference","argument":"phones","category":"compact","description":"Phones for import"},{"type":"reference","argument":"emails","category":"compact","description":"Emails for import"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"PhoneToImport"}},"id":1,"name":"phones"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EmailToImport"}},"id":2,"name":"emails"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"}
+]}},{"type":"empty"},{"type":"rpc","content":{
+"name":"GetContacts",
+"header":87,
+"response":{"type":"anonymous","header":88, "doc":[
+"Current contact list",{"type":"reference","argument":"users","category":"hidden","description":" User list if list is changed"},{"type":"reference","argument":"isNotChanged","category":"full","description":" is list changed"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"}
+,{"type":"bool","id":2,"name":"isNotChanged"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"userPeers"}
+]},
+"doc":[
+"Getting current contact list","SHA256 hash of list of a comma-separated list of contact UIDs in ascending","order may be passed in contactsHash parameter.","If the contact list was not changed, isNotChanged will be true.",{"type":"reference","argument":"contactsHash","category":"full","description":"Hash of saved list in application"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[
+{"type":"string","id":1,"name":"contactsHash"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"RemoveContact",
+"header":89,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Removing contact from contact list",{"type":"reference","argument":"uid","category":"full","description":"Contact's UID"},{"type":"reference","argument":"accessHash","category":"danger","description":"Contact's AccessHash"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}},{"type":"rpc","content":{
+"name":"AddContact",
+"header":114,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Adding contact to contact list",{"type":"reference","argument":"uid","category":"full","description":"Contact's UID"},{"type":"reference","argument":"accessHash","category":"danger","description":"Contact's AccessHash"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}},{"type":"rpc","content":{
+"name":"SearchContacts",
+"header":112,
+"response":{"type":"anonymous","header":113, "doc":[
+"Founded users",{"type":"reference","argument":"users","category":"compact","description":" Founded users"},{"type":"reference","argument":"userPeers","category":"compact","description":" Founded users peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":2,"name":"userPeers"}
+]},
+"doc":[
+"Searching contacts by user's query",{"type":"reference","argument":"request","category":"full","description":"Search query"}],"attributes":[
+{"type":"string","id":1,"name":"request"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"}
+]}},{"type":"empty"},{"type":"update","content":{
+"name":"ContactRegistered",
+"header":5,
+"doc":[
+"Update about contact registration",{"type":"reference","argument":"uid","category":"full","description":" contact's uid"},{"type":"reference","argument":"isSilent","category":"full","description":" is registration silent. If this value is true then don't show notification about registration"},{"type":"reference","argument":"date","category":"full","description":" date of registration"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":"bool","id":2,"name":"isSilent"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+]}},{"type":"update","content":{
+"name":"ContactsAdded",
+"header":40,
+"doc":[
+"Update about contacts added",{"type":"reference","argument":"uids","category":"compact","description":" added contacts"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"uids"}
+]}},{"type":"update","content":{
+"name":"ContactsRemoved",
+"header":41,
+"doc":[
+"Update about contacts removed",{"type":"reference","argument":"uids","category":"compact","description":" removed contacts"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"uids"}
+]}}]}, {
+ "title": "Privacy",
+ "package": "privacy",
+ "items": [
+{"type":"rpc","content":{
+"name":"BlockUser",
+"header":2636,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Block User",{"type":"reference","argument":"peer","category":"full","description":"Peer for blocking"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"UnblockUser",
+"header":2637,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Unblock User",{"type":"reference","argument":"peer","category":"full","description":"Peer for unblocking"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"LoadBlockedUsers",
+"header":2638,
+"response":{"type":"anonymous","header":2639, "doc":[
+{"type":"reference","argument":"userPeers","category":"full","description":" Blocked user peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"userPeers"}
+]},
+"doc":[
+"Load Blocked Users"],"attributes":[
+]}},{"type":"update","content":{
+"name":"UserBlocked",
+"header":2629,
+"doc":[
+"Update about User Blocked",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+]}},{"type":"update","content":{
+"name":"UserUnblocked",
+"header":2630,
+"doc":[
+"Update about User Unblocked",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+]}}]}, {
+ "title": "Messaging",
+ "package": "messaging",
+ "doc": [
+ "Actor can work with encrypted and plain messages in one conversation. For both types of messages API",
+ "contains a bit different methods. Also encrypted and plain messages have different schemes.",
+ "Messages ",
+ "Message entity contains:",
+ "",
+ "PeerType - group chat or private ",
+ "PeerId - group or user id of conversation ",
+ "RandomId - unique id of message that generated by sender. In Encrypted messages random id is encrypted. ",
+ "Date - date of message (calculated on server) ",
+ "Content ",
+ " ",
+ "Message content ",
+ "Message can be one of three basic types of messages: Text Message, File Message and Service message.",
+ "All messages can contain extensions. For example we can send text message and add markdown extension with",
+ "formatted text in markdown and clients that support this extension will show markdown, and that clients that",
+ "not supported extension then show simple text. File messages can have photo, video or voice extensions.",
+ "Service message can have extensions extensions such as \"user added\", \"group created\", \"avatar changed\", etc.",
+ "Send messages ",
+ "Sending messages looks same for encrypted and plain messages. Client MUST prepare all required data",
+ "before sending message (for example FastThumb for photo/video/documents) and call required methods.",
+ "Encrypted messages differs here only by a little different scheme and encryption.",
+ "WRONG_KEYS and incorrect keys ",
+ "For sending encrypted messages client MUST send messages encrypted for all own and receivers keys.",
+ "If client send encryption with missing, old or incorrect keys it will receive WRONG_KEYS.",
+ "In WRONG_KEYS you need to deserialize relatedData from RpcError to WrongKeysErrorData",
+ "and get detailed information about keys. Sometimes there are some broken keys on server and client can't",
+ "encrypt messages with it than client MUST send empty encrypted key in request elsewhere API return WRONG_KEYS.",
+ "Encrypted messages and New Devices ",
+ "When you send message to someone and when he registered with new device there are no way to receive old encrypted",
+ "messages on new device and because of this there are a problem about read/delivery statuses.",
+ "Alice send messages to Bob, but Bob lose his device and buy new iPhone and installed Actor.",
+ "Alice receive notification about new device and send another message. Bob open chat with Alice and",
+ "send read status with maximum message read date. Alice will mark all sent messages as read and one that",
+ "was not delivered. We can use status notifications per message, but in VERY heavy conversations it will be",
+ "a lot of unnecessary traffic. For resolving this small issue we have different ways of message statuses",
+ "for encrypted and plain messages. Also it is recomended to mark all undelivered messages on new device update as",
+ "not devered with warring sign.",
+ "Message Read and Delivery ",
+ "There are two different ways for read and delivery statuses for encrypted and plain messages.",
+ "For encrypted messages used status change by RandomId and for plain messages used by maximum",
+ "date of read/delivered message."
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"MessageAttributes",
+"doc":[
+"Message Attributes",{"type":"reference","argument":"isMentioned","category":"full","description":" Is mentioned. If set overrides built-in value."},{"type":"reference","argument":"isHighlighted","category":"full","description":" Is message highlighted. Default is false."},{"type":"reference","argument":"isNotified","category":"full","description":" Is notified. If set overrides built-in settings."},{"type":"reference","argument":"isOnlyForYou","category":"full","description":" If this message is only for you. Default is false"}],"attributes":[
+{"type":{"type":"opt","childType":"bool"},"id":1,"name":"isMentioned"}
+,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isHighlighted"}
+,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isNotified"}
+,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isOnlyForYou"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"QuotedMessage",
+"doc":[
+"Quoted Message",{"type":"reference","argument":"messageId","category":"full","description":" Message Id if present"},{"type":"reference","argument":"publicGroupId","category":"full","description":" Public Group id if present"},{"type":"reference","argument":"senderUserId","category":"full","description":" Sender of message"},{"type":"reference","argument":"messageDate","category":"full","description":" Date of message"},{"type":"reference","argument":"quotedMessageContent","category":"full","description":" Optional Quoted Message Content. Can be empty if messageId is present and message is in current peer."}],"attributes":[
+{"type":{"type":"opt","childType":{"type":"alias","childType":"randomId"}},"id":1,"name":"messageId"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"groupId"}},"id":2,"name":"publicGroupId"}
+,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"senderUserId"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"messageDate"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"Message"}},"id":5,"name":"quotedMessageContent"}
+]}},{"type":"trait","content":{
+"isContainer":"true","name":"Message","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"TextMessage",
+"doc":[
+"Text message",{"type":"reference","argument":"text","category":"danger","description":" the text"},{"type":"reference","argument":"mentions","category":"full","description":" User mentions in message"},{"type":"reference","argument":"ext","category":"full","description":" Optional bytes of extension"}],"trait":{"name":"Message","key":1},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"text"}
+,{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"mentions"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"TextMessageEx"}},"id":3,"name":"ext"}
+]}},{"type":"trait","content":{
+"isContainer":"true","name":"TextMessageEx","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"TextExMarkdown",
+"doc":[
+"Markdown extension",{"type":"reference","argument":"markdown","category":"full","description":" Markdown text"}],"trait":{"name":"TextMessageEx","key":1},"expandable":"true","attributes":[
+{"type":"string","id":2,"name":"markdown"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"TextModernMessage",
+"doc":[
+"Modern text message",{"type":"reference","argument":"text","category":"full","description":" optional text of message"},{"type":"reference","argument":"senderNameOverride","category":"full","description":" optional overriding of sender"},{"type":"reference","argument":"senderPhotoOverride","category":"full","description":" optional overriding sender's photo"},{"type":"reference","argument":"style","category":"full","description":" optional paragraph style"},{"type":"reference","argument":"attaches","category":"full","description":" optional Attaches of message"}],"trait":{"name":"TextMessageEx","key":2},"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":"string"},"id":1,"name":"text"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"senderNameOverride"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":3,"name":"senderPhotoOverride"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"ParagraphStyle"}},"id":4,"name":"style"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"TextModernAttach"}},"id":5,"name":"attaches"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ParagraphStyle",
+"doc":[
+"Paragraph style",{"type":"reference","argument":"showParagraph","category":"full","description":" Show quote-like paragraph?"},{"type":"reference","argument":"paragraphColor","category":"full","description":" Override paragraph color"},{"type":"reference","argument":"bgColor","category":"full","description":" Override background color"}],"attributes":[
+{"type":{"type":"opt","childType":"bool"},"id":1,"name":"showParagraph"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"Color"}},"id":2,"name":"paragraphColor"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"Color"}},"id":3,"name":"bgColor"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"TextModernAttach",
+"doc":[
+"Attaches to message",{"type":"reference","argument":"title","category":"full","description":" Attach of message"},{"type":"reference","argument":"titleUrl","category":"full","description":" Attach title url"},{"type":"reference","argument":"titleIcon","category":"full","description":" Attach title icon"},{"type":"reference","argument":"text","category":"full","description":" Attach text"},{"type":"reference","argument":"style","category":"full","description":" Attach style"}],"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":"string"},"id":1,"name":"title"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"titleUrl"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":3,"name":"titleIcon"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"text"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"ParagraphStyle"}},"id":5,"name":"style"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"TextModernField"}},"id":6,"name":"fields"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"TextModernField",
+"doc":[
+"Modern message fields",{"type":"reference","argument":"title","category":"full","description":" Field title"},{"type":"reference","argument":"value","category":"full","description":" Field value"},{"type":"reference","argument":"isShort","category":"full","description":" Is field can be shown in compact way (default is TRUE)"}],"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"title"}
+,{"type":"string","id":2,"name":"value"}
+,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isShort"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"TextCommand",
+"doc":[
+"Text Command Message for bots",{"type":"reference","argument":"command","category":"full","description":" Slash-Command For execution"},{"type":"reference","argument":"args","category":"full","description":" Arguments of slash command"}],"trait":{"name":"TextMessageEx","key":3},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"command"}
+,{"type":"string","id":2,"name":"args"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceMessage",
+"doc":[
+"Service message",{"type":"reference","argument":"text","category":"full","description":" service message text"},{"type":"reference","argument":"ext","category":"compact","description":" Extension"}],"trait":{"name":"Message","key":2},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"text"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"ServiceEx"}},"id":3,"name":"ext"}
+]}},{"type":"trait","content":{
+"isContainer":"true","name":"ServiceEx","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExUserInvited",
+"doc":[
+"Service message about adding user to group",{"type":"reference","argument":"invitedUid","category":"full","description":" added user id"}],"trait":{"name":"ServiceEx","key":1},"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"invitedUid"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExUserJoined",
+"doc":[
+"Service message about user join to group"],"trait":{"name":"ServiceEx","key":17},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExUserKicked",
+"doc":[
+"Service message about kicking user from group",{"type":"reference","argument":"kickedUid","category":"full","description":" kicked user id"}],"trait":{"name":"ServiceEx","key":2},"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"kickedUid"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExUserLeft",
+"doc":[
+"Service message about user left group"],"trait":{"name":"ServiceEx","key":3},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExGroupCreated",
+"doc":[
+"Service message about group creating"],"trait":{"name":"ServiceEx","key":4},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExChangedTitle",
+"doc":[
+"Service message about group title change",{"type":"reference","argument":"title","category":"full","description":" New group title"}],"trait":{"name":"ServiceEx","key":5},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"title"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExChangedTopic",
+"doc":[
+"Service message on group topic change",{"type":"reference","argument":"topic","category":"full","description":" New group topic"}],"trait":{"name":"ServiceEx","key":18},"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":"string"},"id":1,"name":"topic"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExChangedAbout",
+"doc":[
+"Service message on group about change",{"type":"reference","argument":"about","category":"full","description":" New group about"}],"trait":{"name":"ServiceEx","key":19},"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":"string"},"id":1,"name":"about"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExChangedAvatar",
+"doc":[
+"Service message about avatar change",{"type":"reference","argument":"avatar","category":"compact","description":" Updated avatar"}],"trait":{"name":"ServiceEx","key":6},"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":1,"name":"avatar"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExContactRegistered",
+"doc":[
+"Service message about user registration",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"trait":{"name":"ServiceEx","key":8},"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExPhoneMissed",
+"doc":[
+"Update about missing phone call"],"trait":{"name":"ServiceEx","key":9},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExPhoneCall",
+"doc":[
+"Update about phone call",{"type":"reference","argument":"duration","category":"full","description":" Duration of a phone call"}],"trait":{"name":"ServiceEx","key":16},"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"duration"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExChatArchived",
+"doc":[
+"Message about chat archived"],"trait":{"name":"ServiceEx","key":20},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ServiceExChatRestored",
+"doc":[
+"Message about chat restored"],"trait":{"name":"ServiceEx","key":21},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DocumentMessage",
+"doc":[
+"File message",{"type":"reference","argument":"fileId","category":"full","description":" file id"},{"type":"reference","argument":"accessHash","category":"danger","description":" file access hash"},{"type":"reference","argument":"fileSize","category":"full","description":" file size"},{"type":"reference","argument":"name","category":"full","description":" name of file"},{"type":"reference","argument":"mimeType","category":"full","description":" mimetype of file"},{"type":"reference","argument":"thumb","category":"compact","description":" optional thumb of file. JPEG less that 90x90 with 60-70 quality."},{"type":"reference","argument":"ext","category":"compact","description":" Extension"}],"trait":{"name":"Message","key":3},"expandable":"true","attributes":[
+{"type":"int64","id":1,"name":"fileId"}
+,{"type":"int64","id":2,"name":"accessHash"}
+,{"type":"int32","id":3,"name":"fileSize"}
+,{"type":"string","id":4,"name":"name"}
+,{"type":"string","id":5,"name":"mimeType"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"FastThumb"}},"id":6,"name":"thumb"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"DocumentEx"}},"id":8,"name":"ext"}
+]}},{"type":"trait","content":{
+"isContainer":"true","name":"DocumentEx","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DocumentExPhoto",
+"doc":[
+"File photo extension. Can be set ONLY for JPEG.",{"type":"reference","argument":"w","category":"full","description":" image width"},{"type":"reference","argument":"h","category":"full","description":" image height"}],"trait":{"name":"DocumentEx","key":1},"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"w"}
+,{"type":"int32","id":2,"name":"h"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DocumentExVideo",
+"doc":[
+"File video extension",{"type":"reference","argument":"w","category":"full","description":" video width"},{"type":"reference","argument":"h","category":"full","description":" video height"},{"type":"reference","argument":"duration","category":"full","description":" video duration"}],"trait":{"name":"DocumentEx","key":2},"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"w"}
+,{"type":"int32","id":2,"name":"h"}
+,{"type":"int32","id":3,"name":"duration"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DocumentExVoice",
+"doc":[
+"File voice extension",{"type":"reference","argument":"duration","category":"full","description":" voice duration"}],"trait":{"name":"DocumentEx","key":3},"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"duration"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DocumentExAnimation",
+"doc":[
+"Animation extension. Can be set ONLY for GIF.",{"type":"reference","argument":"w","category":"full","description":" Animation width"},{"type":"reference","argument":"h","category":"full","description":" Animation height"}],"trait":{"name":"DocumentEx","key":6},"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"w"}
+,{"type":"int32","id":2,"name":"h"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DocumentExAnimationVid",
+"doc":[
+"Animation video extension. More compact version of Animation with video codec instead of GIF.","Can be set ONLY for MP4.",{"type":"reference","argument":"w","category":"full","description":" Animation width"},{"type":"reference","argument":"h","category":"full","description":" Animation height"},{"type":"reference","argument":"duration","category":"full","description":" Animation duration"}],"trait":{"name":"DocumentEx","key":7},"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"w"}
+,{"type":"int32","id":2,"name":"h"}
+,{"type":"int32","id":3,"name":"duration"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"JsonMessage",
+"doc":[
+"Custom-data JsonMessage",{"type":"reference","argument":"rawJson","category":"danger","description":" JSON object"}],"trait":{"name":"Message","key":4},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"rawJson"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"UnsupportedMessage",
+"doc":[
+"Explicit type for unsupported message"],"trait":{"name":"Message","key":5},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"StickerMessage",
+"doc":[
+"Sticker message",{"type":"reference","argument":"stickerId","category":"full","description":" Optional Unique ID of sticker"},{"type":"reference","argument":"fastPreview","category":"full","description":" Optional Fast preview of sticker in webp format"},{"type":"reference","argument":"image512","category":"full","description":" Optional 512x512 sticker image in webp format"},{"type":"reference","argument":"image256","category":"full","description":" Optional 256x256 sticker image in webp format"},{"type":"reference","argument":"stickerCollectionId","category":"full","description":" Optional Collection ID"},{"type":"reference","argument":"stickerCollectionAccessHash","category":"full","description":" Optional Collection Access Hash"}],"trait":{"name":"Message","key":6},"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":"int32"},"id":1,"name":"stickerId"}
+,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"fastPreview"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":3,"name":"image512"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":4,"name":"image256"}
+,{"type":{"type":"opt","childType":"int32"},"id":5,"name":"stickerCollectionId"}
+,{"type":{"type":"opt","childType":"int64"},"id":6,"name":"stickerCollectionAccessHash"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"BinaryMessage",
+"doc":[
+"Binary Message. Useful for implementing your own content types",{"type":"reference","argument":"contentTag","category":"full","description":" Content Tag"},{"type":"reference","argument":"msg","category":"compact","description":" Message contents"}],"trait":{"name":"Message","key":7},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"contentTag"}
+,{"type":"bytes","id":2,"name":"msg"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EncryptedMessage",
+"doc":[
+"Encrypted Message",{"type":"reference","argument":"box","category":"full","description":" Encrypted box"}],"trait":{"name":"Message","key":8},"expandable":"true","attributes":[
+{"type":{"type":"struct","childType":"EncryptedBox"},"id":1,"name":"box"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EmptyMessage",
+"doc":[
+"Empty Message"],"trait":{"name":"Message","key":9},"expandable":"true","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DialogShort",
+"doc":[
+"Short Dialog from grouped conversation list",{"type":"reference","argument":"peer","category":"full","description":" Peer of conversation"},{"type":"reference","argument":"counter","category":"full","description":" Conversation unread count"},{"type":"reference","argument":"date","category":"full","description":" Conversation top message date"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":"int32","id":2,"name":"counter"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DialogGroup",
+"doc":[
+"Grouped dialog list",{"type":"reference","argument":"title","category":"full","description":" Title of group"},{"type":"reference","argument":"key","category":"full","description":" Key of group"},{"type":"reference","argument":"dialogs","category":"full","description":" Conversations in group"}],"attributes":[
+{"type":"string","id":1,"name":"title"}
+,{"type":"string","id":2,"name":"key"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"DialogShort"}},"id":3,"name":"dialogs"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"MessageReaction",
+"doc":[
+"Reaction to message",{"type":"reference","argument":"users","category":"full","description":" User's reaction"},{"type":"reference","argument":"code","category":"full","description":" Reaction EMOJI code"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"users"}
+,{"type":"string","id":2,"name":"code"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"MessageOutReference",
+"doc":[
+"Message Out Reference",{"type":"reference","argument":"peer","category":"full","description":" Out Peer of message"},{"type":"reference","argument":"rid","category":"full","description":" Message random id"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+]}},{"type":"rpc","content":{
+"name":"SendMessage",
+"header":92,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Sending plain message",{"type":"reference","argument":"peer","category":"full","description":"Destination peer for message"},{"type":"reference","argument":"rid","category":"full","description":"Message random id (generated on client side)"},{"type":"reference","argument":"message","category":"full","description":"The message"},{"type":"reference","argument":"isOnlyForUser","category":"full","description":"If message is shown only for specific user"},{"type":"reference","argument":"quotedMessageReference","category":"full","description":"Quoted message if present"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"rid"}
+,{"type":{"type":"trait","childType":"Message"},"id":4,"name":"message"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":5,"name":"isOnlyForUser"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageOutReference"}},"id":6,"name":"quotedMessageReference"}
+]}},{"type":"rpc","content":{
+"name":"UpdateMessage",
+"header":2658,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Changing Message content",{"type":"reference","argument":"peer","category":"full","description":"Destination Peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"updatedMessage","category":"full","description":"Updated Message content"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"trait","childType":"Message"},"id":3,"name":"updatedMessage"}
+]}},{"type":"rpc","content":{
+"name":"MessageReceived",
+"header":55,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Confirmation of plain message receive by device",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"date","category":"full","description":"Maximum date of received messages"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+]}},{"type":"rpc","content":{
+"name":"MessageRead",
+"header":57,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Marking plain messages as read",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"date","category":"full","description":"Maximum date of read messages"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+]}},{"type":"rpc","content":{
+"name":"DeleteMessage",
+"header":98,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Deleting messages",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rids","category":"full","description":"Message random id"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":3,"name":"rids"}
+]}},{"type":"rpc","content":{
+"name":"ClearChat",
+"header":99,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Clearing of conversation (without removing dialog from dialogs list)",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"DeleteChat",
+"header":100,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Deleting of conversation (also leave group for group conversations)",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"ArchiveChat",
+"header":2654,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Archiving chat",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"MessageSetReaction",
+"header":210,
+"response":{"type":"reference","name":"ReactionsResponse"},
+"doc":[
+"Setting Message reaction",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"code","category":"full","description":"Reaction code"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":"string","id":3,"name":"code"}
+]}},{"type":"rpc","content":{
+"name":"MessageRemoveReaction",
+"header":220,
+"response":{"type":"reference","name":"ReactionsResponse"},
+"doc":[
+"Removing Message reaction",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"code","category":"full","description":"Reaction code"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":"string","id":3,"name":"code"}
+]}},{"type":"response","content":{
+"name":"ReactionsResponse",
+"header":219,
+"doc":[
+"Response for reactions change"],"attributes":[
+{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":3,"name":"reactions"}
+]}},{"type":"update","content":{
+"name":"Message",
+"header":55,
+"doc":[
+"Update about plain message",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"senderUid","category":"full","description":" Sender of message"},{"type":"reference","argument":"date","category":"full","description":" date of message"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"message","category":"full","description":" message content"},{"type":"reference","argument":"attributes","category":"full","description":" optional message attributes"},{"type":"reference","argument":"quotedMessage","category":"full","description":" optional quoted message"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"senderUid"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"message"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":6,"name":"attributes"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":7,"name":"quotedMessage"}
+]}},{"type":"update","content":{
+"name":"MessageContentChanged",
+"header":162,
+"doc":[
+"Update about message change",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"message","category":"full","description":" Message content"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"trait","childType":"Message"},"id":3,"name":"message"}
+]}},{"type":"update","content":{
+"name":"MessageQuotedChanged",
+"header":169,
+"doc":[
+"Update about quoted message changed",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"quotedMessage","category":"full","description":" Quoted Message"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":3,"name":"quotedMessage"}
+]}},{"type":"update","content":{
+"name":"MessageDateChanged",
+"header":163,
+"doc":[
+"Update about message date changed",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+]}},{"type":"update","content":{
+"name":"MessageSent",
+"header":4,
+"doc":[
+"Update about message sent",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+]}},{"type":"update","content":{
+"name":"MessageReceived",
+"header":54,
+"doc":[
+"Update about message received",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of received message"},{"type":"reference","argument":"receivedDate","category":"full","description":" Date of receive"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"receivedDate"}
+]}},{"type":"update","content":{
+"name":"MessageRead",
+"header":19,
+"doc":[
+"Update about message read",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of read message"},{"type":"reference","argument":"readDate","category":"full","description":" Date of read"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"readDate"}
+]}},{"type":"update","content":{
+"name":"MessageReadByMe",
+"header":50,
+"doc":[
+"Update about message read by me",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of read message"},{"type":"reference","argument":"unreadCounter","category":"full","description":" Optional unread counter in conversation"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"}
+,{"type":{"type":"opt","childType":"int32"},"id":3,"name":"unreadCounter"}
+]}},{"type":"update","content":{
+"name":"MessageDelete",
+"header":46,
+"doc":[
+"Update about message delete",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rids","category":"full","description":" Deleted messages"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"rids"}
+]}},{"type":"update","content":{
+"name":"ChatClear",
+"header":47,
+"doc":[
+"Update about chat clear",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+]}},{"type":"update","content":{
+"name":"ChatDelete",
+"header":48,
+"doc":[
+"Update about chat delete",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+]}},{"type":"update","content":{
+"name":"ChatArchive",
+"header":94,
+"doc":[
+"Update about chat archive",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+]}},{"type":"update","content":{
+"name":"ChatDropCache",
+"header":2690,
+"doc":[
+"Update about cache drop",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+]}},{"type":"update","content":{
+"name":"ChatGroupsChanged",
+"header":1,
+"doc":[
+"Update about chat groups changed. Called only when adding, removing and reordering of grouped dialog.",{"type":"reference","argument":"dialogs","category":"compact","description":" New dialgos list"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":1,"name":"dialogs"}
+]}},{"type":"update","content":{
+"name":"ReactionsUpdate",
+"header":222,
+"doc":[
+"Update about reactions change",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Message random id"},{"type":"reference","argument":"reactions","category":"full","description":" New Reactions"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":3,"name":"reactions"}
+]}}, {
+ "type": "enum",
+ "content": {
+ "name": "MessageState",
+ "values": [
{
- "type": "string",
- "id": 5,
- "name": "deviceTitle"
+ "name": "Sent",
+ "id": 1
},
{
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 6,
- "name": "timeZone"
+ "name": "Received",
+ "id": 2
},
{
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 7,
- "name": "preferredLanguages"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SendCodeByPhoneCall",
- "header": 197,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Dial phone and dictate auth code",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": "Transaction hash"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
+ "name": "Read",
+ "id": 3
}
- ]
- }
- },
- {
- "type": "rpc",
+ ]
+ }
+ }, {
+ "type":"struct",
+ "content": {
+ "name":"MessageContainer",
+"doc":[
+"Message from history",{"type":"reference","argument":"senderUid","category":"full","description":" Sender of mesasge"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"},{"type":"reference","argument":"message","category":"full","description":" Content of message"},{"type":"reference","argument":"reactions","category":"full","description":" Message reactions"},{"type":"reference","argument":"attribute","category":"full","description":" Optional message attributes"},{"type":"reference","argument":"quotedMessage","category":"full","description":" Optional quoted Message"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"senderUid"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"message"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"MessageState"}},"id":6,"name":"state"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":7,"name":"reactions"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":8,"name":"attribute"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":9,"name":"quotedMessage"}
+]}}, {
+ "type": "enum",
"content": {
- "name": "StartEmailAuth",
- "header": 185,
- "response": {
- "type": "anonymous",
- "header": 186,
- "doc": [
- "Email Activation response",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": " Hash of activation transaction"
- },
- {
- "type": "reference",
- "argument": "isRegistered",
- "category": "full",
- "description": " true if user is registered"
- },
- {
- "type": "reference",
- "argument": "activationType",
- "category": "full",
- "description": " Email Activation type"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "isRegistered"
- },
- {
- "type": {
- "type": "enum",
- "childType": "EmailActivationType"
- },
- "id": 3,
- "name": "activationType"
- }
- ]
- },
- "doc": [
- "Start EMail Activation",
- {
- "type": "reference",
- "argument": "email",
- "category": "full",
- "description": "Email"
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application Id"
- },
+ "name": "ListLoadMode",
+ "values": [
{
- "type": "reference",
- "argument": "apiKey",
- "category": "hidden",
- "description": "Application API key"
+ "name": "Forward",
+ "id": 1
},
{
- "type": "reference",
- "argument": "deviceHash",
- "category": "full",
- "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"
+ "name": "Backward",
+ "id": 2
},
{
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": "Device Title"
- },
+ "name": "Both",
+ "id": 3
+ }
+ ]
+ }
+ },{"type":"rpc","content":{
+"name":"LoadHistory",
+"header":118,
+"response":{"type":"anonymous","header":119, "doc":[
+"Loaded history",{"type":"reference","argument":"history","category":"compact","description":" Messages"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":1,"name":"history"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupPeers"}
+]},
+"doc":[
+"Loading history of chat",{"type":"reference","argument":"peer","category":"full","description":"Peer of conversation"},{"type":"reference","argument":"date","category":"full","description":"start date of messages for loading or 0 for loading from start"},{"type":"reference","argument":"loadMode","category":"full","description":"Loading mode: Forward loading, backward or both ways"},{"type":"reference","argument":"limit","category":"full","description":"maximum amount of messages (max is 100)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"ListLoadMode"}},"id":5,"name":"loadMode"}
+,{"type":"int32","id":4,"name":"limit"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":6,"name":"optimizations"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Dialog",
+"doc":[
+"Conversation from history",{"type":"reference","argument":"peer","category":"full","description":" Peer of conversation"},{"type":"reference","argument":"unreadCount","category":"full","description":" plain messages unread messages count"},{"type":"reference","argument":"sortDate","category":"full","description":" date of conversation for sorting"},{"type":"reference","argument":"senderUid","category":"full","description":" Sender of top message (may be zero)"},{"type":"reference","argument":"rid","category":"full","description":" Random ID of top message (may be zero)"},{"type":"reference","argument":"date","category":"full","description":" Date of top message (can't be zero)"},{"type":"reference","argument":"message","category":"full","description":" Content of message"},{"type":"reference","argument":"firstUnreadDate","category":"full","description":" Date of first unread message"},{"type":"reference","argument":"attributes","category":"full","description":" Optional top message attributes"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":"int32","id":3,"name":"unreadCount"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"sortDate"}
+,{"type":{"type":"alias","childType":"userId"},"id":5,"name":"senderUid"}
+,{"type":{"type":"alias","childType":"randomId"},"id":6,"name":"rid"}
+,{"type":{"type":"alias","childType":"date"},"id":7,"name":"date"}
+,{"type":{"type":"trait","childType":"Message"},"id":8,"name":"message"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"MessageState"}},"id":9,"name":"state"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"date"}},"id":10,"name":"firstUnreadDate"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":11,"name":"attributes"}
+]}},{"type":"rpc","content":{
+"name":"LoadDialogs",
+"header":104,
+"response":{"type":"anonymous","header":105, "doc":[
+"Loaded dialogs",{"type":"reference","argument":"groups","category":"compact","description":" Loaded groups"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"dialogs","category":"compact","description":" Loaded dialogs"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":1,"name":"groups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Dialog"}},"id":3,"name":"dialogs"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":5,"name":"groupPeers"}
+]},
+"doc":[
+"Loading conversation history",{"type":"reference","argument":"minDate","category":"full","description":"start date of conversation loading. Use 0 to load latest messages"},{"type":"reference","argument":"limit","category":"full","description":"limit maximum amount of messages (max is 100)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[
+{"type":{"type":"alias","childType":"date"},"id":1,"name":"minDate"}
+,{"type":"int32","id":2,"name":"limit"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"LoadArchived",
+"header":2651,
+"response":{"type":"anonymous","header":2652, "doc":[
+"Archived dialogs",{"type":"reference","argument":"groups","category":"full","description":" Referenced groups"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"dialogs","category":"full","description":" Archived dialogs"},{"type":"reference","argument":"nextOffset","category":"compact","description":" Offset for next bunch"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":1,"name":"groups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Dialog"}},"id":3,"name":"dialogs"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userPeers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupPeers"}
+,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"nextOffset"}
+]},
+"doc":[
+"Loading archived messages",{"type":"reference","argument":"nextOffset","category":"compact","description":"Optional next offset"},{"type":"reference","argument":"limit","category":"full","description":"Maximum number of elements"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[
+{"type":{"type":"opt","childType":"bytes"},"id":1,"name":"nextOffset"}
+,{"type":"int32","id":2,"name":"limit"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"LoadGroupedDialogs",
+"header":225,
+"response":{"type":"anonymous","header":226, "doc":[
+"Loaded grouped dialogs",{"type":"reference","argument":"dialogs","category":"compact","description":" Loaded groups of dialogs"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"groups","category":"full","description":" Loaded groups"},{"type":"reference","argument":"showArchived","category":"full","description":" Show archived section"},{"type":"reference","argument":"showInvite","category":"full","description":" Show invite message"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":1,"name":"dialogs"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"}
+,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"showArchived"}
+,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"showInvite"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":6,"name":"userPeers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":7,"name":"groupPeers"}
+]},
+"doc":[
+"Load all dialogs from grouped list"],"attributes":[
+{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":1,"name":"optimizations"}
+]}},{"type":"response","content":{
+"name":"DialogsOrder",
+"header":235,
+"doc":[
+"Dialogs order response",{"type":"reference","argument":"seq","category":"full","description":" update seq"},{"type":"reference","argument":"state","category":"full","description":" update state"},{"type":"reference","argument":"groups","category":"full","description":" Update groups"}],"attributes":[
+{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":3,"name":"groups"}
+]}},{"type":"rpc","content":{
+"name":"HideDialog",
+"header":231,
+"response":{"type":"reference","name":"DialogsOrder"},
+"doc":[
+"Hide Dialog from grouped list",{"type":"reference","argument":"peer","category":"full","description":"Dialog peer"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"ShowDialog",
+"header":232,
+"response":{"type":"reference","name":"DialogsOrder"},
+"doc":[
+"Show Dialog in grouped list"],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"FavouriteDialog",
+"header":224,
+"response":{"type":"reference","name":"DialogsOrder"},
+"doc":[
+"Marking dialog as favourite",{"type":"reference","argument":"peer","category":"full","description":"Peer for favouriting"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"UnfavouriteDialog",
+"header":227,
+"response":{"type":"reference","name":"DialogsOrder"},
+"doc":[
+"Making dialog as unfavourite",{"type":"reference","argument":"peer","category":"full","description":"Peer for favouriting"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"NotifyDialogOpened",
+"header":2785,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Notifying about dialog open",{"type":"reference","argument":"peer","category":"full","description":"Peer that was opened"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}}]}, {
+ "title": "Groups",
+ "package": "groups",
+ "items": [
+{"type":"comment","content":"Entities"}, {
+ "type":"struct",
+ "content": {
+ "name":"Member",
+"doc":[
+"Member information",{"type":"reference","argument":"uid","category":"full","description":" User id"},{"type":"reference","argument":"inviterUid","category":"full","description":" User inviter id"},{"type":"reference","argument":"date","category":"full","description":" Adding date"},{"type":"reference","argument":"isAdmin","category":"full","description":" is member admin of group"}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"inviterUid"}
+,{"type":"int64","id":3,"name":"date"}
+,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isAdmin"}
+]}}, {
+ "type": "enum",
+ "content": {
+ "name": "GroupType",
+ "values": [
{
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": "TimeZone of device"
+ "name": "GROUP",
+ "id": 1
},
{
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": "Preferred languages"
+ "name": "CHANNEL",
+ "id": 2
}
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "email"
- },
+ ]
+ }
+ }, {
+ "type": "enum",
+ "content": {
+ "name": "GroupPermissions",
+ "values": [
{
- "type": "int32",
- "id": 2,
- "name": "appId"
+ "name": "SEND_MESSAGE",
+ "id": 1
},
{
- "type": "string",
- "id": 3,
- "name": "apiKey"
+ "name": "CLEAR",
+ "id": 2
},
{
- "type": "bytes",
- "id": 4,
- "name": "deviceHash"
+ "name": "LEAVE",
+ "id": 3
},
{
- "type": "string",
- "id": 5,
- "name": "deviceTitle"
+ "name": "DELETE",
+ "id": 4
},
{
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 6,
- "name": "timeZone"
+ "name": "JOIN",
+ "id": 5
},
{
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 7,
- "name": "preferredLanguages"
+ "name": "VIEW_INFO",
+ "id": 6
}
- ]
- }
- },
- {
- "type": "rpc",
+ ]
+ }
+ }, {
+ "type": "enum",
"content": {
- "name": "StartAnonymousAuth",
- "header": 198,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Starting Anonymous login",
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": "Name of new user"
- },
+ "name": "GroupFullPermissions",
+ "values": [
{
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application Id"
+ "name": "EDIT_INFO",
+ "id": 1
},
{
- "type": "reference",
- "argument": "apiKey",
- "category": "hidden",
- "description": "Application API key"
+ "name": "VIEW_MEMBERS",
+ "id": 2
},
{
- "type": "reference",
- "argument": "deviceHash",
- "category": "full",
- "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"
+ "name": "INVITE_MEMBERS",
+ "id": 3
},
{
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": "Device Title"
+ "name": "INVITE_VIA_LINK",
+ "id": 4
},
{
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": "TimeZone of device"
+ "name": "CALL",
+ "id": 5
},
{
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": "Preferred languages"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "name"
+ "name": "EDIT_ADMIN_SETTINGS",
+ "id": 6
},
{
- "type": "int32",
- "id": 2,
- "name": "appId"
+ "name": "VIEW_ADMINS",
+ "id": 7
},
{
- "type": "string",
- "id": 3,
- "name": "apiKey"
+ "name": "EDIT_ADMINS",
+ "id": 8
},
{
- "type": "bytes",
- "id": 4,
- "name": "deviceHash"
+ "name": "KICK_INVITED",
+ "id": 9
},
{
- "type": "string",
- "id": 5,
- "name": "deviceTitle"
+ "name": "KICK_ANYONE",
+ "id": 10
},
{
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 6,
- "name": "timeZone"
+ "name": "EDIT_FOREIGN",
+ "id": 11
},
{
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 7,
- "name": "preferredLanguages"
+ "name": "DELETE_FOREIGN",
+ "id": 12
}
- ]
- }
- },
+ ]
+ }
+ }, {
+ "type":"struct",
+ "content": {
+ "name":"Group",
+"doc":[
+"Group information","","Permissions.","Permissions of this structure is about group messages operation, such as","ability to send messages, clear chat, leave group and so on. This operations","Can be held outside of the Group Info page.","","Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.","If default is TRUE then ONE == FALSE.","Bits:","0 - canSendMessage. Default is FALSE.","1 - canClear. Default is FALSE.","2 - canLeave. Default is FALSE.","3 - canDelete. Default is FALSE.","4 - canJoin. Default is FALSE.","5 - canViewInfo. Default is FALSE.","",{"type":"reference","argument":"id","category":"full","description":" group id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Access hash of group"},{"type":"reference","argument":"title","category":"full","description":" Title of group"},{"type":"reference","argument":"avatar","category":"compact","description":" Avatar of group"},{"type":"reference","argument":"membersCount","category":"full","description":" Number of members"},{"type":"reference","argument":"isHidden","category":"full","description":" Is group hidden (not showing it in recent list). Default is false."},{"type":"reference","argument":"isMember","category":"full","description":" Is current user a member of a group. Default is true."},{"type":"reference","argument":"groupType","category":"full","description":" Group Type. Used only for displaying information. Default is GROUP."},{"type":"reference","argument":"permissions","category":"full","description":" Permissions of group object"},{"type":"reference","argument":"isDeleted","category":"full","description":" Is this group deleted"},{"type":"reference","argument":"ext","category":"full","description":" Group extension Data"},{"type":"reference","argument":"isAdmin","category":"full","description":" [DEPRECATED] Is current user an admin of a group"},{"type":"reference","argument":"theme","category":"hidden","description":" [DEPRECATED] Theme of group"},{"type":"reference","argument":"about","category":"hidden","description":" [DEPRECATED] About of group"},{"type":"reference","argument":"creatorUid","category":"hidden","description":" [DEPRECATED] Group creator"},{"type":"reference","argument":"members","category":"compact","description":" [DEPRECATED] Members of group"},{"type":"reference","argument":"createDate","category":"full","description":" [DEPRECATED] Date of creation"}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+,{"type":"string","id":3,"name":"title"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":4,"name":"avatar"}
+,{"type":{"type":"opt","childType":"int32"},"id":24,"name":"membersCount"}
+,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isMember"}
+,{"type":{"type":"opt","childType":"bool"},"id":20,"name":"isHidden"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"GroupType"}},"id":25,"name":"groupType"}
+,{"type":{"type":"opt","childType":"int64"},"id":26,"name":"permissions"}
+,{"type":{"type":"opt","childType":"bool"},"id":27,"name":"isDeleted"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":22,"name":"ext"}
+,{"type":{"type":"opt","childType":"bool"},"id":16,"name":"isAdmin", "deprecated":"true"}
+,{"type":{"type":"alias","childType":"userId"},"id":8,"name":"creatorUid", "deprecated":"true"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":9,"name":"members", "deprecated":"true"}
+,{"type":{"type":"alias","childType":"date"},"id":10,"name":"createDate", "deprecated":"true"}
+,{"type":{"type":"opt","childType":"string"},"id":17,"name":"theme", "deprecated":"true"}
+,{"type":{"type":"opt","childType":"string"},"id":18,"name":"about", "deprecated":"true"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"GroupFull",
+"doc":[
+"Goup Full information","Permissions.","Idea of Group Full mermissions is about Group Info pages. This permissions","are usefull only when trying to view and update group settings and not related","to chat messages itself.","Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.","If default is TRUE then ONE == FALSE.","Bits:","0 - canEditInfo. Default is FALSE.","1 - canViewMembers. Default is FALSE.","2 - canInviteMembers. Default is FALSE.","3 - canInviteViaLink. Default is FALSE.","4 - canCall. Default is FALSE.","5 - canEditAdminSettings. Default is FALSE.","6 - canViewAdmins. Default is FALSE.","7 - canEditAdmins. Default is FALSE.","8 - canKickInvited. Default is FALSE.","9 - canKickAnyone. Default is FALSE.","10 - canEditForeign. Default is FALSE.","11 - canDeleteForeign. Default is FALSE.","",{"type":"reference","argument":"id","category":"full","description":" Group Id"},{"type":"reference","argument":"createDate","category":"full","description":" Date created"},{"type":"reference","argument":"ownerUid","category":"full","description":" Optional group owner"},{"type":"reference","argument":"members","category":"full","description":" Group members. Can be empty when isAsyncMembers enabled."},{"type":"reference","argument":"theme","category":"full","description":" Group Theme"},{"type":"reference","argument":"about","category":"full","description":" Group about"},{"type":"reference","argument":"isAsyncMembers","category":"full","description":" Is Members need to be loaded asynchronous. Default is false."},{"type":"reference","argument":"isSharedHistory","category":"full","description":" Is history shared among all users. Default is false."},{"type":"reference","argument":"shortName","category":"full","description":" Group's short name"},{"type":"reference","argument":"permissions","category":"full","description":" Group Permissions"}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"id"}
+,{"type":{"type":"alias","childType":"date"},"id":6,"name":"createDate"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":5,"name":"ownerUid"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":12,"name":"members"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"theme"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":7,"name":"ext"}
+,{"type":{"type":"opt","childType":"bool"},"id":11,"name":"isAsyncMembers"}
+,{"type":{"type":"opt","childType":"bool"},"id":10,"name":"isSharedHistory"}
+,{"type":{"type":"opt","childType":"string"},"id":14,"name":"shortName"}
+,{"type":{"type":"opt","childType":"int64"},"id":27,"name":"permissions"}
+]}},{"type":"rpc","content":{
+"name":"LoadFullGroups",
+"header":2782,
+"response":{"type":"anonymous","header":2783, "doc":[
+{"type":"reference","argument":"groups","category":"compact","description":" Groups to load"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"GroupFull"}},"id":1,"name":"groups"}
+]},
+"doc":[
+"Loading Full Groups",{"type":"reference","argument":"groups","category":"compact","description":"Groups to load"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"}
+]}},{"type":"rpc","content":{
+"name":"LoadMembers",
+"header":2786,
+"response":{"type":"anonymous","header":2787, "doc":[
+{"type":"reference","argument":"users","category":"full","description":" Group members"},{"type":"reference","argument":"next","category":"full","description":" Load more reference"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":3,"name":"members"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"}
+,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"next"}
+]},
+"doc":[
+"Loading group members",{"type":"reference","argument":"group","category":"full","description":"Group peer"},{"type":"reference","argument":"limit","category":"full","description":"Limit members"},{"type":"reference","argument":"next","category":"full","description":"Load more reference"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"group"}
+,{"type":"int32","id":2,"name":"limit"}
+,{"type":{"type":"opt","childType":"bytes"},"id":3,"name":"next"}
+]}},{"type":"comment","content":"Update"},{"type":"update","content":{
+"name":"GroupTitleChanged",
+"header":2609,
+"doc":[
+"Update about title changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"title","category":"full","description":" Group Title"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":"string","id":2,"name":"title"}
+]}},{"type":"update","content":{
+"name":"GroupAvatarChanged",
+"header":2610,
+"doc":[
+"Update about avatar changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"avatar","category":"full","description":" Group Avatar"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":2,"name":"avatar"}
+]}},{"type":"update","content":{
+"name":"GroupTopicChanged",
+"header":2616,
+"doc":[
+"Update about topic changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"topic","category":"full","description":" Updated topic"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"topic"}
+]}},{"type":"update","content":{
+"name":"GroupAboutChanged",
+"header":2617,
+"doc":[
+"Update about about changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"about","category":"full","description":" Updated about"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"}
+]}},{"type":"update","content":{
+"name":"GroupExtChanged",
+"header":2613,
+"doc":[
+"Update about ext changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"ext","category":"full","description":" Updated ext"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"}
+]}},{"type":"update","content":{
+"name":"GroupFullExtChanged",
+"header":2618,
+"doc":[
+"Update about full ext changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"ext","category":"full","description":" Updated ext"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"}
+]}},{"type":"update","content":{
+"name":"GroupShortNameChanged",
+"header":2628,
+"doc":[
+"Group's short name changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"shortName","category":"full","description":" Group short name"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"shortName"}
+]}},{"type":"update","content":{
+"name":"GroupOwnerChanged",
+"header":2619,
+"doc":[
+"Update about owner changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"userId","category":"full","description":" New Owner"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"userId"}
+]}},{"type":"update","content":{
+"name":"GroupHistoryShared",
+"header":2620,
+"doc":[
+"Update about history shared",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+]}},{"type":"update","content":{
+"name":"GroupDeleted",
+"header":2658,
+"doc":[
+"Update about group deleted",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+]}},{"type":"update","content":{
+"name":"GroupPermissionsChanged",
+"header":2663,
+"doc":[
+"Update about group permissions changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"permissions","category":"full","description":" New Permissions"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":"int64","id":2,"name":"permissions"}
+]}},{"type":"update","content":{
+"name":"GroupFullPermissionsChanged",
+"header":2664,
+"doc":[
+"Update about Full Group permissions changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"permissions","category":"full","description":" New Permissions"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":"int64","id":2,"name":"permissions"}
+]}},{"type":"comment","content":" "},{"type":"update","content":{
+"name":"GroupMemberChanged",
+"header":2612,
+"doc":[
+"Update about membership changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"isMember","category":"full","description":" Is current user a member"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":"bool","id":2,"name":"isMember"}
+]}},{"type":"update","content":{
+"name":"GroupMembersBecameAsync",
+"header":2615,
+"doc":[
+"Update about members became async",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+]}},{"type":"update","content":{
+"name":"GroupMembersUpdated",
+"header":2614,
+"doc":[
+"Update about members updated",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"members","category":"full","description":" Group Members"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":2,"name":"members"}
+]}},{"type":"update","content":{
+"name":"GroupMemberDiff",
+"header":2623,
+"doc":[
+"Update about members changed",{"type":"reference","argument":"removedUsers","category":"full","description":" Removed Users"},{"type":"reference","argument":"addedMembers","category":"full","description":" Added members"},{"type":"reference","argument":"membersCount","category":"full","description":" Current Members count"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"removedUsers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":3,"name":"addedMembers"}
+,{"type":"int32","id":4,"name":"membersCount"}
+]}},{"type":"update","content":{
+"name":"GroupMembersCountChanged",
+"header":2622,
+"doc":[
+"Update about members count changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"membersCount","category":"full","description":" Members count"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":"int32","id":2,"name":"membersCount"}
+]}},{"type":"update","content":{
+"name":"GroupMemberAdminChanged",
+"header":2627,
+"doc":[
+"Update about member admin changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"userId","category":"full","description":" User Id"},{"type":"reference","argument":"isAdmin","category":"full","description":" Is Admin flag"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"userId"}
+,{"type":"bool","id":3,"name":"isAdmin"}
+]}},{"type":"comment","content":"Actions"},{"type":"rpc","content":{
+"name":"CreateGroup",
+"header":230,
+"response":{"type":"anonymous","header":216, "doc":[
+"Created group",{"type":"reference","argument":"seq","category":"full","description":" Update Seq"},{"type":"reference","argument":"state","category":"compact","description":" Update state"},{"type":"reference","argument":"group","category":"full","description":" Created group"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"userPeers","category":"full","description":" Referenced users"},{"type":"reference","argument":"date","category":"full","description":" Group creation date"}] ,"attributes":[{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"}
+,{"type":{"type":"struct","childType":"Group"},"id":3,"name":"group"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userPeers"}
+]},
+"doc":[
+"Creating group chat",{"type":"reference","argument":"rid","category":"full","description":"Random Id for avoiding double create"},{"type":"reference","argument":"title","category":"full","description":"Group Title"},{"type":"reference","argument":"users","category":"hidden","description":"Members of group"},{"type":"reference","argument":"groupType","category":"full","description":"Group Type"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"rid"}
+,{"type":"string","id":2,"name":"title"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"GroupType"}},"id":6,"name":"groupType"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":7,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"EditGroupTitle",
+"header":85,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Changing group title",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"title","category":"full","description":"new group title"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+,{"type":"string","id":3,"name":"title"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"EditGroupAvatar",
+"header":86,
+"response":{"type":"anonymous","header":115, "doc":[
+"Updated group avatar",{"type":"reference","argument":"avatar","category":"compact","description":" Changed avatar"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"},{"type":"reference","argument":"date","category":"full","description":" Avatar change date"}] ,"attributes":[{"type":{"type":"struct","childType":"Avatar"},"id":1,"name":"avatar"}
+,{"type":"int32","id":2,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"}
+]},
+"doc":[
+"Changing group avatar",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"fileLocation","category":"compact","description":"uploaded file for avatar"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+,{"type":{"type":"struct","childType":"FileLocation"},"id":3,"name":"fileLocation"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"RemoveGroupAvatar",
+"header":101,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Removing group avatar",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"EditGroupShortName",
+"header":2793,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Edit Group Short Name",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"shortName","category":"full","description":"New group's short name"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"shortName"}
+]}},{"type":"rpc","content":{
+"name":"EditGroupTopic",
+"header":211,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Edit group topic",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random id of operation"},{"type":"reference","argument":"topic","category":"full","description":"New Topic"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"topic"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":4,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"EditGroupAbout",
+"header":213,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Edit Group About",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random id of operation"},{"type":"reference","argument":"about","category":"full","description":"New About"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"InviteUser",
+"header":69,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Inviting user to group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"user","category":"full","description":"Users for invitation"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+,{"type":{"type":"struct","childType":"UserOutPeer"},"id":3,"name":"user"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"LeaveGroup",
+"header":70,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Leaving group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"LeaveAndDelete",
+"header":2721,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Leave group and Delete Chat",{"type":"reference","argument":"groupPeer","category":"full","description":"Group peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"rpc","content":{
+"name":"KickUser",
+"header":71,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Kicking user from group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"user","category":"full","description":"users for removing"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+,{"type":{"type":"struct","childType":"UserOutPeer"},"id":3,"name":"user"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"JoinGroupByPeer",
+"header":2722,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Join group by peer",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"rpc","content":{
+"name":"JoinGroupByGroupId",
+"header":44561,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Join group by peer without a necessity of invite",{"type":"reference","argument":"groupId","category":"hidden","description":"Groups peer"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+]}},{"type":"comment","content":"Administration"},{"type":"rpc","content":{
+"name":"MakeUserAdmin",
+"header":2784,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Make user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"}
+]}},{"type":"rpc","content":{
+"name":"DismissUserAdmin",
+"header":2791,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Dismissing user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"}
+]}},{"type":"rpc","content":{
+"name":"TransferOwnership",
+"header":2789,
+"response":{"type":"reference","name":"SeqDate"},
+"doc":[
+"Transfer ownership of group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"newOwner","category":"full","description":"New group's owner"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"newOwner"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"AdminSettings",
+"doc":[
+"Admin Settings",{"type":"reference","argument":"showAdminsToMembers","category":"full","description":" Show admins in member list"},{"type":"reference","argument":"canMembersInvite","category":"full","description":" Can members of a group invite people"},{"type":"reference","argument":"canMembersEditGroupInfo","category":"full","description":" Can members edit group info"},{"type":"reference","argument":"canAdminsEditGroupInfo","category":"full","description":" Can admins edit group info"},{"type":"reference","argument":"showJoinLeaveMessages","category":"full","description":" Should join and leave messages be visible to members"}],"expandable":"true","attributes":[
+{"type":"bool","id":1,"name":"showAdminsToMembers"}
+,{"type":"bool","id":2,"name":"canMembersInvite"}
+,{"type":"bool","id":3,"name":"canMembersEditGroupInfo"}
+,{"type":"bool","id":4,"name":"canAdminsEditGroupInfo"}
+,{"type":"bool","id":5,"name":"showJoinLeaveMessages"}
+]}},{"type":"rpc","content":{
+"name":"LoadAdminSettings",
+"header":2790,
+"response":{"type":"anonymous","header":2794, "doc":[
+"Loaded settings",{"type":"reference","argument":"settings","category":"full","description":" Current group admin settings"}] ,"attributes":[{"type":{"type":"struct","childType":"AdminSettings"},"id":1,"name":"settings"}
+]},
+"doc":[
+"Loading administration settings",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"rpc","content":{
+"name":"SaveAdminSettings",
+"header":2792,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Save administartion settings",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's Peer"},{"type":"reference","argument":"settings","category":"full","description":"Group's settings"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"struct","childType":"AdminSettings"},"id":2,"name":"settings"}
+]}},{"type":"rpc","content":{
+"name":"DeleteGroup",
+"header":2795,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Delete Group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"rpc","content":{
+"name":"ShareHistory",
+"header":2796,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Share History",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"comment","content":"Invite"},{"type":"response","content":{
+"name":"InviteUrl",
+"header":178,
+"doc":[
+"Response for invite url methods"],"attributes":[
+{"type":"string","id":1,"name":"url"}
+]}},{"type":"rpc","content":{
+"name":"GetGroupInviteUrl",
+"header":177,
+"response":{"type":"reference","name":"InviteUrl"},
+"doc":[
+"Building invite url",{"type":"reference","argument":"groupPeer","category":"full","description":"Destination group peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"rpc","content":{
+"name":"RevokeInviteUrl",
+"header":179,
+"response":{"type":"reference","name":"InviteUrl"},
+"doc":[
+"Revoking invite urls",{"type":"reference","argument":"groupPeer","category":"full","description":"Destination group peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"rpc","content":{
+"name":"JoinGroup",
+"header":180,
+"response":{"type":"anonymous","header":181, "doc":[
+{"type":"reference","argument":"group","category":"hidden","description":" Joined group"},{"type":"reference","argument":"users","category":"hidden","description":" Users from members"},{"type":"reference","argument":"userPeers","category":"hidden","description":" User Peers"},{"type":"reference","argument":"rid","category":"full","description":" Random id"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"hidden","description":" State"},{"type":"reference","argument":"date","category":"full","description":" Date of join"}] ,"attributes":[{"type":{"type":"struct","childType":"Group"},"id":1,"name":"group"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":5,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":7,"name":"userPeers"}
+,{"type":{"type":"alias","childType":"randomId"},"id":6,"name":"rid"}
+,{"type":"int32","id":2,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"}
+]},
+"doc":[
+"Join group method",{"type":"reference","argument":"token","category":"full","description":"Url or Token for joining to group"},{"type":"reference","argument":"optimizations","category":"hidden","description":"Enabled Optimizations"}],"attributes":[
+{"type":"string","id":1,"name":"token"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"}
+]}},{"type":"comment","content":"Obsolete Actions"},{"type":"rpc","content":{
+"name":"CreateGroupObsolete",
+"header":65,
+"response":{"type":"anonymous","header":66, "doc":[
+"Created group",{"type":"reference","argument":"groupPeer","category":"full","description":" Peer of created group"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"},{"type":"reference","argument":"users","category":"compact","description":" Members of created group"},{"type":"reference","argument":"date","category":"full","description":" Group creation date"}] ,"attributes":[{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":"int32","id":3,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":4,"name":"state"}
+,{"type":{"type":"list","childType":"int32"},"id":5,"name":"users"}
+,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"}
+]},
+"doc":[
+"[OBSOLETE] Creating group chat",{"type":"reference","argument":"rid","category":"full","description":"Random Id for avoiding double create"},{"type":"reference","argument":"title","category":"full","description":"Title of new group"},{"type":"reference","argument":"users","category":"compact","description":"Members of new group"}],"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"rid"}
+,{"type":"string","id":2,"name":"title"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"}
+]}},{"type":"rpc","content":{
+"name":"EnterGroupObsolete",
+"header":199,
+"response":{"type":"anonymous","header":200, "doc":[
+"Joined group",{"type":"reference","argument":"group","category":"full","description":" Joined group"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"rid","category":"full","description":" Rid of join message"},{"type":"reference","argument":"seq","category":"full","description":" Seq of Update"},{"type":"reference","argument":"state","category":"full","description":" State of Update"},{"type":"reference","argument":"date","category":"full","description":" Date of update"}] ,"attributes":[{"type":{"type":"struct","childType":"Group"},"id":1,"name":"group"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"}
+,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"rid"}
+,{"type":"int32","id":4,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":5,"name":"state"}
+,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"}
+]},
+"doc":[
+"[OBSOLETE] Join random group by peer id",{"type":"reference","argument":"peer","category":"full","description":"Public group peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"MakeUserAdminObsolete",
+"header":214,
+"response":{"type":"anonymous","header":215, "doc":[
+{"type":"reference","argument":"members","category":"full","description":" new members"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":1,"name":"members"}
+,{"type":"int32","id":2,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"}
+]},
+"doc":[
+"[OBSOLETE] Make user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"}
+,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"}
+]}},{"type":"comment","content":"Obsolete Updates"},{"type":"update","content":{
+"name":"GroupInviteObsolete",
+"header":36,
+"doc":[
+"Update about inviting current user to group",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"inviteUid","category":"full","description":" Inviter UID. If equals to current uid than group created by user."},{"type":"reference","argument":"date","category":"full","description":" Date of creating"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":9,"name":"rid"}
+,{"type":{"type":"alias","childType":"userId"},"id":5,"name":"inviteUid"}
+,{"type":{"type":"alias","childType":"date"},"id":8,"name":"date"}
+]}},{"type":"update","content":{
+"name":"GroupUserInvitedObsolete",
+"header":21,
+"doc":[
+"Update about inviting user to group",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Added user ID"},{"type":"reference","argument":"inviterUid","category":"full","description":" Inviter user ID"},{"type":"reference","argument":"date","category":"full","description":" Date of adding user to group"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"}
+,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"inviterUid"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"}
+]}},{"type":"update","content":{
+"name":"GroupUserLeaveObsolete",
+"header":23,
+"doc":[
+"Update about leaving user",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" User's ID"},{"type":"reference","argument":"date","category":"full","description":" Date of user leave"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+]}},{"type":"update","content":{
+"name":"GroupUserKickObsolete",
+"header":24,
+"doc":[
+"Update about kicking user",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Kicked user's ID"},{"type":"reference","argument":"kickerUid","category":"full","description":" Kicker user's ID"},{"type":"reference","argument":"date","category":"full","description":" Date of user kick"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"}
+,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"kickerUid"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"}
+]}},{"type":"update","content":{
+"name":"GroupMembersUpdateObsolete",
+"header":44,
+"doc":[
+"Silent group members update",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"members","category":"full","description":" New members list"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":2,"name":"members"}
+]}},{"type":"update","content":{
+"name":"GroupTitleChangedObsolete",
+"header":38,
+"doc":[
+"Update about group title change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Changer UID"},{"type":"reference","argument":"title","category":"full","description":" New Title of group"},{"type":"reference","argument":"date","category":"full","description":" Date of title change"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"}
+,{"type":"string","id":3,"name":"title"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"}
+]}},{"type":"update","content":{
+"name":"GroupTopicChangedObsolete",
+"header":213,
+"doc":[
+"Update about group topic change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Changer UID"},{"type":"reference","argument":"topic","category":"full","description":" New topic of group"},{"type":"reference","argument":"date","category":"full","description":" Date of theme change"},{"type":"reference","argument":"rid","category":"full","description":" Randomd Id of operation"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"uid"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"topic"}
+,{"type":{"type":"alias","childType":"date"},"id":5,"name":"date"}
+]}},{"type":"update","content":{
+"name":"GroupAboutChangedObsolete",
+"header":214,
+"doc":[
+"Update about group about change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"about","category":"full","description":" Group about"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"}
+]}},{"type":"update","content":{
+"name":"GroupAvatarChangedObsolete",
+"header":39,
+"doc":[
+"Update about group avatar change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Avatar changer uid"},{"type":"reference","argument":"avatar","category":"compact","description":" New Avatar. If null then avatar is removed"},{"type":"reference","argument":"date","category":"full","description":" Date of avatar change"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":3,"name":"avatar"}
+,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"}
+]}}]}, {
+ "title": "Stickers",
+ "package": "stickers",
+ "doc": [
+ "Stickers support in Actor"
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"StickerDescriptor",
+"doc":[
+"Descriptor of a Sticker",{"type":"reference","argument":"id","category":"full","description":" Sticker unique id"},{"type":"reference","argument":"emoji","category":"full","description":" Emoji code for sticker"},{"type":"reference","argument":"image128","category":"full","description":" Image of sticker 128x128 in WebP format"},{"type":"reference","argument":"image512","category":"full","description":" Image of sticker 512x512 in WebP format"},{"type":"reference","argument":"image256","category":"full","description":" Image of sticker 256x256 in WebP format"}],"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"emoji"}
+,{"type":{"type":"struct","childType":"ImageLocation"},"id":3,"name":"image128"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":4,"name":"image512"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":5,"name":"image256"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"StickerCollection",
+"doc":[
+"Sticker collection",{"type":"reference","argument":"id","category":"full","description":" Unique id of a collection"},{"type":"reference","argument":"accessHash","category":"full","description":" Access Hash of a collection"},{"type":"reference","argument":"stickers","category":"compact","description":" Sticker list"}],"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"StickerDescriptor"}},"id":3,"name":"stickers"}
+]}},{"type":"response","content":{
+"name":"StickersReponse",
+"header":240,
+"doc":[
+"Stickers response",{"type":"reference","argument":"collections","category":"full","description":" Sticker collections"},{"type":"reference","argument":"seq","category":"full","description":" Seq of update"},{"type":"reference","argument":"state","category":"full","description":" State of update"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"}
+,{"type":"int32","id":2,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"}
+]}},{"type":"rpc","content":{
+"name":"LoadOwnStickers",
+"header":238,
+"response":{"type":"anonymous","header":239, "doc":[
+"Own Stickers collections",{"type":"reference","argument":"ownStickers","category":"hidden","description":" Own sticker collections"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"ownStickers"}
+]},
+"doc":[
+"Loading own stickers"],"attributes":[
+]}},{"type":"update","content":{
+"name":"OwnStickersChanged",
+"header":161,
+"doc":[
+"Own Stickers changed",{"type":"reference","argument":"collections","category":"compact","description":" New own sticker collections"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"}
+]}},{"type":"update","content":{
+"name":"StickerCollectionsChanged",
+"header":164,
+"doc":[
+"Sticker collection changed",{"type":"reference","argument":"collections","category":"full","description":" Updated sticker collections"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"}
+]}},{"type":"rpc","content":{
+"name":"AddStickerCollection",
+"header":244,
+"response":{"type":"reference","name":"StickersReponse"},
+"doc":[
+"Adding sticker collection",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}},{"type":"rpc","content":{
+"name":"RemoveStickerCollection",
+"header":245,
+"response":{"type":"reference","name":"StickersReponse"},
+"doc":[
+"Removing sticker collection",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}},{"type":"rpc","content":{
+"name":"LoadStickerCollection",
+"header":246,
+"response":{"type":"anonymous","header":247, "doc":[
+"Loaded collection",{"type":"reference","argument":"collection","category":"full","description":" Collection of stickers"}] ,"attributes":[{"type":{"type":"struct","childType":"StickerCollection"},"id":1,"name":"collection"}
+]},
+"doc":[
+"Loading stickers",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}}]}, {
+ "title": "Search",
+ "package": "search",
+ "doc": [
+ "Searching API"
+ ],
+ "items": [
{
- "type": "rpc",
+ "type": "enum",
"content": {
- "name": "StartTokenAuth",
- "header": 203,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Starting token-based login",
+ "name": "SearchPeerType",
+ "values": [
{
- "type": "reference",
- "argument": "token",
- "category": "full",
- "description": "Token for authentication"
+ "name": "Groups",
+ "id": 1
},
{
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application Id"
+ "name": "Contacts",
+ "id": 2
},
{
- "type": "reference",
- "argument": "apiKey",
- "category": "hidden",
- "description": "Application API key"
- },
+ "name": "Public",
+ "id": 3
+ }
+ ]
+ }
+ }, {
+ "type": "enum",
+ "content": {
+ "name": "SearchContentType",
+ "values": [
{
- "type": "reference",
- "argument": "deviceHash",
- "category": "full",
- "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"
+ "name": "Any",
+ "id": 1
},
{
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": "Device Title"
- },
- {
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": "TimeZone of device"
- },
- {
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": "Preferred languages"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "token"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "appId"
- },
- {
- "type": "string",
- "id": 3,
- "name": "apiKey"
- },
- {
- "type": "bytes",
- "id": 4,
- "name": "deviceHash"
- },
- {
- "type": "string",
- "id": 5,
- "name": "deviceTitle"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 6,
- "name": "timeZone"
- },
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 7,
- "name": "preferredLanguages"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "StartUsernameAuth",
- "header": 2571,
- "response": {
- "type": "anonymous",
- "header": 2572,
- "doc": [
- "Result of login auth start. If is not registered move to signup.",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": " Authentication transaction hash"
- },
- {
- "type": "reference",
- "argument": "isRegistered",
- "category": "full",
- "description": " If user is registered with this username"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "isRegistered"
- }
- ]
- },
- "doc": [
- "Starting Login Authentication",
- {
- "type": "reference",
- "argument": "username",
- "category": "full",
- "description": "Username for signing in"
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application id"
- },
- {
- "type": "reference",
- "argument": "apiKey",
- "category": "hidden",
- "description": "Application API key"
- },
- {
- "type": "reference",
- "argument": "deviceHash",
- "category": "full",
- "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"
- },
- {
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": "Device Title"
- },
- {
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": "Time Zone of device"
- },
- {
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": "Preferred languages of device"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "username"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "appId"
- },
- {
- "type": "string",
- "id": 3,
- "name": "apiKey"
- },
- {
- "type": "bytes",
- "id": 4,
- "name": "deviceHash"
- },
- {
- "type": "string",
- "id": 5,
- "name": "deviceTitle"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 6,
- "name": "timeZone"
- },
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 7,
- "name": "preferredLanguages"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ValidateCode",
- "header": 189,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Performing user sign in.",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": "Hash of transaction"
- },
- {
- "type": "reference",
- "argument": "code",
- "category": "hidden",
- "description": "Activation code"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "string",
- "id": 2,
- "name": "code"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ValidatePassword",
- "header": 207,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Validation of account password",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "full",
- "description": "Hash of transaction"
- },
- {
- "type": "reference",
- "argument": "password",
- "category": "full",
- "description": "Password for account"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "string",
- "id": 2,
- "name": "password"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetOAuth2Params",
- "header": 194,
- "response": {
- "type": "anonymous",
- "header": 195,
- "doc": [
- {
- "type": "reference",
- "argument": "authUrl",
- "category": "hidden",
- "description": " Authentication url"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "authUrl"
- }
- ]
- },
- "doc": [
- "Loading OAuth2 Parameters",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": "Hash of transaction"
- },
- {
- "type": "reference",
- "argument": "redirectUrl",
- "category": "full",
- "description": "Redirect URL for Application"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "string",
- "id": 2,
- "name": "redirectUrl"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "CompleteOAuth2",
- "header": 196,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Complete OAuth2 Authentication",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": "Hash of transaction"
- },
- {
- "type": "reference",
- "argument": "code",
- "category": "danger",
- "description": "Authentication Code"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "string",
- "id": 2,
- "name": "code"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SignUp",
- "header": 190,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Perform user SignUp",
- {
- "type": "reference",
- "argument": "transactionHash",
- "category": "danger",
- "description": "Hash of transaction"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": "User name"
- },
- {
- "type": "reference",
- "argument": "sex",
- "category": "full",
- "description": "Optional user sex"
- },
- {
- "type": "reference",
- "argument": "password",
- "category": "full",
- "description": "Password for password-based accounts"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "transactionHash"
- },
- {
- "type": "string",
- "id": 2,
- "name": "name"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "Sex"
- }
- },
- "id": 3,
- "name": "sex"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "password"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "Auth",
- "header": 5,
- "doc": [
- "Authentication result",
- {
- "type": "reference",
- "argument": "user",
- "category": "compact",
- "description": " The authenticated User"
- },
- {
- "type": "reference",
- "argument": "config",
- "category": "full",
- "description": " Current config of server"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "User"
- },
- "id": 2,
- "name": "user"
- },
- {
- "type": {
- "type": "struct",
- "childType": "Config"
- },
- "id": 3,
- "name": "config"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "AuthSession",
- "doc": [
- "Authentication session",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Unuque ID of session"
- },
- {
- "type": "reference",
- "argument": "authHolder",
- "category": "full",
- "description": " holder of session. 0 - this device, 1 - other."
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "full",
- "description": " Application Id (user in SignIn/SignUp)"
- },
- {
- "type": "reference",
- "argument": "appTitle",
- "category": "full",
- "description": " Title of application"
- },
- {
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": " Title of device"
- },
- {
- "type": "reference",
- "argument": "authTime",
- "category": "full",
- "description": " Time of session creating"
- },
- {
- "type": "reference",
- "argument": "authLocation",
- "category": "hidden",
- "description": " two-letter country code of session create"
- },
- {
- "type": "reference",
- "argument": "latitude",
- "category": "hidden",
- "description": " optional latitude of auth if available"
- },
- {
- "type": "reference",
- "argument": "longitude",
- "category": "hidden",
- "description": " optional longitude of auth if available"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "enum",
- "childType": "AuthHolder"
- },
- "id": 2,
- "name": "authHolder"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "appId"
- },
- {
- "type": "string",
- "id": 4,
- "name": "appTitle"
- },
- {
- "type": "string",
- "id": 5,
- "name": "deviceTitle"
- },
- {
- "type": "int32",
- "id": 6,
- "name": "authTime"
- },
- {
- "type": "string",
- "id": 7,
- "name": "authLocation"
- },
- {
- "type": {
- "type": "opt",
- "childType": "double"
- },
- "id": 8,
- "name": "latitude"
- },
- {
- "type": {
- "type": "opt",
- "childType": "double"
- },
- "id": 9,
- "name": "longitude"
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "AuthHolder",
- "values": [
- {
- "name": "ThisDevice",
- "id": 1
- },
- {
- "name": "OtherDevice",
- "id": 2
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetAuthSessions",
- "header": 80,
- "response": {
- "type": "anonymous",
- "header": 81,
- "doc": [
- "Current Auth sessions",
- {
- "type": "reference",
- "argument": "userAuths",
- "category": "compact",
- "description": " User authentications"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "AuthSession"
- }
- },
- "id": 1,
- "name": "userAuths"
- }
- ]
- },
- "doc": [
- "Getting of all active user's authentication sessions"
- ],
- "attributes": []
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "TerminateSession",
- "header": 82,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "SignOut on specified user's session",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "id from AuthItem"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "TerminateAllSessions",
- "header": 83,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "SignOut on all exept current sessions"
- ],
- "attributes": []
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SignOut",
- "header": 84,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "SignOut current session"
- ],
- "attributes": []
- }
- },
- {
- "type": "comment",
- "content": "OBSOLETE METHODS"
- },
- {
- "type": "rpc",
- "content": {
- "name": "SignInObsolete",
- "header": 3,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Performing user signin",
- {
- "type": "reference",
- "argument": "phoneNumber",
- "category": "danger",
- "description": "Phone number in international format"
- },
- {
- "type": "reference",
- "argument": "smsHash",
- "category": "danger",
- "description": "Code request hash from RequestAuthCode"
- },
- {
- "type": "reference",
- "argument": "smsCode",
- "category": "danger",
- "description": "Confirmation code from SMS"
- },
- {
- "type": "reference",
- "argument": "deviceHash",
- "category": "full",
- "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"
- },
- {
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": "Device title like 'Steven's iPhone'"
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application ID"
- },
- {
- "type": "reference",
- "argument": "appKey",
- "category": "hidden",
- "description": "Application API key"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "phoneNumber"
- },
- {
- "type": "string",
- "id": 2,
- "name": "smsHash"
- },
- {
- "type": "string",
- "id": 3,
- "name": "smsCode"
- },
- {
- "type": "bytes",
- "id": 5,
- "name": "deviceHash"
- },
- {
- "type": "string",
- "id": 6,
- "name": "deviceTitle"
- },
- {
- "type": "int32",
- "id": 7,
- "name": "appId"
- },
- {
- "type": "string",
- "id": 8,
- "name": "appKey"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SignUpObsolete",
- "header": 4,
- "response": {
- "type": "reference",
- "name": "Auth"
- },
- "doc": [
- "Performing user signup. If user perform signup on already registered user it just override previous",
- "profile information",
- {
- "type": "reference",
- "argument": "phoneNumber",
- "category": "danger",
- "description": "Phone number in international format"
- },
- {
- "type": "reference",
- "argument": "smsHash",
- "category": "danger",
- "description": "Code request hash from RequestAuthCode"
- },
- {
- "type": "reference",
- "argument": "smsCode",
- "category": "danger",
- "description": "Confirmation code from SMS"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": "User name"
- },
- {
- "type": "reference",
- "argument": "deviceHash",
- "category": "full",
- "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"
- },
- {
- "type": "reference",
- "argument": "deviceTitle",
- "category": "full",
- "description": "Device title like 'Steven's iPhone'"
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application ID"
- },
- {
- "type": "reference",
- "argument": "appKey",
- "category": "hidden",
- "description": "pplication API key"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "phoneNumber"
- },
- {
- "type": "string",
- "id": 2,
- "name": "smsHash"
- },
- {
- "type": "string",
- "id": 3,
- "name": "smsCode"
- },
- {
- "type": "string",
- "id": 4,
- "name": "name"
- },
- {
- "type": "bytes",
- "id": 7,
- "name": "deviceHash"
- },
- {
- "type": "string",
- "id": 8,
- "name": "deviceTitle"
- },
- {
- "type": "int32",
- "id": 9,
- "name": "appId"
- },
- {
- "type": "string",
- "id": 10,
- "name": "appKey"
- },
- {
- "type": "bool",
- "id": 11,
- "name": "isSilent"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SendAuthCodeObsolete",
- "header": 1,
- "response": {
- "type": "anonymous",
- "header": 2,
- "doc": [
- "Sms Request response",
- {
- "type": "reference",
- "argument": "smsHash",
- "category": "danger",
- "description": " Hash of SMS request"
- },
- {
- "type": "reference",
- "argument": "isRegistered",
- "category": "full",
- "description": " true if user is registered"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "smsHash"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "isRegistered"
- }
- ]
- },
- "doc": [
- "Sending SMS with activation code",
- {
- "type": "reference",
- "argument": "phoneNumber",
- "category": "full",
- "description": "Phone number in international format"
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application ID"
- },
- {
- "type": "reference",
- "argument": "apiKey",
- "category": "hidden",
- "description": "Application API key"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "phoneNumber"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "appId"
- },
- {
- "type": "string",
- "id": 3,
- "name": "apiKey"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SendAuthCallObsolete",
- "header": 90,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Requesting Phone activation",
- {
- "type": "reference",
- "argument": "phoneNumber",
- "category": "full",
- "description": "Phone number in international format"
- },
- {
- "type": "reference",
- "argument": "smsHash",
- "category": "danger",
- "description": "Code request hash from RequestAuthCode"
- },
- {
- "type": "reference",
- "argument": "appId",
- "category": "hidden",
- "description": "Application ID"
- },
- {
- "type": "reference",
- "argument": "apiKey",
- "category": "hidden",
- "description": "Application API key"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "phoneNumber"
- },
- {
- "type": "string",
- "id": 2,
- "name": "smsHash"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "appId"
- },
- {
- "type": "string",
- "id": 4,
- "name": "apiKey"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Users",
- "package": "users",
- "doc": [
- "Users are objects that secured by accessHash. You can't load user profile by it's id.",
- "You can't send message to user without finding it's object in Updates or by calling",
- "method for user search, contacts import or some other methods.",
- "",
- "Applications need to keep all Users information forever.",
- "",
- "Each User have optional localName - name of user that was set by current user and can be changed",
- "any time by calling EditUserLocalName method."
- ],
- "items": [
- {
- "type": "enum",
- "content": {
- "name": "Sex",
- "values": [
- {
- "name": "Unknown",
- "id": 1
- },
- {
- "name": "Male",
- "id": 2
- },
- {
- "name": "Female",
- "id": 3
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "ContactType",
- "values": [
- {
- "name": "Phone",
- "id": 1
- },
- {
- "name": "Email",
- "id": 2
- },
- {
- "name": "Web",
- "id": 3
- },
- {
- "name": "Social",
- "id": 4
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ContactRecord",
- "doc": [
- "Contact information record",
- {
- "type": "reference",
- "argument": "type",
- "category": "full",
- "description": " Record type"
- },
- {
- "type": "reference",
- "argument": "typeSpec",
- "category": "hidden",
- "description": " Value for specification type of contact, for example 'mobile/standalone/office' for phones or 'vk/fb/telegram' for extenrnal networks."
- },
- {
- "type": "reference",
- "argument": "stringValue",
- "category": "full",
- "description": " String value of record"
- },
- {
- "type": "reference",
- "argument": "longValue",
- "category": "full",
- "description": " Long value of record"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " Title of record"
- },
- {
- "type": "reference",
- "argument": "subtitle",
- "category": "hidden",
- "description": " Subtitle of record"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "enum",
- "childType": "ContactType"
- },
- "id": 1,
- "name": "type"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 6,
- "name": "typeSpec"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "stringValue"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int64"
- },
- "id": 3,
- "name": "longValue"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "title"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 5,
- "name": "subtitle"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "User",
- "doc": [
- "Main user object",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " uid"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " user's access hash"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": " user's name"
- },
- {
- "type": "reference",
- "argument": "localName",
- "category": "full",
- "description": " user's local name"
- },
- {
- "type": "reference",
- "argument": "nick",
- "category": "full",
- "description": " User's nickname"
- },
- {
- "type": "reference",
- "argument": "sex",
- "category": "full",
- "description": " optional sex of user"
- },
- {
- "type": "reference",
- "argument": "avatar",
- "category": "compact",
- "description": " avatar of user"
- },
- {
- "type": "reference",
- "argument": "isBot",
- "category": "full",
- "description": " Is user actually bot. By default is false."
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " Extension values"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": " [DEPRECATED] User's about information"
- },
- {
- "type": "reference",
- "argument": "contactInfo",
- "category": "compact",
- "description": " [DEPRECATED] Contact information of user"
- },
- {
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": " [DEPRECATED] Preferred user languages"
- },
- {
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": " [DEPRECATED] Time Zone of user in TZ format"
- },
- {
- "type": "reference",
- "argument": "botCommands",
- "category": "full",
- "description": " [DEPRECATED] Available Bot Commands"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- },
- {
- "type": "string",
- "id": 3,
- "name": "name"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "localName"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 13,
- "name": "nick"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "Sex"
- }
- },
- "id": 5,
- "name": "sex"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 8,
- "name": "avatar"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 11,
- "name": "isBot"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 20,
- "name": "ext"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "ContactRecord"
- }
- },
- "id": 12,
- "name": "contactInfo",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 14,
- "name": "about",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 16,
- "name": "preferredLanguages",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 17,
- "name": "timeZone",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "BotCommand"
- }
- },
- "id": 19,
- "name": "botCommands",
- "deprecated": "true"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "FullUser",
- "doc": [
- "Full User representation",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " User's Id"
- },
- {
- "type": "reference",
- "argument": "contactInfo",
- "category": "compact",
- "description": " User's contact information"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": " User's about information"
- },
- {
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": " Preferred user languages"
- },
- {
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": " Time Zone of user in TZ format"
- },
- {
- "type": "reference",
- "argument": "botCommands",
- "category": "full",
- "description": " Available Commands for Bot"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " Extension values. NOTE: This values are not related to ext field in User object."
- },
- {
- "type": "reference",
- "argument": "isBlocked",
- "category": "full",
- "description": " Is user blocked. Default is false."
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "ContactRecord"
- }
- },
- "id": 2,
- "name": "contactInfo"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "about"
- },
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 4,
- "name": "preferredLanguages"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 5,
- "name": "timeZone"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "BotCommand"
- }
- },
- "id": 6,
- "name": "botCommands"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 7,
- "name": "ext"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 8,
- "name": "isBlocked"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "BotCommand",
- "doc": [
- "Available bot commands",
- {
- "type": "reference",
- "argument": "slashCommand",
- "category": "full",
- "description": " Slash command name (wihtout slash)"
- },
- {
- "type": "reference",
- "argument": "description",
- "category": "full",
- "description": " Slash command description"
- },
- {
- "type": "reference",
- "argument": "locKey",
- "category": "full",
- "description": " Optional Localization Key for i18n"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "slashCommand"
- },
- {
- "type": "string",
- "id": 2,
- "name": "description"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "locKey"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditUserLocalName",
- "header": 96,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Renaming of user's visible name",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": "target User's uid"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": "User's accessHash"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": "New user name"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- },
- {
- "type": "string",
- "id": 3,
- "name": "name"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserAvatarChanged",
- "header": 16,
- "doc": [
- "Update about avatar changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " user's uid"
- },
- {
- "type": "reference",
- "argument": "avatar",
- "category": "compact",
- "description": " user's new avatar"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 2,
- "name": "avatar"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserNameChanged",
- "header": 32,
- "doc": [
- "Update about name changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " user's uid"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": " user's name"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": "string",
- "id": 2,
- "name": "name"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserLocalNameChanged",
- "header": 51,
- "doc": [
- "Update about local name changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " user's uid"
- },
- {
- "type": "reference",
- "argument": "localName",
- "category": "full",
- "description": " new user's local name"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "localName"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserContactsChanged",
- "header": 134,
- "doc": [
- "Update about contact information change",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " user's uid"
- },
- {
- "type": "reference",
- "argument": "contactRecords",
- "category": "compact",
- "description": " new phones list"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "ContactRecord"
- }
- },
- "id": 4,
- "name": "contactRecords"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserNickChanged",
- "header": 209,
- "doc": [
- "Update about nick changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " user's uid"
- },
- {
- "type": "reference",
- "argument": "nickname",
- "category": "full",
- "description": " user's new nickname"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "nickname"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserAboutChanged",
- "header": 210,
- "doc": [
- "Update about user's about changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's uid"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": " User's about"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "about"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserPreferredLanguagesChanged",
- "header": 212,
- "doc": [
- "Update about user's preferred languages",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's uid"
- },
- {
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": " User's preferred languages. Can be empty."
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 2,
- "name": "preferredLanguages"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserTimeZoneChanged",
- "header": 216,
- "doc": [
- "User TimeZone changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's uid"
- },
- {
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": " User's new time zone in TZ format"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "timeZone"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserBotCommandsChanged",
- "header": 217,
- "doc": [
- "Update about bot commands changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's Id"
- },
- {
- "type": "reference",
- "argument": "commands",
- "category": "full",
- "description": " New List of commands"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "BotCommand"
- }
- },
- "id": 2,
- "name": "commands"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserExtChanged",
- "header": 218,
- "doc": [
- "Update about user ext changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " New Ext Value in User (NOT FullUser) object."
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 2,
- "name": "ext"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserFullExtChanged",
- "header": 219,
- "doc": [
- "Update about user ext changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's Id"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " New Ext Value in FullUser (NOT User) object."
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 3,
- "name": "ext"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadFullUsers",
- "header": 2649,
- "response": {
- "type": "anonymous",
- "header": 2650,
- "doc": [
- {
- "type": "reference",
- "argument": "fullUsers",
- "category": "compact",
- "description": " Loaded users"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "FullUser"
- }
- },
- "id": 1,
- "name": "fullUsers"
- }
- ]
- },
- "doc": [
- "Loading Full User information",
- {
- "type": "reference",
- "argument": "userPeers",
- "category": "compact",
- "description": "User's peers to load. Should be non-empy"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 1,
- "name": "userPeers"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Profile",
- "package": "profile",
- "items": [
- {
- "type": "rpc",
- "content": {
- "name": "EditName",
- "header": 53,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Changing account's name",
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": "New name"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "name"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditNickName",
- "header": 205,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Changing account's nickname",
- {
- "type": "reference",
- "argument": "nickname",
- "category": "full",
- "description": "New Nickname"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 1,
- "name": "nickname"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "CheckNickName",
- "header": 206,
- "response": {
- "type": "reference",
- "name": "Bool"
- },
- "doc": [
- "Checking availability of nickname",
- {
- "type": "reference",
- "argument": "nickname",
- "category": "full",
- "description": "Nickname for checking"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "nickname"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditAbout",
- "header": 212,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Changing about information",
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": "new about information"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 1,
- "name": "about"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditAvatar",
- "header": 31,
- "response": {
- "type": "anonymous",
- "header": 103,
- "doc": [
- "Response for change account avatar",
- {
- "type": "reference",
- "argument": "avatar",
- "category": "full",
- "description": " New avatar"
- },
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": " Sequence state"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Avatar"
- },
- "id": 1,
- "name": "avatar"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 3,
- "name": "state"
- }
- ]
- },
- "doc": [
- "Changing account's avatar",
- {
- "type": "reference",
- "argument": "fileLocation",
- "category": "compact",
- "description": "File Location of uploaded unencrypted avatar"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "FileLocation"
- },
- "id": 1,
- "name": "fileLocation"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RemoveAvatar",
- "header": 91,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Removing account's avatar"
- ],
- "attributes": []
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditMyTimeZone",
- "header": 144,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Updating user's time zone",
- {
- "type": "reference",
- "argument": "tz",
- "category": "full",
- "description": "New Time Zone"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "tz"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditMyPreferredLanguages",
- "header": 145,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Changing preffered languages",
- {
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": "Preffered Languages"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 1,
- "name": "preferredLanguages"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Contacts",
- "package": "contacts",
- "doc": [
- "Before working with contact list is is useful to import contacts from phone first by calling",
- "method ImportContacts#0x07.",
- "",
- "All phone numbers MUST be preprocessed before import by some library (like libphonenumber)",
- "and build international phone number depending on current users phone and/or locale.",
- "",
- "For loading contact list from server use GetContacts#0x57.",
- "If during this call there are some updates about contact list change",
- "it is recommended to call it again. Also applications need to sync contacts on application start.",
- "",
- "For searching for users without adding to contacts list use method FindContacts#0x70.",
- "",
- "For adding/deleting contacts AddContact#0x72 and DeleteContact#0x59."
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "PhoneToImport",
- "doc": [
- "Phone for import",
- {
- "type": "reference",
- "argument": "phoneNumber",
- "category": "full",
- "description": " phone number for import in international format"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": " optional name for contact"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "phoneNumber"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "name"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EmailToImport",
- "doc": [
- "Email for import",
- {
- "type": "reference",
- "argument": "email",
- "category": "full",
- "description": " email for importing"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": " optional name for contact"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "email"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "name"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ImportContacts",
- "header": 7,
- "response": {
- "type": "anonymous",
- "header": 8,
- "doc": [
- "Imported contacts",
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Imported users"
- },
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number if users are imported"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": " Sequence state if users are imported"
- },
- {
- "type": "reference",
- "argument": "userPeers",
- "category": "full",
- "description": " Imported user peers"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 1,
- "name": "users"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 3,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 4,
- "name": "userPeers"
- }
- ]
- },
- "doc": [
- "Importing phones and emails for building contact list",
- "Maximum amount of items for import per method call equals to 100.",
- {
- "type": "reference",
- "argument": "phones",
- "category": "compact",
- "description": "Phones for import"
- },
- {
- "type": "reference",
- "argument": "emails",
- "category": "compact",
- "description": "Emails for import"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "PhoneToImport"
- }
- },
- "id": 1,
- "name": "phones"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EmailToImport"
- }
- },
- "id": 2,
- "name": "emails"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 3,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "empty"
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetContacts",
- "header": 87,
- "response": {
- "type": "anonymous",
- "header": 88,
- "doc": [
- "Current contact list",
- {
- "type": "reference",
- "argument": "users",
- "category": "hidden",
- "description": " User list if list is changed"
- },
- {
- "type": "reference",
- "argument": "isNotChanged",
- "category": "full",
- "description": " is list changed"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 1,
- "name": "users"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "isNotChanged"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 3,
- "name": "userPeers"
- }
- ]
- },
- "doc": [
- "Getting current contact list",
- "SHA256 hash of list of a comma-separated list of contact UIDs in ascending",
- "order may be passed in contactsHash parameter.",
- "If the contact list was not changed, isNotChanged will be true.",
- {
- "type": "reference",
- "argument": "contactsHash",
- "category": "full",
- "description": "Hash of saved list in application"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled optimizations"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "contactsHash"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 2,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RemoveContact",
- "header": 89,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Removing contact from contact list",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": "Contact's UID"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": "Contact's AccessHash"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "AddContact",
- "header": 114,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Adding contact to contact list",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": "Contact's UID"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": "Contact's AccessHash"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SearchContacts",
- "header": 112,
- "response": {
- "type": "anonymous",
- "header": 113,
- "doc": [
- "Founded users",
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Founded users"
- },
- {
- "type": "reference",
- "argument": "userPeers",
- "category": "compact",
- "description": " Founded users peers"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 1,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 2,
- "name": "userPeers"
- }
- ]
- },
- "doc": [
- "Searching contacts by user's query",
- {
- "type": "reference",
- "argument": "request",
- "category": "full",
- "description": "Search query"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "request"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 2,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "empty"
- },
- {
- "type": "update",
- "content": {
- "name": "ContactRegistered",
- "header": 5,
- "doc": [
- "Update about contact registration",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " contact's uid"
- },
- {
- "type": "reference",
- "argument": "isSilent",
- "category": "full",
- "description": " is registration silent. If this value is true then don't show notification about registration"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " date of registration"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "isSilent"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ContactsAdded",
- "header": 40,
- "doc": [
- "Update about contacts added",
- {
- "type": "reference",
- "argument": "uids",
- "category": "compact",
- "description": " added contacts"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 1,
- "name": "uids"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ContactsRemoved",
- "header": 41,
- "doc": [
- "Update about contacts removed",
- {
- "type": "reference",
- "argument": "uids",
- "category": "compact",
- "description": " removed contacts"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 1,
- "name": "uids"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Privacy",
- "package": "privacy",
- "items": [
- {
- "type": "rpc",
- "content": {
- "name": "BlockUser",
- "header": 2636,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Block User",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Peer for blocking"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UnblockUser",
- "header": 2637,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Unblock User",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Peer for unblocking"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadBlockedUsers",
- "header": 2638,
- "response": {
- "type": "anonymous",
- "header": 2639,
- "doc": [
- {
- "type": "reference",
- "argument": "userPeers",
- "category": "full",
- "description": " Blocked user peers"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 1,
- "name": "userPeers"
- }
- ]
- },
- "doc": [
- "Load Blocked Users"
- ],
- "attributes": []
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserBlocked",
- "header": 2629,
- "doc": [
- "Update about User Blocked",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserUnblocked",
- "header": 2630,
- "doc": [
- "Update about User Unblocked",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Messaging",
- "package": "messaging",
- "doc": [
- "Actor can work with encrypted and plain messages in one conversation. For both types of messages API",
- "contains a bit different methods. Also encrypted and plain messages have different schemes.",
- "Messages ",
- "Message entity contains:",
- "",
- "PeerType - group chat or private ",
- "PeerId - group or user id of conversation ",
- "RandomId - unique id of message that generated by sender. In Encrypted messages random id is encrypted. ",
- "Date - date of message (calculated on server) ",
- "Content ",
- " ",
- "Message content ",
- "Message can be one of three basic types of messages: Text Message, File Message and Service message.",
- "All messages can contain extensions. For example we can send text message and add markdown extension with",
- "formatted text in markdown and clients that support this extension will show markdown, and that clients that",
- "not supported extension then show simple text. File messages can have photo, video or voice extensions.",
- "Service message can have extensions extensions such as \"user added\", \"group created\", \"avatar changed\", etc.",
- "Send messages ",
- "Sending messages looks same for encrypted and plain messages. Client MUST prepare all required data",
- "before sending message (for example FastThumb for photo/video/documents) and call required methods.",
- "Encrypted messages differs here only by a little different scheme and encryption.",
- "WRONG_KEYS and incorrect keys ",
- "For sending encrypted messages client MUST send messages encrypted for all own and receivers keys.",
- "If client send encryption with missing, old or incorrect keys it will receive WRONG_KEYS.",
- "In WRONG_KEYS you need to deserialize relatedData from RpcError to WrongKeysErrorData",
- "and get detailed information about keys. Sometimes there are some broken keys on server and client can't",
- "encrypt messages with it than client MUST send empty encrypted key in request elsewhere API return WRONG_KEYS.",
- "Encrypted messages and New Devices ",
- "When you send message to someone and when he registered with new device there are no way to receive old encrypted",
- "messages on new device and because of this there are a problem about read/delivery statuses.",
- "Alice send messages to Bob, but Bob lose his device and buy new iPhone and installed Actor.",
- "Alice receive notification about new device and send another message. Bob open chat with Alice and",
- "send read status with maximum message read date. Alice will mark all sent messages as read and one that",
- "was not delivered. We can use status notifications per message, but in VERY heavy conversations it will be",
- "a lot of unnecessary traffic. For resolving this small issue we have different ways of message statuses",
- "for encrypted and plain messages. Also it is recomended to mark all undelivered messages on new device update as",
- "not devered with warring sign.",
- "Message Read and Delivery ",
- "There are two different ways for read and delivery statuses for encrypted and plain messages.",
- "For encrypted messages used status change by RandomId and for plain messages used by maximum",
- "date of read/delivered message."
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "MessageAttributes",
- "doc": [
- "Message Attributes",
- {
- "type": "reference",
- "argument": "isMentioned",
- "category": "full",
- "description": " Is mentioned. If set overrides built-in value."
- },
- {
- "type": "reference",
- "argument": "isHighlighted",
- "category": "full",
- "description": " Is message highlighted. Default is false."
- },
- {
- "type": "reference",
- "argument": "isNotified",
- "category": "full",
- "description": " Is notified. If set overrides built-in settings."
- },
- {
- "type": "reference",
- "argument": "isOnlyForYou",
- "category": "full",
- "description": " If this message is only for you. Default is false"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 1,
- "name": "isMentioned"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 2,
- "name": "isHighlighted"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 3,
- "name": "isNotified"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 4,
- "name": "isOnlyForYou"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "QuotedMessage",
- "doc": [
- "Quoted Message",
- {
- "type": "reference",
- "argument": "messageId",
- "category": "full",
- "description": " Message Id if present"
- },
- {
- "type": "reference",
- "argument": "publicGroupId",
- "category": "full",
- "description": " Public Group id if present"
- },
- {
- "type": "reference",
- "argument": "senderUserId",
- "category": "full",
- "description": " Sender of message"
- },
- {
- "type": "reference",
- "argument": "messageDate",
- "category": "full",
- "description": " Date of message"
- },
- {
- "type": "reference",
- "argument": "quotedMessageContent",
- "category": "full",
- "description": " Optional Quoted Message Content. Can be empty if messageId is present and message is in current peer."
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "randomId"
- }
- },
- "id": 1,
- "name": "messageId"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "groupId"
- }
- },
- "id": 2,
- "name": "publicGroupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 3,
- "name": "senderUserId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "messageDate"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "Message"
- }
- },
- "id": 5,
- "name": "quotedMessageContent"
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "Message",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "TextMessage",
- "doc": [
- "Text message",
- {
- "type": "reference",
- "argument": "text",
- "category": "danger",
- "description": " the text"
- },
- {
- "type": "reference",
- "argument": "mentions",
- "category": "full",
- "description": " User mentions in message"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " Optional bytes of extension"
- }
- ],
- "trait": {
- "name": "Message",
- "key": 1
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "text"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 2,
- "name": "mentions"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "TextMessageEx"
- }
- },
- "id": 3,
- "name": "ext"
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "TextMessageEx",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "TextExMarkdown",
- "doc": [
- "Markdown extension",
- {
- "type": "reference",
- "argument": "markdown",
- "category": "full",
- "description": " Markdown text"
- }
- ],
- "trait": {
- "name": "TextMessageEx",
- "key": 1
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 2,
- "name": "markdown"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "TextModernMessage",
- "doc": [
- "Modern text message",
- {
- "type": "reference",
- "argument": "text",
- "category": "full",
- "description": " optional text of message"
- },
- {
- "type": "reference",
- "argument": "senderNameOverride",
- "category": "full",
- "description": " optional overriding of sender"
- },
- {
- "type": "reference",
- "argument": "senderPhotoOverride",
- "category": "full",
- "description": " optional overriding sender's photo"
- },
- {
- "type": "reference",
- "argument": "style",
- "category": "full",
- "description": " optional paragraph style"
- },
- {
- "type": "reference",
- "argument": "attaches",
- "category": "full",
- "description": " optional Attaches of message"
- }
- ],
- "trait": {
- "name": "TextMessageEx",
- "key": 2
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 1,
- "name": "text"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "senderNameOverride"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 3,
- "name": "senderPhotoOverride"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "ParagraphStyle"
- }
- },
- "id": 4,
- "name": "style"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "TextModernAttach"
- }
- },
- "id": 5,
- "name": "attaches"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ParagraphStyle",
- "doc": [
- "Paragraph style",
- {
- "type": "reference",
- "argument": "showParagraph",
- "category": "full",
- "description": " Show quote-like paragraph?"
- },
- {
- "type": "reference",
- "argument": "paragraphColor",
- "category": "full",
- "description": " Override paragraph color"
- },
- {
- "type": "reference",
- "argument": "bgColor",
- "category": "full",
- "description": " Override background color"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 1,
- "name": "showParagraph"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "Color"
- }
- },
- "id": 2,
- "name": "paragraphColor"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "Color"
- }
- },
- "id": 3,
- "name": "bgColor"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "TextModernAttach",
- "doc": [
- "Attaches to message",
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " Attach of message"
- },
- {
- "type": "reference",
- "argument": "titleUrl",
- "category": "full",
- "description": " Attach title url"
- },
- {
- "type": "reference",
- "argument": "titleIcon",
- "category": "full",
- "description": " Attach title icon"
- },
- {
- "type": "reference",
- "argument": "text",
- "category": "full",
- "description": " Attach text"
- },
- {
- "type": "reference",
- "argument": "style",
- "category": "full",
- "description": " Attach style"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 1,
- "name": "title"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "titleUrl"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "ImageLocation"
- }
- },
- "id": 3,
- "name": "titleIcon"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "text"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "ParagraphStyle"
- }
- },
- "id": 5,
- "name": "style"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "TextModernField"
- }
- },
- "id": 6,
- "name": "fields"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "TextModernField",
- "doc": [
- "Modern message fields",
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " Field title"
- },
- {
- "type": "reference",
- "argument": "value",
- "category": "full",
- "description": " Field value"
- },
- {
- "type": "reference",
- "argument": "isShort",
- "category": "full",
- "description": " Is field can be shown in compact way (default is TRUE)"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "title"
- },
- {
- "type": "string",
- "id": 2,
- "name": "value"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 3,
- "name": "isShort"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "TextCommand",
- "doc": [
- "Text Command Message for bots",
- {
- "type": "reference",
- "argument": "command",
- "category": "full",
- "description": " Slash-Command For execution"
- },
- {
- "type": "reference",
- "argument": "args",
- "category": "full",
- "description": " Arguments of slash command"
- }
- ],
- "trait": {
- "name": "TextMessageEx",
- "key": 3
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "command"
- },
- {
- "type": "string",
- "id": 2,
- "name": "args"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceMessage",
- "doc": [
- "Service message",
- {
- "type": "reference",
- "argument": "text",
- "category": "full",
- "description": " service message text"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "compact",
- "description": " Extension"
- }
- ],
- "trait": {
- "name": "Message",
- "key": 2
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "text"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "ServiceEx"
- }
- },
- "id": 3,
- "name": "ext"
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "ServiceEx",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExUserInvited",
- "doc": [
- "Service message about adding user to group",
- {
- "type": "reference",
- "argument": "invitedUid",
- "category": "full",
- "description": " added user id"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 1
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "invitedUid"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExUserJoined",
- "doc": [
- "Service message about user join to group"
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 17
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExUserKicked",
- "doc": [
- "Service message about kicking user from group",
- {
- "type": "reference",
- "argument": "kickedUid",
- "category": "full",
- "description": " kicked user id"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 2
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "kickedUid"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExUserLeft",
- "doc": [
- "Service message about user left group"
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 3
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExGroupCreated",
- "doc": [
- "Service message about group creating"
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 4
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExChangedTitle",
- "doc": [
- "Service message about group title change",
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " New group title"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 5
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "title"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExChangedTopic",
- "doc": [
- "Service message on group topic change",
- {
- "type": "reference",
- "argument": "topic",
- "category": "full",
- "description": " New group topic"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 18
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 1,
- "name": "topic"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExChangedAbout",
- "doc": [
- "Service message on group about change",
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": " New group about"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 19
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 1,
- "name": "about"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExChangedAvatar",
- "doc": [
- "Service message about avatar change",
- {
- "type": "reference",
- "argument": "avatar",
- "category": "compact",
- "description": " Updated avatar"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 6
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 1,
- "name": "avatar"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExContactRegistered",
- "doc": [
- "Service message about user registration",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User Id"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 8
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExPhoneMissed",
- "doc": [
- "Update about missing phone call"
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 9
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExPhoneCall",
- "doc": [
- "Update about phone call",
- {
- "type": "reference",
- "argument": "duration",
- "category": "full",
- "description": " Duration of a phone call"
- }
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 16
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "duration"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExChatArchived",
- "doc": [
- "Message about chat archived"
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 20
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ServiceExChatRestored",
- "doc": [
- "Message about chat restored"
- ],
- "trait": {
- "name": "ServiceEx",
- "key": 21
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DocumentMessage",
- "doc": [
- "File message",
- {
- "type": "reference",
- "argument": "fileId",
- "category": "full",
- "description": " file id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " file access hash"
- },
- {
- "type": "reference",
- "argument": "fileSize",
- "category": "full",
- "description": " file size"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": " name of file"
- },
- {
- "type": "reference",
- "argument": "mimeType",
- "category": "full",
- "description": " mimetype of file"
- },
- {
- "type": "reference",
- "argument": "thumb",
- "category": "compact",
- "description": " optional thumb of file. JPEG less that 90x90 with 60-70 quality."
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "compact",
- "description": " Extension"
- }
- ],
- "trait": {
- "name": "Message",
- "key": 3
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "fileId"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "fileSize"
- },
- {
- "type": "string",
- "id": 4,
- "name": "name"
- },
- {
- "type": "string",
- "id": 5,
- "name": "mimeType"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "FastThumb"
- }
- },
- "id": 6,
- "name": "thumb"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "DocumentEx"
- }
- },
- "id": 8,
- "name": "ext"
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "DocumentEx",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DocumentExPhoto",
- "doc": [
- "File photo extension. Can be set ONLY for JPEG.",
- {
- "type": "reference",
- "argument": "w",
- "category": "full",
- "description": " image width"
- },
- {
- "type": "reference",
- "argument": "h",
- "category": "full",
- "description": " image height"
- }
- ],
- "trait": {
- "name": "DocumentEx",
- "key": 1
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "w"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "h"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DocumentExVideo",
- "doc": [
- "File video extension",
- {
- "type": "reference",
- "argument": "w",
- "category": "full",
- "description": " video width"
- },
- {
- "type": "reference",
- "argument": "h",
- "category": "full",
- "description": " video height"
- },
- {
- "type": "reference",
- "argument": "duration",
- "category": "full",
- "description": " video duration"
- }
- ],
- "trait": {
- "name": "DocumentEx",
- "key": 2
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "w"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "h"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "duration"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DocumentExVoice",
- "doc": [
- "File voice extension",
- {
- "type": "reference",
- "argument": "duration",
- "category": "full",
- "description": " voice duration"
- }
- ],
- "trait": {
- "name": "DocumentEx",
- "key": 3
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "duration"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DocumentExAnimation",
- "doc": [
- "Animation extension. Can be set ONLY for GIF.",
- {
- "type": "reference",
- "argument": "w",
- "category": "full",
- "description": " Animation width"
- },
- {
- "type": "reference",
- "argument": "h",
- "category": "full",
- "description": " Animation height"
- }
- ],
- "trait": {
- "name": "DocumentEx",
- "key": 6
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "w"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "h"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DocumentExAnimationVid",
- "doc": [
- "Animation video extension. More compact version of Animation with video codec instead of GIF.",
- "Can be set ONLY for MP4.",
- {
- "type": "reference",
- "argument": "w",
- "category": "full",
- "description": " Animation width"
- },
- {
- "type": "reference",
- "argument": "h",
- "category": "full",
- "description": " Animation height"
- },
- {
- "type": "reference",
- "argument": "duration",
- "category": "full",
- "description": " Animation duration"
- }
- ],
- "trait": {
- "name": "DocumentEx",
- "key": 7
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "w"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "h"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "duration"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "JsonMessage",
- "doc": [
- "Custom-data JsonMessage",
- {
- "type": "reference",
- "argument": "rawJson",
- "category": "danger",
- "description": " JSON object"
- }
- ],
- "trait": {
- "name": "Message",
- "key": 4
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "rawJson"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "UnsupportedMessage",
- "doc": [
- "Explicit type for unsupported message"
- ],
- "trait": {
- "name": "Message",
- "key": 5
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "StickerMessage",
- "doc": [
- "Sticker message",
- {
- "type": "reference",
- "argument": "stickerId",
- "category": "full",
- "description": " Optional Unique ID of sticker"
- },
- {
- "type": "reference",
- "argument": "fastPreview",
- "category": "full",
- "description": " Optional Fast preview of sticker in webp format"
- },
- {
- "type": "reference",
- "argument": "image512",
- "category": "full",
- "description": " Optional 512x512 sticker image in webp format"
- },
- {
- "type": "reference",
- "argument": "image256",
- "category": "full",
- "description": " Optional 256x256 sticker image in webp format"
- },
- {
- "type": "reference",
- "argument": "stickerCollectionId",
- "category": "full",
- "description": " Optional Collection ID"
- },
- {
- "type": "reference",
- "argument": "stickerCollectionAccessHash",
- "category": "full",
- "description": " Optional Collection Access Hash"
- }
- ],
- "trait": {
- "name": "Message",
- "key": 6
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 1,
- "name": "stickerId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 2,
- "name": "fastPreview"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "ImageLocation"
- }
- },
- "id": 3,
- "name": "image512"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "ImageLocation"
- }
- },
- "id": 4,
- "name": "image256"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 5,
- "name": "stickerCollectionId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int64"
- },
- "id": 6,
- "name": "stickerCollectionAccessHash"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "BinaryMessage",
- "doc": [
- "Binary Message. Useful for implementing your own content types",
- {
- "type": "reference",
- "argument": "contentTag",
- "category": "full",
- "description": " Content Tag"
- },
- {
- "type": "reference",
- "argument": "msg",
- "category": "compact",
- "description": " Message contents"
- }
- ],
- "trait": {
- "name": "Message",
- "key": 7
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "contentTag"
- },
- {
- "type": "bytes",
- "id": 2,
- "name": "msg"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EncryptedMessage",
- "doc": [
- "Encrypted Message",
- {
- "type": "reference",
- "argument": "box",
- "category": "full",
- "description": " Encrypted box"
- }
- ],
- "trait": {
- "name": "Message",
- "key": 8
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "EncryptedBox"
- },
- "id": 1,
- "name": "box"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EmptyMessage",
- "doc": [
- "Empty Message"
- ],
- "trait": {
- "name": "Message",
- "key": 9
- },
- "expandable": "true",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DialogShort",
- "doc": [
- "Short Dialog from grouped conversation list",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Peer of conversation"
- },
- {
- "type": "reference",
- "argument": "counter",
- "category": "full",
- "description": " Conversation unread count"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Conversation top message date"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "counter"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DialogGroup",
- "doc": [
- "Grouped dialog list",
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " Title of group"
- },
- {
- "type": "reference",
- "argument": "key",
- "category": "full",
- "description": " Key of group"
- },
- {
- "type": "reference",
- "argument": "dialogs",
- "category": "full",
- "description": " Conversations in group"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "title"
- },
- {
- "type": "string",
- "id": 2,
- "name": "key"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "DialogShort"
- }
- },
- "id": 3,
- "name": "dialogs"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MessageReaction",
- "doc": [
- "Reaction to message",
- {
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " User's reaction"
- },
- {
- "type": "reference",
- "argument": "code",
- "category": "full",
- "description": " Reaction EMOJI code"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 1,
- "name": "users"
- },
- {
- "type": "string",
- "id": 2,
- "name": "code"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MessageOutReference",
- "doc": [
- "Message Out Reference",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Out Peer of message"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Message random id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SendMessage",
- "header": 92,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Sending plain message",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer for message"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Message random id (generated on client side)"
- },
- {
- "type": "reference",
- "argument": "message",
- "category": "full",
- "description": "The message"
- },
- {
- "type": "reference",
- "argument": "isOnlyForUser",
- "category": "full",
- "description": "If message is shown only for specific user"
- },
- {
- "type": "reference",
- "argument": "quotedMessageReference",
- "category": "full",
- "description": "Quoted message if present"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 3,
- "name": "rid"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Message"
- },
- "id": 4,
- "name": "message"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 5,
- "name": "isOnlyForUser"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MessageOutReference"
- }
- },
- "id": 6,
- "name": "quotedMessageReference"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UpdateMessage",
- "header": 2658,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Changing Message content",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination Peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Message random id"
- },
- {
- "type": "reference",
- "argument": "updatedMessage",
- "category": "full",
- "description": "Updated Message content"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Message"
- },
- "id": 3,
- "name": "updatedMessage"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "MessageReceived",
- "header": 55,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Confirmation of plain message receive by device",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": "Maximum date of received messages"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "MessageRead",
- "header": 57,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Marking plain messages as read",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": "Maximum date of read messages"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DeleteMessage",
- "header": 98,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Deleting messages",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "rids",
- "category": "full",
- "description": "Message random id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "randomId"
- }
- },
- "id": 3,
- "name": "rids"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ClearChat",
- "header": 99,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Clearing of conversation (without removing dialog from dialogs list)",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Conversation peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DeleteChat",
- "header": 100,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Deleting of conversation (also leave group for group conversations)",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Conversation peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ArchiveChat",
- "header": 2654,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Archiving chat",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Conversation peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "MessageSetReaction",
- "header": 210,
- "response": {
- "type": "reference",
- "name": "ReactionsResponse"
- },
- "doc": [
- "Setting Message reaction",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Message random id"
- },
- {
- "type": "reference",
- "argument": "code",
- "category": "full",
- "description": "Reaction code"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": "string",
- "id": 3,
- "name": "code"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "MessageRemoveReaction",
- "header": 220,
- "response": {
- "type": "reference",
- "name": "ReactionsResponse"
- },
- "doc": [
- "Removing Message reaction",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Message random id"
- },
- {
- "type": "reference",
- "argument": "code",
- "category": "full",
- "description": "Reaction code"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": "string",
- "id": 3,
- "name": "code"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "ReactionsResponse",
- "header": 219,
- "doc": [
- "Response for reactions change"
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MessageReaction"
- }
- },
- "id": 3,
- "name": "reactions"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "Message",
- "header": 55,
- "doc": [
- "Update about plain message",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "senderUid",
- "category": "full",
- "description": " Sender of message"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " date of message"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Rid of message"
- },
- {
- "type": "reference",
- "argument": "message",
- "category": "full",
- "description": " message content"
- },
- {
- "type": "reference",
- "argument": "attributes",
- "category": "full",
- "description": " optional message attributes"
- },
- {
- "type": "reference",
- "argument": "quotedMessage",
- "category": "full",
- "description": " optional quoted message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "senderUid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Message"
- },
- "id": 5,
- "name": "message"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MessageAttributes"
- }
- },
- "id": 6,
- "name": "attributes"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "QuotedMessage"
- }
- },
- "id": 7,
- "name": "quotedMessage"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageContentChanged",
- "header": 162,
- "doc": [
- "Update about message change",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Rid of message"
- },
- {
- "type": "reference",
- "argument": "message",
- "category": "full",
- "description": " Message content"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Message"
- },
- "id": 3,
- "name": "message"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageQuotedChanged",
- "header": 169,
- "doc": [
- "Update about quoted message changed",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Rid of message"
- },
- {
- "type": "reference",
- "argument": "quotedMessage",
- "category": "full",
- "description": " Quoted Message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "QuotedMessage"
- }
- },
- "id": 3,
- "name": "quotedMessage"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageDateChanged",
- "header": 163,
- "doc": [
- "Update about message date changed",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Rid of message"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageSent",
- "header": 4,
- "doc": [
- "Update about message sent",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Rid of message"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageReceived",
- "header": 54,
- "doc": [
- "Update about message received",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "startDate",
- "category": "full",
- "description": " Start date of received message"
- },
- {
- "type": "reference",
- "argument": "receivedDate",
- "category": "full",
- "description": " Date of receive"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 2,
- "name": "startDate"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "receivedDate"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageRead",
- "header": 19,
- "doc": [
- "Update about message read",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "startDate",
- "category": "full",
- "description": " Start date of read message"
- },
- {
- "type": "reference",
- "argument": "readDate",
- "category": "full",
- "description": " Date of read"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 2,
- "name": "startDate"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "readDate"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageReadByMe",
- "header": 50,
- "doc": [
- "Update about message read by me",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "startDate",
- "category": "full",
- "description": " Start date of read message"
- },
- {
- "type": "reference",
- "argument": "unreadCounter",
- "category": "full",
- "description": " Optional unread counter in conversation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 2,
- "name": "startDate"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 3,
- "name": "unreadCounter"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "MessageDelete",
- "header": 46,
- "doc": [
- "Update about message delete",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "rids",
- "category": "full",
- "description": " Deleted messages"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "randomId"
- }
- },
- "id": 2,
- "name": "rids"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ChatClear",
- "header": 47,
- "doc": [
- "Update about chat clear",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ChatDelete",
- "header": 48,
- "doc": [
- "Update about chat delete",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ChatArchive",
- "header": 94,
- "doc": [
- "Update about chat archive",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ChatDropCache",
- "header": 2690,
- "doc": [
- "Update about cache drop",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ChatGroupsChanged",
- "header": 1,
- "doc": [
- "Update about chat groups changed. Called only when adding, removing and reordering of grouped dialog.",
- {
- "type": "reference",
- "argument": "dialogs",
- "category": "compact",
- "description": " New dialgos list"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "DialogGroup"
- }
- },
- "id": 1,
- "name": "dialogs"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ReactionsUpdate",
- "header": 222,
- "doc": [
- "Update about reactions change",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Message random id"
- },
- {
- "type": "reference",
- "argument": "reactions",
- "category": "full",
- "description": " New Reactions"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MessageReaction"
- }
- },
- "id": 3,
- "name": "reactions"
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "MessageState",
- "values": [
- {
- "name": "Sent",
- "id": 1
- },
- {
- "name": "Received",
- "id": 2
- },
- {
- "name": "Read",
- "id": 3
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MessageContainer",
- "doc": [
- "Message from history",
- {
- "type": "reference",
- "argument": "senderUid",
- "category": "full",
- "description": " Sender of mesasge"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random Id of message"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of message"
- },
- {
- "type": "reference",
- "argument": "message",
- "category": "full",
- "description": " Content of message"
- },
- {
- "type": "reference",
- "argument": "reactions",
- "category": "full",
- "description": " Message reactions"
- },
- {
- "type": "reference",
- "argument": "attribute",
- "category": "full",
- "description": " Optional message attributes"
- },
- {
- "type": "reference",
- "argument": "quotedMessage",
- "category": "full",
- "description": " Optional quoted Message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "senderUid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Message"
- },
- "id": 5,
- "name": "message"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "MessageState"
- }
- },
- "id": 6,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MessageReaction"
- }
- },
- "id": 7,
- "name": "reactions"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MessageAttributes"
- }
- },
- "id": 8,
- "name": "attribute"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "QuotedMessage"
- }
- },
- "id": 9,
- "name": "quotedMessage"
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "ListLoadMode",
- "values": [
- {
- "name": "Forward",
- "id": 1
- },
- {
- "name": "Backward",
- "id": 2
- },
- {
- "name": "Both",
- "id": 3
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadHistory",
- "header": 118,
- "response": {
- "type": "anonymous",
- "header": 119,
- "doc": [
- "Loaded history",
- {
- "type": "reference",
- "argument": "history",
- "category": "compact",
- "description": " Messages"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Loaded users"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MessageContainer"
- }
- },
- "id": 1,
- "name": "history"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 4,
- "name": "userPeers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 5,
- "name": "groups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 6,
- "name": "groupPeers"
- }
- ]
- },
- "doc": [
- "Loading history of chat",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Peer of conversation"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": "start date of messages for loading or 0 for loading from start"
- },
- {
- "type": "reference",
- "argument": "loadMode",
- "category": "full",
- "description": "Loading mode: Forward loading, backward or both ways"
- },
- {
- "type": "reference",
- "argument": "limit",
- "category": "full",
- "description": "maximum amount of messages (max is 100)"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "ListLoadMode"
- }
- },
- "id": 5,
- "name": "loadMode"
- },
- {
- "type": "int32",
- "id": 4,
- "name": "limit"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 6,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Dialog",
- "doc": [
- "Conversation from history",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Peer of conversation"
- },
- {
- "type": "reference",
- "argument": "unreadCount",
- "category": "full",
- "description": " plain messages unread messages count"
- },
- {
- "type": "reference",
- "argument": "sortDate",
- "category": "full",
- "description": " date of conversation for sorting"
- },
- {
- "type": "reference",
- "argument": "senderUid",
- "category": "full",
- "description": " Sender of top message (may be zero)"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random ID of top message (may be zero)"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of top message (can't be zero)"
- },
- {
- "type": "reference",
- "argument": "message",
- "category": "full",
- "description": " Content of message"
- },
- {
- "type": "reference",
- "argument": "firstUnreadDate",
- "category": "full",
- "description": " Date of first unread message"
- },
- {
- "type": "reference",
- "argument": "attributes",
- "category": "full",
- "description": " Optional top message attributes"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "unreadCount"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "sortDate"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 5,
- "name": "senderUid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 6,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 7,
- "name": "date"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Message"
- },
- "id": 8,
- "name": "message"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "MessageState"
- }
- },
- "id": 9,
- "name": "state"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "date"
- }
- },
- "id": 10,
- "name": "firstUnreadDate"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MessageAttributes"
- }
- },
- "id": 11,
- "name": "attributes"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadDialogs",
- "header": 104,
- "response": {
- "type": "anonymous",
- "header": 105,
- "doc": [
- "Loaded dialogs",
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": " Loaded groups"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Loaded users"
- },
- {
- "type": "reference",
- "argument": "dialogs",
- "category": "compact",
- "description": " Loaded dialogs"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 1,
- "name": "groups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Dialog"
- }
- },
- "id": 3,
- "name": "dialogs"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 4,
- "name": "userPeers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 5,
- "name": "groupPeers"
- }
- ]
- },
- "doc": [
- "Loading conversation history",
- {
- "type": "reference",
- "argument": "minDate",
- "category": "full",
- "description": "start date of conversation loading. Use 0 to load latest messages"
- },
- {
- "type": "reference",
- "argument": "limit",
- "category": "full",
- "description": "limit maximum amount of messages (max is 100)"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 1,
- "name": "minDate"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "limit"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 3,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadArchived",
- "header": 2651,
- "response": {
- "type": "anonymous",
- "header": 2652,
- "doc": [
- "Archived dialogs",
- {
- "type": "reference",
- "argument": "groups",
- "category": "full",
- "description": " Referenced groups"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " Referenced users"
- },
- {
- "type": "reference",
- "argument": "dialogs",
- "category": "full",
- "description": " Archived dialogs"
- },
- {
- "type": "reference",
- "argument": "nextOffset",
- "category": "compact",
- "description": " Offset for next bunch"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 1,
- "name": "groups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Dialog"
- }
- },
- "id": 3,
- "name": "dialogs"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 5,
- "name": "userPeers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 6,
- "name": "groupPeers"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 4,
- "name": "nextOffset"
- }
- ]
- },
- "doc": [
- "Loading archived messages",
- {
- "type": "reference",
- "argument": "nextOffset",
- "category": "compact",
- "description": "Optional next offset"
- },
- {
- "type": "reference",
- "argument": "limit",
- "category": "full",
- "description": "Maximum number of elements"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 1,
- "name": "nextOffset"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "limit"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 3,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadGroupedDialogs",
- "header": 225,
- "response": {
- "type": "anonymous",
- "header": 226,
- "doc": [
- "Loaded grouped dialogs",
- {
- "type": "reference",
- "argument": "dialogs",
- "category": "compact",
- "description": " Loaded groups of dialogs"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Loaded users"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "full",
- "description": " Loaded groups"
- },
- {
- "type": "reference",
- "argument": "showArchived",
- "category": "full",
- "description": " Show archived section"
- },
- {
- "type": "reference",
- "argument": "showInvite",
- "category": "full",
- "description": " Show invite message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "DialogGroup"
- }
- },
- "id": 1,
- "name": "dialogs"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 3,
- "name": "groups"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 4,
- "name": "showArchived"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 5,
- "name": "showInvite"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 6,
- "name": "userPeers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 7,
- "name": "groupPeers"
- }
- ]
- },
- "doc": [
- "Load all dialogs from grouped list"
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 1,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "DialogsOrder",
- "header": 235,
- "doc": [
- "Dialogs order response",
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " update seq"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " update state"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "full",
- "description": " Update groups"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "DialogGroup"
- }
- },
- "id": 3,
- "name": "groups"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "HideDialog",
- "header": 231,
- "response": {
- "type": "reference",
- "name": "DialogsOrder"
- },
- "doc": [
- "Hide Dialog from grouped list",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Dialog peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ShowDialog",
- "header": 232,
- "response": {
- "type": "reference",
- "name": "DialogsOrder"
- },
- "doc": [
- "Show Dialog in grouped list"
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "FavouriteDialog",
- "header": 224,
- "response": {
- "type": "reference",
- "name": "DialogsOrder"
- },
- "doc": [
- "Marking dialog as favourite",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Peer for favouriting"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UnfavouriteDialog",
- "header": 227,
- "response": {
- "type": "reference",
- "name": "DialogsOrder"
- },
- "doc": [
- "Making dialog as unfavourite",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Peer for favouriting"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "NotifyDialogOpened",
- "header": 2785,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Notifying about dialog open",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Peer that was opened"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Groups",
- "package": "groups",
- "items": [
- {
- "type": "comment",
- "content": "Entities"
- },
- {
- "type": "struct",
- "content": {
- "name": "Member",
- "doc": [
- "Member information",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User id"
- },
- {
- "type": "reference",
- "argument": "inviterUid",
- "category": "full",
- "description": " User inviter id"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Adding date"
- },
- {
- "type": "reference",
- "argument": "isAdmin",
- "category": "full",
- "description": " is member admin of group"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "inviterUid"
- },
- {
- "type": "int64",
- "id": 3,
- "name": "date"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 4,
- "name": "isAdmin"
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "GroupType",
- "values": [
- {
- "name": "GROUP",
- "id": 1
- },
- {
- "name": "CHANNEL",
- "id": 2
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "GroupPermissions",
- "values": [
- {
- "name": "SEND_MESSAGE",
- "id": 1
- },
- {
- "name": "CLEAR",
- "id": 2
- },
- {
- "name": "LEAVE",
- "id": 3
- },
- {
- "name": "DELETE",
- "id": 4
- },
- {
- "name": "JOIN",
- "id": 5
- },
- {
- "name": "VIEW_INFO",
- "id": 6
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "GroupFullPermissions",
- "values": [
- {
- "name": "EDIT_INFO",
- "id": 1
- },
- {
- "name": "VIEW_MEMBERS",
- "id": 2
- },
- {
- "name": "INVITE_MEMBERS",
- "id": 3
- },
- {
- "name": "INVITE_VIA_LINK",
- "id": 4
- },
- {
- "name": "CALL",
- "id": 5
- },
- {
- "name": "EDIT_ADMIN_SETTINGS",
- "id": 6
- },
- {
- "name": "VIEW_ADMINS",
- "id": 7
- },
- {
- "name": "EDIT_ADMINS",
- "id": 8
- },
- {
- "name": "KICK_INVITED",
- "id": 9
- },
- {
- "name": "KICK_ANYONE",
- "id": 10
- },
- {
- "name": "EDIT_FOREIGN",
- "id": 11
- },
- {
- "name": "DELETE_FOREIGN",
- "id": 12
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Group",
- "doc": [
- "Group information",
- "",
- "Permissions.",
- "Permissions of this structure is about group messages operation, such as",
- "ability to send messages, clear chat, leave group and so on. This operations",
- "Can be held outside of the Group Info page.",
- "",
- "Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.",
- "If default is TRUE then ONE == FALSE.",
- "Bits:",
- "0 - canSendMessage. Default is FALSE.",
- "1 - canClear. Default is FALSE.",
- "2 - canLeave. Default is FALSE.",
- "3 - canDelete. Default is FALSE.",
- "4 - canJoin. Default is FALSE.",
- "5 - canViewInfo. Default is FALSE.",
- "",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " group id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " Access hash of group"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " Title of group"
- },
- {
- "type": "reference",
- "argument": "avatar",
- "category": "compact",
- "description": " Avatar of group"
- },
- {
- "type": "reference",
- "argument": "membersCount",
- "category": "full",
- "description": " Number of members"
- },
- {
- "type": "reference",
- "argument": "isHidden",
- "category": "full",
- "description": " Is group hidden (not showing it in recent list). Default is false."
- },
- {
- "type": "reference",
- "argument": "isMember",
- "category": "full",
- "description": " Is current user a member of a group. Default is true."
- },
- {
- "type": "reference",
- "argument": "groupType",
- "category": "full",
- "description": " Group Type. Used only for displaying information. Default is GROUP."
- },
- {
- "type": "reference",
- "argument": "permissions",
- "category": "full",
- "description": " Permissions of group object"
- },
- {
- "type": "reference",
- "argument": "isDeleted",
- "category": "full",
- "description": " Is this group deleted"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " Group extension Data"
- },
- {
- "type": "reference",
- "argument": "isAdmin",
- "category": "full",
- "description": " [DEPRECATED] Is current user an admin of a group"
- },
- {
- "type": "reference",
- "argument": "theme",
- "category": "hidden",
- "description": " [DEPRECATED] Theme of group"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "hidden",
- "description": " [DEPRECATED] About of group"
- },
- {
- "type": "reference",
- "argument": "creatorUid",
- "category": "hidden",
- "description": " [DEPRECATED] Group creator"
- },
- {
- "type": "reference",
- "argument": "members",
- "category": "compact",
- "description": " [DEPRECATED] Members of group"
- },
- {
- "type": "reference",
- "argument": "createDate",
- "category": "full",
- "description": " [DEPRECATED] Date of creation"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- },
- {
- "type": "string",
- "id": 3,
- "name": "title"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 4,
- "name": "avatar"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 24,
- "name": "membersCount"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 6,
- "name": "isMember"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 20,
- "name": "isHidden"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "GroupType"
- }
- },
- "id": 25,
- "name": "groupType"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int64"
- },
- "id": 26,
- "name": "permissions"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 27,
- "name": "isDeleted"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 22,
- "name": "ext"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 16,
- "name": "isAdmin",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 8,
- "name": "creatorUid",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Member"
- }
- },
- "id": 9,
- "name": "members",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 10,
- "name": "createDate",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 17,
- "name": "theme",
- "deprecated": "true"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 18,
- "name": "about",
- "deprecated": "true"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "GroupFull",
- "doc": [
- "Goup Full information",
- "Permissions.",
- "Idea of Group Full mermissions is about Group Info pages. This permissions",
- "are usefull only when trying to view and update group settings and not related",
- "to chat messages itself.",
- "Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.",
- "If default is TRUE then ONE == FALSE.",
- "Bits:",
- "0 - canEditInfo. Default is FALSE.",
- "1 - canViewMembers. Default is FALSE.",
- "2 - canInviteMembers. Default is FALSE.",
- "3 - canInviteViaLink. Default is FALSE.",
- "4 - canCall. Default is FALSE.",
- "5 - canEditAdminSettings. Default is FALSE.",
- "6 - canViewAdmins. Default is FALSE.",
- "7 - canEditAdmins. Default is FALSE.",
- "8 - canKickInvited. Default is FALSE.",
- "9 - canKickAnyone. Default is FALSE.",
- "10 - canEditForeign. Default is FALSE.",
- "11 - canDeleteForeign. Default is FALSE.",
- "",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "createDate",
- "category": "full",
- "description": " Date created"
- },
- {
- "type": "reference",
- "argument": "ownerUid",
- "category": "full",
- "description": " Optional group owner"
- },
- {
- "type": "reference",
- "argument": "members",
- "category": "full",
- "description": " Group members. Can be empty when isAsyncMembers enabled."
- },
- {
- "type": "reference",
- "argument": "theme",
- "category": "full",
- "description": " Group Theme"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": " Group about"
- },
- {
- "type": "reference",
- "argument": "isAsyncMembers",
- "category": "full",
- "description": " Is Members need to be loaded asynchronous. Default is false."
- },
- {
- "type": "reference",
- "argument": "isSharedHistory",
- "category": "full",
- "description": " Is history shared among all users. Default is false."
- },
- {
- "type": "reference",
- "argument": "shortName",
- "category": "full",
- "description": " Group's short name"
- },
- {
- "type": "reference",
- "argument": "permissions",
- "category": "full",
- "description": " Group Permissions"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 6,
- "name": "createDate"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 5,
- "name": "ownerUid"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Member"
- }
- },
- "id": 12,
- "name": "members"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "theme"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "about"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 7,
- "name": "ext"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 11,
- "name": "isAsyncMembers"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 10,
- "name": "isSharedHistory"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 14,
- "name": "shortName"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int64"
- },
- "id": 27,
- "name": "permissions"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadFullGroups",
- "header": 2782,
- "response": {
- "type": "anonymous",
- "header": 2783,
- "doc": [
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": " Groups to load"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupFull"
- }
- },
- "id": 1,
- "name": "groups"
- }
- ]
- },
- "doc": [
- "Loading Full Groups",
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": "Groups to load"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 1,
- "name": "groups"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadMembers",
- "header": 2786,
- "response": {
- "type": "anonymous",
- "header": 2787,
- "doc": [
- {
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " Group members"
- },
- {
- "type": "reference",
- "argument": "next",
- "category": "full",
- "description": " Load more reference"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Member"
- }
- },
- "id": 3,
- "name": "members"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 1,
- "name": "users"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 2,
- "name": "next"
- }
- ]
- },
- "doc": [
- "Loading group members",
- {
- "type": "reference",
- "argument": "group",
- "category": "full",
- "description": "Group peer"
- },
- {
- "type": "reference",
- "argument": "limit",
- "category": "full",
- "description": "Limit members"
- },
- {
- "type": "reference",
- "argument": "next",
- "category": "full",
- "description": "Load more reference"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "group"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "limit"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 3,
- "name": "next"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Update"
- },
- {
- "type": "update",
- "content": {
- "name": "GroupTitleChanged",
- "header": 2609,
- "doc": [
- "Update about title changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " Group Title"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "title"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupAvatarChanged",
- "header": 2610,
- "doc": [
- "Update about avatar changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "avatar",
- "category": "full",
- "description": " Group Avatar"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 2,
- "name": "avatar"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupTopicChanged",
- "header": 2616,
- "doc": [
- "Update about topic changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "topic",
- "category": "full",
- "description": " Updated topic"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "topic"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupAboutChanged",
- "header": 2617,
- "doc": [
- "Update about about changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": " Updated about"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "about"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupExtChanged",
- "header": 2613,
- "doc": [
- "Update about ext changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " Updated ext"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 2,
- "name": "ext"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupFullExtChanged",
- "header": 2618,
- "doc": [
- "Update about full ext changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "ext",
- "category": "full",
- "description": " Updated ext"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "MapValue"
- }
- },
- "id": 2,
- "name": "ext"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupShortNameChanged",
- "header": 2628,
- "doc": [
- "Group's short name changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "shortName",
- "category": "full",
- "description": " Group short name"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "shortName"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupOwnerChanged",
- "header": 2619,
- "doc": [
- "Update about owner changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "userId",
- "category": "full",
- "description": " New Owner"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "userId"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupHistoryShared",
- "header": 2620,
- "doc": [
- "Update about history shared",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupDeleted",
- "header": 2658,
- "doc": [
- "Update about group deleted",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupPermissionsChanged",
- "header": 2663,
- "doc": [
- "Update about group permissions changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "permissions",
- "category": "full",
- "description": " New Permissions"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "permissions"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupFullPermissionsChanged",
- "header": 2664,
- "doc": [
- "Update about Full Group permissions changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "permissions",
- "category": "full",
- "description": " New Permissions"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "permissions"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": " "
- },
- {
- "type": "update",
- "content": {
- "name": "GroupMemberChanged",
- "header": 2612,
- "doc": [
- "Update about membership changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "isMember",
- "category": "full",
- "description": " Is current user a member"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "isMember"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupMembersBecameAsync",
- "header": 2615,
- "doc": [
- "Update about members became async",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupMembersUpdated",
- "header": 2614,
- "doc": [
- "Update about members updated",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "members",
- "category": "full",
- "description": " Group Members"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Member"
- }
- },
- "id": 2,
- "name": "members"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupMemberDiff",
- "header": 2623,
- "doc": [
- "Update about members changed",
- {
- "type": "reference",
- "argument": "removedUsers",
- "category": "full",
- "description": " Removed Users"
- },
- {
- "type": "reference",
- "argument": "addedMembers",
- "category": "full",
- "description": " Added members"
- },
- {
- "type": "reference",
- "argument": "membersCount",
- "category": "full",
- "description": " Current Members count"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 2,
- "name": "removedUsers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Member"
- }
- },
- "id": 3,
- "name": "addedMembers"
- },
- {
- "type": "int32",
- "id": 4,
- "name": "membersCount"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupMembersCountChanged",
- "header": 2622,
- "doc": [
- "Update about members count changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "membersCount",
- "category": "full",
- "description": " Members count"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "membersCount"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupMemberAdminChanged",
- "header": 2627,
- "doc": [
- "Update about member admin changed",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "userId",
- "category": "full",
- "description": " User Id"
- },
- {
- "type": "reference",
- "argument": "isAdmin",
- "category": "full",
- "description": " Is Admin flag"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "userId"
- },
- {
- "type": "bool",
- "id": 3,
- "name": "isAdmin"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Actions"
- },
- {
- "type": "rpc",
- "content": {
- "name": "CreateGroup",
- "header": 230,
- "response": {
- "type": "anonymous",
- "header": 216,
- "doc": [
- "Created group",
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Update Seq"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": " Update state"
- },
- {
- "type": "reference",
- "argument": "group",
- "category": "full",
- "description": " Created group"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " Referenced users"
- },
- {
- "type": "reference",
- "argument": "userPeers",
- "category": "full",
- "description": " Referenced users"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Group creation date"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 6,
- "name": "date"
- },
- {
- "type": {
- "type": "struct",
- "childType": "Group"
- },
- "id": 3,
- "name": "group"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 4,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 5,
- "name": "userPeers"
- }
- ]
- },
- "doc": [
- "Creating group chat",
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id for avoiding double create"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": "Group Title"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "hidden",
- "description": "Members of group"
- },
- {
- "type": "reference",
- "argument": "groupType",
- "category": "full",
- "description": "Group Type"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "rid"
- },
- {
- "type": "string",
- "id": 2,
- "name": "title"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 3,
- "name": "users"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "GroupType"
- }
- },
- "id": 6,
- "name": "groupType"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 7,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditGroupTitle",
- "header": 85,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Changing group title",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": "new group title"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id of operation"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- },
- {
- "type": "string",
- "id": 3,
- "name": "title"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 5,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditGroupAvatar",
- "header": 86,
- "response": {
- "type": "anonymous",
- "header": 115,
- "doc": [
- "Updated group avatar",
- {
- "type": "reference",
- "argument": "avatar",
- "category": "compact",
- "description": " Changed avatar"
- },
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": " Sequence state"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Avatar change date"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Avatar"
- },
- "id": 1,
- "name": "avatar"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 3,
- "name": "state"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "date"
- }
- ]
- },
- "doc": [
- "Changing group avatar",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "fileLocation",
- "category": "compact",
- "description": "uploaded file for avatar"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id of operation"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- },
- {
- "type": {
- "type": "struct",
- "childType": "FileLocation"
- },
- "id": 3,
- "name": "fileLocation"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 5,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RemoveGroupAvatar",
- "header": 101,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Removing group avatar",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id of operation"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 5,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditGroupShortName",
- "header": 2793,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Edit Group Short Name",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "shortName",
- "category": "full",
- "description": "New group's short name"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "shortName"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditGroupTopic",
- "header": 211,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Edit group topic",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random id of operation"
- },
- {
- "type": "reference",
- "argument": "topic",
- "category": "full",
- "description": "New Topic"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "topic"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 4,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditGroupAbout",
- "header": 213,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Edit Group About",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random id of operation"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": "New About"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "about"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 5,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "InviteUser",
- "header": 69,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Inviting user to group",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "user",
- "category": "full",
- "description": "Users for invitation"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id of operation"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- },
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 3,
- "name": "user"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 5,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LeaveGroup",
- "header": 70,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Leaving group",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id of operation"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 3,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LeaveAndDelete",
- "header": 2721,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Leave group and Delete Chat",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "KickUser",
- "header": 71,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Kicking user from group",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "user",
- "category": "full",
- "description": "users for removing"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id of operation"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- },
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 3,
- "name": "user"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 5,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "JoinGroupByPeer",
- "header": 2722,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Join group by peer",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Administration"
- },
- {
- "type": "rpc",
- "content": {
- "name": "MakeUserAdmin",
- "header": 2784,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Make user admin",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "userPeer",
- "category": "full",
- "description": "User's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 2,
- "name": "userPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DismissUserAdmin",
- "header": 2791,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Dismissing user admin",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "userPeer",
- "category": "full",
- "description": "User's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 2,
- "name": "userPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "TransferOwnership",
- "header": 2789,
- "response": {
- "type": "reference",
- "name": "SeqDate"
- },
- "doc": [
- "Transfer ownership of group",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "newOwner",
- "category": "full",
- "description": "New group's owner"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 2,
- "name": "newOwner"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "AdminSettings",
- "doc": [
- "Admin Settings",
- {
- "type": "reference",
- "argument": "showAdminsToMembers",
- "category": "full",
- "description": " Show admins in member list"
- },
- {
- "type": "reference",
- "argument": "canMembersInvite",
- "category": "full",
- "description": " Can members of a group invite people"
- },
- {
- "type": "reference",
- "argument": "canMembersEditGroupInfo",
- "category": "full",
- "description": " Can members edit group info"
- },
- {
- "type": "reference",
- "argument": "canAdminsEditGroupInfo",
- "category": "full",
- "description": " Can admins edit group info"
- },
- {
- "type": "reference",
- "argument": "showJoinLeaveMessages",
- "category": "full",
- "description": " Should join and leave messages be visible to members"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": "bool",
- "id": 1,
- "name": "showAdminsToMembers"
- },
- {
- "type": "bool",
- "id": 2,
- "name": "canMembersInvite"
- },
- {
- "type": "bool",
- "id": 3,
- "name": "canMembersEditGroupInfo"
- },
- {
- "type": "bool",
- "id": 4,
- "name": "canAdminsEditGroupInfo"
- },
- {
- "type": "bool",
- "id": 5,
- "name": "showJoinLeaveMessages"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadAdminSettings",
- "header": 2790,
- "response": {
- "type": "anonymous",
- "header": 2794,
- "doc": [
- "Loaded settings",
- {
- "type": "reference",
- "argument": "settings",
- "category": "full",
- "description": " Current group admin settings"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "AdminSettings"
- },
- "id": 1,
- "name": "settings"
- }
- ]
- },
- "doc": [
- "Loading administration settings",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SaveAdminSettings",
- "header": 2792,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Save administartion settings",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's Peer"
- },
- {
- "type": "reference",
- "argument": "settings",
- "category": "full",
- "description": "Group's settings"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "struct",
- "childType": "AdminSettings"
- },
- "id": 2,
- "name": "settings"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DeleteGroup",
- "header": 2795,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Delete Group",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ShareHistory",
- "header": 2796,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Share History",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Invite"
- },
- {
- "type": "response",
- "content": {
- "name": "InviteUrl",
- "header": 178,
- "doc": [
- "Response for invite url methods"
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "url"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetGroupInviteUrl",
- "header": 177,
- "response": {
- "type": "reference",
- "name": "InviteUrl"
- },
- "doc": [
- "Building invite url",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Destination group peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RevokeInviteUrl",
- "header": 179,
- "response": {
- "type": "reference",
- "name": "InviteUrl"
- },
- "doc": [
- "Revoking invite urls",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Destination group peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "JoinGroup",
- "header": 180,
- "response": {
- "type": "anonymous",
- "header": 181,
- "doc": [
- {
- "type": "reference",
- "argument": "group",
- "category": "hidden",
- "description": " Joined group"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "hidden",
- "description": " Users from members"
- },
- {
- "type": "reference",
- "argument": "userPeers",
- "category": "hidden",
- "description": " User Peers"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random id"
- },
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "hidden",
- "description": " State"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of join"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Group"
- },
- "id": 1,
- "name": "group"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 5,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 7,
- "name": "userPeers"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 6,
- "name": "rid"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 3,
- "name": "state"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "date"
- }
- ]
- },
- "doc": [
- "Join group method",
- {
- "type": "reference",
- "argument": "token",
- "category": "full",
- "description": "Url or Token for joining to group"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "hidden",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "token"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 2,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Obsolete Actions"
- },
- {
- "type": "rpc",
- "content": {
- "name": "CreateGroupObsolete",
- "header": 65,
- "response": {
- "type": "anonymous",
- "header": 66,
- "doc": [
- "Created group",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": " Peer of created group"
- },
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": " Sequence state"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Members of created group"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Group creation date"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 4,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": "int32"
- },
- "id": 5,
- "name": "users"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 6,
- "name": "date"
- }
- ]
- },
- "doc": [
- "[OBSOLETE] Creating group chat",
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": "Random Id for avoiding double create"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": "Title of new group"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": "Members of new group"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "rid"
- },
- {
- "type": "string",
- "id": 2,
- "name": "title"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 3,
- "name": "users"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EnterGroupObsolete",
- "header": 199,
- "response": {
- "type": "anonymous",
- "header": 200,
- "doc": [
- "Joined group",
- {
- "type": "reference",
- "argument": "group",
- "category": "full",
- "description": " Joined group"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " Referenced users"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Rid of join message"
- },
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Seq of Update"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " State of Update"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of update"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Group"
- },
- "id": 1,
- "name": "group"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "users"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 3,
- "name": "rid"
- },
- {
- "type": "int32",
- "id": 4,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 5,
- "name": "state"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 6,
- "name": "date"
- }
- ]
- },
- "doc": [
- "[OBSOLETE] Join random group by peer id",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Public group peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "MakeUserAdminObsolete",
- "header": 214,
- "response": {
- "type": "anonymous",
- "header": 215,
- "doc": [
- {
- "type": "reference",
- "argument": "members",
- "category": "full",
- "description": " new members"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Member"
- }
- },
- "id": 1,
- "name": "members"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 3,
- "name": "state"
- }
- ]
- },
- "doc": [
- "[OBSOLETE] Make user admin",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Group's peer"
- },
- {
- "type": "reference",
- "argument": "userPeer",
- "category": "full",
- "description": "User's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- },
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 2,
- "name": "userPeer"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Obsolete Updates"
- },
- {
- "type": "update",
- "content": {
- "name": "GroupInviteObsolete",
- "header": 36,
- "doc": [
- "Update about inviting current user to group",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "inviteUid",
- "category": "full",
- "description": " Inviter UID. If equals to current uid than group created by user."
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of creating"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random Id of operation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 9,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 5,
- "name": "inviteUid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 8,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupUserInvitedObsolete",
- "header": 21,
- "doc": [
- "Update about inviting user to group",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " Added user ID"
- },
- {
- "type": "reference",
- "argument": "inviterUid",
- "category": "full",
- "description": " Inviter user ID"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of adding user to group"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random Id of operation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 5,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 3,
- "name": "inviterUid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupUserLeaveObsolete",
- "header": 23,
- "doc": [
- "Update about leaving user",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's ID"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of user leave"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random Id of operation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupUserKickObsolete",
- "header": 24,
- "doc": [
- "Update about kicking user",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " Kicked user's ID"
- },
- {
- "type": "reference",
- "argument": "kickerUid",
- "category": "full",
- "description": " Kicker user's ID"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of user kick"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random Id of operation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 5,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 3,
- "name": "kickerUid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupMembersUpdateObsolete",
- "header": 44,
- "doc": [
- "Silent group members update",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "members",
- "category": "full",
- "description": " New members list"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Member"
- }
- },
- "id": 2,
- "name": "members"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupTitleChangedObsolete",
- "header": 38,
- "doc": [
- "Update about group title change",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " Changer UID"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " New Title of group"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of title change"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random Id of operation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 5,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "uid"
- },
- {
- "type": "string",
- "id": 3,
- "name": "title"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupTopicChangedObsolete",
- "header": 213,
- "doc": [
- "Update about group topic change",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " Changer UID"
- },
- {
- "type": "reference",
- "argument": "topic",
- "category": "full",
- "description": " New topic of group"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of theme change"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Randomd Id of operation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 3,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "topic"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 5,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupAboutChangedObsolete",
- "header": 214,
- "doc": [
- "Update about group about change",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "about",
- "category": "full",
- "description": " Group about"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "about"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupAvatarChangedObsolete",
- "header": 39,
- "doc": [
- "Update about group avatar change",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group Id"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " Avatar changer uid"
- },
- {
- "type": "reference",
- "argument": "avatar",
- "category": "compact",
- "description": " New Avatar. If null then avatar is removed"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of avatar change"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Random Id of operation"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 5,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 3,
- "name": "avatar"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 4,
- "name": "date"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Stickers",
- "package": "stickers",
- "doc": [
- "Stickers support in Actor"
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "StickerDescriptor",
- "doc": [
- "Descriptor of a Sticker",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Sticker unique id"
- },
- {
- "type": "reference",
- "argument": "emoji",
- "category": "full",
- "description": " Emoji code for sticker"
- },
- {
- "type": "reference",
- "argument": "image128",
- "category": "full",
- "description": " Image of sticker 128x128 in WebP format"
- },
- {
- "type": "reference",
- "argument": "image512",
- "category": "full",
- "description": " Image of sticker 512x512 in WebP format"
- },
- {
- "type": "reference",
- "argument": "image256",
- "category": "full",
- "description": " Image of sticker 256x256 in WebP format"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "emoji"
- },
- {
- "type": {
- "type": "struct",
- "childType": "ImageLocation"
- },
- "id": 3,
- "name": "image128"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "ImageLocation"
- }
- },
- "id": 4,
- "name": "image512"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "ImageLocation"
- }
- },
- "id": 5,
- "name": "image256"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "StickerCollection",
- "doc": [
- "Sticker collection",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Unique id of a collection"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "full",
- "description": " Access Hash of a collection"
- },
- {
- "type": "reference",
- "argument": "stickers",
- "category": "compact",
- "description": " Sticker list"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "StickerDescriptor"
- }
- },
- "id": 3,
- "name": "stickers"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "StickersReponse",
- "header": 240,
- "doc": [
- "Stickers response",
- {
- "type": "reference",
- "argument": "collections",
- "category": "full",
- "description": " Sticker collections"
- },
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Seq of update"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " State of update"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "StickerCollection"
- }
- },
- "id": 1,
- "name": "collections"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 3,
- "name": "state"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadOwnStickers",
- "header": 238,
- "response": {
- "type": "anonymous",
- "header": 239,
- "doc": [
- "Own Stickers collections",
- {
- "type": "reference",
- "argument": "ownStickers",
- "category": "hidden",
- "description": " Own sticker collections"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "StickerCollection"
- }
- },
- "id": 1,
- "name": "ownStickers"
- }
- ]
- },
- "doc": [
- "Loading own stickers"
- ],
- "attributes": []
- }
- },
- {
- "type": "update",
- "content": {
- "name": "OwnStickersChanged",
- "header": 161,
- "doc": [
- "Own Stickers changed",
- {
- "type": "reference",
- "argument": "collections",
- "category": "compact",
- "description": " New own sticker collections"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "StickerCollection"
- }
- },
- "id": 1,
- "name": "collections"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "StickerCollectionsChanged",
- "header": 164,
- "doc": [
- "Sticker collection changed",
- {
- "type": "reference",
- "argument": "collections",
- "category": "full",
- "description": " Updated sticker collections"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "StickerCollection"
- }
- },
- "id": 1,
- "name": "collections"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "AddStickerCollection",
- "header": 244,
- "response": {
- "type": "reference",
- "name": "StickersReponse"
- },
- "doc": [
- "Adding sticker collection",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Collection id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "full",
- "description": "Collection access hash"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RemoveStickerCollection",
- "header": 245,
- "response": {
- "type": "reference",
- "name": "StickersReponse"
- },
- "doc": [
- "Removing sticker collection",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Collection id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "full",
- "description": "Collection access hash"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadStickerCollection",
- "header": 246,
- "response": {
- "type": "anonymous",
- "header": 247,
- "doc": [
- "Loaded collection",
- {
- "type": "reference",
- "argument": "collection",
- "category": "full",
- "description": " Collection of stickers"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "StickerCollection"
- },
- "id": 1,
- "name": "collection"
- }
- ]
- },
- "doc": [
- "Loading stickers",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Collection id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "full",
- "description": "Collection access hash"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Search",
- "package": "search",
- "doc": [
- "Searching API"
- ],
- "items": [
- {
- "type": "enum",
- "content": {
- "name": "SearchPeerType",
- "values": [
- {
- "name": "Groups",
- "id": 1
- },
- {
- "name": "Contacts",
- "id": 2
- },
- {
- "name": "Public",
- "id": 3
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "SearchContentType",
- "values": [
- {
- "name": "Any",
- "id": 1
- },
- {
- "name": "Text",
- "id": 2
- },
- {
- "name": "Links",
- "id": 3
- },
- {
- "name": "Documents",
- "id": 4
- },
- {
- "name": "Photos",
- "id": 5
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "SearchCondition",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "SearchPeerTypeCondition",
- "doc": [
- "Search peer type condition",
- {
- "type": "reference",
- "argument": "peerType",
- "category": "full",
- "description": " Peer type for searching"
- }
- ],
- "trait": {
- "name": "SearchCondition",
- "key": 1
- },
- "attributes": [
- {
- "type": {
- "type": "enum",
- "childType": "SearchPeerType"
- },
- "id": 1,
- "name": "peerType"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "SearchPieceText",
- "doc": [
- "Search peer name condition",
- {
- "type": "reference",
- "argument": "query",
- "category": "full",
- "description": " Search query"
- }
- ],
- "trait": {
- "name": "SearchCondition",
- "key": 2
- },
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "query"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "SearchAndCondition",
- "doc": [
- "Search AND condion",
- {
- "type": "reference",
- "argument": "andQuery",
- "category": "full",
- "description": " And Query"
- }
- ],
- "trait": {
- "name": "SearchCondition",
- "key": 3
- },
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "trait",
- "childType": "SearchCondition"
- }
- },
- "id": 1,
- "name": "andQuery"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "SearchOrCondition",
- "doc": [
- "Search OR condition",
- {
- "type": "reference",
- "argument": "orQuery",
- "category": "full",
- "description": " Or Query"
- }
- ],
- "trait": {
- "name": "SearchCondition",
- "key": 4
- },
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "trait",
- "childType": "SearchCondition"
- }
- },
- "id": 2,
- "name": "orQuery"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "SearchPeerCondition",
- "doc": [
- "Serch Peer condition",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Peer condition"
- }
- ],
- "trait": {
- "name": "SearchCondition",
- "key": 5
- },
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "SearchPeerContentType",
- "doc": [
- "Search content type condition",
- {
- "type": "reference",
- "argument": "contentType",
- "category": "full",
- "description": " Content Type"
- }
- ],
- "trait": {
- "name": "SearchCondition",
- "key": 6
- },
- "attributes": [
- {
- "type": {
- "type": "enum",
- "childType": "SearchContentType"
- },
- "id": 1,
- "name": "contentType"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "SearchSenderIdConfition",
- "doc": [
- "Searching sender uid condition",
- {
- "type": "reference",
- "argument": "senderId",
- "category": "full",
- "description": " sender UID"
- }
- ],
- "trait": {
- "name": "SearchCondition",
- "key": 7
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "senderId"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "PeerSearchResult",
- "doc": [
- "Peer search result",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Peer information"
- },
- {
- "type": "reference",
- "argument": "optMatchString",
- "category": "full",
- "description": " Description"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "optMatchString"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "PeerSearch",
- "header": 233,
- "response": {
- "type": "anonymous",
- "header": 234,
- "doc": [
- "Found peers",
- {
- "type": "reference",
- "argument": "searchResults",
- "category": "full",
- "description": " Search Results"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " Related users"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "full",
- "description": " Related groups"
- },
- {
- "type": "reference",
- "argument": "userPeers",
- "category": "full",
- "description": " Related user peers"
- },
- {
- "type": "reference",
- "argument": "groupPeers",
- "category": "full",
- "description": " Related group peers"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "PeerSearchResult"
- }
- },
- "id": 1,
- "name": "searchResults"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 3,
- "name": "groups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 4,
- "name": "userPeers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 5,
- "name": "groupPeers"
- }
- ]
- },
- "doc": [
- "Performing peer search",
- {
- "type": "reference",
- "argument": "query",
- "category": "full",
- "description": "Search query. Warring not all combinations can be processed by server. (acts as OR)"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "trait",
- "childType": "SearchCondition"
- }
- },
- "id": 1,
- "name": "query"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 2,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MessageSearchResult",
- "doc": [
- "Message container",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Message Peer"
- },
- {
- "type": "reference",
- "argument": "rid",
- "category": "full",
- "description": " Message Random Id"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Message Date"
- },
- {
- "type": "reference",
- "argument": "senderId",
- "category": "full",
- "description": " Message sender UID"
- },
- {
- "type": "reference",
- "argument": "content",
- "category": "full",
- "description": " Message content"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "rid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 4,
- "name": "senderId"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Message"
- },
- "id": 5,
- "name": "content"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MessageSearchItem",
- "doc": [
- "Message Search result container"
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "MessageSearchResult"
- },
- "id": 1,
- "name": "result"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "MessageSearchResponse",
- "header": 218,
- "doc": [
- "Search Result",
- {
- "type": "reference",
- "argument": "searchResults",
- "category": "full",
- "description": " Search results"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " Search users"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "full",
- "description": " Search groups"
- },
- {
- "type": "reference",
- "argument": "loadMoreState",
- "category": "hidden",
- "description": " State for loading more results"
- },
- {
- "type": "reference",
- "argument": "userOutPeers",
- "category": "full",
- "description": " Search user peers"
- },
- {
- "type": "reference",
- "argument": "groupOutPeers",
- "category": "full",
- "description": " Search group peers"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MessageSearchItem"
- }
- },
- "id": 1,
- "name": "searchResults"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 3,
- "name": "groups"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 4,
- "name": "loadMoreState"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 5,
- "name": "userOutPeers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 6,
- "name": "groupOutPeers"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "MessageSearch",
- "header": 217,
- "response": {
- "type": "reference",
- "name": "MessageSearchResponse"
- },
- "doc": [
- "Performing message search",
- {
- "type": "reference",
- "argument": "query",
- "category": "full",
- "description": "Search query"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "trait",
- "childType": "SearchCondition"
- },
- "id": 1,
- "name": "query"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 2,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "MessageSearchMore",
- "header": 222,
- "response": {
- "type": "reference",
- "name": "MessageSearchResponse"
- },
- "doc": [
- "Performing message search paging",
- {
- "type": "reference",
- "argument": "loadMoreState",
- "category": "hidden",
- "description": "State for loading more results"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled Optimizations"
- }
- ],
- "attributes": [
- {
- "type": "bytes",
- "id": 1,
- "name": "loadMoreState"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 2,
- "name": "optimizations"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Public Groups",
- "package": "pubgroups",
- "doc": [
- "Public group is easy way to find communities"
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "PublicGroup",
- "doc": [
- "Public Group description",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Group id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " Group Access hash"
- },
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": " Group title"
- },
- {
- "type": "reference",
- "argument": "avatar",
- "category": "full",
- "description": " Group avatar"
- },
- {
- "type": "reference",
- "argument": "membersCount",
- "category": "full",
- "description": " Members count in group"
- },
- {
- "type": "reference",
- "argument": "friendsCount",
- "category": "full",
- "description": " Friends count int group"
- },
- {
- "type": "reference",
- "argument": "description",
- "category": "full",
- "description": " Description of group"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- },
- {
- "type": "string",
- "id": 3,
- "name": "title"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "Avatar"
- }
- },
- "id": 7,
- "name": "avatar"
- },
- {
- "type": "int32",
- "id": 4,
- "name": "membersCount"
- },
- {
- "type": "int32",
- "id": 5,
- "name": "friendsCount"
- },
- {
- "type": "string",
- "id": 6,
- "name": "description"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetPublicGroups",
- "header": 201,
- "response": {
- "type": "anonymous",
- "header": 202,
- "doc": [
- "Loaded public groups",
- {
- "type": "reference",
- "argument": "groups",
- "category": "full",
- "description": " All available groups"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "PublicGroup"
- }
- },
- "id": 1,
- "name": "groups"
- }
- ]
- },
- "doc": [
- "Getting public groups"
- ],
- "attributes": []
- }
- }
- ]
- },
- {
- "title": "Invites",
- "package": "invites",
- "doc": [
- "Invite mechanizm"
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "InviteState",
- "doc": [
- "Invite state",
- {
- "type": "reference",
- "argument": "email",
- "category": "full",
- "description": " Email of invite"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": " Name of invited user"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " Uid of registered user"
- },
- {
- "type": "reference",
- "argument": "tid",
- "category": "full",
- "description": " Team id of invite"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "email"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "name"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 3,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 4,
- "name": "tid"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "InviteList",
- "header": 2564,
- "doc": [
- "Intites list",
- {
- "type": "reference",
- "argument": "invites",
- "category": "full",
- "description": " Intvites"
- },
- {
- "type": "reference",
- "argument": "relatedUsers",
- "category": "full",
- "description": " Related users in invites"
- },
- {
- "type": "reference",
- "argument": "relatedGroups",
- "category": "full",
- "description": " Related groups in invites"
- },
- {
- "type": "reference",
- "argument": "relatedTeams",
- "category": "full",
- "description": " Related teams in invites"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "InviteState"
- }
- },
- "id": 1,
- "name": "invites"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 2,
- "name": "relatedUsers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 3,
- "name": "relatedGroups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Team"
- }
- },
- "id": 4,
- "name": "relatedTeams"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadOwnSentInvites",
- "header": 2563,
- "response": {
- "type": "reference",
- "name": "InviteList"
- },
- "doc": [
- "Loading current invite states"
- ],
- "attributes": []
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SendInvite",
- "header": 2565,
- "response": {
- "type": "reference",
- "name": "InviteList"
- },
- "doc": [
- "Sending an email invite",
- {
- "type": "reference",
- "argument": "email",
- "category": "full",
- "description": "Email for invite"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": "Optional name for invite"
- },
- {
- "type": "reference",
- "argument": "destTeam",
- "category": "full",
- "description": "Optional team for invite"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "email"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "name"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "OutTeam"
- }
- },
- "id": 3,
- "name": "destTeam"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Teams",
- "package": "teams",
- "doc": [
- "Teams support for Actor"
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "Team",
- "doc": [
- "Team entity",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Team Id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " Team Access Hash"
- },
- {
- "type": "reference",
- "argument": "name",
- "category": "full",
- "description": " Team name"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- },
- {
- "type": "string",
- "id": 3,
- "name": "name"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "OutTeam",
- "doc": [
- "Reference to a team",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Team Id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "full",
- "description": " Team access hash"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "TeamsList",
- "header": 2562,
- "doc": [
- "Teams response",
- {
- "type": "reference",
- "argument": "teams",
- "category": "hidden",
- "description": " Teams list"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Team"
- }
- },
- "id": 1,
- "name": "teams"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadOwnTeams",
- "header": 2561,
- "response": {
- "type": "reference",
- "name": "TeamsList"
- },
- "doc": [
- "Loading own teams"
- ],
- "attributes": []
- }
- },
- {
- "type": "update",
- "content": {
- "name": "OwnTeamsChanged",
- "header": 165,
- "doc": [
- "Update about own teams changed",
- {
- "type": "reference",
- "argument": "ownTeams",
- "category": "full",
- "description": " Updated own teams list"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Team"
- }
- },
- "id": 1,
- "name": "ownTeams"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "CreateTeam",
- "header": 2566,
- "response": {
- "type": "anonymous",
- "header": 2567,
- "doc": [
- "Created team response",
- {
- "type": "reference",
- "argument": "createdTeam",
- "category": "full",
- "description": " Created Team"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Team"
- },
- "id": 1,
- "name": "createdTeam"
- }
- ]
- },
- "doc": [
- "Creation of a Team",
- {
- "type": "reference",
- "argument": "title",
- "category": "full",
- "description": "Title of a team"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "title"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "InviteToTeam",
- "header": 2568,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Inviting people to team",
- {
- "type": "reference",
- "argument": "user",
- "category": "full",
- "description": "Dest user"
- },
- {
- "type": "reference",
- "argument": "destTeam",
- "category": "full",
- "description": "Dest team"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "user"
- },
- {
- "type": {
- "type": "struct",
- "childType": "OutTeam"
- },
- "id": 3,
- "name": "destTeam"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Integrations",
- "package": "integrations",
- "doc": [
- "Package contains methods for providing integration"
- ],
- "items": [
- {
- "type": "response",
- "content": {
- "name": "IntegrationToken",
- "header": 183,
- "doc": [
- "Group token response",
- {
- "type": "reference",
- "argument": "token",
- "category": "danger",
- "description": " current group token"
- },
- {
- "type": "reference",
- "argument": "url",
- "category": "danger",
- "description": " current group url"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "token"
- },
- {
- "type": "string",
- "id": 2,
- "name": "url"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetIntegrationToken",
- "header": 182,
- "response": {
- "type": "reference",
- "name": "IntegrationToken"
- },
- "doc": [
- "Getting current group token",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RevokeIntegrationToken",
- "header": 184,
- "response": {
- "type": "reference",
- "name": "IntegrationToken"
- },
- "doc": [
- "Revoke group token",
- {
- "type": "reference",
- "argument": "groupPeer",
- "category": "full",
- "description": "Peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "groupPeer"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Typing and Online",
- "package": "weak",
- "items": [
- {
- "type": "enum",
- "content": {
- "name": "TypingType",
- "values": [
- {
- "name": "Text",
- "id": 0
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "Typing",
- "header": 27,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Sending typing notification",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "typingType",
- "category": "full",
- "description": "typing type."
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "enum",
- "childType": "TypingType"
- },
- "id": 3,
- "name": "typingType"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "StopTyping",
- "header": 30,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Stop typing",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "typingType",
- "category": "full",
- "description": "typing type"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "enum",
- "childType": "TypingType"
- },
- "id": 2,
- "name": "typingType"
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "DeviceType",
- "values": [
- {
- "name": "GENERIC",
- "id": 1
- },
- {
- "name": "PC",
- "id": 2
- },
- {
- "name": "MOBILE",
- "id": 3
- },
- {
- "name": "TABLET",
- "id": 4
- },
- {
- "name": "WATCH",
- "id": 5
- },
- {
- "name": "MIRROR",
- "id": 6
- },
- {
- "name": "CAR",
- "id": 7
- },
- {
- "name": "TABLE",
- "id": 8
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SetOnline",
- "header": 29,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Sending online state",
- {
- "type": "reference",
- "argument": "isOnline",
- "category": "full",
- "description": "is user online"
- },
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": "timeout of online state in milliseconds"
- },
- {
- "type": "reference",
- "argument": "deviceType",
- "category": "full",
- "description": "Optional device type"
- },
- {
- "type": "reference",
- "argument": "deviceCategory",
- "category": "full",
- "description": "Optional device category, for example android or ios"
- }
- ],
- "attributes": [
- {
- "type": "bool",
- "id": 1,
- "name": "isOnline"
- },
- {
- "type": {
- "type": "alias",
- "childType": "msec"
- },
- "id": 2,
- "name": "timeout"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "DeviceType"
- }
- },
- "id": 3,
- "name": "deviceType"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "deviceCategory"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "PauseNotifications",
- "header": 166,
- "doc": [
- "Update about pausing notifications",
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": " Timeout for notifications resume"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "sec"
- },
- "id": 1,
- "name": "timeout"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "RestoreNotifications",
- "header": 167,
- "doc": [
- "Update about restoring notifications"
- ],
- "attributes": []
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "PauseNotifications",
- "header": 2641,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Pause notifications",
- {
- "type": "reference",
- "argument": "timeout",
- "category": "hidden",
- "description": "Timeout of pause"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "sec"
- },
- "id": 1,
- "name": "timeout"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RestoreNotifications",
- "header": 2642,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Restoring notifications"
- ],
- "attributes": []
- }
- },
- {
- "type": "empty"
- },
- {
- "type": "update",
- "content": {
- "name": "Typing",
- "header": 6,
- "doc": [
- "Update about user's typing",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Conversation peer"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "typingType",
- "category": "full",
- "description": " Type of typing"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "uid"
- },
- {
- "type": {
- "type": "enum",
- "childType": "TypingType"
- },
- "id": 3,
- "name": "typingType"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "TypingStop",
- "header": 81,
- "doc": [
- "Update about user's typing stop",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Conversation peer"
- },
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "typingType",
- "category": "hidden",
- "description": " Type of typing"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 2,
- "name": "uid"
- },
- {
- "type": {
- "type": "enum",
- "childType": "TypingType"
- },
- "id": 3,
- "name": "typingType"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserOnline",
- "header": 7,
- "doc": [
- "Update about user became online",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "DeviceType"
- }
- },
- "id": 2,
- "name": "deviceType"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "deviceCategory"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserOffline",
- "header": 8,
- "doc": [
- "Update about user became offline",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "DeviceType"
- }
- },
- "id": 2,
- "name": "deviceType"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "deviceCategory"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "UserLastSeen",
- "header": 9,
- "doc": [
- "Update about user's last seen state",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Last seen time"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 2,
- "name": "date"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "enum",
- "childType": "DeviceType"
- }
- },
- "id": 3,
- "name": "deviceType"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "deviceCategory"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "GroupOnline",
- "header": 33,
- "doc": [
- "Update about group online change",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group id"
- },
- {
- "type": "reference",
- "argument": "count",
- "category": "full",
- "description": " current online user's count"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "count"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Media and Files",
- "package": "files",
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "FileLocation",
- "doc": [
- "Location of file on server",
- {
- "type": "reference",
- "argument": "fileId",
- "category": "full",
- "description": " Unique Id of file"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " Access hash of file"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "fileId"
- },
- {
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ImageLocation",
- "doc": [
- "Image location",
- {
- "type": "reference",
- "argument": "fileLocation",
- "category": "full",
- "description": " Location of file"
- },
- {
- "type": "reference",
- "argument": "width",
- "category": "full",
- "description": " Width of avatar image"
- },
- {
- "type": "reference",
- "argument": "height",
- "category": "full",
- "description": " Height of avatar image"
- },
- {
- "type": "reference",
- "argument": "fileSize",
- "category": "full",
- "description": " Size of file"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "FileLocation"
- },
- "id": 1,
- "name": "fileLocation"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "width"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "height"
- },
- {
- "type": "int32",
- "id": 4,
- "name": "fileSize"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "AvatarImage",
- "doc": [
- "Avatar Image",
- {
- "type": "reference",
- "argument": "fileLocation",
- "category": "full",
- "description": " Location of file"
- },
- {
- "type": "reference",
- "argument": "width",
- "category": "full",
- "description": " Width of avatar image"
- },
- {
- "type": "reference",
- "argument": "height",
- "category": "full",
- "description": " Height of avatar image"
- },
- {
- "type": "reference",
- "argument": "fileSize",
- "category": "full",
- "description": " Size of file"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "FileLocation"
- },
- "id": 1,
- "name": "fileLocation"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "width"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "height"
- },
- {
- "type": "int32",
- "id": 4,
- "name": "fileSize"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Avatar",
- "doc": [
- "Avatar of User or Group",
- {
- "type": "reference",
- "argument": "smallImage",
- "category": "compact",
- "description": " Optional small image of avatar box in 100x100"
- },
- {
- "type": "reference",
- "argument": "largeImage",
- "category": "compact",
- "description": " Optional large image of avatar box in 200x200"
- },
- {
- "type": "reference",
- "argument": "fullImage",
- "category": "compact",
- "description": " Optional full screen image of avatar"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "AvatarImage"
- }
- },
- "id": 1,
- "name": "smallImage"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "AvatarImage"
- }
- },
- "id": 2,
- "name": "largeImage"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "AvatarImage"
- }
- },
- "id": 3,
- "name": "fullImage"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "FastThumb",
- "doc": [
- "Fast thumb of media messages. Less than 90x90 and compressed by JPEG with low quality",
- {
- "type": "reference",
- "argument": "w",
- "category": "full",
- "description": " Width of thumb"
- },
- {
- "type": "reference",
- "argument": "h",
- "category": "full",
- "description": " Height of thump"
- },
- {
- "type": "reference",
- "argument": "thumb",
- "category": "compact",
- "description": " compressed image data"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "w"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "h"
- },
- {
- "type": "bytes",
- "id": 3,
- "name": "thumb"
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "Colors",
- "values": [
- {
- "name": "red",
- "id": 1
- },
- {
- "name": "yellow",
- "id": 2
- },
- {
- "name": "green",
- "id": 3
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "Color",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "RgbColor",
- "doc": [
- "RGB Color",
- {
- "type": "reference",
- "argument": "rgb",
- "category": "full",
- "description": " RGB color value"
- }
- ],
- "trait": {
- "name": "Color",
- "key": 1
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "rgb"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "PredefinedColor",
- "doc": [
- "Predefined color",
- {
- "type": "reference",
- "argument": "color",
- "category": "hidden",
- "description": " Predefined color value"
- }
- ],
- "trait": {
- "name": "Color",
- "key": 2
- },
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "enum",
- "childType": "Colors"
- },
- "id": 1,
- "name": "color"
- }
- ]
- }
- },
- {
- "type": "empty"
- },
- {
- "type": "struct",
- "content": {
- "name": "HTTPHeader",
- "doc": [
- "HTTP Header record",
- {
- "type": "reference",
- "argument": "key",
- "category": "full",
- "description": " HTTP Header name"
- },
- {
- "type": "reference",
- "argument": "value",
- "category": "full",
- "description": " HTTP Header value"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "key"
- },
- {
- "type": "string",
- "id": 2,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "FileUrlDescription",
- "doc": [
- "File url description",
- {
- "type": "reference",
- "argument": "fileId",
- "category": "full",
- "description": " File id of url"
- },
- {
- "type": "reference",
- "argument": "url",
- "category": "full",
- "description": " Url for downloading"
- },
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": " Timeout of url"
- },
- {
- "type": "reference",
- "argument": "unsignedUrl",
- "category": "hidden",
- "description": " Unsigned URL (used to honor web caches)"
- },
- {
- "type": "reference",
- "argument": "unsignedUrlHeaders",
- "category": "hidden",
- "description": " Headers that is required to download files with unsigned url"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "fileId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "url"
- },
- {
- "type": {
- "type": "alias",
- "childType": "sec"
- },
- "id": 3,
- "name": "timeout"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 4,
- "name": "unsignedUrl"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "HTTPHeader"
- }
- },
- "id": 5,
- "name": "unsignedUrlHeaders"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetFileUrl",
- "header": 77,
- "response": {
- "type": "anonymous",
- "header": 78,
- "doc": [
- {
- "type": "reference",
- "argument": "url",
- "category": "full",
- "description": " Url for downloading"
- },
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": " Timeout of url"
- },
- {
- "type": "reference",
- "argument": "unsignedUrl",
- "category": "full",
- "description": " Unsigned URL (used to honor web caches)"
- },
- {
- "type": "reference",
- "argument": "unsignedUrlHeaders",
- "category": "full",
- "description": " Headers that is required to download files with unsigned url"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "url"
- },
- {
- "type": {
- "type": "alias",
- "childType": "sec"
- },
- "id": 2,
- "name": "timeout"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "unsignedUrl"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "HTTPHeader"
- }
- },
- "id": 4,
- "name": "unsignedUrlHeaders"
- }
- ]
- },
- "doc": [
- "Requesting file URL for downloading",
- {
- "type": "reference",
- "argument": "file",
- "category": "full",
- "description": "file's location"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "FileLocation"
- },
- "id": 1,
- "name": "file"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetFileUrls",
- "header": 2573,
- "response": {
- "type": "anonymous",
- "header": 2574,
- "doc": [
- {
- "type": "reference",
- "argument": "fileUrls",
- "category": "full",
- "description": " File urls"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "FileUrlDescription"
- }
- },
- "id": 1,
- "name": "fileUrls"
- }
- ]
- },
- "doc": [
- "Requesting multiple fle URL for downloading",
- {
- "type": "reference",
- "argument": "files",
- "category": "hidden",
- "description": "File locations to load urls"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "FileLocation"
- }
- },
- "id": 1,
- "name": "files"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetFileUrlBuilder",
- "header": 2579,
- "response": {
- "type": "anonymous",
- "header": 2580,
- "doc": [
- {
- "type": "reference",
- "argument": "baseUrl",
- "category": "full",
- "description": " Base Url for files"
- },
- {
- "type": "reference",
- "argument": "algo",
- "category": "full",
- "description": " Signature algorithm"
- },
- {
- "type": "reference",
- "argument": "seed",
- "category": "full",
- "description": " Public-visible seed of signature"
- },
- {
- "type": "reference",
- "argument": "signatureSecret",
- "category": "full",
- "description": " Signature Secret"
- },
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": " Timeout of url builder"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "baseUrl"
- },
- {
- "type": "string",
- "id": 2,
- "name": "algo"
- },
- {
- "type": "string",
- "id": 5,
- "name": "seed"
- },
- {
- "type": "bytes",
- "id": 3,
- "name": "signatureSecret"
- },
- {
- "type": {
- "type": "alias",
- "childType": "sec"
- },
- "id": 4,
- "name": "timeout"
- }
- ]
- },
- "doc": [
- "Get File URL Builder that allows to build file urls from client side",
- {
- "type": "reference",
- "argument": "supportedSignatureAlgorithms",
- "category": "hidden",
- "description": "Supported signature algorithms by client"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 1,
- "name": "supportedSignatureAlgorithms"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetFileUploadUrl",
- "header": 97,
- "response": {
- "type": "anonymous",
- "header": 121,
- "doc": [
- {
- "type": "reference",
- "argument": "url",
- "category": "full",
- "description": " Url for uploading"
- },
- {
- "type": "reference",
- "argument": "uploadKey",
- "category": "compact",
- "description": " Upload key for upload"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "url"
- },
- {
- "type": "bytes",
- "id": 2,
- "name": "uploadKey"
- }
- ]
- },
- "doc": [
- "Requesting pload url",
- {
- "type": "reference",
- "argument": "expectedSize",
- "category": "full",
- "description": "Expected size of uploading file. May be inaccurate. Used for size allocation optimizations."
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "expectedSize"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "CommitFileUpload",
- "header": 122,
- "response": {
- "type": "anonymous",
- "header": 138,
- "doc": [
- {
- "type": "reference",
- "argument": "uploadedFileLocation",
- "category": "hidden",
- "description": " Result file location"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "FileLocation"
- },
- "id": 1,
- "name": "uploadedFileLocation"
- }
- ]
- },
- "doc": [
- "Comminting uploaded file to storage"
- ],
- "attributes": [
- {
- "type": "bytes",
- "id": 1,
- "name": "uploadKey"
- },
- {
- "type": "string",
- "id": 2,
- "name": "fileName"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetFileUploadPartUrl",
- "header": 142,
- "response": {
- "type": "anonymous",
- "header": 141,
- "doc": [
- {
- "type": "reference",
- "argument": "url",
- "category": "full",
- "description": " Upload file part url"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "url"
- }
- ]
- },
- "doc": [
- "Upload file part",
- {
- "type": "reference",
- "argument": "uploadKey",
- "category": "compact",
- "description": "Upload Key from requestFileUploadUrl"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "partNumber"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "partSize"
- },
- {
- "type": "bytes",
- "id": 3,
- "name": "uploadKey"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Features",
- "package": "features",
- "doc": [
- "Enable feature discovery. Currently available features:",
- "* \"call\" - private audio calls"
- ],
- "items": [
- {
- "type": "rpc",
- "content": {
- "name": "EnableFeature",
- "header": 2588,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Enabling feature on the device",
- {
- "type": "reference",
- "argument": "featureName",
- "category": "full",
- "description": "Feature name"
- },
- {
- "type": "reference",
- "argument": "args",
- "category": "danger",
- "description": "Optional arguments to a feature"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "featureName"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 2,
- "name": "args"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DisableFeature",
- "header": 2589,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Disabling feature on the device",
- {
- "type": "reference",
- "argument": "featureName",
- "category": "full",
- "description": "Feature name"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "featureName"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "CheckFeatureEnabled",
- "header": 2590,
- "response": {
- "type": "reference",
- "name": "Bool"
- },
- "doc": [
- "Method for checking if feature is available to user"
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "userOutPeer"
- },
- {
- "type": "string",
- "id": 2,
- "name": "featureName"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "EventBus",
- "package": "eventbus",
- "items": [
- {
- "type": "rpc",
- "content": {
- "name": "CreateNewEventBus",
- "header": 2665,
- "response": {
- "type": "anonymous",
- "header": 2666,
- "doc": [
- "Created new Event Bus",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Event Bus Id"
- },
- {
- "type": "reference",
- "argument": "deviceId",
- "category": "full",
- "description": " Your Device Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "deviceId"
- }
- ]
- },
- "doc": [
- "Create new Event Bus",
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": "Optional timeout of Event Bus"
- },
- {
- "type": "reference",
- "argument": "isOwned",
- "category": "full",
- "description": "Is Event Bus owned by creator"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "msec"
- }
- },
- "id": 1,
- "name": "timeout"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 2,
- "name": "isOwned"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "JoinEventBus",
- "header": 2668,
- "response": {
- "type": "anonymous",
- "header": 2669,
- "doc": [
- {
- "type": "reference",
- "argument": "deviceId",
- "category": "full",
- "description": " Your Device Id"
- },
- {
- "type": "reference",
- "argument": "rejoinToken",
- "category": "full",
- "description": " Token that can be used for rejoining event bus with same device id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "deviceId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 2,
- "name": "rejoinToken"
- }
- ]
- },
- "doc": [
- "Joining Event Bus",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Event Bus Id"
- },
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": "Join timeout"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "msec"
- }
- },
- "id": 2,
- "name": "timeout"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ReJoinEventBus",
- "header": 2675,
- "response": {
- "type": "anonymous",
- "header": 2676,
- "doc": [
- {
- "type": "reference",
- "argument": "deviceId",
- "category": "hidden",
- "description": " Your Device Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "deviceId"
- }
- ]
- },
- "doc": [
- "Rejoining to event bus after session was disposed",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Event Bus Id"
- },
- {
- "type": "reference",
- "argument": "rejoinToken",
- "category": "full",
- "description": "Rejoin Token"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": "bytes",
- "id": 2,
- "name": "rejoinToken"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "KeepAliveEventBus",
- "header": 2670,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Keep Alive Event Bus",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Event Bus Id"
- },
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": "Optional timeout for keep alive"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "msec"
- }
- },
- "id": 2,
- "name": "timeout"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DisposeEventBus",
- "header": 2667,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Dispose Event Bus",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Event Bus Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "PostToEventBus",
- "header": 2671,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Event Bus Destination",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": "Bus Id"
- },
- {
- "type": "reference",
- "argument": "destinations",
- "category": "full",
- "description": "If Empty need to broadcase message to everyone"
- },
- {
- "type": "reference",
- "argument": "message",
- "category": "hidden",
- "description": "Message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "randomId"
- }
- },
- "id": 2,
- "name": "destinations"
- },
- {
- "type": "bytes",
- "id": 3,
- "name": "message"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "EventBusDeviceConnected",
- "header": 2561,
- "doc": [
- "Update about pubsub device connected",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " ID of Event Bus"
- },
- {
- "type": "reference",
- "argument": "userId",
- "category": "full",
- "description": " Joined User Id"
- },
- {
- "type": "reference",
- "argument": "deviceId",
- "category": "full",
- "description": " Joined Device Unique Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 2,
- "name": "userId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 3,
- "name": "deviceId"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "EventBusDeviceDisconnected",
- "header": 2563,
- "doc": [
- "Update about device disconnected",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " ID of Event Bus"
- },
- {
- "type": "reference",
- "argument": "userId",
- "category": "full",
- "description": " Joined User Id"
- },
- {
- "type": "reference",
- "argument": "deviceId",
- "category": "full",
- "description": " Disconnected Device unique Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 2,
- "name": "userId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 3,
- "name": "deviceId"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "EventBusMessage",
- "header": 2562,
- "doc": [
- "Event Bus Message",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Event Bus Id"
- },
- {
- "type": "reference",
- "argument": "senderId",
- "category": "full",
- "description": " Sender of message"
- },
- {
- "type": "reference",
- "argument": "senderDeviceId",
- "category": "full",
- "description": " Device Id of sender"
- },
- {
- "type": "reference",
- "argument": "message",
- "category": "hidden",
- "description": " Message"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "userId"
- }
- },
- "id": 2,
- "name": "senderId"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "randomId"
- }
- },
- "id": 3,
- "name": "senderDeviceId"
- },
- {
- "type": "bytes",
- "id": 4,
- "name": "message"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "EventBusDisposed",
- "header": 2564,
- "doc": [
- "Event Bus dispose",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Event Bus Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 1,
- "name": "id"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Values",
- "package": "values",
- "doc": [
- "Synced Values"
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "SyncedValue",
- "doc": [
- "Synced Value container",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Unique Id of a value. Unique in the scope of one named value."
- },
- {
- "type": "reference",
- "argument": "value",
- "category": "full",
- "description": " Optional value"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "id"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 2,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadSyncedSet",
- "header": 2679,
- "response": {
- "type": "anonymous",
- "header": 2680,
- "doc": [
- {
- "type": "reference",
- "argument": "values",
- "category": "full",
- "description": " Current set values"
- },
- {
- "type": "reference",
- "argument": "isStrong",
- "category": "full",
- "description": " Is this value strong and stored in sequence. By default is true."
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "SyncedValue"
- }
- },
- "id": 1,
- "name": "values"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 2,
- "name": "isStrong"
- }
- ]
- },
- "doc": [
- "Loading synced set",
- {
- "type": "reference",
- "argument": "setName",
- "category": "hidden",
- "description": "readable name of the set"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "setName"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "SynedSetUpdated",
- "header": 72,
- "doc": [
- "Update about synced set update",
- {
- "type": "reference",
- "argument": "setName",
- "category": "full",
- "description": " Set Name"
- },
- {
- "type": "reference",
- "argument": "syncedValues",
- "category": "full",
- "description": " Current set values"
- },
- {
- "type": "reference",
- "argument": "isStrong",
- "category": "full",
- "description": " Is this value strong and need to be stored on disk"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "setName"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "SyncedValue"
- }
- },
- "id": 2,
- "name": "syncedValues"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 3,
- "name": "isStrong"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "SyncedSetAddedOrUpdated",
- "header": 73,
- "doc": [
- "Update about added or updated values in the synced set",
- {
- "type": "reference",
- "argument": "setName",
- "category": "full",
- "description": " Set Name"
- },
- {
- "type": "reference",
- "argument": "addedOrUpdatedValues",
- "category": "hidden",
- "description": " Added or updated values"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "setName"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "SyncedValue"
- }
- },
- "id": 2,
- "name": "addedOrUpdatedValues"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "SyncedSetRemoved",
- "header": 74,
- "doc": [
- "Update about removed items from synced set",
- {
- "type": "reference",
- "argument": "setName",
- "category": "full",
- "description": " Set Name"
- },
- {
- "type": "reference",
- "argument": "removedItems",
- "category": "full",
- "description": " Removed Items from the set"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "setName"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "alias",
- "childType": "randomId"
- }
- },
- "id": 2,
- "name": "removedItems"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "WebRTC",
- "package": "webrtc",
- "doc": [
- "WebRTC package that enables support to audio and video calls"
- ],
- "items": [
- {
- "type": "update",
- "content": {
- "name": "IncomingCall",
- "header": 52,
- "doc": [
- "Update about incoming call (Sent every 10 seconds)",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": " Call Id"
- },
- {
- "type": "reference",
- "argument": "attemptIndex",
- "category": "full",
- "description": " Optional attempt Index"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 2,
- "name": "attemptIndex"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "CallHandled",
- "header": 53,
- "doc": [
- "Update about incoming call handled",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": " Call Id"
- },
- {
- "type": "reference",
- "argument": "attemptIndex",
- "category": "full",
- "description": " Optional attempt Index"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 2,
- "name": "attemptIndex"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "CallUpgraded",
- "header": 56,
- "doc": [
- "Update about call moved to other peer",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": " Call Id"
- },
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Upgraded group id"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 2,
- "name": "groupId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetCallInfo",
- "header": 2600,
- "response": {
- "type": "anonymous",
- "header": 2606,
- "doc": [
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Destination peer"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": " Groups"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Users"
- },
- {
- "type": "reference",
- "argument": "eventBusId",
- "category": "full",
- "description": " Event Bus Id"
- },
- {
- "type": "reference",
- "argument": "isAudioOnlyCall",
- "category": "full",
- "description": " Is Audio Only Call. Default is true"
- },
- {
- "type": "reference",
- "argument": "isVideoOnlyCall",
- "category": "full",
- "description": " Is Video Only Call. Default is false."
- },
- {
- "type": "reference",
- "argument": "isVideoPreferred",
- "category": "full",
- "description": " Is Video preferred"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 2,
- "name": "groups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 3,
- "name": "users"
- },
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 4,
- "name": "eventBusId"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 5,
- "name": "isAudioOnlyCall"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 6,
- "name": "isVideoOnlyCall"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 7,
- "name": "isVideoPreferred"
- }
- ]
- },
- "doc": [
- "Getting Call Information",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": "Call Id"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DoCall",
- "header": 2597,
- "response": {
- "type": "anonymous",
- "header": 2598,
- "doc": [
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": " Call Id"
- },
- {
- "type": "reference",
- "argument": "eventBusId",
- "category": "full",
- "description": " Call Event Bus Id"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "busId"
- },
- "id": 2,
- "name": "eventBusId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 3,
- "name": "deviceId"
- }
- ]
- },
- "doc": [
- "Do Call. Right after a call client need to start sending CallInProgress",
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "destination peer"
- },
- {
- "type": "reference",
- "argument": "timeout",
- "category": "full",
- "description": "Initial timeout"
- },
- {
- "type": "reference",
- "argument": "isAudioOnlyCall",
- "category": "full",
- "description": "Is Audio only call. Default is true."
- },
- {
- "type": "reference",
- "argument": "isVideoOnlyCall",
- "category": "full",
- "description": "Is Video Only call. Default is false."
- },
- {
- "type": "reference",
- "argument": "isVideoPreferred",
- "category": "full",
- "description": "Is Video preferred"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "OutPeer"
- },
- "id": 1,
- "name": "peer"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "msec"
- }
- },
- "id": 2,
- "name": "timeout"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 3,
- "name": "isAudioOnlyCall"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 4,
- "name": "isVideoOnlyCall"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 6,
- "name": "isVideoPreferred"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UpgradeCall",
- "header": 2677,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Method for upgrading a call from private call to group call",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": "Call Id"
- },
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": "Destination peer for upgrading"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- },
- {
- "type": {
- "type": "struct",
- "childType": "GroupOutPeer"
- },
- "id": 2,
- "name": "peer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DoCallAgain",
- "header": 2678,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Call again to user",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": "Call Id"
- },
- {
- "type": "reference",
- "argument": "user",
- "category": "full",
- "description": "User to call again"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- },
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 2,
- "name": "user"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "JoinCall",
- "header": 2683,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Joining Call",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": "Call Id"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RejectCall",
- "header": 2684,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Rejecting Call",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": "Call Id"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "OptimizeSDP",
- "header": 2685,
- "response": {
- "type": "anonymous",
- "header": 2686,
- "doc": [
- {
- "type": "reference",
- "argument": "optimizedSDP",
- "category": "hidden",
- "description": " Optimized version of SDP"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "optimizedSDP"
- }
- ]
- },
- "doc": [
- "Optimizing SDP",
- {
- "type": "reference",
- "argument": "type",
- "category": "full",
- "description": "Type of SDP (offer or answer)"
- },
- {
- "type": "reference",
- "argument": "sdp",
- "category": "full",
- "description": "SDP value"
- },
- {
- "type": "reference",
- "argument": "ownSettings",
- "category": "full",
- "description": "Own Settings"
- },
- {
- "type": "reference",
- "argument": "theirSettings",
- "category": "full",
- "description": "Their Settings"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "type"
- },
- {
- "type": "string",
- "id": 2,
- "name": "sdp"
- },
- {
- "type": {
- "type": "struct",
- "childType": "PeerSettings"
- },
- "id": 3,
- "name": "ownSettings"
- },
- {
- "type": {
- "type": "struct",
- "childType": "PeerSettings"
- },
- "id": 4,
- "name": "theirSettings"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ICEServer",
- "doc": [
- "ICE Server description",
- {
- "type": "reference",
- "argument": "url",
- "category": "full",
- "description": " Url to server"
- },
- {
- "type": "reference",
- "argument": "username",
- "category": "full",
- "description": " Optional username"
- },
- {
- "type": "reference",
- "argument": "credential",
- "category": "danger",
- "description": " Optional credential"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "url"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "username"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 3,
- "name": "credential"
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "WebRTCSignaling",
- "attributes": []
- }
- },
- {
- "type": "comment",
- "content": "Advertising"
- },
- {
- "type": "struct",
- "content": {
- "name": "AdvertiseSelf",
- "doc": [
- "Advertizing self to a master mode",
- {
- "type": "reference",
- "argument": "peerSettings",
- "category": "full",
- "description": " Optional peer Settings"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 21
- },
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "PeerSettings"
- }
- },
- "id": 1,
- "name": "peerSettings"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "AdvertiseMaster",
- "doc": [
- "Sent by master"
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 26
- },
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "ICEServer"
- }
- },
- "id": 1,
- "name": "server"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Web RTC signaling"
- },
- {
- "type": "struct",
- "content": {
- "name": "Candidate",
- "doc": [
- "Candidate signal",
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id of candidate"
- },
- {
- "type": "reference",
- "argument": "index",
- "category": "full",
- "description": " Index of candidate"
- },
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Id of candidate"
- },
- {
- "type": "reference",
- "argument": "sdp",
- "category": "full",
- "description": " SDP of candidate"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 3
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "sessionId"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "index"
- },
- {
- "type": "string",
- "id": 3,
- "name": "id"
- },
- {
- "type": "string",
- "id": 4,
- "name": "sdp"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Offer",
- "doc": [
- "Offer signal",
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id of offer"
- },
- {
- "type": "reference",
- "argument": "sdp",
- "category": "full",
- "description": " Offer SDP"
- },
- {
- "type": "reference",
- "argument": "ownPeerSettings",
- "category": "full",
- "description": " Optional Own Peer settings"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 4
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "sessionId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "sdp"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "PeerSettings"
- }
- },
- "id": 3,
- "name": "ownPeerSettings"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Answer",
- "doc": [
- "Answer signal",
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id of answer"
- },
- {
- "type": "reference",
- "argument": "sdp",
- "category": "full",
- "description": " Answer SDP"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 5
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "sessionId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "sdp"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MediaStreamsUpdated",
- "doc": [
- "Update about media stream settings updated. Can be sent before offer/answer.",
- {
- "type": "reference",
- "argument": "isAudioEnabled",
- "category": "full",
- "description": " Is Audio Enabled in current connection. True by default."
- },
- {
- "type": "reference",
- "argument": "isVideoEnabled",
- "category": "full",
- "description": " Is Video Enabled in current connection. False by default."
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 28
- },
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 1,
- "name": "isAudioEnabled"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 2,
- "name": "isVideoEnabled"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Call Controlling events"
- },
- {
- "type": "struct",
- "content": {
- "name": "NeedOffer",
- "doc": [
- "Notification from master that offer is required",
- {
- "type": "reference",
- "argument": "device",
- "category": "full",
- "description": " Destination Device Id"
- },
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id"
- },
- {
- "type": "reference",
- "argument": "peerSettings",
- "category": "full",
- "description": " Optional peer settings"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 8
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "device"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "sessionId"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "struct",
- "childType": "PeerSettings"
- }
- },
- "id": 3,
- "name": "peerSettings"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "NegotinationSuccessful",
- "doc": [
- "Notification about on negotiation is successful",
- {
- "type": "reference",
- "argument": "device",
- "category": "full",
- "description": " Device Id"
- },
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 24
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "device"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "sessionId"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EnableConnection",
- "doc": [
- "Notification about enabling connection to peer",
- {
- "type": "reference",
- "argument": "device",
- "category": "full",
- "description": " Device Id"
- },
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 22
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "device"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "sessionId"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "OnRenegotiationNeeded",
- "doc": [
- "Need renegotiate session. For example when streams are changed.",
- {
- "type": "reference",
- "argument": "device",
- "category": "full",
- "description": " Device Id"
- },
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 25
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "device"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "sessionId"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "CloseSession",
- "doc": [
- "Close this session and be ready to",
- {
- "type": "reference",
- "argument": "device",
- "category": "hidden",
- "description": " Device Id"
- },
- {
- "type": "reference",
- "argument": "sessionId",
- "category": "full",
- "description": " Session Id for renegotiation"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 6
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "device"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 2,
- "name": "sessionId"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "NeedDisconnect",
- "doc": [
- "Notification about requirement about required disconnection from peer",
- {
- "type": "reference",
- "argument": "device",
- "category": "hidden",
- "description": " Device Id"
- }
- ],
- "trait": {
- "name": "WebRTCSignaling",
- "key": 20
- },
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "device"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ActiveCall",
- "doc": [
- "Active Calls. Used in broadcasting states of current calls.",
- {
- "type": "reference",
- "argument": "callId",
- "category": "full",
- "description": " Call Id"
- },
- {
- "type": "reference",
- "argument": "peer",
- "category": "full",
- "description": " Call's peer"
- },
- {
- "type": "reference",
- "argument": "callMembers",
- "category": "full",
- "description": " Call Members"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "callId"
- },
- {
- "type": {
- "type": "struct",
- "childType": "Peer"
- },
- "id": 2,
- "name": "peer"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "CallMember"
- }
- },
- "id": 3,
- "name": "callMembers"
- }
- ]
- }
- },
- {
- "type": "enum",
- "content": {
- "name": "CallMemberState",
- "values": [
- {
- "name": "RINGING",
- "id": 1
- },
- {
- "name": "RINGING_REACHED",
- "id": 4
- },
- {
- "name": "CONNECTING",
- "id": 2
- },
- {
- "name": "CONNECTED",
- "id": 3
- },
- {
- "name": "ENDED",
- "id": 5
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "CallMemberStateHolder",
- "doc": [
- "Call Member state holder",
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " State Value"
- },
- {
- "type": "reference",
- "argument": "fallbackIsRinging",
- "category": "full",
- "description": " Fallback flag for future compatibility of state"
- },
- {
- "type": "reference",
- "argument": "fallbackIsConnected",
- "category": "full",
- "description": " Fallback flag for future compatibility of state"
- },
- {
- "type": "reference",
- "argument": "fallbackIsConnecting",
- "category": "full",
- "description": " Fallback flag for future compatibility of state"
- },
- {
- "type": "reference",
- "argument": "fallbackIsRingingReached",
- "category": "full",
- "description": " Fallback flag for future compatibility of state"
- },
- {
- "type": "reference",
- "argument": "fallbackIsEnded",
- "category": "full",
- "description": " Fallback flag for future compatibility of state"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "enum",
- "childType": "CallMemberState"
- },
- "id": 1,
- "name": "state"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 2,
- "name": "fallbackIsRinging"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 3,
- "name": "fallbackIsConnected"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 4,
- "name": "fallbackIsConnecting"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 5,
- "name": "fallbackIsRingingReached"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 6,
- "name": "fallbackIsEnded"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "CallMember",
- "doc": [
- "Call Member",
- {
- "type": "reference",
- "argument": "userId",
- "category": "full",
- "description": " Member User Id"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " State of member"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "userId"
- },
- {
- "type": {
- "type": "struct",
- "childType": "CallMemberStateHolder"
- },
- "id": 3,
- "name": "state"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "PeerSettings",
- "doc": [
- "Peer Settings",
- {
- "type": "reference",
- "argument": "is3DESSupported",
- "category": "full",
- "description": " Marking if 3DES supported. Default is false."
- },
- {
- "type": "reference",
- "argument": "isMobile",
- "category": "full",
- "description": " Is Peer a mobile phone. Default is false."
- },
- {
- "type": "reference",
- "argument": "canBeAudioRelay",
- "category": "full",
- "description": " If peer can audio relay. Default is false."
- },
- {
- "type": "reference",
- "argument": "canPreConnect",
- "category": "full",
- "description": " If peer can preconnect before answer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 1,
- "name": "is3DESSupported"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 2,
- "name": "isMobile"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 3,
- "name": "canBeAudioRelay"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bool"
- },
- "id": 4,
- "name": "canPreConnect"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Config sync",
- "package": "configs",
- "doc": [
- "Parameter Syncronization across devices. Can be used for simple sync",
- "across devices without rewriting server side code."
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "Parameter",
- "doc": [
- "Syncing Parameter",
- {
- "type": "reference",
- "argument": "key",
- "category": "full",
- "description": " Key of parameter"
- },
- {
- "type": "reference",
- "argument": "value",
- "category": "full",
- "description": " Value of parameter"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "key"
- },
- {
- "type": "string",
- "id": 2,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetParameters",
- "header": 134,
- "response": {
- "type": "anonymous",
- "header": 135,
- "doc": [
- {
- "type": "reference",
- "argument": "parameters",
- "category": "full",
- "description": " Current parameters"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Parameter"
- }
- },
- "id": 1,
- "name": "parameters"
- }
- ]
- },
- "doc": [
- "Getting Parameters"
- ],
- "attributes": []
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "EditParameter",
- "header": 128,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Change parameter value",
- {
- "type": "reference",
- "argument": "key",
- "category": "full",
- "description": "Key of parameter"
- },
- {
- "type": "reference",
- "argument": "value",
- "category": "full",
- "description": "Value of parameter"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "key"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "ParameterChanged",
- "header": 131,
- "doc": [
- "Update about parameter change",
- {
- "type": "reference",
- "argument": "key",
- "category": "full",
- "description": " Key of parameter"
- },
- {
- "type": "reference",
- "argument": "value",
- "category": "full",
- "description": " Value of parameter"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "key"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "value"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Stats",
- "package": "stats",
- "doc": [
- "Saving statistics information"
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "EventRecord",
- "doc": [
- "Record for stored event"
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 1,
- "name": "date"
- },
- {
- "type": {
- "type": "trait",
- "childType": "Event"
- },
- "id": 2,
- "name": "event"
- }
- ]
- }
- },
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "Event",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "UntypedEvent",
- "doc": [
- "Untyped event",
- {
- "type": "reference",
- "argument": "eventType",
- "category": "full",
- "description": " Event type"
- },
- {
- "type": "reference",
- "argument": "params",
- "category": "full",
- "description": " optional params for event"
- }
- ],
- "trait": {
- "name": "Event",
- "key": 1
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "eventType"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "RawValue"
- }
- },
- "id": 2,
- "name": "params"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ContentViewChanged",
- "doc": [
- "Content view event",
- {
- "type": "reference",
- "argument": "contentType",
- "category": "full",
- "description": " unique content id"
- },
- {
- "type": "reference",
- "argument": "visible",
- "category": "full",
- "description": " Is content visible"
- },
- {
- "type": "reference",
- "argument": "params",
- "category": "full",
- "description": " optional params for content view"
- }
- ],
- "trait": {
- "name": "Event",
- "key": 2
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "contentType"
- },
- {
- "type": "string",
- "id": 2,
- "name": "contentId"
- },
- {
- "type": "bool",
- "id": 3,
- "name": "visible"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "RawValue"
- }
- },
- "id": 4,
- "name": "params"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "AppVisibleChanged",
- "doc": [
- "On App Visible event",
- {
- "type": "reference",
- "argument": "visible",
- "category": "full",
- "description": " Is app visible"
- }
- ],
- "trait": {
- "name": "Event",
- "key": 4
- },
- "expandable": "true",
- "attributes": [
- {
- "type": "bool",
- "id": 1,
- "name": "visible"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "StoreEvents",
- "header": 243,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Storing events on server",
- {
- "type": "reference",
- "argument": "events",
- "category": "full",
- "description": "Events for storing"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "trait",
- "childType": "Event"
- }
- },
- "id": 1,
- "name": "events"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Raw API",
- "package": "raw",
- "doc": [
- "Schema-less API that is useful for external integrations"
- ],
- "items": [
- {
- "type": "rpc",
- "content": {
- "name": "RawRequest",
- "header": 2569,
- "response": {
- "type": "anonymous",
- "header": 2570,
- "doc": [
- "Response of a raw request",
- {
- "type": "reference",
- "argument": "result",
- "category": "full",
- "description": " Result of request"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "trait",
- "childType": "RawValue"
- },
- "id": 1,
- "name": "result"
- }
- ]
- },
- "doc": [
- "Making raw request to external service via shema-less RPC request",
- {
- "type": "reference",
- "argument": "service",
- "category": "full",
- "description": "Service name for RPC request"
- },
- {
- "type": "reference",
- "argument": "method",
- "category": "full",
- "description": "Method for execution"
- },
- {
- "type": "reference",
- "argument": "params",
- "category": "full",
- "description": "Optional params for the method"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "service"
- },
- {
- "type": "string",
- "id": 2,
- "name": "method"
- },
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "trait",
- "childType": "RawValue"
- }
- },
- "id": 3,
- "name": "params"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Wallpappers",
- "package": "wallpappers",
- "doc": [
- "Wallpappers support"
- ],
- "items": [
- {
- "type": "struct",
- "content": {
- "name": "Wallpapper",
- "doc": [
- "Wallpapper structure",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Wallpapper id"
- },
- {
- "type": "reference",
- "argument": "w",
- "category": "full",
- "description": " Image width"
- },
- {
- "type": "reference",
- "argument": "h",
- "category": "full",
- "description": " Image height"
- },
- {
- "type": "reference",
- "argument": "fileSize",
- "category": "full",
- "description": " Image file size"
- },
- {
- "type": "reference",
- "argument": "file",
- "category": "full",
- "description": " Image file reference"
- },
- {
- "type": "reference",
- "argument": "thumb",
- "category": "full",
- "description": " Image thumb"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 7,
- "name": "id"
- },
- {
- "type": "int32",
- "id": 1,
- "name": "w"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "h"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "fileSize"
- },
- {
- "type": {
- "type": "struct",
- "childType": "FileLocation"
- },
- "id": 5,
- "name": "file"
- },
- {
- "type": {
- "type": "struct",
- "childType": "FastThumb"
- },
- "id": 6,
- "name": "thumb"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadWallpappers",
- "header": 241,
- "response": {
- "type": "anonymous",
- "header": 242,
- "doc": [
- "Loaded Wallpappers",
- {
- "type": "reference",
- "argument": "wallpappers",
- "category": "full",
- "description": " Available wallpapper list"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Wallpapper"
- }
- },
- "id": 1,
- "name": "wallpappers"
- }
- ]
- },
- "doc": [
- "Load available wallpappers",
- {
- "type": "reference",
- "argument": "maxWidth",
- "category": "full",
- "description": "Maximum width of wallpapper"
- },
- {
- "type": "reference",
- "argument": "maxHeight",
- "category": "full",
- "description": "Maximum height of wallpapper"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "maxWidth"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "maxHeight"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Push",
- "package": "push",
- "doc": [
- "Vendor's pushes for receiving push notifications.",
- "Push notification contains current sequence number of main sequence."
- ],
- "items": [
- {
- "type": "rpc",
- "content": {
- "name": "RegisterGooglePush",
- "header": 51,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Registering push token on server",
- {
- "type": "reference",
- "argument": "projectId",
- "category": "hidden",
- "description": "Project Id of token"
- },
- {
- "type": "reference",
- "argument": "token",
- "category": "danger",
- "description": "token value"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "projectId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UnregisterGooglePush",
- "header": 2631,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Unregistering Google Push",
- {
- "type": "reference",
- "argument": "token",
- "category": "danger",
- "description": "Token value"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RegisterApplePush",
- "header": 76,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Registering apple push on server",
- {
- "type": "reference",
- "argument": "apnsKey",
- "category": "hidden",
- "description": "apns key id"
- },
- {
- "type": "reference",
- "argument": "token",
- "category": "danger",
- "description": "token value"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "apnsKey"
- },
- {
- "type": "string",
- "id": 2,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UnregisterApplePush",
- "header": 2632,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Unregistering Apple Push",
- {
- "type": "reference",
- "argument": "token",
- "category": "full",
- "description": "Token"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RegisterApplePushKit",
- "header": 2576,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Registration of a new Apple's PushKit tokens",
- {
- "type": "reference",
- "argument": "apnsKey",
- "category": "hidden",
- "description": "APNS key id"
- },
- {
- "type": "reference",
- "argument": "token",
- "category": "danger",
- "description": "token value"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "apnsKey"
- },
- {
- "type": "string",
- "id": 2,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UnregisterApplePushKit",
- "header": 2633,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Unregistering Apple Push Kit token",
- {
- "type": "reference",
- "argument": "token",
- "category": "hidden",
- "description": "Token Value"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RegisterApplePushToken",
- "header": 2593,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Registering Apple Push Token",
- {
- "type": "reference",
- "argument": "bundleId",
- "category": "full",
- "description": "Bundle Id of app"
- },
- {
- "type": "reference",
- "argument": "token",
- "category": "full",
- "description": "Push token"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "bundleId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UnregisterApplePushToken",
- "header": 2634,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Unregister Apple Push token",
- {
- "type": "reference",
- "argument": "token",
- "category": "hidden",
- "description": "Token value"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "token"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "RegisterActorPush",
- "header": 2575,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Register Actor Push endpoint",
- {
- "type": "reference",
- "argument": "endpoint",
- "category": "full",
- "description": "Endpoint for push sending"
- },
- {
- "type": "reference",
- "argument": "encryptionKeys",
- "category": "full",
- "description": "Push Encryption keys"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "endpoint"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKey"
- }
- },
- "id": 2,
- "name": "encryptionKeys"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UnregisterActorPush",
- "header": 2635,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Unregister Actor Push endpoint",
- {
- "type": "reference",
- "argument": "endpoint",
- "category": "full",
- "description": "Endpoint for unregistering"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "endpoint"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Encryption",
- "package": "encryption",
- "doc": [
- "Package that include encryption support",
- "Key alg types:",
- "* curve25519 - https://en.wikipedia.org/wiki/Curve25519",
- "* rsa-2048",
- "* rsa-4096",
- "* aes-128",
- "* kuznechik-128",
- "",
- "Signature alg types:",
- "* Ed25519 - used curve25519 conveted to Ed255519 for signing and validataion"
- ],
- "items": [
- {
- "type": "comment",
- "content": "Public Keys"
- },
- {
- "type": "struct",
- "content": {
- "name": "EncryptionKeyGroup",
- "doc": [
- "Encryption Key Group",
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": " Key Group Id"
- },
- {
- "type": "reference",
- "argument": "identityKey",
- "category": "full",
- "description": " Key that is used as identity and for validation of Key Group changes"
- },
- {
- "type": "reference",
- "argument": "supportedEncryption",
- "category": "full",
- "description": " Supported encryption methods by this key group"
- },
- {
- "type": "reference",
- "argument": "keys",
- "category": "compact",
- "description": " keys of Key Group"
- },
- {
- "type": "reference",
- "argument": "signatures",
- "category": "compact",
- "description": " Signatures of keys"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 1,
- "name": "keyGroupId"
- },
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 2,
- "name": "supportedEncryption"
- },
- {
- "type": {
- "type": "struct",
- "childType": "EncryptionKey"
- },
- "id": 3,
- "name": "identityKey"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKey"
- }
- },
- "id": 4,
- "name": "keys"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKeySignature"
- }
- },
- "id": 5,
- "name": "signatures"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EncryptionKeySignature",
- "doc": [
- "Signed Key. Usually used for public keys.",
- {
- "type": "reference",
- "argument": "keyId",
- "category": "full",
- "description": " Key Id used for signature"
- },
- {
- "type": "reference",
- "argument": "signatureAlg",
- "category": "full",
- "description": " Signature algorithm"
- },
- {
- "type": "reference",
- "argument": "signature",
- "category": "full",
- "description": " Signature value"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "keyId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "signatureAlg"
- },
- {
- "type": "bytes",
- "id": 3,
- "name": "signature"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EncryptionKey",
- "doc": [
- "Encryption Key",
- {
- "type": "reference",
- "argument": "keyId",
- "category": "full",
- "description": " Key Id"
- },
- {
- "type": "reference",
- "argument": "keyAlg",
- "category": "full",
- "description": " Key Algorithm"
- },
- {
- "type": "reference",
- "argument": "keyMaterial",
- "category": "compact",
- "description": " Public key material. Can be null, but always not null for LoadPublicKey"
- },
- {
- "type": "reference",
- "argument": "keyHash",
- "category": "hidden",
- "description": " If keyMaterial is null, pass keyHash - SHA256 of key"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "keyId"
- },
- {
- "type": "string",
- "id": 2,
- "name": "keyAlg"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 3,
- "name": "keyMaterial"
- },
- {
- "type": {
- "type": "opt",
- "childType": "bytes"
- },
- "id": 4,
- "name": "keyHash"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "PublicKeys",
- "header": 2602,
- "doc": [
- "Public Keys response",
- {
- "type": "reference",
- "argument": "publicKey",
- "category": "full",
- "description": " Public keys"
- },
- {
- "type": "reference",
- "argument": "signatures",
- "category": "full",
- "description": " Signatures of public keys"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKey"
- }
- },
- "id": 1,
- "name": "publicKey"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKeySignature"
- }
- },
- "id": 2,
- "name": "signatures"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "PublicKeyGroups",
- "header": 2604,
- "doc": [
- "Public key groups response"
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKeyGroup"
- }
- },
- "id": 1,
- "name": "publicKeyGroups"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadPublicKeyGroups",
- "header": 2601,
- "response": {
- "type": "reference",
- "name": "PublicKeyGroups"
- },
- "doc": [
- "Loading Public key groups",
- {
- "type": "reference",
- "argument": "userPeer",
- "category": "full",
- "description": "User's peer"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "userPeer"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadPublicKey",
- "header": 2605,
- "response": {
- "type": "reference",
- "name": "PublicKeys"
- },
- "doc": [
- "Loading public key explictly",
- {
- "type": "reference",
- "argument": "userPeer",
- "category": "full",
- "description": "User's peer"
- },
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": "Key group's id"
- },
- {
- "type": "reference",
- "argument": "keyIds",
- "category": "full",
- "description": "Key ids for loading"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "userPeer"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "keyGroupId"
- },
- {
- "type": {
- "type": "list",
- "childType": "int64"
- },
- "id": 3,
- "name": "keyIds"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "LoadPrePublicKeys",
- "header": 2603,
- "response": {
- "type": "reference",
- "name": "PublicKeys"
- },
- "doc": [
- "Loading SOME of ephermal public keys",
- {
- "type": "reference",
- "argument": "userPeer",
- "category": "full",
- "description": "User's peer"
- },
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": "User's key group id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "userPeer"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "keyGroupId"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "PublicKeyGroupChanged",
- "header": 103,
- "doc": [
- "Update about public key group changed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "keyGroup",
- "category": "full",
- "description": " Updated Key Group"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "struct",
- "childType": "EncryptionKeyGroup"
- },
- "id": 2,
- "name": "keyGroup"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "KeysAdded",
- "header": 112,
- "doc": [
- "Update about keys added to Key Group",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": " Key Group Id"
- },
- {
- "type": "reference",
- "argument": "keys",
- "category": "compact",
- "description": " Added keys"
- },
- {
- "type": "reference",
- "argument": "signatures",
- "category": "compact",
- "description": " Signatures of a public key"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 2,
- "name": "keyGroupId"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKey"
- }
- },
- "id": 3,
- "name": "keys"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKeySignature"
- }
- },
- "id": 4,
- "name": "signatures"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "KeysRemoved",
- "header": 113,
- "doc": [
- "Update about keys removed from Key Group",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": " Key Group Id"
- },
- {
- "type": "reference",
- "argument": "keyIds",
- "category": "full",
- "description": " Removed keys"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 2,
- "name": "keyGroupId"
- },
- {
- "type": {
- "type": "list",
- "childType": "int64"
- },
- "id": 3,
- "name": "keyIds"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "PublicKeyGroupAdded",
- "header": 104,
- "doc": [
- "Update about public key group added",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "keyGroup",
- "category": "full",
- "description": " Added Key Group"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "struct",
- "childType": "EncryptionKeyGroup"
- },
- "id": 2,
- "name": "keyGroup"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "PublicKeyGroupRemoved",
- "header": 105,
- "doc": [
- "Update about public key group removed",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": " Removed Key Group Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 2,
- "name": "keyGroupId"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Device Side"
- },
- {
- "type": "rpc",
- "content": {
- "name": "CreateNewKeyGroup",
- "header": 2609,
- "response": {
- "type": "anonymous",
- "header": 2610,
- "doc": [
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": " Created Key Group id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 1,
- "name": "keyGroupId"
- }
- ]
- },
- "doc": [
- "Creation of a new Key Group",
- {
- "type": "reference",
- "argument": "identityKey",
- "category": "full",
- "description": "Identity Key of a new group"
- },
- {
- "type": "reference",
- "argument": "supportedEncryptions",
- "category": "full",
- "description": "Supported encryption methods"
- },
- {
- "type": "reference",
- "argument": "keys",
- "category": "full",
- "description": "keys of current group"
- },
- {
- "type": "reference",
- "argument": "signatures",
- "category": "full",
- "description": "signatures of keys"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "EncryptionKey"
- },
- "id": 1,
- "name": "identityKey"
- },
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 2,
- "name": "supportedEncryptions"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKey"
- }
- },
- "id": 3,
- "name": "keys"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKeySignature"
- }
- },
- "id": 4,
- "name": "signatures"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DeleteKeyGroup",
- "header": 2611,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Deletion of a Key Group",
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": "Key Group Id for deletion"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 1,
- "name": "keyGroupId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DisconnectKeyGroup",
- "header": 2613,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Disconnect Key Group from device",
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": "Key Group Id for disconnection"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 1,
- "name": "keyGroupId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "ConnectKeyGroup",
- "header": 2614,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Connectiong Key Group to device",
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": "Key Group Id for connection"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 1,
- "name": "keyGroupId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "UploadPreKey",
- "header": 2612,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Uploading Ephermal Keys",
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": "Key Group Id"
- },
- {
- "type": "reference",
- "argument": "keys",
- "category": "compact",
- "description": "Encryprion keys"
- },
- {
- "type": "reference",
- "argument": "signatures",
- "category": "compact",
- "description": "Key signatures"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 1,
- "name": "keyGroupId"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKey"
- }
- },
- "id": 2,
- "name": "keys"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptionKeySignature"
- }
- },
- "id": 3,
- "name": "signatures"
- }
- ]
- }
- },
- {
- "type": "comment",
- "content": "Encrypted Packages"
- },
- {
- "type": "struct",
- "content": {
- "name": "EncryptedBox",
- "doc": [
- "Encrypted package that is encrypted for multiple keys",
- {
- "type": "reference",
- "argument": "keys",
- "category": "full",
- "description": " Encrypted encryption keys"
- },
- {
- "type": "reference",
- "argument": "algType",
- "category": "full",
- "description": " Package encryption type"
- },
- {
- "type": "reference",
- "argument": "encPackage",
- "category": "full",
- "description": " Encrypted package"
- },
- {
- "type": "reference",
- "argument": "senderKeyGroupId",
- "category": "full",
- "description": " Sender key group"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 4,
- "name": "senderKeyGroupId"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncyptedBoxKey"
- }
- },
- "id": 1,
- "name": "keys"
- },
- {
- "type": "string",
- "id": 2,
- "name": "algType"
- },
- {
- "type": "bytes",
- "id": 3,
- "name": "encPackage"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "EncryptedBoxSignature"
- }
- },
- "id": 5,
- "name": "signatures"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EncryptedBoxSignature",
- "doc": [
- "Signature for encrypted package",
- {
- "type": "reference",
- "argument": "algType",
- "category": "full",
- "description": " Alg Type"
- },
- {
- "type": "reference",
- "argument": "signature",
- "category": "full",
- "description": " Signature of encrypted package"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "algType"
- },
- {
- "type": "bytes",
- "id": 2,
- "name": "signature"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "EncyptedBoxKey",
- "doc": [
- "Encrypted package encryption key",
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": " Key Group Id"
- },
- {
- "type": "reference",
- "argument": "algType",
- "category": "full",
- "description": " Key encryption algorithm"
- },
- {
- "type": "reference",
- "argument": "encryptedKey",
- "category": "hidden",
- "description": " Encrypted encryption key"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "usersId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 2,
- "name": "keyGroupId"
- },
- {
- "type": "string",
- "id": 3,
- "name": "algType"
- },
- {
- "type": "bytes",
- "id": 4,
- "name": "encryptedKey"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "KeyGroupId",
- "doc": [
- "References to key groups",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "keyGroupId",
- "category": "full",
- "description": " Key Group Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "alias",
- "childType": "keyGroupId"
- },
- "id": 2,
- "name": "keyGroupId"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "KeyGroupHolder",
- "doc": [
- "Key Group Holder",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "keyGroup",
- "category": "full",
- "description": " Key Group"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
- },
- {
- "type": {
- "type": "struct",
- "childType": "EncryptionKeyGroup"
- },
- "id": 2,
- "name": "keyGroup"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SendEncryptedPackage",
- "header": 2657,
- "response": {
- "type": "anonymous",
- "header": 2664,
- "doc": [
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " date"
- },
- {
- "type": "reference",
- "argument": "obsoleteKeyGroups",
- "category": "full",
- "description": " obsolete key group ids"
- },
- {
- "type": "reference",
- "argument": "missedKeyGroups",
- "category": "full",
- "description": " missed key groups"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": {
- "type": "alias",
- "childType": "date"
- }
- },
- "id": 1,
- "name": "date"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "KeyGroupId"
- }
- },
- "id": 2,
- "name": "obsoleteKeyGroups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "KeyGroupHolder"
- }
- },
- "id": 3,
- "name": "missedKeyGroups"
- }
- ]
- },
- "doc": [
- "Sending encrypted package",
- {
- "type": "reference",
- "argument": "randomId",
- "category": "hidden",
- "description": "Random id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "randomId"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 2,
- "name": "destPeers"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "KeyGroupId"
- }
- },
- "id": 3,
- "name": "ignoredKeyGroups"
- },
- {
- "type": {
- "type": "struct",
- "childType": "EncryptedBox"
- },
- "id": 4,
- "name": "encryptedBox"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "EncryptedPackage",
- "header": 177,
- "doc": [
- "Update about encrypted package",
- {
- "type": "reference",
- "argument": "randomId",
- "category": "full",
- "description": " Random Id of package"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Sending date of package"
- },
- {
- "type": "reference",
- "argument": "senderId",
- "category": "full",
- "description": " Sender id of package"
- },
- {
- "type": "reference",
- "argument": "encryptedBox",
- "category": "full",
- "description": " Encrypted box"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 1,
- "name": "randomId"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 2,
- "name": "date"
- },
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 3,
- "name": "senderId"
- },
- {
- "type": {
- "type": "struct",
- "childType": "EncryptedBox"
- },
- "id": 4,
- "name": "encryptedBox"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Storage",
- "package": "storage",
- "items": [
- {
- "type": "rpc",
- "content": {
- "name": "UploadSharedBlob",
- "header": 2660,
- "response": {
- "type": "anonymous",
- "header": 2661,
- "doc": [
- {
- "type": "reference",
- "argument": "sharedObjectId",
- "category": "full",
- "description": " Id of shared object"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "sharedObjectId"
- }
- ]
- },
- "doc": [
- "Upload shared blob with user",
- {
- "type": "reference",
- "argument": "destPeer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "bucket",
- "category": "full",
- "description": "Bucked name"
- },
- {
- "type": "reference",
- "argument": "blob",
- "category": "full",
- "description": "Blob data"
- },
- {
- "type": "reference",
- "argument": "randomId",
- "category": "full",
- "description": "Random id for protecting from double upload"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "destPeer"
- },
- {
- "type": "string",
- "id": 2,
- "name": "bucket"
- },
- {
- "type": "bytes",
- "id": 3,
- "name": "blob"
- },
- {
- "type": {
- "type": "alias",
- "childType": "randomId"
- },
- "id": 4,
- "name": "randomId"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "DownloadSharedBlob",
- "header": 2662,
- "response": {
- "type": "anonymous",
- "header": 2663,
- "doc": [
- {
- "type": "reference",
- "argument": "blob",
- "category": "full",
- "description": " Blob contents"
- }
- ],
- "attributes": [
- {
- "type": "bytes",
- "id": 1,
- "name": "blob"
- }
- ]
- },
- "doc": [
- "Download shared blob",
- {
- "type": "reference",
- "argument": "destPeer",
- "category": "full",
- "description": "Destination peer"
- },
- {
- "type": "reference",
- "argument": "bucket",
- "category": "full",
- "description": "Bucket name"
- },
- {
- "type": "reference",
- "argument": "objectId",
- "category": "full",
- "description": "Object Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "UserOutPeer"
- },
- "id": 1,
- "name": "destPeer"
- },
- {
- "type": "string",
- "id": 2,
- "name": "bucket"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "objectId"
- }
- ]
- }
- }
- ]
- },
- {
- "title": "Peers",
- "package": "peers",
- "doc": [
- "Peer is an identificator of specific conversation."
- ],
- "items": [
- {
- "type": "enum",
- "content": {
- "name": "PeerType",
- "values": [
- {
- "name": "Private",
- "id": 1
- },
- {
- "name": "Group",
- "id": 2
- },
- {
- "name": "EncryptedPrivate",
- "id": 3
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Peer",
- "doc": [
- "Peer",
- {
- "type": "reference",
- "argument": "type",
- "category": "full",
- "description": " Peer Type"
- },
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Peer Id"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "enum",
- "childType": "PeerType"
- },
- "id": 1,
- "name": "type"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "id"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "OutPeer",
- "doc": [
- "Out peer with access hash",
- {
- "type": "reference",
- "argument": "type",
- "category": "full",
- "description": " Peer Type"
- },
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Peer Id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " Peer access hash"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "enum",
- "childType": "PeerType"
- },
- "id": 1,
- "name": "type"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "id"
- },
- {
- "type": "int64",
- "id": 3,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "UserOutPeer",
- "doc": [
- "User's out peer",
- {
- "type": "reference",
- "argument": "uid",
- "category": "full",
- "description": " User's id"
- },
- {
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " User's access hash"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "userId"
- },
- "id": 1,
- "name": "uid"
+ "name": "Text",
+ "id": 2
},
{
- "type": "int64",
- "id": 2,
- "name": "accessHash"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "GroupOutPeer",
- "doc": [
- "Group's out peer",
- {
- "type": "reference",
- "argument": "groupId",
- "category": "full",
- "description": " Group's Id"
+ "name": "Links",
+ "id": 3
},
{
- "type": "reference",
- "argument": "accessHash",
- "category": "danger",
- "description": " Group's access hash"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "alias",
- "childType": "groupId"
- },
- "id": 1,
- "name": "groupId"
+ "name": "Documents",
+ "id": 4
},
{
- "type": "int64",
- "id": 2,
- "name": "accessHash"
+ "name": "Photos",
+ "id": 5
}
- ]
- }
+ ]
}
- ]
- },
- {
- "title": "Sequence and Updates",
- "package": "sequence",
+ },{"type":"trait","content":{
+"isContainer":"true","name":"SearchCondition","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"SearchPeerTypeCondition",
+"doc":[
+"Search peer type condition",{"type":"reference","argument":"peerType","category":"full","description":" Peer type for searching"}],"trait":{"name":"SearchCondition","key":1},"attributes":[
+{"type":{"type":"enum","childType":"SearchPeerType"},"id":1,"name":"peerType"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"SearchPieceText",
+"doc":[
+"Search peer name condition",{"type":"reference","argument":"query","category":"full","description":" Search query"}],"trait":{"name":"SearchCondition","key":2},"attributes":[
+{"type":"string","id":1,"name":"query"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"SearchAndCondition",
+"doc":[
+"Search AND condion",{"type":"reference","argument":"andQuery","category":"full","description":" And Query"}],"trait":{"name":"SearchCondition","key":3},"attributes":[
+{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":1,"name":"andQuery"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"SearchOrCondition",
+"doc":[
+"Search OR condition",{"type":"reference","argument":"orQuery","category":"full","description":" Or Query"}],"trait":{"name":"SearchCondition","key":4},"attributes":[
+{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":2,"name":"orQuery"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"SearchPeerCondition",
+"doc":[
+"Serch Peer condition",{"type":"reference","argument":"peer","category":"full","description":" Peer condition"}],"trait":{"name":"SearchCondition","key":5},"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"SearchPeerContentType",
+"doc":[
+"Search content type condition",{"type":"reference","argument":"contentType","category":"full","description":" Content Type"}],"trait":{"name":"SearchCondition","key":6},"attributes":[
+{"type":{"type":"enum","childType":"SearchContentType"},"id":1,"name":"contentType"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"SearchSenderIdConfition",
+"doc":[
+"Searching sender uid condition",{"type":"reference","argument":"senderId","category":"full","description":" sender UID"}],"trait":{"name":"SearchCondition","key":7},"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"senderId"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"PeerSearchResult",
+"doc":[
+"Peer search result",{"type":"reference","argument":"peer","category":"full","description":" Peer information"},{"type":"reference","argument":"optMatchString","category":"full","description":" Description"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"optMatchString"}
+]}},{"type":"rpc","content":{
+"name":"PeerSearch",
+"header":233,
+"response":{"type":"anonymous","header":234, "doc":[
+"Found peers",{"type":"reference","argument":"searchResults","category":"full","description":" Search Results"},{"type":"reference","argument":"users","category":"full","description":" Related users"},{"type":"reference","argument":"groups","category":"full","description":" Related groups"},{"type":"reference","argument":"userPeers","category":"full","description":" Related user peers"},{"type":"reference","argument":"groupPeers","category":"full","description":" Related group peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"PeerSearchResult"}},"id":1,"name":"searchResults"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":5,"name":"groupPeers"}
+]},
+"doc":[
+"Performing peer search",{"type":"reference","argument":"query","category":"full","description":"Search query. Warring not all combinations can be processed by server. (acts as OR)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":1,"name":"query"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"MessageSearchResult",
+"doc":[
+"Message container",{"type":"reference","argument":"peer","category":"full","description":" Message Peer"},{"type":"reference","argument":"rid","category":"full","description":" Message Random Id"},{"type":"reference","argument":"date","category":"full","description":" Message Date"},{"type":"reference","argument":"senderId","category":"full","description":" Message sender UID"},{"type":"reference","argument":"content","category":"full","description":" Message content"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+,{"type":{"type":"alias","childType":"userId"},"id":4,"name":"senderId"}
+,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"content"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"MessageSearchItem",
+"doc":[
+"Message Search result container"],"attributes":[
+{"type":{"type":"struct","childType":"MessageSearchResult"},"id":1,"name":"result"}
+]}},{"type":"response","content":{
+"name":"MessageSearchResponse",
+"header":218,
+"doc":[
+"Search Result",{"type":"reference","argument":"searchResults","category":"full","description":" Search results"},{"type":"reference","argument":"users","category":"full","description":" Search users"},{"type":"reference","argument":"groups","category":"full","description":" Search groups"},{"type":"reference","argument":"loadMoreState","category":"hidden","description":" State for loading more results"},{"type":"reference","argument":"userOutPeers","category":"full","description":" Search user peers"},{"type":"reference","argument":"groupOutPeers","category":"full","description":" Search group peers"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"MessageSearchItem"}},"id":1,"name":"searchResults"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"}
+,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"loadMoreState"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userOutPeers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupOutPeers"}
+]}},{"type":"rpc","content":{
+"name":"MessageSearch",
+"header":217,
+"response":{"type":"reference","name":"MessageSearchResponse"},
+"doc":[
+"Performing message search",{"type":"reference","argument":"query","category":"full","description":"Search query"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":{"type":"trait","childType":"SearchCondition"},"id":1,"name":"query"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"MessageSearchMore",
+"header":222,
+"response":{"type":"reference","name":"MessageSearchResponse"},
+"doc":[
+"Performing message search paging",{"type":"reference","argument":"loadMoreState","category":"hidden","description":"State for loading more results"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[
+{"type":"bytes","id":1,"name":"loadMoreState"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"}
+]}}]}, {
+ "title": "Public Groups",
+ "package": "pubgroups",
"doc": [
- "Each device has it's own update sequence. At the begining application request initial sequence state by",
- "calling GetState. On each application restart or NewSessionCreated application calls GetDifference for receiving",
- "updates in update sequence.",
- "GetState and GetDifference automatically subscribes session to receiving updates in session.",
- "Each update has seq and state. Seq is sequental index of updated and used for detecting of holes in update sequence",
- "(because of server failure or session die) on client side.",
- "All updates needed to be processed in partucular order according to seq values.",
- "In some updates there can be references to users that are not available at client yer. In this case application need",
- "to ignore such update and init getting difference."
+ "Public group is easy way to find communities"
],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"PublicGroup",
+"doc":[
+"Public Group description",{"type":"reference","argument":"id","category":"full","description":" Group id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Group Access hash"},{"type":"reference","argument":"title","category":"full","description":" Group title"},{"type":"reference","argument":"avatar","category":"full","description":" Group avatar"},{"type":"reference","argument":"membersCount","category":"full","description":" Members count in group"},{"type":"reference","argument":"friendsCount","category":"full","description":" Friends count int group"},{"type":"reference","argument":"description","category":"full","description":" Description of group"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+,{"type":"string","id":3,"name":"title"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":7,"name":"avatar"}
+,{"type":"int32","id":4,"name":"membersCount"}
+,{"type":"int32","id":5,"name":"friendsCount"}
+,{"type":"string","id":6,"name":"description"}
+]}},{"type":"rpc","content":{
+"name":"GetPublicGroups",
+"header":201,
+"response":{"type":"anonymous","header":202, "doc":[
+"Loaded public groups",{"type":"reference","argument":"groups","category":"full","description":" All available groups"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"PublicGroup"}},"id":1,"name":"groups"}
+]},
+"doc":[
+"Getting public groups"],"attributes":[
+]}}]}, {
+ "title": "Invites",
+ "package": "invites",
+ "doc": [
+ "Invite mechanizm"
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"InviteState",
+"doc":[
+"Invite state",{"type":"reference","argument":"email","category":"full","description":" Email of invite"},{"type":"reference","argument":"name","category":"full","description":" Name of invited user"},{"type":"reference","argument":"uid","category":"full","description":" Uid of registered user"},{"type":"reference","argument":"tid","category":"full","description":" Team id of invite"}],"attributes":[
+{"type":"string","id":1,"name":"email"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"}
+,{"type":{"type":"opt","childType":"int32"},"id":3,"name":"uid"}
+,{"type":{"type":"opt","childType":"int32"},"id":4,"name":"tid"}
+]}},{"type":"response","content":{
+"name":"InviteList",
+"header":2564,
+"doc":[
+"Intites list",{"type":"reference","argument":"invites","category":"full","description":" Intvites"},{"type":"reference","argument":"relatedUsers","category":"full","description":" Related users in invites"},{"type":"reference","argument":"relatedGroups","category":"full","description":" Related groups in invites"},{"type":"reference","argument":"relatedTeams","category":"full","description":" Related teams in invites"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"InviteState"}},"id":1,"name":"invites"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"relatedUsers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"relatedGroups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":4,"name":"relatedTeams"}
+]}},{"type":"rpc","content":{
+"name":"LoadOwnSentInvites",
+"header":2563,
+"response":{"type":"reference","name":"InviteList"},
+"doc":[
+"Loading current invite states"],"attributes":[
+]}},{"type":"rpc","content":{
+"name":"SendInvite",
+"header":2565,
+"response":{"type":"reference","name":"InviteList"},
+"doc":[
+"Sending an email invite",{"type":"reference","argument":"email","category":"full","description":"Email for invite"},{"type":"reference","argument":"name","category":"full","description":"Optional name for invite"},{"type":"reference","argument":"destTeam","category":"full","description":"Optional team for invite"}],"attributes":[
+{"type":"string","id":1,"name":"email"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"OutTeam"}},"id":3,"name":"destTeam"}
+]}}]}, {
+ "title": "Teams",
+ "package": "teams",
+ "doc": [
+ "Teams support for Actor"
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"Team",
+"doc":[
+"Team entity",{"type":"reference","argument":"id","category":"full","description":" Team Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Team Access Hash"},{"type":"reference","argument":"name","category":"full","description":" Team name"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+,{"type":"string","id":3,"name":"name"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"OutTeam",
+"doc":[
+"Reference to a team",{"type":"reference","argument":"id","category":"full","description":" Team Id"},{"type":"reference","argument":"accessHash","category":"full","description":" Team access hash"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}},{"type":"response","content":{
+"name":"TeamsList",
+"header":2562,
+"doc":[
+"Teams response",{"type":"reference","argument":"teams","category":"hidden","description":" Teams list"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":1,"name":"teams"}
+]}},{"type":"rpc","content":{
+"name":"LoadOwnTeams",
+"header":2561,
+"response":{"type":"reference","name":"TeamsList"},
+"doc":[
+"Loading own teams"],"attributes":[
+]}},{"type":"update","content":{
+"name":"OwnTeamsChanged",
+"header":165,
+"doc":[
+"Update about own teams changed",{"type":"reference","argument":"ownTeams","category":"full","description":" Updated own teams list"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":1,"name":"ownTeams"}
+]}},{"type":"rpc","content":{
+"name":"CreateTeam",
+"header":2566,
+"response":{"type":"anonymous","header":2567, "doc":[
+"Created team response",{"type":"reference","argument":"createdTeam","category":"full","description":" Created Team"}] ,"attributes":[{"type":{"type":"struct","childType":"Team"},"id":1,"name":"createdTeam"}
+]},
+"doc":[
+"Creation of a Team",{"type":"reference","argument":"title","category":"full","description":"Title of a team"}],"attributes":[
+{"type":"string","id":1,"name":"title"}
+]}},{"type":"rpc","content":{
+"name":"InviteToTeam",
+"header":2568,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Inviting people to team",{"type":"reference","argument":"user","category":"full","description":"Dest user"},{"type":"reference","argument":"destTeam","category":"full","description":"Dest team"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"user"}
+,{"type":{"type":"struct","childType":"OutTeam"},"id":3,"name":"destTeam"}
+]}}]}, {
+ "title": "Integrations",
+ "package": "integrations",
+ "doc": [
+ "Package contains methods for providing integration"
+ ],
+ "items": [
+{"type":"response","content":{
+"name":"IntegrationToken",
+"header":183,
+"doc":[
+"Group token response",{"type":"reference","argument":"token","category":"danger","description":" current group token"},{"type":"reference","argument":"url","category":"danger","description":" current group url"}],"attributes":[
+{"type":"string","id":1,"name":"token"}
+,{"type":"string","id":2,"name":"url"}
+]}},{"type":"rpc","content":{
+"name":"GetIntegrationToken",
+"header":182,
+"response":{"type":"reference","name":"IntegrationToken"},
+"doc":[
+"Getting current group token",{"type":"reference","argument":"groupPeer","category":"full","description":"Peer"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"groupPeer"}
+]}},{"type":"rpc","content":{
+"name":"RevokeIntegrationToken",
+"header":184,
+"response":{"type":"reference","name":"IntegrationToken"},
+"doc":[
+"Revoke group token",{"type":"reference","argument":"groupPeer","category":"full","description":"Peer"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"groupPeer"}
+]}}]}, {
+ "title": "Typing and Online",
+ "package": "weak",
"items": [
{
- "type": "update_box",
- "content": {
- "name": "SeqUpdate",
- "header": 13,
- "doc": [
- "Sequence update",
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number of update"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": " Sequece state of update"
- },
- {
- "type": "reference",
- "argument": "updateHeader",
- "category": "full",
- "description": " header of update"
- },
- {
- "type": "reference",
- "argument": "update",
- "category": "compact",
- "description": " The update"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "updateHeader"
- },
- {
- "type": "bytes",
- "id": 4,
- "name": "update"
- }
- ]
- }
- },
- {
- "type": "update_box",
- "content": {
- "name": "FatSeqUpdate",
- "header": 73,
- "doc": [
- "Fat sequence update with additional data",
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number of update"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": " Sequence state of update"
- },
- {
- "type": "reference",
- "argument": "updateHeader",
- "category": "full",
- "description": " header of update"
- },
- {
- "type": "reference",
- "argument": "update",
- "category": "compact",
- "description": " The update"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Users that are referenced in update"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": " Groups that are referenced in update"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": "int32",
- "id": 3,
- "name": "updateHeader"
- },
- {
- "type": "bytes",
- "id": 4,
- "name": "update"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 5,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 6,
- "name": "groups"
- }
- ]
- }
- },
- {
- "type": "update_box",
+ "type": "enum",
"content": {
- "name": "WeakUpdate",
- "header": 26,
- "doc": [
- "Out of sequence update (for typing and online statuses)",
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of update"
- },
- {
- "type": "reference",
- "argument": "updateHeader",
- "category": "full",
- "description": " Header of update"
- },
- {
- "type": "reference",
- "argument": "update",
- "category": "compact",
- "description": " The update"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "date"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "updateHeader"
- },
+ "name": "TypingType",
+ "values": [
{
- "type": "bytes",
- "id": 3,
- "name": "update"
+ "name": "Text",
+ "id": 0
}
- ]
- }
- },
- {
- "type": "update_box",
+ ]
+ }
+ },{"type":"rpc","content":{
+"name":"Typing",
+"header":27,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Sending typing notification",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"typingType","category":"full","description":"typing type."}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"}
+]}},{"type":"rpc","content":{
+"name":"StopTyping",
+"header":30,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Stop typing",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"typingType","category":"full","description":"typing type"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"enum","childType":"TypingType"},"id":2,"name":"typingType"}
+]}}, {
+ "type": "enum",
"content": {
- "name": "WeakFatUpdate",
- "header": 2673,
- "doc": [
- "Fat Weak Update",
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of update"
- },
+ "name": "DeviceType",
+ "values": [
{
- "type": "reference",
- "argument": "updateHeader",
- "category": "full",
- "description": " Header of update"
+ "name": "GENERIC",
+ "id": 1
},
{
- "type": "reference",
- "argument": "update",
- "category": "full",
- "description": " The update"
+ "name": "PC",
+ "id": 2
},
{
- "type": "reference",
- "argument": "users",
- "category": "full",
- "description": " Users that are referenced in update"
+ "name": "MOBILE",
+ "id": 3
},
{
- "type": "reference",
- "argument": "groups",
- "category": "full",
- "description": " Groups that are referenced in update"
- }
- ],
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "date"
+ "name": "TABLET",
+ "id": 4
},
{
- "type": "int32",
- "id": 2,
- "name": "updateHeader"
+ "name": "WATCH",
+ "id": 5
},
{
- "type": "bytes",
- "id": 3,
- "name": "update"
+ "name": "MIRROR",
+ "id": 6
},
{
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 4,
- "name": "users"
+ "name": "CAR",
+ "id": 7
},
{
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 5,
- "name": "groups"
+ "name": "TABLE",
+ "id": 8
}
- ]
- }
- },
- {
- "type": "update_box",
- "content": {
- "name": "SeqUpdateTooLong",
- "header": 25,
- "doc": [
- "Notification about requiring performing manual GetDifference"
- ],
- "attributes": []
- }
- },
- {
- "type": "struct",
+ ]
+ }
+ },{"type":"rpc","content":{
+"name":"SetOnline",
+"header":29,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Sending online state",{"type":"reference","argument":"isOnline","category":"full","description":"is user online"},{"type":"reference","argument":"timeout","category":"full","description":"timeout of online state in milliseconds"},{"type":"reference","argument":"deviceType","category":"full","description":"Optional device type"},{"type":"reference","argument":"deviceCategory","category":"full","description":"Optional device category, for example android or ios"}],"attributes":[
+{"type":"bool","id":1,"name":"isOnline"}
+,{"type":{"type":"alias","childType":"msec"},"id":2,"name":"timeout"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":3,"name":"deviceType"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"deviceCategory"}
+]}},{"type":"update","content":{
+"name":"PauseNotifications",
+"header":166,
+"doc":[
+"Update about pausing notifications",{"type":"reference","argument":"timeout","category":"full","description":" Timeout for notifications resume"}],"attributes":[
+{"type":{"type":"alias","childType":"sec"},"id":1,"name":"timeout"}
+]}},{"type":"update","content":{
+"name":"RestoreNotifications",
+"header":167,
+"doc":[
+"Update about restoring notifications"],"attributes":[
+]}},{"type":"rpc","content":{
+"name":"PauseNotifications",
+"header":2641,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Pause notifications",{"type":"reference","argument":"timeout","category":"hidden","description":"Timeout of pause"}],"attributes":[
+{"type":{"type":"alias","childType":"sec"},"id":1,"name":"timeout"}
+]}},{"type":"rpc","content":{
+"name":"RestoreNotifications",
+"header":2642,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Restoring notifications"],"attributes":[
+]}},{"type":"empty"},{"type":"update","content":{
+"name":"Typing",
+"header":6,
+"doc":[
+"Update about user's typing",{"type":"reference","argument":"peer","category":"full","description":" Conversation peer"},{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"typingType","category":"full","description":" Type of typing"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"}
+,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"}
+]}},{"type":"update","content":{
+"name":"TypingStop",
+"header":81,
+"doc":[
+"Update about user's typing stop",{"type":"reference","argument":"peer","category":"full","description":" Conversation peer"},{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"typingType","category":"hidden","description":" Type of typing"}],"attributes":[
+{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"}
+,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"}
+]}},{"type":"update","content":{
+"name":"UserOnline",
+"header":7,
+"doc":[
+"Update about user became online",{"type":"reference","argument":"uid","category":"full","description":" User's Id"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":2,"name":"deviceType"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"deviceCategory"}
+]}},{"type":"update","content":{
+"name":"UserOffline",
+"header":8,
+"doc":[
+"Update about user became offline",{"type":"reference","argument":"uid","category":"full","description":" User's id"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":2,"name":"deviceType"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"deviceCategory"}
+]}},{"type":"update","content":{
+"name":"UserLastSeen",
+"header":9,
+"doc":[
+"Update about user's last seen state",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"date","category":"full","description":" Last seen time"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"alias","childType":"date"},"id":2,"name":"date"}
+,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":3,"name":"deviceType"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"deviceCategory"}
+]}},{"type":"update","content":{
+"name":"GroupOnline",
+"header":33,
+"doc":[
+"Update about group online change",{"type":"reference","argument":"groupId","category":"full","description":" Group id"},{"type":"reference","argument":"count","category":"full","description":" current online user's count"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":"int32","id":2,"name":"count"}
+]}}]}, {
+ "title": "Media and Files",
+ "package": "files",
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"FileLocation",
+"doc":[
+"Location of file on server",{"type":"reference","argument":"fileId","category":"full","description":" Unique Id of file"},{"type":"reference","argument":"accessHash","category":"danger","description":" Access hash of file"}],"expandable":"true","attributes":[
+{"type":"int64","id":1,"name":"fileId"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ImageLocation",
+"doc":[
+"Image location",{"type":"reference","argument":"fileLocation","category":"full","description":" Location of file"},{"type":"reference","argument":"width","category":"full","description":" Width of avatar image"},{"type":"reference","argument":"height","category":"full","description":" Height of avatar image"},{"type":"reference","argument":"fileSize","category":"full","description":" Size of file"}],"expandable":"true","attributes":[
+{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"}
+,{"type":"int32","id":2,"name":"width"}
+,{"type":"int32","id":3,"name":"height"}
+,{"type":"int32","id":4,"name":"fileSize"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"AvatarImage",
+"doc":[
+"Avatar Image",{"type":"reference","argument":"fileLocation","category":"full","description":" Location of file"},{"type":"reference","argument":"width","category":"full","description":" Width of avatar image"},{"type":"reference","argument":"height","category":"full","description":" Height of avatar image"},{"type":"reference","argument":"fileSize","category":"full","description":" Size of file"}],"expandable":"true","attributes":[
+{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"}
+,{"type":"int32","id":2,"name":"width"}
+,{"type":"int32","id":3,"name":"height"}
+,{"type":"int32","id":4,"name":"fileSize"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Avatar",
+"doc":[
+"Avatar of User or Group",{"type":"reference","argument":"smallImage","category":"compact","description":" Optional small image of avatar box in 100x100"},{"type":"reference","argument":"largeImage","category":"compact","description":" Optional large image of avatar box in 200x200"},{"type":"reference","argument":"fullImage","category":"compact","description":" Optional full screen image of avatar"}],"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":1,"name":"smallImage"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":2,"name":"largeImage"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":3,"name":"fullImage"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"FastThumb",
+"doc":[
+"Fast thumb of media messages. Less than 90x90 and compressed by JPEG with low quality",{"type":"reference","argument":"w","category":"full","description":" Width of thumb"},{"type":"reference","argument":"h","category":"full","description":" Height of thump"},{"type":"reference","argument":"thumb","category":"compact","description":" compressed image data"}],"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"w"}
+,{"type":"int32","id":2,"name":"h"}
+,{"type":"bytes","id":3,"name":"thumb"}
+]}}, {
+ "type": "enum",
"content": {
- "name": "UpdateContainer",
- "doc": [
- "Update container",
+ "name": "Colors",
+ "values": [
{
- "type": "reference",
- "argument": "updateHeader",
- "category": "full",
- "description": " Header of update"
+ "name": "red",
+ "id": 1
},
{
- "type": "reference",
- "argument": "update",
- "category": "compact",
- "description": " The updatre"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "updateHeader"
+ "name": "yellow",
+ "id": 2
},
{
- "type": "bytes",
- "id": 2,
- "name": "update"
+ "name": "green",
+ "id": 3
}
- ]
- }
- },
- {
- "type": "update_box",
+ ]
+ }
+ },{"type":"trait","content":{
+"isContainer":"true","name":"Color","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"RgbColor",
+"doc":[
+"RGB Color",{"type":"reference","argument":"rgb","category":"full","description":" RGB color value"}],"trait":{"name":"Color","key":1},"expandable":"true","attributes":[
+{"type":"int32","id":1,"name":"rgb"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"PredefinedColor",
+"doc":[
+"Predefined color",{"type":"reference","argument":"color","category":"hidden","description":" Predefined color value"}],"trait":{"name":"Color","key":2},"expandable":"true","attributes":[
+{"type":{"type":"enum","childType":"Colors"},"id":1,"name":"color"}
+]}},{"type":"empty"}, {
+ "type":"struct",
+ "content": {
+ "name":"HTTPHeader",
+"doc":[
+"HTTP Header record",{"type":"reference","argument":"key","category":"full","description":" HTTP Header name"},{"type":"reference","argument":"value","category":"full","description":" HTTP Header value"}],"attributes":[
+{"type":"string","id":1,"name":"key"}
+,{"type":"string","id":2,"name":"value"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"FileUrlDescription",
+"doc":[
+"File url description",{"type":"reference","argument":"fileId","category":"full","description":" File id of url"},{"type":"reference","argument":"url","category":"full","description":" Url for downloading"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url"},{"type":"reference","argument":"unsignedUrl","category":"hidden","description":" Unsigned URL (used to honor web caches)"},{"type":"reference","argument":"unsignedUrlHeaders","category":"hidden","description":" Headers that is required to download files with unsigned url"}],"attributes":[
+{"type":"int64","id":1,"name":"fileId"}
+,{"type":"string","id":2,"name":"url"}
+,{"type":{"type":"alias","childType":"sec"},"id":3,"name":"timeout"}
+,{"type":{"type":"opt","childType":"string"},"id":4,"name":"unsignedUrl"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"HTTPHeader"}},"id":5,"name":"unsignedUrlHeaders"}
+]}},{"type":"rpc","content":{
+"name":"GetFileUrl",
+"header":77,
+"response":{"type":"anonymous","header":78, "doc":[
+{"type":"reference","argument":"url","category":"full","description":" Url for downloading"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url"},{"type":"reference","argument":"unsignedUrl","category":"full","description":" Unsigned URL (used to honor web caches)"},{"type":"reference","argument":"unsignedUrlHeaders","category":"full","description":" Headers that is required to download files with unsigned url"}] ,"attributes":[{"type":"string","id":1,"name":"url"}
+,{"type":{"type":"alias","childType":"sec"},"id":2,"name":"timeout"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"unsignedUrl"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"HTTPHeader"}},"id":4,"name":"unsignedUrlHeaders"}
+]},
+"doc":[
+"Requesting file URL for downloading",{"type":"reference","argument":"file","category":"full","description":"file's location"}],"attributes":[
+{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"file"}
+]}},{"type":"rpc","content":{
+"name":"GetFileUrls",
+"header":2573,
+"response":{"type":"anonymous","header":2574, "doc":[
+{"type":"reference","argument":"fileUrls","category":"full","description":" File urls"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"FileUrlDescription"}},"id":1,"name":"fileUrls"}
+]},
+"doc":[
+"Requesting multiple fle URL for downloading",{"type":"reference","argument":"files","category":"hidden","description":"File locations to load urls"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"FileLocation"}},"id":1,"name":"files"}
+]}},{"type":"rpc","content":{
+"name":"GetFileUrlBuilder",
+"header":2579,
+"response":{"type":"anonymous","header":2580, "doc":[
+{"type":"reference","argument":"baseUrl","category":"full","description":" Base Url for files"},{"type":"reference","argument":"algo","category":"full","description":" Signature algorithm"},{"type":"reference","argument":"seed","category":"full","description":" Public-visible seed of signature"},{"type":"reference","argument":"signatureSecret","category":"full","description":" Signature Secret"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url builder"}] ,"attributes":[{"type":"string","id":1,"name":"baseUrl"}
+,{"type":"string","id":2,"name":"algo"}
+,{"type":"string","id":5,"name":"seed"}
+,{"type":"bytes","id":3,"name":"signatureSecret"}
+,{"type":{"type":"alias","childType":"sec"},"id":4,"name":"timeout"}
+]},
+"doc":[
+"Get File URL Builder that allows to build file urls from client side",{"type":"reference","argument":"supportedSignatureAlgorithms","category":"hidden","description":"Supported signature algorithms by client"}],"attributes":[
+{"type":{"type":"list","childType":"string"},"id":1,"name":"supportedSignatureAlgorithms"}
+]}},{"type":"rpc","content":{
+"name":"GetFileUploadUrl",
+"header":97,
+"response":{"type":"anonymous","header":121, "doc":[
+{"type":"reference","argument":"url","category":"full","description":" Url for uploading"},{"type":"reference","argument":"uploadKey","category":"compact","description":" Upload key for upload"}] ,"attributes":[{"type":"string","id":1,"name":"url"}
+,{"type":"bytes","id":2,"name":"uploadKey"}
+]},
+"doc":[
+"Requesting pload url",{"type":"reference","argument":"expectedSize","category":"full","description":"Expected size of uploading file. May be inaccurate. Used for size allocation optimizations."}],"attributes":[
+{"type":"int32","id":1,"name":"expectedSize"}
+]}},{"type":"rpc","content":{
+"name":"CommitFileUpload",
+"header":122,
+"response":{"type":"anonymous","header":138, "doc":[
+{"type":"reference","argument":"uploadedFileLocation","category":"hidden","description":" Result file location"}] ,"attributes":[{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"uploadedFileLocation"}
+]},
+"doc":[
+"Comminting uploaded file to storage"],"attributes":[
+{"type":"bytes","id":1,"name":"uploadKey"}
+,{"type":"string","id":2,"name":"fileName"}
+]}},{"type":"rpc","content":{
+"name":"GetFileUploadPartUrl",
+"header":142,
+"response":{"type":"anonymous","header":141, "doc":[
+{"type":"reference","argument":"url","category":"full","description":" Upload file part url"}] ,"attributes":[{"type":"string","id":1,"name":"url"}
+]},
+"doc":[
+"Upload file part",{"type":"reference","argument":"uploadKey","category":"compact","description":"Upload Key from requestFileUploadUrl"}],"attributes":[
+{"type":"int32","id":1,"name":"partNumber"}
+,{"type":"int32","id":2,"name":"partSize"}
+,{"type":"bytes","id":3,"name":"uploadKey"}
+]}}]}, {
+ "title": "Features",
+ "package": "features",
+ "doc": [
+ "Enable feature discovery. Currently available features:",
+ "* \"call\" - private audio calls"
+ ],
+ "items": [
+{"type":"rpc","content":{
+"name":"EnableFeature",
+"header":2588,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Enabling feature on the device",{"type":"reference","argument":"featureName","category":"full","description":"Feature name"},{"type":"reference","argument":"args","category":"danger","description":"Optional arguments to a feature"}],"attributes":[
+{"type":"string","id":1,"name":"featureName"}
+,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"args"}
+]}},{"type":"rpc","content":{
+"name":"DisableFeature",
+"header":2589,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Disabling feature on the device",{"type":"reference","argument":"featureName","category":"full","description":"Feature name"}],"attributes":[
+{"type":"string","id":1,"name":"featureName"}
+]}},{"type":"rpc","content":{
+"name":"CheckFeatureEnabled",
+"header":2590,
+"response":{"type":"reference","name":"Bool"},
+"doc":[
+"Method for checking if feature is available to user"],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userOutPeer"}
+,{"type":"string","id":2,"name":"featureName"}
+]}}]}, {
+ "title": "EventBus",
+ "package": "eventbus",
+ "items": [
+{"type":"rpc","content":{
+"name":"CreateNewEventBus",
+"header":2665,
+"response":{"type":"anonymous","header":2666, "doc":[
+"Created new Event Bus",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Your Device Id"}] ,"attributes":[{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"deviceId"}
+]},
+"doc":[
+"Create new Event Bus",{"type":"reference","argument":"timeout","category":"full","description":"Optional timeout of Event Bus"},{"type":"reference","argument":"isOwned","category":"full","description":"Is Event Bus owned by creator"}],"attributes":[
+{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":1,"name":"timeout"}
+,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isOwned"}
+]}},{"type":"rpc","content":{
+"name":"JoinEventBus",
+"header":2668,
+"response":{"type":"anonymous","header":2669, "doc":[
+{"type":"reference","argument":"deviceId","category":"full","description":" Your Device Id"},{"type":"reference","argument":"rejoinToken","category":"full","description":" Token that can be used for rejoining event bus with same device id"}] ,"attributes":[{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"deviceId"}
+,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"rejoinToken"}
+]},
+"doc":[
+"Joining Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"timeout","category":"full","description":"Join timeout"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"}
+]}},{"type":"rpc","content":{
+"name":"ReJoinEventBus",
+"header":2675,
+"response":{"type":"anonymous","header":2676, "doc":[
+{"type":"reference","argument":"deviceId","category":"hidden","description":" Your Device Id"}] ,"attributes":[{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"deviceId"}
+]},
+"doc":[
+"Rejoining to event bus after session was disposed",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"rejoinToken","category":"full","description":"Rejoin Token"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":"bytes","id":2,"name":"rejoinToken"}
+]}},{"type":"rpc","content":{
+"name":"KeepAliveEventBus",
+"header":2670,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Keep Alive Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"timeout","category":"full","description":"Optional timeout for keep alive"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"}
+]}},{"type":"rpc","content":{
+"name":"DisposeEventBus",
+"header":2667,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Dispose Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+]}},{"type":"rpc","content":{
+"name":"PostToEventBus",
+"header":2671,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Event Bus Destination",{"type":"reference","argument":"id","category":"full","description":"Bus Id"},{"type":"reference","argument":"destinations","category":"full","description":"If Empty need to broadcase message to everyone"},{"type":"reference","argument":"message","category":"hidden","description":"Message"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"destinations"}
+,{"type":"bytes","id":3,"name":"message"}
+]}},{"type":"update","content":{
+"name":"EventBusDeviceConnected",
+"header":2561,
+"doc":[
+"Update about pubsub device connected",{"type":"reference","argument":"id","category":"full","description":" ID of Event Bus"},{"type":"reference","argument":"userId","category":"full","description":" Joined User Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Joined Device Unique Id"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"userId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"}
+]}},{"type":"update","content":{
+"name":"EventBusDeviceDisconnected",
+"header":2563,
+"doc":[
+"Update about device disconnected",{"type":"reference","argument":"id","category":"full","description":" ID of Event Bus"},{"type":"reference","argument":"userId","category":"full","description":" Joined User Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Disconnected Device unique Id"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"userId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"}
+]}},{"type":"update","content":{
+"name":"EventBusMessage",
+"header":2562,
+"doc":[
+"Event Bus Message",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"senderId","category":"full","description":" Sender of message"},{"type":"reference","argument":"senderDeviceId","category":"full","description":" Device Id of sender"},{"type":"reference","argument":"message","category":"hidden","description":" Message"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"senderId"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"randomId"}},"id":3,"name":"senderDeviceId"}
+,{"type":"bytes","id":4,"name":"message"}
+]}},{"type":"update","content":{
+"name":"EventBusDisposed",
+"header":2564,
+"doc":[
+"Event Bus dispose",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"}],"attributes":[
+{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"}
+]}}]}, {
+ "title": "Values",
+ "package": "values",
+ "doc": [
+ "Synced Values"
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"SyncedValue",
+"doc":[
+"Synced Value container",{"type":"reference","argument":"id","category":"full","description":" Unique Id of a value. Unique in the scope of one named value."},{"type":"reference","argument":"value","category":"full","description":" Optional value"}],"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"id"}
+,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"value"}
+]}},{"type":"rpc","content":{
+"name":"LoadSyncedSet",
+"header":2679,
+"response":{"type":"anonymous","header":2680, "doc":[
+{"type":"reference","argument":"values","category":"full","description":" Current set values"},{"type":"reference","argument":"isStrong","category":"full","description":" Is this value strong and stored in sequence. By default is true."}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":1,"name":"values"}
+,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isStrong"}
+]},
+"doc":[
+"Loading synced set",{"type":"reference","argument":"setName","category":"hidden","description":"readable name of the set"}],"attributes":[
+{"type":"string","id":1,"name":"setName"}
+]}},{"type":"update","content":{
+"name":"SynedSetUpdated",
+"header":72,
+"doc":[
+"Update about synced set update",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"syncedValues","category":"full","description":" Current set values"},{"type":"reference","argument":"isStrong","category":"full","description":" Is this value strong and need to be stored on disk"}],"attributes":[
+{"type":"string","id":1,"name":"setName"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":2,"name":"syncedValues"}
+,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isStrong"}
+]}},{"type":"update","content":{
+"name":"SyncedSetAddedOrUpdated",
+"header":73,
+"doc":[
+"Update about added or updated values in the synced set",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"addedOrUpdatedValues","category":"hidden","description":" Added or updated values"}],"attributes":[
+{"type":"string","id":1,"name":"setName"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":2,"name":"addedOrUpdatedValues"}
+]}},{"type":"update","content":{
+"name":"SyncedSetRemoved",
+"header":74,
+"doc":[
+"Update about removed items from synced set",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"removedItems","category":"full","description":" Removed Items from the set"}],"attributes":[
+{"type":"string","id":1,"name":"setName"}
+,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"removedItems"}
+]}}]}, {
+ "title": "WebRTC",
+ "package": "webrtc",
+ "doc": [
+ "WebRTC package that enables support to audio and video calls"
+ ],
+ "items": [
+{"type":"update","content":{
+"name":"IncomingCall",
+"header":52,
+"doc":[
+"Update about incoming call (Sent every 10 seconds)",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"attemptIndex","category":"full","description":" Optional attempt Index"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+,{"type":{"type":"opt","childType":"int32"},"id":2,"name":"attemptIndex"}
+]}},{"type":"update","content":{
+"name":"CallHandled",
+"header":53,
+"doc":[
+"Update about incoming call handled",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"attemptIndex","category":"full","description":" Optional attempt Index"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+,{"type":{"type":"opt","childType":"int32"},"id":2,"name":"attemptIndex"}
+]}},{"type":"update","content":{
+"name":"CallUpgraded",
+"header":56,
+"doc":[
+"Update about call moved to other peer",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"groupId","category":"full","description":" Upgraded group id"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+,{"type":{"type":"alias","childType":"groupId"},"id":2,"name":"groupId"}
+]}},{"type":"rpc","content":{
+"name":"GetCallInfo",
+"header":2600,
+"response":{"type":"anonymous","header":2606, "doc":[
+{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"groups","category":"compact","description":" Groups"},{"type":"reference","argument":"users","category":"compact","description":" Users"},{"type":"reference","argument":"eventBusId","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"isAudioOnlyCall","category":"full","description":" Is Audio Only Call. Default is true"},{"type":"reference","argument":"isVideoOnlyCall","category":"full","description":" Is Video Only Call. Default is false."},{"type":"reference","argument":"isVideoPreferred","category":"full","description":" Is Video preferred"}] ,"attributes":[{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":2,"name":"groups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"}
+,{"type":{"type":"alias","childType":"busId"},"id":4,"name":"eventBusId"}
+,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"isAudioOnlyCall"}
+,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isVideoOnlyCall"}
+,{"type":{"type":"opt","childType":"bool"},"id":7,"name":"isVideoPreferred"}
+]},
+"doc":[
+"Getting Call Information",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+]}},{"type":"rpc","content":{
+"name":"DoCall",
+"header":2597,
+"response":{"type":"anonymous","header":2598, "doc":[
+{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"eventBusId","category":"full","description":" Call Event Bus Id"}] ,"attributes":[{"type":"int64","id":1,"name":"callId"}
+,{"type":{"type":"alias","childType":"busId"},"id":2,"name":"eventBusId"}
+,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"}
+]},
+"doc":[
+"Do Call. Right after a call client need to start sending CallInProgress",{"type":"reference","argument":"peer","category":"full","description":"destination peer"},{"type":"reference","argument":"timeout","category":"full","description":"Initial timeout"},{"type":"reference","argument":"isAudioOnlyCall","category":"full","description":"Is Audio only call. Default is true."},{"type":"reference","argument":"isVideoOnlyCall","category":"full","description":"Is Video Only call. Default is false."},{"type":"reference","argument":"isVideoPreferred","category":"full","description":"Is Video preferred"}],"attributes":[
+{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"}
+,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"}
+,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isAudioOnlyCall"}
+,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isVideoOnlyCall"}
+,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isVideoPreferred"}
+]}},{"type":"rpc","content":{
+"name":"UpgradeCall",
+"header":2677,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Method for upgrading a call from private call to group call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"},{"type":"reference","argument":"peer","category":"full","description":"Destination peer for upgrading"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+,{"type":{"type":"struct","childType":"GroupOutPeer"},"id":2,"name":"peer"}
+]}},{"type":"rpc","content":{
+"name":"DoCallAgain",
+"header":2678,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Call again to user",{"type":"reference","argument":"callId","category":"full","description":"Call Id"},{"type":"reference","argument":"user","category":"full","description":"User to call again"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"user"}
+]}},{"type":"rpc","content":{
+"name":"JoinCall",
+"header":2683,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Joining Call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+]}},{"type":"rpc","content":{
+"name":"RejectCall",
+"header":2684,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Rejecting Call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+]}},{"type":"rpc","content":{
+"name":"OptimizeSDP",
+"header":2685,
+"response":{"type":"anonymous","header":2686, "doc":[
+{"type":"reference","argument":"optimizedSDP","category":"hidden","description":" Optimized version of SDP"}] ,"attributes":[{"type":"string","id":1,"name":"optimizedSDP"}
+]},
+"doc":[
+"Optimizing SDP",{"type":"reference","argument":"type","category":"full","description":"Type of SDP (offer or answer)"},{"type":"reference","argument":"sdp","category":"full","description":"SDP value"},{"type":"reference","argument":"ownSettings","category":"full","description":"Own Settings"},{"type":"reference","argument":"theirSettings","category":"full","description":"Their Settings"}],"attributes":[
+{"type":"string","id":1,"name":"type"}
+,{"type":"string","id":2,"name":"sdp"}
+,{"type":{"type":"struct","childType":"PeerSettings"},"id":3,"name":"ownSettings"}
+,{"type":{"type":"struct","childType":"PeerSettings"},"id":4,"name":"theirSettings"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ICEServer",
+"doc":[
+"ICE Server description",{"type":"reference","argument":"url","category":"full","description":" Url to server"},{"type":"reference","argument":"username","category":"full","description":" Optional username"},{"type":"reference","argument":"credential","category":"danger","description":" Optional credential"}],"attributes":[
+{"type":"string","id":1,"name":"url"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"username"}
+,{"type":{"type":"opt","childType":"string"},"id":3,"name":"credential"}
+]}},{"type":"trait","content":{
+"isContainer":"true","name":"WebRTCSignaling","attributes":[
+]}},{"type":"comment","content":"Advertising"}, {
+ "type":"struct",
+ "content": {
+ "name":"AdvertiseSelf",
+"doc":[
+"Advertizing self to a master mode",{"type":"reference","argument":"peerSettings","category":"full","description":" Optional peer Settings"}],"trait":{"name":"WebRTCSignaling","key":21},"attributes":[
+{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":1,"name":"peerSettings"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"AdvertiseMaster",
+"doc":[
+"Sent by master"],"trait":{"name":"WebRTCSignaling","key":26},"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"ICEServer"}},"id":1,"name":"server"}
+]}},{"type":"comment","content":"Web RTC signaling"}, {
+ "type":"struct",
+ "content": {
+ "name":"Candidate",
+"doc":[
+"Candidate signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of candidate"},{"type":"reference","argument":"index","category":"full","description":" Index of candidate"},{"type":"reference","argument":"id","category":"full","description":" Id of candidate"},{"type":"reference","argument":"sdp","category":"full","description":" SDP of candidate"}],"trait":{"name":"WebRTCSignaling","key":3},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"}
+,{"type":"int32","id":2,"name":"index"}
+,{"type":"string","id":3,"name":"id"}
+,{"type":"string","id":4,"name":"sdp"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Offer",
+"doc":[
+"Offer signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of offer"},{"type":"reference","argument":"sdp","category":"full","description":" Offer SDP"},{"type":"reference","argument":"ownPeerSettings","category":"full","description":" Optional Own Peer settings"}],"trait":{"name":"WebRTCSignaling","key":4},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"}
+,{"type":"string","id":2,"name":"sdp"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":3,"name":"ownPeerSettings"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Answer",
+"doc":[
+"Answer signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of answer"},{"type":"reference","argument":"sdp","category":"full","description":" Answer SDP"}],"trait":{"name":"WebRTCSignaling","key":5},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"}
+,{"type":"string","id":2,"name":"sdp"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"MediaStreamsUpdated",
+"doc":[
+"Update about media stream settings updated. Can be sent before offer/answer.",{"type":"reference","argument":"isAudioEnabled","category":"full","description":" Is Audio Enabled in current connection. True by default."},{"type":"reference","argument":"isVideoEnabled","category":"full","description":" Is Video Enabled in current connection. False by default."}],"trait":{"name":"WebRTCSignaling","key":28},"attributes":[
+{"type":{"type":"opt","childType":"bool"},"id":1,"name":"isAudioEnabled"}
+,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isVideoEnabled"}
+]}},{"type":"comment","content":"Call Controlling events"}, {
+ "type":"struct",
+ "content": {
+ "name":"NeedOffer",
+"doc":[
+"Notification from master that offer is required",{"type":"reference","argument":"device","category":"full","description":" Destination Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"},{"type":"reference","argument":"peerSettings","category":"full","description":" Optional peer settings"}],"trait":{"name":"WebRTCSignaling","key":8},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"}
+,{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":3,"name":"peerSettings"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"NegotinationSuccessful",
+"doc":[
+"Notification about on negotiation is successful",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":24},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EnableConnection",
+"doc":[
+"Notification about enabling connection to peer",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":22},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"OnRenegotiationNeeded",
+"doc":[
+"Need renegotiate session. For example when streams are changed.",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":25},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"CloseSession",
+"doc":[
+"Close this session and be ready to",{"type":"reference","argument":"device","category":"hidden","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id for renegotiation"}],"trait":{"name":"WebRTCSignaling","key":6},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"}
+,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"NeedDisconnect",
+"doc":[
+"Notification about requirement about required disconnection from peer",{"type":"reference","argument":"device","category":"hidden","description":" Device Id"}],"trait":{"name":"WebRTCSignaling","key":20},"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ActiveCall",
+"doc":[
+"Active Calls. Used in broadcasting states of current calls.",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"peer","category":"full","description":" Call's peer"},{"type":"reference","argument":"callMembers","category":"full","description":" Call Members"}],"attributes":[
+{"type":"int64","id":1,"name":"callId"}
+,{"type":{"type":"struct","childType":"Peer"},"id":2,"name":"peer"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"CallMember"}},"id":3,"name":"callMembers"}
+]}}, {
+ "type": "enum",
"content": {
- "name": "CombinedUpdate",
- "header": 2625,
- "doc": [
- "Combined update",
- {
- "type": "reference",
- "argument": "seqStart",
- "category": "full",
- "description": " Sequence number start"
- },
- {
- "type": "reference",
- "argument": "seqEnd",
- "category": "full",
- "description": " Sequence number end"
- },
+ "name": "CallMemberState",
+ "values": [
{
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " Sequence state"
+ "name": "RINGING",
+ "id": 1
},
{
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Update's users"
+ "name": "RINGING_REACHED",
+ "id": 4
},
{
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": " Update's groups"
+ "name": "CONNECTING",
+ "id": 2
},
{
- "type": "reference",
- "argument": "updates",
- "category": "full",
- "description": " Updates (can be empty)"
+ "name": "CONNECTED",
+ "id": 3
},
{
- "type": "reference",
- "argument": "messages",
- "category": "full",
- "description": " New messages"
+ "name": "ENDED",
+ "id": 5
}
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seqStart"
- },
- {
- "type": "int32",
- "id": 2,
- "name": "seqEnd"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 3,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 4,
- "name": "users"
- },
+ ]
+ }
+ }, {
+ "type":"struct",
+ "content": {
+ "name":"CallMemberStateHolder",
+"doc":[
+"Call Member state holder",{"type":"reference","argument":"state","category":"full","description":" State Value"},{"type":"reference","argument":"fallbackIsRinging","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsConnected","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsConnecting","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsRingingReached","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsEnded","category":"full","description":" Fallback flag for future compatibility of state"}],"attributes":[
+{"type":{"type":"enum","childType":"CallMemberState"},"id":1,"name":"state"}
+,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"fallbackIsRinging"}
+,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"fallbackIsConnected"}
+,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"fallbackIsConnecting"}
+,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"fallbackIsRingingReached"}
+,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"fallbackIsEnded"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"CallMember",
+"doc":[
+"Call Member",{"type":"reference","argument":"userId","category":"full","description":" Member User Id"},{"type":"reference","argument":"state","category":"full","description":" State of member"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"userId"}
+,{"type":{"type":"struct","childType":"CallMemberStateHolder"},"id":3,"name":"state"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"PeerSettings",
+"doc":[
+"Peer Settings",{"type":"reference","argument":"is3DESSupported","category":"full","description":" Marking if 3DES supported. Default is false."},{"type":"reference","argument":"isMobile","category":"full","description":" Is Peer a mobile phone. Default is false."},{"type":"reference","argument":"canBeAudioRelay","category":"full","description":" If peer can audio relay. Default is false."},{"type":"reference","argument":"canPreConnect","category":"full","description":" If peer can preconnect before answer"}],"attributes":[
+{"type":{"type":"opt","childType":"bool"},"id":1,"name":"is3DESSupported"}
+,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isMobile"}
+,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"canBeAudioRelay"}
+,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"canPreConnect"}
+]}}]}, {
+ "title": "Config sync",
+ "package": "configs",
+ "doc": [
+ "Parameter Syncronization across devices. Can be used for simple sync",
+ "across devices without rewriting server side code."
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"Parameter",
+"doc":[
+"Syncing Parameter",{"type":"reference","argument":"key","category":"full","description":" Key of parameter"},{"type":"reference","argument":"value","category":"full","description":" Value of parameter"}],"attributes":[
+{"type":"string","id":1,"name":"key"}
+,{"type":"string","id":2,"name":"value"}
+]}},{"type":"rpc","content":{
+"name":"GetParameters",
+"header":134,
+"response":{"type":"anonymous","header":135, "doc":[
+{"type":"reference","argument":"parameters","category":"full","description":" Current parameters"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Parameter"}},"id":1,"name":"parameters"}
+]},
+"doc":[
+"Getting Parameters"],"attributes":[
+]}},{"type":"rpc","content":{
+"name":"EditParameter",
+"header":128,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Change parameter value",{"type":"reference","argument":"key","category":"full","description":"Key of parameter"},{"type":"reference","argument":"value","category":"full","description":"Value of parameter"}],"attributes":[
+{"type":"string","id":1,"name":"key"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"value"}
+]}},{"type":"update","content":{
+"name":"ParameterChanged",
+"header":131,
+"doc":[
+"Update about parameter change",{"type":"reference","argument":"key","category":"full","description":" Key of parameter"},{"type":"reference","argument":"value","category":"full","description":" Value of parameter"}],"attributes":[
+{"type":"string","id":1,"name":"key"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"value"}
+]}}]}, {
+ "title": "Stats",
+ "package": "stats",
+ "doc": [
+ "Saving statistics information"
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"EventRecord",
+"doc":[
+"Record for stored event"],"attributes":[
+{"type":{"type":"alias","childType":"date"},"id":1,"name":"date"}
+,{"type":{"type":"trait","childType":"Event"},"id":2,"name":"event"}
+]}},{"type":"trait","content":{
+"isContainer":"true","name":"Event","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"UntypedEvent",
+"doc":[
+"Untyped event",{"type":"reference","argument":"eventType","category":"full","description":" Event type"},{"type":"reference","argument":"params","category":"full","description":" optional params for event"}],"trait":{"name":"Event","key":1},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"eventType"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":2,"name":"params"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ContentViewChanged",
+"doc":[
+"Content view event",{"type":"reference","argument":"contentType","category":"full","description":" unique content id"},{"type":"reference","argument":"visible","category":"full","description":" Is content visible"},{"type":"reference","argument":"params","category":"full","description":" optional params for content view"}],"trait":{"name":"Event","key":2},"expandable":"true","attributes":[
+{"type":"string","id":1,"name":"contentType"}
+,{"type":"string","id":2,"name":"contentId"}
+,{"type":"bool","id":3,"name":"visible"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":4,"name":"params"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"AppVisibleChanged",
+"doc":[
+"On App Visible event",{"type":"reference","argument":"visible","category":"full","description":" Is app visible"}],"trait":{"name":"Event","key":4},"expandable":"true","attributes":[
+{"type":"bool","id":1,"name":"visible"}
+]}},{"type":"rpc","content":{
+"name":"StoreEvents",
+"header":243,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Storing events on server",{"type":"reference","argument":"events","category":"full","description":"Events for storing"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"trait","childType":"Event"}},"id":1,"name":"events"}
+]}}]}, {
+ "title": "Raw API",
+ "package": "raw",
+ "doc": [
+ "Schema-less API that is useful for external integrations"
+ ],
+ "items": [
+{"type":"rpc","content":{
+"name":"RawRequest",
+"header":2569,
+"response":{"type":"anonymous","header":2570, "doc":[
+"Response of a raw request",{"type":"reference","argument":"result","category":"full","description":" Result of request"}] ,"attributes":[{"type":{"type":"trait","childType":"RawValue"},"id":1,"name":"result"}
+]},
+"doc":[
+"Making raw request to external service via shema-less RPC request",{"type":"reference","argument":"service","category":"full","description":"Service name for RPC request"},{"type":"reference","argument":"method","category":"full","description":"Method for execution"},{"type":"reference","argument":"params","category":"full","description":"Optional params for the method"}],"attributes":[
+{"type":"string","id":1,"name":"service"}
+,{"type":"string","id":2,"name":"method"}
+,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":3,"name":"params"}
+]}}]}, {
+ "title": "Wallpappers",
+ "package": "wallpappers",
+ "doc": [
+ "Wallpappers support"
+ ],
+ "items": [
+ {
+ "type":"struct",
+ "content": {
+ "name":"Wallpapper",
+"doc":[
+"Wallpapper structure",{"type":"reference","argument":"id","category":"full","description":" Wallpapper id"},{"type":"reference","argument":"w","category":"full","description":" Image width"},{"type":"reference","argument":"h","category":"full","description":" Image height"},{"type":"reference","argument":"fileSize","category":"full","description":" Image file size"},{"type":"reference","argument":"file","category":"full","description":" Image file reference"},{"type":"reference","argument":"thumb","category":"full","description":" Image thumb"}],"attributes":[
+{"type":"int32","id":7,"name":"id"}
+,{"type":"int32","id":1,"name":"w"}
+,{"type":"int32","id":2,"name":"h"}
+,{"type":"int32","id":3,"name":"fileSize"}
+,{"type":{"type":"struct","childType":"FileLocation"},"id":5,"name":"file"}
+,{"type":{"type":"struct","childType":"FastThumb"},"id":6,"name":"thumb"}
+]}},{"type":"rpc","content":{
+"name":"LoadWallpappers",
+"header":241,
+"response":{"type":"anonymous","header":242, "doc":[
+"Loaded Wallpappers",{"type":"reference","argument":"wallpappers","category":"full","description":" Available wallpapper list"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Wallpapper"}},"id":1,"name":"wallpappers"}
+]},
+"doc":[
+"Load available wallpappers",{"type":"reference","argument":"maxWidth","category":"full","description":"Maximum width of wallpapper"},{"type":"reference","argument":"maxHeight","category":"full","description":"Maximum height of wallpapper"}],"attributes":[
+{"type":"int32","id":1,"name":"maxWidth"}
+,{"type":"int32","id":2,"name":"maxHeight"}
+]}}]}, {
+ "title": "Push",
+ "package": "push",
+ "doc": [
+ "Vendor's pushes for receiving push notifications.",
+ "Push notification contains current sequence number of main sequence."
+ ],
+ "items": [
+{"type":"rpc","content":{
+"name":"RegisterGooglePush",
+"header":51,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Registering push token on server",{"type":"reference","argument":"projectId","category":"hidden","description":"Project Id of token"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[
+{"type":"int64","id":1,"name":"projectId"}
+,{"type":"string","id":2,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"UnregisterGooglePush",
+"header":2631,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Unregistering Google Push",{"type":"reference","argument":"token","category":"danger","description":"Token value"}],"attributes":[
+{"type":"string","id":1,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"RegisterApplePush",
+"header":76,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Registering apple push on server",{"type":"reference","argument":"apnsKey","category":"hidden","description":"apns key id"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[
+{"type":"int32","id":1,"name":"apnsKey"}
+,{"type":"string","id":2,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"UnregisterApplePush",
+"header":2632,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Unregistering Apple Push",{"type":"reference","argument":"token","category":"full","description":"Token"}],"attributes":[
+{"type":"string","id":1,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"RegisterApplePushKit",
+"header":2576,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Registration of a new Apple's PushKit tokens",{"type":"reference","argument":"apnsKey","category":"hidden","description":"APNS key id"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[
+{"type":"int32","id":1,"name":"apnsKey"}
+,{"type":"string","id":2,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"UnregisterApplePushKit",
+"header":2633,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Unregistering Apple Push Kit token",{"type":"reference","argument":"token","category":"hidden","description":"Token Value"}],"attributes":[
+{"type":"string","id":1,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"RegisterApplePushToken",
+"header":2593,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Registering Apple Push Token",{"type":"reference","argument":"bundleId","category":"full","description":"Bundle Id of app"},{"type":"reference","argument":"token","category":"full","description":"Push token"}],"attributes":[
+{"type":"string","id":1,"name":"bundleId"}
+,{"type":"string","id":2,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"UnregisterApplePushToken",
+"header":2634,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Unregister Apple Push token",{"type":"reference","argument":"token","category":"hidden","description":"Token value"}],"attributes":[
+{"type":"string","id":1,"name":"token"}
+]}},{"type":"rpc","content":{
+"name":"RegisterActorPush",
+"header":2575,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Register Actor Push endpoint",{"type":"reference","argument":"endpoint","category":"full","description":"Endpoint for push sending"},{"type":"reference","argument":"encryptionKeys","category":"full","description":"Push Encryption keys"}],"attributes":[
+{"type":"string","id":1,"name":"endpoint"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":2,"name":"encryptionKeys"}
+]}},{"type":"rpc","content":{
+"name":"UnregisterActorPush",
+"header":2635,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Unregister Actor Push endpoint",{"type":"reference","argument":"endpoint","category":"full","description":"Endpoint for unregistering"}],"attributes":[
+{"type":"string","id":1,"name":"endpoint"}
+]}}]}, {
+ "title": "Encryption",
+ "package": "encryption",
+ "doc": [
+ "Package that include encryption support",
+ "Key alg types:",
+ "* curve25519 - https://en.wikipedia.org/wiki/Curve25519",
+ "* rsa-2048",
+ "* rsa-4096",
+ "* aes-128",
+ "* kuznechik-128",
+ "",
+ "Signature alg types:",
+ "* Ed25519 - used curve25519 conveted to Ed255519 for signing and validataion"
+ ],
+ "items": [
+{"type":"comment","content":"Public Keys"}, {
+ "type":"struct",
+ "content": {
+ "name":"EncryptionKeyGroup",
+"doc":[
+"Encryption Key Group",{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"identityKey","category":"full","description":" Key that is used as identity and for validation of Key Group changes"},{"type":"reference","argument":"supportedEncryption","category":"full","description":" Supported encryption methods by this key group"},{"type":"reference","argument":"keys","category":"compact","description":" keys of Key Group"},{"type":"reference","argument":"signatures","category":"compact","description":" Signatures of keys"}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"}
+,{"type":{"type":"list","childType":"string"},"id":2,"name":"supportedEncryption"}
+,{"type":{"type":"struct","childType":"EncryptionKey"},"id":3,"name":"identityKey"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":4,"name":"keys"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":5,"name":"signatures"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EncryptionKeySignature",
+"doc":[
+"Signed Key. Usually used for public keys.",{"type":"reference","argument":"keyId","category":"full","description":" Key Id used for signature"},{"type":"reference","argument":"signatureAlg","category":"full","description":" Signature algorithm"},{"type":"reference","argument":"signature","category":"full","description":" Signature value"}],"attributes":[
+{"type":"int64","id":1,"name":"keyId"}
+,{"type":"string","id":2,"name":"signatureAlg"}
+,{"type":"bytes","id":3,"name":"signature"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EncryptionKey",
+"doc":[
+"Encryption Key",{"type":"reference","argument":"keyId","category":"full","description":" Key Id"},{"type":"reference","argument":"keyAlg","category":"full","description":" Key Algorithm"},{"type":"reference","argument":"keyMaterial","category":"compact","description":" Public key material. Can be null, but always not null for LoadPublicKey"},{"type":"reference","argument":"keyHash","category":"hidden","description":" If keyMaterial is null, pass keyHash - SHA256 of key"}],"expandable":"true","attributes":[
+{"type":"int64","id":1,"name":"keyId"}
+,{"type":"string","id":2,"name":"keyAlg"}
+,{"type":{"type":"opt","childType":"bytes"},"id":3,"name":"keyMaterial"}
+,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"keyHash"}
+]}},{"type":"response","content":{
+"name":"PublicKeys",
+"header":2602,
+"doc":[
+"Public Keys response",{"type":"reference","argument":"publicKey","category":"full","description":" Public keys"},{"type":"reference","argument":"signatures","category":"full","description":" Signatures of public keys"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":1,"name":"publicKey"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":2,"name":"signatures"}
+]}},{"type":"response","content":{
+"name":"PublicKeyGroups",
+"header":2604,
+"doc":[
+"Public key groups response"],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeyGroup"}},"id":1,"name":"publicKeyGroups"}
+]}},{"type":"rpc","content":{
+"name":"LoadPublicKeyGroups",
+"header":2601,
+"response":{"type":"reference","name":"PublicKeyGroups"},
+"doc":[
+"Loading Public key groups",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"}
+]}},{"type":"rpc","content":{
+"name":"LoadPublicKey",
+"header":2605,
+"response":{"type":"reference","name":"PublicKeys"},
+"doc":[
+"Loading public key explictly",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"},{"type":"reference","argument":"keyGroupId","category":"full","description":"Key group's id"},{"type":"reference","argument":"keyIds","category":"full","description":"Key ids for loading"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"}
+,{"type":"int32","id":2,"name":"keyGroupId"}
+,{"type":{"type":"list","childType":"int64"},"id":3,"name":"keyIds"}
+]}},{"type":"rpc","content":{
+"name":"LoadPrePublicKeys",
+"header":2603,
+"response":{"type":"reference","name":"PublicKeys"},
+"doc":[
+"Loading SOME of ephermal public keys",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"},{"type":"reference","argument":"keyGroupId","category":"full","description":"User's key group id"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"}
+,{"type":"int32","id":2,"name":"keyGroupId"}
+]}},{"type":"update","content":{
+"name":"PublicKeyGroupChanged",
+"header":103,
+"doc":[
+"Update about public key group changed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Updated Key Group"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"}
+]}},{"type":"update","content":{
+"name":"KeysAdded",
+"header":112,
+"doc":[
+"Update about keys added to Key Group",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"keys","category":"compact","description":" Added keys"},{"type":"reference","argument":"signatures","category":"compact","description":" Signatures of a public key"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":3,"name":"keys"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":4,"name":"signatures"}
+]}},{"type":"update","content":{
+"name":"KeysRemoved",
+"header":113,
+"doc":[
+"Update about keys removed from Key Group",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"keyIds","category":"full","description":" Removed keys"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"}
+,{"type":{"type":"list","childType":"int64"},"id":3,"name":"keyIds"}
+]}},{"type":"update","content":{
+"name":"PublicKeyGroupAdded",
+"header":104,
+"doc":[
+"Update about public key group added",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Added Key Group"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"}
+]}},{"type":"update","content":{
+"name":"PublicKeyGroupRemoved",
+"header":105,
+"doc":[
+"Update about public key group removed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Removed Key Group Id"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"}
+]}},{"type":"comment","content":"Device Side"},{"type":"rpc","content":{
+"name":"CreateNewKeyGroup",
+"header":2609,
+"response":{"type":"anonymous","header":2610, "doc":[
+{"type":"reference","argument":"keyGroupId","category":"full","description":" Created Key Group id"}] ,"attributes":[{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"}
+]},
+"doc":[
+"Creation of a new Key Group",{"type":"reference","argument":"identityKey","category":"full","description":"Identity Key of a new group"},{"type":"reference","argument":"supportedEncryptions","category":"full","description":"Supported encryption methods"},{"type":"reference","argument":"keys","category":"full","description":"keys of current group"},{"type":"reference","argument":"signatures","category":"full","description":"signatures of keys"}],"attributes":[
+{"type":{"type":"struct","childType":"EncryptionKey"},"id":1,"name":"identityKey"}
+,{"type":{"type":"list","childType":"string"},"id":2,"name":"supportedEncryptions"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":3,"name":"keys"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":4,"name":"signatures"}
+]}},{"type":"rpc","content":{
+"name":"DeleteKeyGroup",
+"header":2611,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Deletion of a Key Group",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for deletion"}],"attributes":[
+{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"}
+]}},{"type":"rpc","content":{
+"name":"DisconnectKeyGroup",
+"header":2613,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Disconnect Key Group from device",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for disconnection"}],"attributes":[
+{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"}
+]}},{"type":"rpc","content":{
+"name":"ConnectKeyGroup",
+"header":2614,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Connectiong Key Group to device",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for connection"}],"attributes":[
+{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"}
+]}},{"type":"rpc","content":{
+"name":"UploadPreKey",
+"header":2612,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Uploading Ephermal Keys",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id"},{"type":"reference","argument":"keys","category":"compact","description":"Encryprion keys"},{"type":"reference","argument":"signatures","category":"compact","description":"Key signatures"}],"attributes":[
+{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":2,"name":"keys"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":3,"name":"signatures"}
+]}},{"type":"comment","content":"Encrypted Packages"}, {
+ "type":"struct",
+ "content": {
+ "name":"EncryptedBox",
+"doc":[
+"Encrypted package that is encrypted for multiple keys",{"type":"reference","argument":"keys","category":"full","description":" Encrypted encryption keys"},{"type":"reference","argument":"algType","category":"full","description":" Package encryption type"},{"type":"reference","argument":"encPackage","category":"full","description":" Encrypted package"},{"type":"reference","argument":"senderKeyGroupId","category":"full","description":" Sender key group"}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"keyGroupId"},"id":4,"name":"senderKeyGroupId"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncyptedBoxKey"}},"id":1,"name":"keys"}
+,{"type":"string","id":2,"name":"algType"}
+,{"type":"bytes","id":3,"name":"encPackage"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptedBoxSignature"}},"id":5,"name":"signatures"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EncryptedBoxSignature",
+"doc":[
+"Signature for encrypted package",{"type":"reference","argument":"algType","category":"full","description":" Alg Type"},{"type":"reference","argument":"signature","category":"full","description":" Signature of encrypted package"}],"attributes":[
+{"type":"string","id":1,"name":"algType"}
+,{"type":"bytes","id":2,"name":"signature"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"EncyptedBoxKey",
+"doc":[
+"Encrypted package encryption key",{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"algType","category":"full","description":" Key encryption algorithm"},{"type":"reference","argument":"encryptedKey","category":"hidden","description":" Encrypted encryption key"}],"expandable":"true","attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"usersId"}
+,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"}
+,{"type":"string","id":3,"name":"algType"}
+,{"type":"bytes","id":4,"name":"encryptedKey"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"KeyGroupId",
+"doc":[
+"References to key groups",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"KeyGroupHolder",
+"doc":[
+"Key Group Holder",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Key Group"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"}
+]}},{"type":"rpc","content":{
+"name":"SendEncryptedPackage",
+"header":2657,
+"response":{"type":"anonymous","header":2664, "doc":[
+{"type":"reference","argument":"date","category":"full","description":" date"},{"type":"reference","argument":"obsoleteKeyGroups","category":"full","description":" obsolete key group ids"},{"type":"reference","argument":"missedKeyGroups","category":"full","description":" missed key groups"}] ,"attributes":[{"type":{"type":"opt","childType":{"type":"alias","childType":"date"}},"id":1,"name":"date"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupId"}},"id":2,"name":"obsoleteKeyGroups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupHolder"}},"id":3,"name":"missedKeyGroups"}
+]},
+"doc":[
+"Sending encrypted package",{"type":"reference","argument":"randomId","category":"hidden","description":"Random id"}],"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"randomId"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":2,"name":"destPeers"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupId"}},"id":3,"name":"ignoredKeyGroups"}
+,{"type":{"type":"struct","childType":"EncryptedBox"},"id":4,"name":"encryptedBox"}
+]}},{"type":"update","content":{
+"name":"EncryptedPackage",
+"header":177,
+"doc":[
+"Update about encrypted package",{"type":"reference","argument":"randomId","category":"full","description":" Random Id of package"},{"type":"reference","argument":"date","category":"full","description":" Sending date of package"},{"type":"reference","argument":"senderId","category":"full","description":" Sender id of package"},{"type":"reference","argument":"encryptedBox","category":"full","description":" Encrypted box"}],"attributes":[
+{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"randomId"}
+,{"type":{"type":"alias","childType":"date"},"id":2,"name":"date"}
+,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"senderId"}
+,{"type":{"type":"struct","childType":"EncryptedBox"},"id":4,"name":"encryptedBox"}
+]}}]}, {
+ "title": "Storage",
+ "package": "storage",
+ "items": [
+{"type":"rpc","content":{
+"name":"UploadSharedBlob",
+"header":2660,
+"response":{"type":"anonymous","header":2661, "doc":[
+{"type":"reference","argument":"sharedObjectId","category":"full","description":" Id of shared object"}] ,"attributes":[{"type":"int32","id":1,"name":"sharedObjectId"}
+]},
+"doc":[
+"Upload shared blob with user",{"type":"reference","argument":"destPeer","category":"full","description":"Destination peer"},{"type":"reference","argument":"bucket","category":"full","description":"Bucked name"},{"type":"reference","argument":"blob","category":"full","description":"Blob data"},{"type":"reference","argument":"randomId","category":"full","description":"Random id for protecting from double upload"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"destPeer"}
+,{"type":"string","id":2,"name":"bucket"}
+,{"type":"bytes","id":3,"name":"blob"}
+,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"randomId"}
+]}},{"type":"rpc","content":{
+"name":"DownloadSharedBlob",
+"header":2662,
+"response":{"type":"anonymous","header":2663, "doc":[
+{"type":"reference","argument":"blob","category":"full","description":" Blob contents"}] ,"attributes":[{"type":"bytes","id":1,"name":"blob"}
+]},
+"doc":[
+"Download shared blob",{"type":"reference","argument":"destPeer","category":"full","description":"Destination peer"},{"type":"reference","argument":"bucket","category":"full","description":"Bucket name"},{"type":"reference","argument":"objectId","category":"full","description":"Object Id"}],"attributes":[
+{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"destPeer"}
+,{"type":"string","id":2,"name":"bucket"}
+,{"type":"int32","id":3,"name":"objectId"}
+]}}]}, {
+ "title": "Peers",
+ "package": "peers",
+ "doc": [
+ "Peer is an identificator of specific conversation."
+ ],
+ "items": [
+ {
+ "type": "enum",
+ "content": {
+ "name": "PeerType",
+ "values": [
{
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 5,
- "name": "groups"
+ "name": "Private",
+ "id": 1
},
{
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UpdateContainer"
- }
- },
- "id": 6,
- "name": "updates"
+ "name": "Group",
+ "id": 2
},
{
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MessageContainer"
- }
- },
- "id": 7,
- "name": "messages"
+ "name": "EncryptedPrivate",
+ "id": 3
}
- ]
- }
- },
- {
+ ]
+ }
+ }, {
+ "type":"struct",
+ "content": {
+ "name":"Peer",
+"doc":[
+"Peer",{"type":"reference","argument":"type","category":"full","description":" Peer Type"},{"type":"reference","argument":"id","category":"full","description":" Peer Id"}],"attributes":[
+{"type":{"type":"enum","childType":"PeerType"},"id":1,"name":"type"}
+,{"type":"int32","id":2,"name":"id"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"OutPeer",
+"doc":[
+"Out peer with access hash",{"type":"reference","argument":"type","category":"full","description":" Peer Type"},{"type":"reference","argument":"id","category":"full","description":" Peer Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Peer access hash"}],"attributes":[
+{"type":{"type":"enum","childType":"PeerType"},"id":1,"name":"type"}
+,{"type":"int32","id":2,"name":"id"}
+,{"type":"int64","id":3,"name":"accessHash"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"UserOutPeer",
+"doc":[
+"User's out peer",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"accessHash","category":"danger","description":" User's access hash"}],"attributes":[
+{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"GroupOutPeer",
+"doc":[
+"Group's out peer",{"type":"reference","argument":"groupId","category":"full","description":" Group's Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Group's access hash"}],"attributes":[
+{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"}
+,{"type":"int64","id":2,"name":"accessHash"}
+]}}]}, {
+ "title": "Sequence and Updates",
+ "package": "sequence",
+ "doc": [
+ "Each device has it's own update sequence. At the begining application request initial sequence state by",
+ "calling GetState. On each application restart or NewSessionCreated application calls GetDifference for receiving",
+ "updates in update sequence.",
+ "GetState and GetDifference automatically subscribes session to receiving updates in session.",
+ "Each update has seq and state. Seq is sequental index of updated and used for detecting of holes in update sequence",
+ "(because of server failure or session die) on client side.",
+ "All updates needed to be processed in partucular order according to seq values.",
+ "In some updates there can be references to users that are not available at client yer. In this case application need",
+ "to ignore such update and init getting difference."
+ ],
+ "items": [
+{"type":"update_box","content":{
+"name":"SeqUpdate",
+"header":13,
+"doc":[
+"Sequence update",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of update"},{"type":"reference","argument":"state","category":"compact","description":" Sequece state of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"}],"attributes":[
+{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":"int32","id":3,"name":"updateHeader"}
+,{"type":"bytes","id":4,"name":"update"}
+]}},{"type":"update_box","content":{
+"name":"FatSeqUpdate",
+"header":73,
+"doc":[
+"Fat sequence update with additional data",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of update"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"},{"type":"reference","argument":"users","category":"compact","description":" Users that are referenced in update"},{"type":"reference","argument":"groups","category":"compact","description":" Groups that are referenced in update"}],"attributes":[
+{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":"int32","id":3,"name":"updateHeader"}
+,{"type":"bytes","id":4,"name":"update"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":5,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":6,"name":"groups"}
+]}},{"type":"update_box","content":{
+"name":"WeakUpdate",
+"header":26,
+"doc":[
+"Out of sequence update (for typing and online statuses)",{"type":"reference","argument":"date","category":"full","description":" Date of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"}],"attributes":[
+{"type":"int64","id":1,"name":"date"}
+,{"type":"int32","id":2,"name":"updateHeader"}
+,{"type":"bytes","id":3,"name":"update"}
+]}},{"type":"update_box","content":{
+"name":"WeakFatUpdate",
+"header":2673,
+"doc":[
+"Fat Weak Update",{"type":"reference","argument":"date","category":"full","description":" Date of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"full","description":" The update"},{"type":"reference","argument":"users","category":"full","description":" Users that are referenced in update"},{"type":"reference","argument":"groups","category":"full","description":" Groups that are referenced in update"}],"attributes":[
+{"type":"int64","id":1,"name":"date"}
+,{"type":"int32","id":2,"name":"updateHeader"}
+,{"type":"bytes","id":3,"name":"update"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"}
+]}},{"type":"update_box","content":{
+"name":"SeqUpdateTooLong",
+"header":25,
+"doc":[
+"Notification about requiring performing manual GetDifference"],"attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"UpdateContainer",
+"doc":[
+"Update container",{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"compact","description":" The updatre"}],"attributes":[
+{"type":"int32","id":1,"name":"updateHeader"}
+,{"type":"bytes","id":2,"name":"update"}
+]}},{"type":"update_box","content":{
+"name":"CombinedUpdate",
+"header":2625,
+"doc":[
+"Combined update",{"type":"reference","argument":"seqStart","category":"full","description":" Sequence number start"},{"type":"reference","argument":"seqEnd","category":"full","description":" Sequence number end"},{"type":"reference","argument":"state","category":"full","description":" Sequence state"},{"type":"reference","argument":"users","category":"compact","description":" Update's users"},{"type":"reference","argument":"groups","category":"compact","description":" Update's groups"},{"type":"reference","argument":"updates","category":"full","description":" Updates (can be empty)"},{"type":"reference","argument":"messages","category":"full","description":" New messages"}],"attributes":[
+{"type":"int32","id":1,"name":"seqStart"}
+,{"type":"int32","id":2,"name":"seqEnd"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UpdateContainer"}},"id":6,"name":"updates"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":7,"name":"messages"}
+]}}, {
"type": "enum",
"content": {
"name": "UpdateOptimization",
@@ -20644,780 +3984,157 @@
"name": "GROUPS_V2",
"id": 7
}
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetState",
- "header": 9,
- "response": {
- "type": "reference",
- "name": "Seq"
- },
- "doc": [
- "Get main sequence state",
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled optimizations"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 1,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetDifference",
- "header": 11,
- "response": {
- "type": "anonymous",
- "header": 12,
- "doc": [
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Seq of LAST update in updates"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " State of LAST update in updates"
- },
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Users referenced in updates"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": " Groups referenced in updates"
- },
- {
- "type": "reference",
- "argument": "updates",
- "category": "compact",
- "description": " Updates"
- },
- {
- "type": "reference",
- "argument": "needMore",
- "category": "full",
- "description": " Need to perform other difference"
- },
- {
- "type": "reference",
- "argument": "usersRefs",
- "category": "full",
- "description": " Direct references of users"
- },
- {
- "type": "reference",
- "argument": "groupsRefs",
- "category": "full",
- "description": " Direct References of groups"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 3,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 6,
- "name": "groups"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UpdateContainer"
- }
- },
- "id": 4,
- "name": "updates"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MessageContainer"
- }
- },
- "id": 7,
- "name": "messages"
- },
- {
- "type": "bool",
- "id": 5,
- "name": "needMore"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 8,
- "name": "usersRefs"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 9,
- "name": "groupsRefs"
- }
- ]
- },
- "doc": [
- "Getting difference of sequence",
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": "Sequence number"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "compact",
- "description": "Sequence state"
- },
- {
- "type": "reference",
- "argument": "optimizations",
- "category": "full",
- "description": "Enabled optimizations"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "enum",
- "childType": "UpdateOptimization"
- }
- },
- "id": 3,
- "name": "optimizations"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "GetReferencedEntitites",
- "header": 2628,
- "response": {
- "type": "anonymous",
- "header": 2629,
- "doc": [
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": " Loaded users"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": " Loaded groups"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "User"
- }
- },
- "id": 1,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "Group"
- }
- },
- "id": 2,
- "name": "groups"
- }
- ]
- },
- "doc": [
- "Loading referenced entities",
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": "Users to load"
- },
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": "Groups to load. Also returns all members of a group."
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 1,
- "name": "users"
- },
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 2,
- "name": "groups"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "RawUpdate",
- "header": 80,
- "doc": [
- "Custom Raw Update",
- {
- "type": "reference",
- "argument": "type",
- "category": "full",
- "description": " Type of content"
- },
- {
- "type": "reference",
- "argument": "bytes",
- "category": "full",
- "description": " Raw data"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 1,
- "name": "type"
- },
- {
- "type": "bytes",
- "id": 2,
- "name": "bytes"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "EmptyUpdate",
- "header": 85,
- "doc": [
- "Empty update"
- ],
- "attributes": []
- }
- },
- {
- "type": "empty"
- },
- {
- "type": "rpc",
- "content": {
- "name": "SubscribeToOnline",
- "header": 32,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Subscribing for users online",
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": "Users for subscription"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 1,
- "name": "users"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SubscribeFromOnline",
- "header": 33,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Removing subscription for users online",
- {
- "type": "reference",
- "argument": "users",
- "category": "compact",
- "description": "Users of subscriptions"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "UserOutPeer"
- }
- },
- "id": 1,
- "name": "users"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SubscribeToGroupOnline",
- "header": 74,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Subscribing for groups online",
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": "Groups for subscription"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 1,
- "name": "groups"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "SubscribeFromGroupOnline",
- "header": 75,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Removing subscription for groups online",
- {
- "type": "reference",
- "argument": "groups",
- "category": "compact",
- "description": "Groups of subscriptions"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "GroupOutPeer"
- }
- },
- "id": 1,
- "name": "groups"
- }
- ]
- }
+ ]
}
- ]
- },
- {
+ },{"type":"rpc","content":{
+"name":"GetState",
+"header":9,
+"response":{"type":"reference","name":"Seq"},
+"doc":[
+"Get main sequence state",{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":1,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"GetDifference",
+"header":11,
+"response":{"type":"anonymous","header":12, "doc":[
+{"type":"reference","argument":"seq","category":"full","description":" Seq of LAST update in updates"},{"type":"reference","argument":"state","category":"full","description":" State of LAST update in updates"},{"type":"reference","argument":"users","category":"compact","description":" Users referenced in updates"},{"type":"reference","argument":"groups","category":"compact","description":" Groups referenced in updates"},{"type":"reference","argument":"updates","category":"compact","description":" Updates"},{"type":"reference","argument":"needMore","category":"full","description":" Need to perform other difference"},{"type":"reference","argument":"usersRefs","category":"full","description":" Direct references of users"},{"type":"reference","argument":"groupsRefs","category":"full","description":" Direct References of groups"}] ,"attributes":[{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":3,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":6,"name":"groups"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UpdateContainer"}},"id":4,"name":"updates"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":7,"name":"messages"}
+,{"type":"bool","id":5,"name":"needMore"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":8,"name":"usersRefs"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":9,"name":"groupsRefs"}
+]},
+"doc":[
+"Getting difference of sequence",{"type":"reference","argument":"seq","category":"full","description":"Sequence number"},{"type":"reference","argument":"state","category":"compact","description":"Sequence state"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[
+{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"}
+]}},{"type":"rpc","content":{
+"name":"GetReferencedEntitites",
+"header":2628,
+"response":{"type":"anonymous","header":2629, "doc":[
+{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"groups","category":"compact","description":" Loaded groups"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":2,"name":"groups"}
+]},
+"doc":[
+"Loading referenced entities",{"type":"reference","argument":"users","category":"compact","description":"Users to load"},{"type":"reference","argument":"groups","category":"compact","description":"Groups to load. Also returns all members of a group."}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"}
+,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":2,"name":"groups"}
+]}},{"type":"update","content":{
+"name":"RawUpdate",
+"header":80,
+"doc":[
+"Custom Raw Update",{"type":"reference","argument":"type","category":"full","description":" Type of content"},{"type":"reference","argument":"bytes","category":"full","description":" Raw data"}],"attributes":[
+{"type":{"type":"opt","childType":"string"},"id":1,"name":"type"}
+,{"type":"bytes","id":2,"name":"bytes"}
+]}},{"type":"update","content":{
+"name":"EmptyUpdate",
+"header":85,
+"doc":[
+"Empty update"],"attributes":[
+]}},{"type":"empty"},{"type":"rpc","content":{
+"name":"SubscribeToOnline",
+"header":32,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Subscribing for users online",{"type":"reference","argument":"users","category":"compact","description":"Users for subscription"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"}
+]}},{"type":"rpc","content":{
+"name":"SubscribeFromOnline",
+"header":33,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Removing subscription for users online",{"type":"reference","argument":"users","category":"compact","description":"Users of subscriptions"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"}
+]}},{"type":"rpc","content":{
+"name":"SubscribeToGroupOnline",
+"header":74,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Subscribing for groups online",{"type":"reference","argument":"groups","category":"compact","description":"Groups for subscription"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"}
+]}},{"type":"rpc","content":{
+"name":"SubscribeFromGroupOnline",
+"header":75,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Removing subscription for groups online",{"type":"reference","argument":"groups","category":"compact","description":"Groups of subscriptions"}],"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"}
+]}}]}, {
"title": "Counters",
"package": "counters",
"doc": [
"Application Counters, used to display various counters in application"
],
"items": [
- {
- "type": "struct",
- "content": {
- "name": "AppCounters",
- "doc": [
- "Application counters",
- {
- "type": "reference",
- "argument": "globalCounter",
- "category": "full",
- "description": " Global unread counter"
- }
- ],
- "expandable": "true",
- "attributes": [
- {
- "type": {
- "type": "opt",
- "childType": "int32"
- },
- "id": 1,
- "name": "globalCounter"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "CountersChanged",
- "header": 215,
- "doc": [
- "Update about counters changed",
- {
- "type": "reference",
- "argument": "counters",
- "category": "full",
- "description": " Current Application counters"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "AppCounters"
- },
- "id": 1,
- "name": "counters"
- }
- ]
- }
- }
- ]
- },
- {
+ {
+ "type":"struct",
+ "content": {
+ "name":"AppCounters",
+"doc":[
+"Application counters",{"type":"reference","argument":"globalCounter","category":"full","description":" Global unread counter"}],"expandable":"true","attributes":[
+{"type":{"type":"opt","childType":"int32"},"id":1,"name":"globalCounter"}
+]}},{"type":"update","content":{
+"name":"CountersChanged",
+"header":215,
+"doc":[
+"Update about counters changed",{"type":"reference","argument":"counters","category":"full","description":" Current Application counters"}],"attributes":[
+{"type":{"type":"struct","childType":"AppCounters"},"id":1,"name":"counters"}
+]}}]}, {
"title": "Miscellaneous",
"package": "misc",
"items": [
- {
- "type": "response",
- "content": {
- "name": "Void",
- "header": 50,
- "doc": [
- "Empty response"
- ],
- "attributes": []
- }
- },
- {
- "type": "response",
- "content": {
- "name": "Seq",
- "header": 72,
- "doc": [
- "Sequence response. Methods that return this value must process response in particular order",
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number of response"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " Sequence state of response"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "SeqDate",
- "header": 102,
- "doc": [
- "Sequence response with date. Methods that return this value must process response in particular order",
- {
- "type": "reference",
- "argument": "seq",
- "category": "full",
- "description": " Sequence number of response"
- },
- {
- "type": "reference",
- "argument": "state",
- "category": "full",
- "description": " Sequence state of response"
- },
- {
- "type": "reference",
- "argument": "date",
- "category": "full",
- "description": " Date of response"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "seq"
- },
- {
- "type": {
- "type": "alias",
- "childType": "seq_state"
- },
- "id": 2,
- "name": "state"
- },
- {
- "type": {
- "type": "alias",
- "childType": "date"
- },
- "id": 3,
- "name": "date"
- }
- ]
- }
- },
- {
- "type": "response",
- "content": {
- "name": "Bool",
- "header": 209,
- "doc": [
- "Boolean response",
- {
- "type": "reference",
- "argument": "value",
- "category": "full",
- "description": " Response value"
- }
- ],
- "attributes": [
- {
- "type": "bool",
- "id": 1,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Config",
- "doc": [
- "Configuration of system",
- {
- "type": "reference",
- "argument": "maxGroupSize",
- "category": "full",
- "description": " Current maximum group size"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "maxGroupSize"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Extension",
- "doc": [
- "Extention",
- {
- "type": "reference",
- "argument": "id",
- "category": "full",
- "description": " Extension id"
- },
- {
- "type": "reference",
- "argument": "data",
- "category": "full",
- "description": " Extension data"
- }
- ],
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "id"
- },
- {
- "type": "bytes",
- "id": 2,
- "name": "data"
- }
- ]
- }
- },
- {
- "type": "update",
- "content": {
- "name": "Config",
- "header": 42,
- "doc": [
- "Update about config change",
- {
- "type": "reference",
- "argument": "config",
- "category": "full",
- "description": " new config"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "Config"
- },
- "id": 1,
- "name": "config"
- }
- ]
- }
- }
- ]
- },
- {
+{"type":"response","content":{
+"name":"Void",
+"header":50,
+"doc":[
+"Empty response"],"attributes":[
+]}},{"type":"response","content":{
+"name":"Seq",
+"header":72,
+"doc":[
+"Sequence response. Methods that return this value must process response in particular order",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of response"},{"type":"reference","argument":"state","category":"full","description":" Sequence state of response"}],"attributes":[
+{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+]}},{"type":"response","content":{
+"name":"SeqDate",
+"header":102,
+"doc":[
+"Sequence response with date. Methods that return this value must process response in particular order",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of response"},{"type":"reference","argument":"state","category":"full","description":" Sequence state of response"},{"type":"reference","argument":"date","category":"full","description":" Date of response"}],"attributes":[
+{"type":"int32","id":1,"name":"seq"}
+,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"}
+,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"}
+]}},{"type":"response","content":{
+"name":"Bool",
+"header":209,
+"doc":[
+"Boolean response",{"type":"reference","argument":"value","category":"full","description":" Response value"}],"attributes":[
+{"type":"bool","id":1,"name":"value"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Config",
+"doc":[
+"Configuration of system",{"type":"reference","argument":"maxGroupSize","category":"full","description":" Current maximum group size"}],"attributes":[
+{"type":"int32","id":1,"name":"maxGroupSize"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Extension",
+"doc":[
+"Extention",{"type":"reference","argument":"id","category":"full","description":" Extension id"},{"type":"reference","argument":"data","category":"full","description":" Extension data"}],"attributes":[
+{"type":"int32","id":1,"name":"id"}
+,{"type":"bytes","id":2,"name":"data"}
+]}},{"type":"update","content":{
+"name":"Config",
+"header":42,
+"doc":[
+"Update about config change",{"type":"reference","argument":"config","category":"full","description":" new config"}],"attributes":[
+{"type":{"type":"struct","childType":"Config"},"id":1,"name":"config"}
+]}}]}, {
"title": "Device Info",
"package": "device",
"doc": [
@@ -21425,53 +4142,15 @@
"For example, getting timezone or preffered languages"
],
"items": [
- {
- "type": "rpc",
- "content": {
- "name": "NotifyAboutDeviceInfo",
- "header": 229,
- "response": {
- "type": "reference",
- "name": "Void"
- },
- "doc": [
- "Notifying about device information",
- {
- "type": "reference",
- "argument": "preferredLanguages",
- "category": "full",
- "description": "Preferred languages"
- },
- {
- "type": "reference",
- "argument": "timeZone",
- "category": "full",
- "description": "Device Time Zone"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": "string"
- },
- "id": 1,
- "name": "preferredLanguages"
- },
- {
- "type": {
- "type": "opt",
- "childType": "string"
- },
- "id": 2,
- "name": "timeZone"
- }
- ]
- }
- }
- ]
- },
- {
+{"type":"rpc","content":{
+"name":"NotifyAboutDeviceInfo",
+"header":229,
+"response":{"type":"reference","name":"Void"},
+"doc":[
+"Notifying about device information",{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"},{"type":"reference","argument":"timeZone","category":"full","description":"Device Time Zone"}],"attributes":[
+{"type":{"type":"list","childType":"string"},"id":1,"name":"preferredLanguages"}
+,{"type":{"type":"opt","childType":"string"},"id":2,"name":"timeZone"}
+]}}]}, {
"title": "Webactions",
"package": "webactions",
"doc": [
@@ -21479,314 +4158,85 @@
"perform actions, and pass result on action completion"
],
"items": [
- {
- "type": "rpc",
- "content": {
- "name": "InitWebaction",
- "header": 116,
- "response": {
- "type": "anonymous",
- "header": 117,
- "doc": [
- {
- "type": "reference",
- "argument": "uri",
- "category": "full",
- "description": " Web action uri"
- },
- {
- "type": "reference",
- "argument": "regexp",
- "category": "full",
- "description": " Regular expression. Required to match completion of web action"
- },
- {
- "type": "reference",
- "argument": "actionHash",
- "category": "danger",
- "description": " Identifier of current web action. Required to complete it"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "uri"
- },
- {
- "type": "string",
- "id": 2,
- "name": "regexp"
- },
- {
- "type": "string",
- "id": 3,
- "name": "actionHash"
- }
- ]
- },
- "doc": [
- "Initialize start of web action",
- {
- "type": "reference",
- "argument": "actionName",
- "category": "full",
- "description": "Name of web action"
- },
- {
- "type": "reference",
- "argument": "params",
- "category": "full",
- "description": "Additional params required to make action's uri"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "actionName"
- },
- {
- "type": {
- "type": "struct",
- "childType": "MapValue"
- },
- "id": 2,
- "name": "params"
- }
- ]
- }
- },
- {
- "type": "rpc",
- "content": {
- "name": "CompleteWebaction",
- "header": 123,
- "response": {
- "type": "anonymous",
- "header": 124,
- "doc": [
- {
- "type": "reference",
- "argument": "result",
- "category": "full",
- "description": " Reslut of web action completion"
- }
- ],
- "attributes": [
- {
- "type": {
- "type": "struct",
- "childType": "MapValue"
- },
- "id": 1,
- "name": "result"
- }
- ]
- },
- "doc": [
- "Complete started web action",
- {
- "type": "reference",
- "argument": "actionHash",
- "category": "danger",
- "description": "Identifier of given web action"
- },
- {
- "type": "reference",
- "argument": "completeUri",
- "category": "full",
- "description": "Final uri of web action"
- }
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "actionHash"
- },
- {
- "type": "string",
- "id": 2,
- "name": "completeUri"
- }
- ]
- }
- }
- ]
- },
- {
+{"type":"rpc","content":{
+"name":"InitWebaction",
+"header":116,
+"response":{"type":"anonymous","header":117, "doc":[
+{"type":"reference","argument":"uri","category":"full","description":" Web action uri"},{"type":"reference","argument":"regexp","category":"full","description":" Regular expression. Required to match completion of web action"},{"type":"reference","argument":"actionHash","category":"danger","description":" Identifier of current web action. Required to complete it"}] ,"attributes":[{"type":"string","id":1,"name":"uri"}
+,{"type":"string","id":2,"name":"regexp"}
+,{"type":"string","id":3,"name":"actionHash"}
+]},
+"doc":[
+"Initialize start of web action",{"type":"reference","argument":"actionName","category":"full","description":"Name of web action"},{"type":"reference","argument":"params","category":"full","description":"Additional params required to make action's uri"}],"attributes":[
+{"type":"string","id":1,"name":"actionName"}
+,{"type":{"type":"struct","childType":"MapValue"},"id":2,"name":"params"}
+]}},{"type":"rpc","content":{
+"name":"CompleteWebaction",
+"header":123,
+"response":{"type":"anonymous","header":124, "doc":[
+{"type":"reference","argument":"result","category":"full","description":" Reslut of web action completion"}] ,"attributes":[{"type":{"type":"struct","childType":"MapValue"},"id":1,"name":"result"}
+]},
+"doc":[
+"Complete started web action",{"type":"reference","argument":"actionHash","category":"danger","description":"Identifier of given web action"},{"type":"reference","argument":"completeUri","category":"full","description":"Final uri of web action"}],"attributes":[
+{"type":"string","id":1,"name":"actionHash"}
+,{"type":"string","id":2,"name":"completeUri"}
+]}}]}, {
"title": "Collections",
"package": "collections",
"doc": [
"Flexible raw collections without structure"
],
"items": [
- {
- "type": "trait",
- "content": {
- "isContainer": "true",
- "name": "RawValue",
- "attributes": []
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "StringValue",
- "doc": [
- "Text value"
- ],
- "trait": {
- "name": "RawValue",
- "key": 1
- },
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "text"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Int32Value",
- "doc": [
- "Int32 value"
- ],
- "trait": {
- "name": "RawValue",
- "key": 2
- },
- "attributes": [
- {
- "type": "int32",
- "id": 1,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "Int64Value",
- "doc": [
- "Int64 value"
- ],
- "trait": {
- "name": "RawValue",
- "key": 3
- },
- "attributes": [
- {
- "type": "int64",
- "id": 1,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "DoubleValue",
- "doc": [
- "Double value"
- ],
- "trait": {
- "name": "RawValue",
- "key": 4
- },
- "attributes": [
- {
- "type": "double",
- "id": 1,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "ArrayValue",
- "doc": [
- "Array value"
- ],
- "trait": {
- "name": "RawValue",
- "key": 5
- },
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "trait",
- "childType": "RawValue"
- }
- },
- "id": 1,
- "name": "array"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MapValueItem",
- "doc": [
- "Item of Map"
- ],
- "attributes": [
- {
- "type": "string",
- "id": 1,
- "name": "key"
- },
- {
- "type": {
- "type": "trait",
- "childType": "RawValue"
- },
- "id": 2,
- "name": "value"
- }
- ]
- }
- },
- {
- "type": "struct",
- "content": {
- "name": "MapValue",
- "doc": [
- "Map Value"
- ],
- "trait": {
- "name": "RawValue",
- "key": 6
- },
- "attributes": [
- {
- "type": {
- "type": "list",
- "childType": {
- "type": "struct",
- "childType": "MapValueItem"
- }
- },
- "id": 1,
- "name": "items"
- }
- ]
- }
- }
- ]
- }
- ]
-}
+{"type":"trait","content":{
+"isContainer":"true","name":"RawValue","attributes":[
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"StringValue",
+"doc":[
+"Text value"],"trait":{"name":"RawValue","key":1},"attributes":[
+{"type":"string","id":1,"name":"text"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Int32Value",
+"doc":[
+"Int32 value"],"trait":{"name":"RawValue","key":2},"attributes":[
+{"type":"int32","id":1,"name":"value"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"Int64Value",
+"doc":[
+"Int64 value"],"trait":{"name":"RawValue","key":3},"attributes":[
+{"type":"int64","id":1,"name":"value"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"DoubleValue",
+"doc":[
+"Double value"],"trait":{"name":"RawValue","key":4},"attributes":[
+{"type":"double","id":1,"name":"value"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"ArrayValue",
+"doc":[
+"Array value"],"trait":{"name":"RawValue","key":5},"attributes":[
+{"type":{"type":"list","childType":{"type":"trait","childType":"RawValue"}},"id":1,"name":"array"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"MapValueItem",
+"doc":[
+"Item of Map"],"attributes":[
+{"type":"string","id":1,"name":"key"}
+,{"type":{"type":"trait","childType":"RawValue"},"id":2,"name":"value"}
+]}}, {
+ "type":"struct",
+ "content": {
+ "name":"MapValue",
+"doc":[
+"Map Value"],"trait":{"name":"RawValue","key":6},"attributes":[
+{"type":{"type":"list","childType":{"type":"struct","childType":"MapValueItem"}},"id":1,"name":"items"}
+]}}]}]}
\ No newline at end of file
diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala
index 825b83fbe3..99c164a17a 100644
--- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala
+++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala
@@ -1,6 +1,7 @@
package im.actor.server.push.apple
import akka.actor.ActorSystem
+import akka.event.Logging
import com.google.protobuf.wrappers.{ Int32Value, StringValue }
import com.relayrides.pushy.apns.PushNotificationResponse
import com.relayrides.pushy.apns.util.{ SimpleApnsPushNotification, TokenUtil }
@@ -15,18 +16,28 @@ trait APNSSend {
private val listeners = TrieMap.empty[String, PushFutureListener]
protected def sendNotification(payload: String, creds: ApplePushCredentials, userId: Int)(implicit client: ApplePushExtension#Client, system: ActorSystem): NFuture[PushNotificationResponse[SimpleApnsPushNotification]] = {
- // when topic is null, it will be taken from APNs certificate
- // http://relayrides.github.io/pushy/apidocs/0.6/com/relayrides/pushy/apns/ApnsPushNotification.html#getTopic--
+
+ val log = Logging(system, getClass)
val token = BitVector(creds.token.toByteArray).toHex
+
+ log.debug(
+ s"Searching topic for ApnsKey: {}, BundleId: {}, AuthId: {}, IsVoip: {}, token: $token",
+ creds.apnsKey, creds.bundleId, creds.authId, creds.isVoip
+ )
+
val topic: String = (creds.apnsKey, creds.bundleId) match {
case (_, Some(bundleId)) ⇒ bundleId.value
- case (Some(key), _) ⇒ ApplePushExtension(system).apnsBundleId.get(key.value).orNull
+ case (Some(key), _) ⇒ ApplePushExtension(system).apnsBundleId(creds.isVoip).get(key.value).orNull
case _ ⇒
- system.log.warning("Wrong creds format on sending notification. Creds: {}", creds)
+ log.warning("Wrong creds format on sending notification. Creds: {}", creds)
null
}
- system.log.debug(s"Sending APNS, token: {}, key: {}, isVoip: {}, topic: {}, payload: $payload", token, creds.apnsKey, creds.isVoip, topic)
- val notification = new SimpleApnsPushNotification(TokenUtil.sanitizeTokenString(token), topic, payload)
+
+ val sanitizedToken = TokenUtil.sanitizeTokenString(token)
+ log.debug(s"Sending APNS, token: {}, key: {}, isVoip: {}, topic: {}, payload: $payload", sanitizedToken, creds.apnsKey, creds.isVoip, topic)
+
+ val notification = new SimpleApnsPushNotification(sanitizedToken, topic, payload)
+
val listener = listeners.getOrElseUpdate(token, new PushFutureListener(userId, creds, extractCredsId(creds))(system))
client.sendNotification(notification).addListener(listener)
}
diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala
index 04f12cab82..2eda1c457c 100644
--- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala
+++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala
@@ -5,8 +5,7 @@ import java.util.concurrent.{ ExecutionException, TimeUnit, TimeoutException }
import akka.actor.{ ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider }
import akka.event.Logging
-import com.relayrides.pushy.apns.ApnsClient
-import com.relayrides.pushy.apns.util.SimpleApnsPushNotification
+import com.relayrides.pushy.apns.{ ApnsClient, ApnsClientBuilder }
import im.actor.server.db.DbExtension
import im.actor.server.model.push.ApplePushCredentials
import im.actor.server.persist.push.ApplePushCredentialsRepo
@@ -29,7 +28,7 @@ final class ApplePushExtension(system: ActorSystem) extends Extension with AnyRe
private val MaxCreateAttempts = 50
- type Client = ApnsClient[SimpleApnsPushNotification]
+ type Client = ApnsClient
import system.dispatcher
@@ -43,8 +42,12 @@ final class ApplePushExtension(system: ActorSystem) extends Extension with AnyRe
// there are some apple push keys, that require topic(bundleId)
// to be included in apple push notification. We provide apns key -> bundle id
// mapping for them.
- val apnsBundleId: Map[Int, String] = (config.certs collect {
- case ApnsCert(Some(key), Some(bundleId), _, _, _, _) ⇒ key → bundleId
+ // val apnsBundleId: Map[Int, String] = (config.certs collect {
+ // case ApnsCert(Some(key), Some(bundleId), _, _, _, _) ⇒ key → bundleId
+ // }).toMap
+
+ def apnsBundleId(isVoip: Boolean): Map[Int, String] = (config.certs filter (_.isVoip == isVoip) collect {
+ case ApnsCert(Some(key), bundleId, _, _, _, _) ⇒ key → bundleId.getOrElse(null)
}).toMap
private val (clients, voipClients): (TrieMap[String, Future[Client]], TrieMap[String, Future[Client]]) = {
@@ -69,7 +72,7 @@ final class ApplePushExtension(system: ActorSystem) extends Extension with AnyRe
val connectFuture: Future[Client] = Future {
blocking {
- val client = new ApnsClient[SimpleApnsPushNotification](new File(cert.path), cert.password)
+ val client = new ApnsClientBuilder().setClientCredentials(new File(cert.path), cert.password).build()
client.connect(host).get(20, TimeUnit.SECONDS)
log.debug("Established client connection for cert: {}, is voip: {}", certKey, cert.isVoip)
client
diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala
index 135eebb2f2..ab4ed88ab9 100644
--- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala
+++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala
@@ -9,6 +9,8 @@ import im.actor.server.model.push.ApplePushCredentials
import im.actor.server.push.PushProvider
import im.actor.server.sequence.PushData
+import scala.concurrent.Future
+
final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends PushProvider with APNSSend {
import system.dispatcher
@@ -31,6 +33,7 @@ final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends
log.debug("Delivering invisible(seq:{}) to bundleId: {}", seq, creds.bundleId)
sendNotification(payload = seqOnly(seq), creds, userId)
}
+ deliverVoip(seq, creds.authId)
}
}
@@ -66,9 +69,28 @@ final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends
} else {
sendNotification(payload = seqOnly(seq), creds, userId)
}
+ deliverVoip(seq, creds.authId)
}
}
+ def deliverVoip(
+ seq: Int,
+ authId: Long
+ ): Unit = {
+ applePushExt.fetchVoipCreds(Seq(authId).toSet).map(userId → _).map {
+ case (userId, credsList) ⇒ {
+ for {
+ creds ← credsList
+ credsId = extractCredsId(creds)
+ clientFu ← applePushExt.voipClient(credsId)
+ payload = new ApnsPayloadBuilder().buildWithDefaultMaximumLength()
+ _ = clientFu foreach { implicit c ⇒ sendNotification(payload, creds, userId) }
+ } yield ()
+ }
+ }
+
+ }
+
private def seqOnly(seq: Int): String =
new ApnsPayloadBuilder()
.addCustomProperty("seq", seq)
@@ -76,7 +98,7 @@ final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends
private def isLegacyCreds(creds: ApplePushCredentials) = creds.bundleId.isEmpty
- private def withClient[A](creds: ApplePushCredentials)(f: ApnsClient[SimpleApnsPushNotification] ⇒ A): Unit = {
+ private def withClient[A](creds: ApplePushCredentials)(f: ApnsClient ⇒ A): Unit = {
val credsKey = extractCredsId(creds)
applePushExt.client(credsKey) match {
case Some(futureClient) ⇒ futureClient foreach { f(_) }
diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala
index 58e89e02cc..4bf9be5212 100644
--- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala
+++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala
@@ -21,16 +21,22 @@ final class PushFutureListener(userId: Int, creds: ApplePushCredentials, credsId
private val tokenString = BitVector(tokenBytes).toHex
def operationComplete(future: Future[PushNotificationResponse[SimpleApnsPushNotification]]): Unit = {
+
+ log.debug(
+ "APNS send event has completed user: {}, token: {}, cert id: {}, isVoip: {}",
+ userId, tokenString, credsId, creds.isVoip
+ )
+
Try(future.get()) match {
case Success(response) ⇒
log.debug(
- "APNS send complete, user: {}, token: {}, cert id: {}",
- userId, tokenString, credsId
+ "APNS send complete, user: {}, token: {}, cert id: {}, isVoip: {}",
+ userId, tokenString, credsId, creds.isVoip
)
if (response.isAccepted) {
log.debug(
- "Successfully delivered APNS notification to user: {}, token: {}, cert id: {}",
- userId, tokenString, credsId
+ "Successfully delivered APNS notification to user: {}, token: {}, cert id: {}, isVoip: {}",
+ userId, tokenString, credsId, creds.isVoip
)
} else {
log.warning(
@@ -43,8 +49,8 @@ final class PushFutureListener(userId: Int, creds: ApplePushCredentials, credsId
}
}
case Failure(e) ⇒
- log.error(e, "Failed to send APNS notification for user: {}, token: {}, cert id: {}",
- userId, tokenString, credsId)
+ log.error(e, "Failed to send APNS notification for user: {}, token: {}, cert id: {}, isVoip: {}",
+ userId, tokenString, credsId, creds.isVoip)
}
}
diff --git a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala
index 8a568a5356..77d2c470a7 100644
--- a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala
+++ b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala
@@ -648,4 +648,26 @@ final class GroupsServiceImpl(groupInviteConfig: GroupInviteConfig)(implicit act
case GroupErrors.UserIsBanned ⇒ GroupRpcErrors.UserIsBanned
}
+ /**
+ * Join group by groupid without a necessity of invite
+ *
+ * @param groupId Groups peer
+ */
+ override protected def doHandleJoinGroupByGroupId(groupId: Int, clientData: ClientData): Future[HandlerResult[ResponseSeq]] = {
+ authorized(clientData) { implicit client ⇒
+ val action = for {
+ apiGroup ← fromFuture(groupExt.getApiStruct(groupId, client.userId))
+ _ ← fromBoolean(GroupRpcErrors.CantJoinGroup)(canJoin(apiGroup.permissions))
+ joinResp ← fromFuture(groupExt.joinGroup(
+ groupId = groupId,
+ joiningUserId = client.userId,
+ joiningUserAuthId = client.authId,
+ invitingUserId = None
+ ))
+ SeqStateDate(seq, state, _) = joinResp._1
+ } yield ResponseSeq(seq, state.toByteArray)
+
+ action.value
+ }
+ }
}
diff --git a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala
index 6d31c2007b..47a1f78a68 100644
--- a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala
+++ b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala
@@ -11,6 +11,7 @@ import im.actor.api.rpc.push.PushService
import im.actor.server.db.DbExtension
import im.actor.server.model.push.{ ActorPushCredentials, ApplePushCredentials, FirebasePushCredentials, GCMPushCredentials }
import im.actor.server.persist.push.{ ActorPushCredentialsRepo, ApplePushCredentialsRepo, FirebasePushCredentialsKV, GooglePushCredentialsRepo }
+import im.actor.server.push.apple.ApplePushExtension
import im.actor.server.sequence.SeqUpdatesExtension
import scodec.bits.BitVector
import slick.driver.PostgresDriver.api._
@@ -64,6 +65,7 @@ final class PushServiceImpl(
token = ByteString.copyFrom(tokenBytes),
isVoip = false
)
+
val action: DBIO[HandlerResult[ResponseVoid]] = for {
_ ← ApplePushCredentialsRepo.deleteByToken(tokenBytes)
_ ← ApplePushCredentialsRepo.createOrUpdate(creds)
diff --git a/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala b/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala
index 449b3484eb..0297f2d4cc 100644
--- a/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala
+++ b/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala
@@ -21,5 +21,10 @@ private final class BotsCliService extends Actor with ActorLogging {
(for {
(token, _) ← botExt.create(username, name, isAdmin)
} yield CreateBotResponse(token)) pipeTo sender()
+
+ case GetBotToken(botUserId) ⇒
+ (for {
+ token ← botExt.findBotToken(botUserId)
+ } yield BotToken(token)) pipeTo sender()
}
}
diff --git a/actor-server/conf/application.ini b/actor-server/conf/application.ini
new file mode 100644
index 0000000000..629f380635
--- /dev/null
+++ b/actor-server/conf/application.ini
@@ -0,0 +1,4 @@
+-J-Xms256M
+-J-Xmx1024M
+-J-server
+
diff --git a/actor-server/conf/server.conf b/actor-server/conf/server.conf
new file mode 100644
index 0000000000..9a25445c15
--- /dev/null
+++ b/actor-server/conf/server.conf
@@ -0,0 +1,310 @@
+# HTTP Server settings
+# It serves static app (optionally) and provides integration API
+ http {
+ # interface: "0.0.0.0"
+ # port: 9090
+ base-uri: "http://localhost:9090"
+ }
+
+# URIs of endpoints, accessible by client applications
+# public-endpoints: [
+# "wss://front1-ws-mtproto-api-rev2.actor.im",
+# "tls://front1-mtproto-api-rev2.actor.im",
+# "tcp://front3-mtproto-api-rev3.actor.im:443"
+# ]
+# Endpoints for Mobile/Web API
+# It is strictly recommended to use 443 port
+# for all connections. There are a lot of problems
+# on any other ports.
+#
+# Array of elements in format:
+# {
+# type: "tcp" or "websocket"
+# host: Listening host
+# post: Listening port
+# keystore: [Optional] Keystore
+# }
+# endpoints: [
+# {
+# type: tcp
+# interface: "0.0.0.0"
+# port: 9070
+# },
+# {
+# type: websocket
+# interface: "0.0.0.0"
+# port: 9080
+# }
+#]
+
+# Name of your application.
+project-name: actor
+
+# Secret is used to work with various secrets like password, auth hashes, etc
+# It have to be set once and never be changed in future
+secret: gf6VLkJRq7P8f0TnQEko
+
+# Server modules
+modules {
+
+ # Configuration for messaging module
+ messaging {
+ # Configure url for group invites here
+ groups {
+ invite {
+ base-uri: "https://xloto.im"
+ }
+ }
+ }
+
+ files {
+ adapter: "im.actor.server.file.local.LocalFileStorageAdapter"
+ }
+
+ # Message enricher
+ # Comment this module if you don't want to use message
+ # enriching feature
+ # enricher {
+ # Uncomment to customize max image preview size
+ # max-preview-size = 2 M
+ # }
+
+ security {
+ server-keys: [
+ {
+ public: "/home/diego/data/keys/actor-key-0.pub"
+ private: "/home/diego/data/keys/actor-key-0.key"
+ }
+ {
+ public: "/home/diego/data/keys/actor-key-1.pub"
+ private: "/home/diego/data/keys/actor-key-1.key"
+ }
+ {
+ public: "/home/diego/data/keys/actor-key-2.pub"
+ private: "/home/diego/data/keys/actor-key-2.key"
+ }
+ {
+ public: "/home/diego/data/keys/actor-key-3.pub"
+ private: "/home/diego/data/keys/actor-key-3.key"
+ }
+ ]
+ }
+ api {
+ endpoint = "http://192.168.1.3:9090"
+ }
+
+ raw {
+ rpc: "im.actor.server.api.rpc.service.raw.RawServiceImpl"
+ }
+}
+
+# Services that are used by the server.
+# Default distribution support services:
+# * [REQUIRED] postgresql: PostgreSQL database
+# * email: Email integration
+# * aws: Amazon Web Services integration
+# * google: Accessing Google services
+# * apple: Accessing Apple services
+# * telesign: Telesign Activation gateway
+# * actor-activation: Actor Activation gateway
+
+services {
+
+ # PostgreSQL storage for data
+ # The only required service to start server
+ # For more information see https://github.com/actorapp/actor-bootstrap/blob/master/docs/server/configure-database.md
+
+ postgresql {
+ host: localhost
+ port: 5432
+ db: actor
+ user: actor
+ password: actor
+ }
+
+ #For local file storage
+ file-storage {
+ # provide your own path to directory with read and write permissions for user `actor`
+ location: "/home/diego/data/files"
+ thread-pool-size: 20
+ }
+
+ # AWS configuration
+ # It is strictly recommended to configure s3 storage for
+ # enabling file sharing in apps
+ #aws {
+ # S3 Storage, used for file sharing
+ # For more information see https://github.com/actorapp/actor-bootstrap/blob/master/docs/server/configure-s3.md
+ # s3 {
+ # S3 Api Key
+ # access-key: "AKIAJZJLA5CVEQNWI2BA"
+ # S3 Api Secret
+ # secret-key: "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"
+ # File bucket
+ #default-bucket: olmf-backup
+ # S3 Endpoint
+ # endpoint:
+ # S3 bucket region
+ # region:
+ # Enable S3 URLs with path-style access
+ # path-style-access: true / false
+ #}
+ #}
+
+ # Service used for sending activation codes
+ activation {
+ # Define code providers. look im.actor.server.activation for full provider list
+ # providers {
+ # internal: im.actor.server.activation.internal.InternalCodeProvider
+ # sms: im.actor.server.activation.gate.ActorGateSmsProvider
+ # smtp: im.actor.server.activation.smtp.SMTPProvider
+ # call: im.actor.server.activation.telesign.TelesignProvider
+ # }
+ # Allow client to repeat code sending after this interval
+ # repeat-limit: 1m
+ # Time and attempt to expire sms/email activation code
+ # code-expiration: 1 day
+ # code-attempts: 3
+
+ # Email template for email code activation
+ email {
+ template: templates/activation-email-template.html
+ }
+ # Setting for internal activation(aka via actor bot)
+ # internal {
+ # sender-user-id: 10
+ # online-time-window: 10m
+ # message-template: "Your Actor activation code: $$CODE$$"
+ # }
+
+ providers {
+ #sms: im.actor.server.activation.gate.ActorGateSmsProvider
+ sms: im.actor.server.activation.fake.FakeSmsProvider
+ smtp: im.actor.server.activation.smtp.SMTPProvider
+ }
+ }
+
+ # Actor SMS gate
+ # Write to @gatekeeper in Actor Cloud to get your token
+ actor-activation {
+ # uri: "https://gate.actor.im"
+ auth-token: 8b831164dd59acf5e2014a92ddba0298ee33d69
+ }
+
+ # Telesign SMS gate
+ # To get tokens ask at telesign web site: https://www.telesign.com
+ # telesign {
+ # customer-id:
+ # api-key:
+ # }
+
+ # Email configuration
+ email {
+
+ # Sender information for outgoing emails
+ # sender {
+ # Sender Email address
+ # address:
+ # Sender Name
+ # name:
+ # Mail theme prefix
+ # prefix:
+ # }
+
+ # SMTP server configuration
+ # smtp {
+
+ # SMTP server host
+ # host:
+ # SMTP server port
+ # port:
+ # SMTP server username
+ # username:
+ # SMTP server password
+ # password:
+
+ # Is TLS required
+ # tls: true
+ # }
+
+ sender {
+ address: "diego@diegosilva.com.br"
+ name: "Acesso"
+ prefix: "Acesso"
+ }
+
+ smtp {
+ host: "email-smtp.us-east-1.amazonaws.com"
+ port: 465
+ username: "AKIAJGYTVIXYJU7FTHZQ"
+ password: "AooHgOV/z62Bml0dVYtQ7CFvASj+BP0nMy1ToiHQ9vgi"
+ tls: true
+ }
+ }
+
+
+ # Accessing Google Services
+ # Used for OAuth2 in gmail mailboxes
+ # and sending push notifications in Android & Chrome
+ #
+ # How to get OAuth2:
+ # * Open https://console.developers.google.com/
+ # * Go To Api&Auth, then to Credentials
+ # * Press "Client Id" and create id for Web Application
+ # * In created Client Id there are values "Client Id" and "Client Secret"
+ # for web OAuth configuration¬
+ # * Same steps for Android & iOS applications
+ #
+ # How to get Push keys
+ # * Open https://console.developers.google.com/
+ # * Go To Api&Auth, then to Credentials
+ # * Press "Create new key" for Android Application
+ # * Allow any IP
+ # * Get API key from created "Key for Android Application"
+ # * Project Id can be found on Overview page
+ google {
+ gcm {
+ keys = [{
+ project-id: 43880936595
+ key: "AIzaSyAliS4bfKy8GucSRX1pnCLJHM5HroHPpLk"
+ }]
+ }
+ }
+
+ # Accessing Apple servers for push notifications
+ apple {
+ push {
+ certs = [{
+ key: 868547
+ bundleId: "br.com.diegosilva.xlotomessenger"
+ path: "/home/diego/Dropbox/actor/apple/development/aps_development.p12"
+ #path: "/home/diego/Dropbox/actor/apple/production/apns_producao.p12"
+ password: "xlotoapns123"
+ sandbox: true
+ voip: false
+ },{
+ key: 868547
+ path: "/home/diego/Dropbox/actor/apple/production/voip_services.p12"
+ password: "xlotoapns123"
+ sandbox: true
+ voip: true
+ }]
+ }
+ }
+
+ actor {
+ push {
+ max-queue: 10000
+ token: "jsksksk"
+ }
+ }
+}
+
+
+akka {
+ loggers = ["akka.event.slf4j.Slf4jLogger"]
+ event-handlers = ["akka.event.slf4j.Slf4jLogger"]
+ #loglevel = "WARNING"
+}
+
+#debug-mode = true
\ No newline at end of file
diff --git a/actor-server/docker.sh b/actor-server/docker.sh
index bd8e3c6edf..04ad8227fc 100755
--- a/actor-server/docker.sh
+++ b/actor-server/docker.sh
@@ -1,3 +1,3 @@
#! /bin/bash
-
+export BUILD_NUMBER=108
./sbt docker:stage && docker build --no-cache=true -f Dockerfile -t actor/server .
diff --git a/actor-server/project/Build.scala b/actor-server/project/Build.scala
index 7d27bc16d5..2daec442fa 100644
--- a/actor-server/project/Build.scala
+++ b/actor-server/project/Build.scala
@@ -171,8 +171,8 @@ object Build extends sbt.Build with Versioning with Releasing with Packaging {
base = file("actor-cli"),
settings = defaultSettingsServer ++ Revolver.settings ++ Seq(
libraryDependencies ++= Dependencies.cli,
- mainClass in Revolver.reStart := Some("im.actor.server.cli.ActorCliApp"),
- mainClass in Compile := Some("im.actor.server.cli.ActorCliApp")
+ mainClass in Revolver.reStart := Some("im.actor.server.cli.ActorCli"),
+ mainClass in Compile := Some("im.actor.server.cli.ActorCli")
)
)
.dependsOn(actorCore, actorFrontend)
diff --git a/actor-server/project/Dependencies.scala b/actor-server/project/Dependencies.scala
index d237fc0ae0..e55862a5a0 100644
--- a/actor-server/project/Dependencies.scala
+++ b/actor-server/project/Dependencies.scala
@@ -5,7 +5,7 @@ import sbt._
object Dependencies {
object V {
val actorCommons = "0.0.20"
- val actorBotkit = "1.0.113"
+ val actorBotkit = "1.0.108"
val akka = "2.4.10"
val akkaHttpJson = "1.10.0"
val cats = "0.7.2"
@@ -94,7 +94,7 @@ object Dependencies {
val tyrex = "tyrex" % "tyrex" % "1.0.1"
- val pushy = "com.relayrides" % "pushy" % "0.6.1"
+ val pushy = "com.relayrides" % "pushy" % "0.9.2"
val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.1.2"
val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.1.0"
@@ -107,8 +107,10 @@ object Dependencies {
val apacheCommonsValidator = "commons-validator" % "commons-validator" % "1.4.1"
val guava = "com.google.guava" % "guava" % "19.0"
- val alpn = "org.eclipse.jetty.alpn" % "alpn-api" % "1.1.2.v20150522" % "runtime"
- val tcnative = "io.netty" % "netty-tcnative" % "1.1.33.Fork15" classifier "linux-x86_64"
+ val alpn = "org.eclipse.jetty.alpn" % "alpn-api" % "1.1.3.v20160715" % "runtime"
+ //val tcnative = "io.netty" % "netty-tcnative" % "1.1.33.Fork25" classifier "linux-x86_64"
+
+ val tcnative = "io.netty" % "netty-tcnative-boringssl-static" % "1.1.33.Fork25"
val silencer = "com.github.ghik" % "silencer-lib" % "0.4"
}
diff --git a/actor-server/project/Packaging.scala b/actor-server/project/Packaging.scala
index 0a517732bf..36d42a958d 100644
--- a/actor-server/project/Packaging.scala
+++ b/actor-server/project/Packaging.scala
@@ -22,7 +22,7 @@ private[actor] trait Packaging {
daemonUser in Linux := "actor",
daemonGroup in Linux := (daemonUser in Linux).value,
- bashScriptExtraDefines += """addJava "-Dlogback.configurationFile=${app_home}/../conf/logback.xml"""",
+ //bashScriptExtraDefines += """addJava "-Dlogback.configurationFile=${app_home}/../conf/logback.xml"""",
bashScriptExtraDefines += """addJava -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${app_home}/../logs/dump-`date`.hprof""",
linuxPackageMappings += {
diff --git a/actor-server/project/Releasing.scala b/actor-server/project/Releasing.scala
index af1c24d11d..26af6f9c77 100644
--- a/actor-server/project/Releasing.scala
+++ b/actor-server/project/Releasing.scala
@@ -32,7 +32,7 @@ trait Releasing {
val releaseSettings = Seq(
taskSetting,
releaseCommitMessage := s"chore(server): setting version to ${(version in ThisBuild).value}",
- GithubRelease.repo := "actorapp/actor-platform",
+ GithubRelease.repo := "dfsilva/actor-platform",
GithubRelease.releaseName := "Actor Server",
GithubRelease.draft := false,
GithubRelease.tag := s"server/v${(version in ThisBuild).value}",
diff --git a/actor-server/sbt b/actor-server/sbt
index 3214e85315..e9241692ca 100755
--- a/actor-server/sbt
+++ b/actor-server/sbt
@@ -1,3 +1,4 @@
#!/bin/bash
-SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
-java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
\ No newline at end of file
+export BUILD_NUMBER=108
+SBT_OPTS="-Xms512M -Xmx2G -Xss2M -XX:+CMSClassUnloadingEnabled"
+java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
diff --git a/actor-server/sbt-launch.jar b/actor-server/sbt-launch.jar
index 0d9dd94c57..34b74b7ef7 100644
Binary files a/actor-server/sbt-launch.jar and b/actor-server/sbt-launch.jar differ
diff --git a/actor-server/sbt_debug b/actor-server/sbt_debug
new file mode 100755
index 0000000000..55e4e29fd0
--- /dev/null
+++ b/actor-server/sbt_debug
@@ -0,0 +1,3 @@
+#!/bin/bash
+SBT_OPTS="-Xms512M -Xmx2048M -Xss1M -XX:+CMSClassUnloadingEnabled -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Dlogback.configurationFile=/home/diego/data/conf/logback.xml"
+java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
diff --git a/actor-server/version.sbt b/actor-server/version.sbt
index d46b3d6f4b..189cd0c10e 100644
--- a/actor-server/version.sbt
+++ b/actor-server/version.sbt
@@ -1 +1 @@
-version in ThisBuild := "3.0.1-SNAPSHOT"
\ No newline at end of file
+version in ThisBuild := "3.0.30-SNAPSHOT"