@inline-openclaw/inline 0.0.44 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/account-inspect-api.js +4 -2
- package/dist/account-inspect-api.js.map +3 -3
- package/dist/approval-handler.runtime.js +1093 -74
- package/dist/approval-handler.runtime.js.map +10 -10
- package/dist/channel-plugin-api.js +2262 -364
- package/dist/channel-plugin-api.js.map +16 -15
- package/dist/inline/actions.d.ts.map +1 -1
- package/dist/inline/approval-handler.runtime.d.ts +1 -0
- package/dist/inline/approval-handler.runtime.d.ts.map +1 -1
- package/dist/inline/bot-avatar-tool.d.ts +12 -0
- package/dist/inline/bot-avatar-tool.d.ts.map +1 -0
- package/dist/inline/bot-commands-sync.d.ts.map +1 -1
- package/dist/inline/channel.d.ts.map +1 -1
- package/dist/inline/config-schema.d.ts +2 -0
- package/dist/inline/config-schema.d.ts.map +1 -1
- package/dist/inline/doctor.d.ts.map +1 -1
- package/dist/inline/message-content.d.ts +5 -1
- package/dist/inline/message-content.d.ts.map +1 -1
- package/dist/inline/message-formatting.d.ts +18 -0
- package/dist/inline/message-formatting.d.ts.map +1 -1
- package/dist/inline/message-tools.d.ts.map +1 -1
- package/dist/inline/monitor.d.ts.map +1 -1
- package/dist/inline/parent-context-tool.d.ts.map +1 -1
- package/dist/inline/security.d.ts.map +1 -1
- package/dist/inline/setup-surface.d.ts.map +1 -1
- package/dist/inline/threadreply-command.d.ts +31 -0
- package/dist/inline/threadreply-command.d.ts.map +1 -1
- package/dist/runtime-register-api.d.ts.map +1 -1
- package/dist/runtime-register-api.js +1741 -259
- package/dist/runtime-register-api.js.map +14 -13
- package/dist/setup-plugin-api.js +23 -13
- package/dist/setup-plugin-api.js.map +6 -6
- package/openclaw.plugin.json +5 -3
- package/package.json +1 -1
|
@@ -5600,6 +5600,24 @@ var ConnectionError_Reason;
|
|
|
5600
5600
|
ConnectionError_Reason2[ConnectionError_Reason2["INVALID_AUTH"] = 2] = "INVALID_AUTH";
|
|
5601
5601
|
ConnectionError_Reason2[ConnectionError_Reason2["SESSION_REVOKED"] = 3] = "SESSION_REVOKED";
|
|
5602
5602
|
})(ConnectionError_Reason || (ConnectionError_Reason = {}));
|
|
5603
|
+
var BotAvatar_Kind;
|
|
5604
|
+
(function(BotAvatar_Kind2) {
|
|
5605
|
+
BotAvatar_Kind2[BotAvatar_Kind2["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
|
|
5606
|
+
BotAvatar_Kind2[BotAvatar_Kind2["CODEX_ATLAS"] = 1] = "CODEX_ATLAS";
|
|
5607
|
+
})(BotAvatar_Kind || (BotAvatar_Kind = {}));
|
|
5608
|
+
var BotPresenceState_Kind;
|
|
5609
|
+
(function(BotPresenceState_Kind2) {
|
|
5610
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
|
|
5611
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["HIDDEN"] = 1] = "HIDDEN";
|
|
5612
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["IDLE"] = 2] = "IDLE";
|
|
5613
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["HAPPY"] = 3] = "HAPPY";
|
|
5614
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["WAVING"] = 4] = "WAVING";
|
|
5615
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["JUMPING"] = 5] = "JUMPING";
|
|
5616
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["FAILED"] = 6] = "FAILED";
|
|
5617
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["WAITING"] = 7] = "WAITING";
|
|
5618
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["RUNNING"] = 8] = "RUNNING";
|
|
5619
|
+
BotPresenceState_Kind2[BotPresenceState_Kind2["REVIEW"] = 9] = "REVIEW";
|
|
5620
|
+
})(BotPresenceState_Kind || (BotPresenceState_Kind = {}));
|
|
5603
5621
|
var MessageEntity_Type;
|
|
5604
5622
|
(function(MessageEntity_Type2) {
|
|
5605
5623
|
MessageEntity_Type2[MessageEntity_Type2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
@@ -5713,6 +5731,11 @@ var UserStatus_Status;
|
|
|
5713
5731
|
UserStatus_Status2[UserStatus_Status2["ONLINE"] = 1] = "ONLINE";
|
|
5714
5732
|
UserStatus_Status2[UserStatus_Status2["OFFLINE"] = 2] = "OFFLINE";
|
|
5715
5733
|
})(UserStatus_Status || (UserStatus_Status = {}));
|
|
5734
|
+
var DialogFollowMode;
|
|
5735
|
+
(function(DialogFollowMode2) {
|
|
5736
|
+
DialogFollowMode2[DialogFollowMode2["DIALOG_FOLLOW_MODE_UNSPECIFIED"] = 0] = "DIALOG_FOLLOW_MODE_UNSPECIFIED";
|
|
5737
|
+
DialogFollowMode2[DialogFollowMode2["FOLLOWING"] = 1] = "FOLLOWING";
|
|
5738
|
+
})(DialogFollowMode || (DialogFollowMode = {}));
|
|
5716
5739
|
var MessageSendMode;
|
|
5717
5740
|
(function(MessageSendMode2) {
|
|
5718
5741
|
MessageSendMode2[MessageSendMode2["MODE_UNSPECIFIED"] = 0] = "MODE_UNSPECIFIED";
|
|
@@ -5776,6 +5799,11 @@ var Method;
|
|
|
5776
5799
|
Method2[Method2["CLEAR_CHAT_HISTORY"] = 53] = "CLEAR_CHAT_HISTORY";
|
|
5777
5800
|
Method2[Method2["DELETE_BOT"] = 54] = "DELETE_BOT";
|
|
5778
5801
|
Method2[Method2["DELETE_MESSAGE_ATTACHMENT"] = 55] = "DELETE_MESSAGE_ATTACHMENT";
|
|
5802
|
+
Method2[Method2["SET_BOT_AVATAR"] = 56] = "SET_BOT_AVATAR";
|
|
5803
|
+
Method2[Method2["CLEAR_BOT_AVATAR"] = 57] = "CLEAR_BOT_AVATAR";
|
|
5804
|
+
Method2[Method2["GET_BOT_PRESENCE"] = 58] = "GET_BOT_PRESENCE";
|
|
5805
|
+
Method2[Method2["SET_BOT_PRESENCE_STATE"] = 59] = "SET_BOT_PRESENCE_STATE";
|
|
5806
|
+
Method2[Method2["UPDATE_DIALOG_FOLLOW_MODE"] = 60] = "UPDATE_DIALOG_FOLLOW_MODE";
|
|
5779
5807
|
})(Method || (Method = {}));
|
|
5780
5808
|
var PushNotificationProvider;
|
|
5781
5809
|
(function(PushNotificationProvider2) {
|
|
@@ -6658,6 +6686,123 @@ class PeerUser$Type extends import_runtime4.MessageType {
|
|
|
6658
6686
|
}
|
|
6659
6687
|
var PeerUser = new PeerUser$Type;
|
|
6660
6688
|
|
|
6689
|
+
class BotAvatar$Type extends import_runtime4.MessageType {
|
|
6690
|
+
constructor() {
|
|
6691
|
+
super("BotAvatar", [
|
|
6692
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["BotAvatar.Kind", BotAvatar_Kind] },
|
|
6693
|
+
{ no: 2, name: "display_name", kind: "scalar", T: 9 },
|
|
6694
|
+
{ no: 3, name: "description", kind: "scalar", opt: true, T: 9 },
|
|
6695
|
+
{ no: 4, name: "cdn_url", kind: "scalar", opt: true, T: 9 },
|
|
6696
|
+
{ no: 5, name: "file_unique_id", kind: "scalar", opt: true, T: 9 }
|
|
6697
|
+
]);
|
|
6698
|
+
}
|
|
6699
|
+
create(value) {
|
|
6700
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
6701
|
+
message.kind = 0;
|
|
6702
|
+
message.displayName = "";
|
|
6703
|
+
if (value !== undefined)
|
|
6704
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
6705
|
+
return message;
|
|
6706
|
+
}
|
|
6707
|
+
internalBinaryRead(reader, length, options, target) {
|
|
6708
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
6709
|
+
while (reader.pos < end) {
|
|
6710
|
+
let [fieldNo, wireType] = reader.tag();
|
|
6711
|
+
switch (fieldNo) {
|
|
6712
|
+
case 1:
|
|
6713
|
+
message.kind = reader.int32();
|
|
6714
|
+
break;
|
|
6715
|
+
case 2:
|
|
6716
|
+
message.displayName = reader.string();
|
|
6717
|
+
break;
|
|
6718
|
+
case 3:
|
|
6719
|
+
message.description = reader.string();
|
|
6720
|
+
break;
|
|
6721
|
+
case 4:
|
|
6722
|
+
message.cdnUrl = reader.string();
|
|
6723
|
+
break;
|
|
6724
|
+
case 5:
|
|
6725
|
+
message.fileUniqueId = reader.string();
|
|
6726
|
+
break;
|
|
6727
|
+
default:
|
|
6728
|
+
let u = options.readUnknownField;
|
|
6729
|
+
if (u === "throw")
|
|
6730
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
6731
|
+
let d = reader.skip(wireType);
|
|
6732
|
+
if (u !== false)
|
|
6733
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
6734
|
+
}
|
|
6735
|
+
}
|
|
6736
|
+
return message;
|
|
6737
|
+
}
|
|
6738
|
+
internalBinaryWrite(message, writer, options) {
|
|
6739
|
+
if (message.kind !== 0)
|
|
6740
|
+
writer.tag(1, import_runtime.WireType.Varint).int32(message.kind);
|
|
6741
|
+
if (message.displayName !== "")
|
|
6742
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.displayName);
|
|
6743
|
+
if (message.description !== undefined)
|
|
6744
|
+
writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.description);
|
|
6745
|
+
if (message.cdnUrl !== undefined)
|
|
6746
|
+
writer.tag(4, import_runtime.WireType.LengthDelimited).string(message.cdnUrl);
|
|
6747
|
+
if (message.fileUniqueId !== undefined)
|
|
6748
|
+
writer.tag(5, import_runtime.WireType.LengthDelimited).string(message.fileUniqueId);
|
|
6749
|
+
let u = options.writeUnknownFields;
|
|
6750
|
+
if (u !== false)
|
|
6751
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
6752
|
+
return writer;
|
|
6753
|
+
}
|
|
6754
|
+
}
|
|
6755
|
+
var BotAvatar = new BotAvatar$Type;
|
|
6756
|
+
|
|
6757
|
+
class BotPresenceState$Type extends import_runtime4.MessageType {
|
|
6758
|
+
constructor() {
|
|
6759
|
+
super("BotPresenceState", [
|
|
6760
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["BotPresenceState.Kind", BotPresenceState_Kind] },
|
|
6761
|
+
{ no: 2, name: "comment", kind: "scalar", opt: true, T: 9 }
|
|
6762
|
+
]);
|
|
6763
|
+
}
|
|
6764
|
+
create(value) {
|
|
6765
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
6766
|
+
message.kind = 0;
|
|
6767
|
+
if (value !== undefined)
|
|
6768
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
6769
|
+
return message;
|
|
6770
|
+
}
|
|
6771
|
+
internalBinaryRead(reader, length, options, target) {
|
|
6772
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
6773
|
+
while (reader.pos < end) {
|
|
6774
|
+
let [fieldNo, wireType] = reader.tag();
|
|
6775
|
+
switch (fieldNo) {
|
|
6776
|
+
case 1:
|
|
6777
|
+
message.kind = reader.int32();
|
|
6778
|
+
break;
|
|
6779
|
+
case 2:
|
|
6780
|
+
message.comment = reader.string();
|
|
6781
|
+
break;
|
|
6782
|
+
default:
|
|
6783
|
+
let u = options.readUnknownField;
|
|
6784
|
+
if (u === "throw")
|
|
6785
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
6786
|
+
let d = reader.skip(wireType);
|
|
6787
|
+
if (u !== false)
|
|
6788
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
6789
|
+
}
|
|
6790
|
+
}
|
|
6791
|
+
return message;
|
|
6792
|
+
}
|
|
6793
|
+
internalBinaryWrite(message, writer, options) {
|
|
6794
|
+
if (message.kind !== 0)
|
|
6795
|
+
writer.tag(1, import_runtime.WireType.Varint).int32(message.kind);
|
|
6796
|
+
if (message.comment !== undefined)
|
|
6797
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.comment);
|
|
6798
|
+
let u = options.writeUnknownFields;
|
|
6799
|
+
if (u !== false)
|
|
6800
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
6801
|
+
return writer;
|
|
6802
|
+
}
|
|
6803
|
+
}
|
|
6804
|
+
var BotPresenceState = new BotPresenceState$Type;
|
|
6805
|
+
|
|
6661
6806
|
class User$Type extends import_runtime4.MessageType {
|
|
6662
6807
|
constructor() {
|
|
6663
6808
|
super("User", [
|
|
@@ -6672,7 +6817,8 @@ class User$Type extends import_runtime4.MessageType {
|
|
|
6672
6817
|
{ no: 9, name: "profile_photo", kind: "message", T: () => UserProfilePhoto },
|
|
6673
6818
|
{ no: 11, name: "pending_setup", kind: "scalar", opt: true, T: 8 },
|
|
6674
6819
|
{ no: 12, name: "time_zone", kind: "scalar", opt: true, T: 9 },
|
|
6675
|
-
{ no: 13, name: "bot", kind: "scalar", opt: true, T: 8 }
|
|
6820
|
+
{ no: 13, name: "bot", kind: "scalar", opt: true, T: 8 },
|
|
6821
|
+
{ no: 14, name: "bot_avatar", kind: "message", T: () => BotAvatar }
|
|
6676
6822
|
]);
|
|
6677
6823
|
}
|
|
6678
6824
|
create(value) {
|
|
@@ -6723,6 +6869,9 @@ class User$Type extends import_runtime4.MessageType {
|
|
|
6723
6869
|
case 13:
|
|
6724
6870
|
message.bot = reader.bool();
|
|
6725
6871
|
break;
|
|
6872
|
+
case 14:
|
|
6873
|
+
message.botAvatar = BotAvatar.internalBinaryRead(reader, reader.uint32(), options, message.botAvatar);
|
|
6874
|
+
break;
|
|
6726
6875
|
default:
|
|
6727
6876
|
let u = options.readUnknownField;
|
|
6728
6877
|
if (u === "throw")
|
|
@@ -6759,6 +6908,8 @@ class User$Type extends import_runtime4.MessageType {
|
|
|
6759
6908
|
writer.tag(12, import_runtime.WireType.LengthDelimited).string(message.timeZone);
|
|
6760
6909
|
if (message.bot !== undefined)
|
|
6761
6910
|
writer.tag(13, import_runtime.WireType.Varint).bool(message.bot);
|
|
6911
|
+
if (message.botAvatar)
|
|
6912
|
+
BotAvatar.internalBinaryWrite(message.botAvatar, writer.tag(14, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
6762
6913
|
let u = options.writeUnknownFields;
|
|
6763
6914
|
if (u !== false)
|
|
6764
6915
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -6844,7 +6995,8 @@ class Dialog$Type extends import_runtime4.MessageType {
|
|
|
6844
6995
|
{ no: 11, name: "open", kind: "scalar", opt: true, T: 8 },
|
|
6845
6996
|
{ no: 12, name: "opened_date", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
6846
6997
|
{ no: 14, name: "order", kind: "scalar", opt: true, T: 9 },
|
|
6847
|
-
{ no: 15, name: "pinned_order", kind: "scalar", opt: true, T: 9 }
|
|
6998
|
+
{ no: 15, name: "pinned_order", kind: "scalar", opt: true, T: 9 },
|
|
6999
|
+
{ no: 16, name: "follow_mode", kind: "enum", opt: true, T: () => ["DialogFollowMode", DialogFollowMode] }
|
|
6848
7000
|
]);
|
|
6849
7001
|
}
|
|
6850
7002
|
create(value) {
|
|
@@ -6903,6 +7055,9 @@ class Dialog$Type extends import_runtime4.MessageType {
|
|
|
6903
7055
|
case 15:
|
|
6904
7056
|
message.pinnedOrder = reader.string();
|
|
6905
7057
|
break;
|
|
7058
|
+
case 16:
|
|
7059
|
+
message.followMode = reader.int32();
|
|
7060
|
+
break;
|
|
6906
7061
|
default:
|
|
6907
7062
|
let u = options.readUnknownField;
|
|
6908
7063
|
if (u === "throw")
|
|
@@ -6945,6 +7100,8 @@ class Dialog$Type extends import_runtime4.MessageType {
|
|
|
6945
7100
|
writer.tag(14, import_runtime.WireType.LengthDelimited).string(message.order);
|
|
6946
7101
|
if (message.pinnedOrder !== undefined)
|
|
6947
7102
|
writer.tag(15, import_runtime.WireType.LengthDelimited).string(message.pinnedOrder);
|
|
7103
|
+
if (message.followMode !== undefined)
|
|
7104
|
+
writer.tag(16, import_runtime.WireType.Varint).int32(message.followMode);
|
|
6948
7105
|
let u = options.writeUnknownFields;
|
|
6949
7106
|
if (u !== false)
|
|
6950
7107
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -6968,7 +7125,8 @@ class Chat$Type extends import_runtime4.MessageType {
|
|
|
6968
7125
|
{ no: 10, name: "created_by", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
6969
7126
|
{ no: 11, name: "parent_chat_id", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
6970
7127
|
{ no: 12, name: "parent_message_id", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
6971
|
-
{ no: 13, name: "untitled", kind: "scalar", opt: true, T: 8 }
|
|
7128
|
+
{ no: 13, name: "untitled", kind: "scalar", opt: true, T: 8 },
|
|
7129
|
+
{ no: 14, name: "number", kind: "scalar", opt: true, T: 5 }
|
|
6972
7130
|
]);
|
|
6973
7131
|
}
|
|
6974
7132
|
create(value) {
|
|
@@ -7023,6 +7181,9 @@ class Chat$Type extends import_runtime4.MessageType {
|
|
|
7023
7181
|
case 13:
|
|
7024
7182
|
message.untitled = reader.bool();
|
|
7025
7183
|
break;
|
|
7184
|
+
case 14:
|
|
7185
|
+
message.number = reader.int32();
|
|
7186
|
+
break;
|
|
7026
7187
|
default:
|
|
7027
7188
|
let u = options.readUnknownField;
|
|
7028
7189
|
if (u === "throw")
|
|
@@ -7061,6 +7222,8 @@ class Chat$Type extends import_runtime4.MessageType {
|
|
|
7061
7222
|
writer.tag(12, import_runtime.WireType.Varint).int64(message.parentMessageId);
|
|
7062
7223
|
if (message.untitled !== undefined)
|
|
7063
7224
|
writer.tag(13, import_runtime.WireType.Varint).bool(message.untitled);
|
|
7225
|
+
if (message.number !== undefined)
|
|
7226
|
+
writer.tag(14, import_runtime.WireType.Varint).int32(message.number);
|
|
7064
7227
|
let u = options.writeUnknownFields;
|
|
7065
7228
|
if (u !== false)
|
|
7066
7229
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -9909,7 +10072,12 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
9909
10072
|
{ no: 53, name: "updateDialogOrder", kind: "message", oneof: "input", T: () => UpdateDialogOrderInput },
|
|
9910
10073
|
{ no: 54, name: "clearChatHistory", kind: "message", oneof: "input", T: () => ClearChatHistoryInput },
|
|
9911
10074
|
{ no: 55, name: "deleteBot", kind: "message", oneof: "input", T: () => DeleteBotInput },
|
|
9912
|
-
{ no: 56, name: "deleteMessageAttachment", kind: "message", oneof: "input", T: () => DeleteMessageAttachmentInput }
|
|
10075
|
+
{ no: 56, name: "deleteMessageAttachment", kind: "message", oneof: "input", T: () => DeleteMessageAttachmentInput },
|
|
10076
|
+
{ no: 57, name: "setBotAvatar", kind: "message", oneof: "input", T: () => SetBotAvatarInput },
|
|
10077
|
+
{ no: 58, name: "clearBotAvatar", kind: "message", oneof: "input", T: () => ClearBotAvatarInput },
|
|
10078
|
+
{ no: 59, name: "getBotPresence", kind: "message", oneof: "input", T: () => GetBotPresenceInput },
|
|
10079
|
+
{ no: 60, name: "setBotPresenceState", kind: "message", oneof: "input", T: () => SetBotPresenceStateInput },
|
|
10080
|
+
{ no: 61, name: "updateDialogFollowMode", kind: "message", oneof: "input", T: () => UpdateDialogFollowModeInput }
|
|
9913
10081
|
]);
|
|
9914
10082
|
}
|
|
9915
10083
|
create(value) {
|
|
@@ -10258,6 +10426,36 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
10258
10426
|
deleteMessageAttachment: DeleteMessageAttachmentInput.internalBinaryRead(reader, reader.uint32(), options, message.input.deleteMessageAttachment)
|
|
10259
10427
|
};
|
|
10260
10428
|
break;
|
|
10429
|
+
case 57:
|
|
10430
|
+
message.input = {
|
|
10431
|
+
oneofKind: "setBotAvatar",
|
|
10432
|
+
setBotAvatar: SetBotAvatarInput.internalBinaryRead(reader, reader.uint32(), options, message.input.setBotAvatar)
|
|
10433
|
+
};
|
|
10434
|
+
break;
|
|
10435
|
+
case 58:
|
|
10436
|
+
message.input = {
|
|
10437
|
+
oneofKind: "clearBotAvatar",
|
|
10438
|
+
clearBotAvatar: ClearBotAvatarInput.internalBinaryRead(reader, reader.uint32(), options, message.input.clearBotAvatar)
|
|
10439
|
+
};
|
|
10440
|
+
break;
|
|
10441
|
+
case 59:
|
|
10442
|
+
message.input = {
|
|
10443
|
+
oneofKind: "getBotPresence",
|
|
10444
|
+
getBotPresence: GetBotPresenceInput.internalBinaryRead(reader, reader.uint32(), options, message.input.getBotPresence)
|
|
10445
|
+
};
|
|
10446
|
+
break;
|
|
10447
|
+
case 60:
|
|
10448
|
+
message.input = {
|
|
10449
|
+
oneofKind: "setBotPresenceState",
|
|
10450
|
+
setBotPresenceState: SetBotPresenceStateInput.internalBinaryRead(reader, reader.uint32(), options, message.input.setBotPresenceState)
|
|
10451
|
+
};
|
|
10452
|
+
break;
|
|
10453
|
+
case 61:
|
|
10454
|
+
message.input = {
|
|
10455
|
+
oneofKind: "updateDialogFollowMode",
|
|
10456
|
+
updateDialogFollowMode: UpdateDialogFollowModeInput.internalBinaryRead(reader, reader.uint32(), options, message.input.updateDialogFollowMode)
|
|
10457
|
+
};
|
|
10458
|
+
break;
|
|
10261
10459
|
default:
|
|
10262
10460
|
let u = options.readUnknownField;
|
|
10263
10461
|
if (u === "throw")
|
|
@@ -10382,6 +10580,16 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
10382
10580
|
DeleteBotInput.internalBinaryWrite(message.input.deleteBot, writer.tag(55, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10383
10581
|
if (message.input.oneofKind === "deleteMessageAttachment")
|
|
10384
10582
|
DeleteMessageAttachmentInput.internalBinaryWrite(message.input.deleteMessageAttachment, writer.tag(56, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10583
|
+
if (message.input.oneofKind === "setBotAvatar")
|
|
10584
|
+
SetBotAvatarInput.internalBinaryWrite(message.input.setBotAvatar, writer.tag(57, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10585
|
+
if (message.input.oneofKind === "clearBotAvatar")
|
|
10586
|
+
ClearBotAvatarInput.internalBinaryWrite(message.input.clearBotAvatar, writer.tag(58, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10587
|
+
if (message.input.oneofKind === "getBotPresence")
|
|
10588
|
+
GetBotPresenceInput.internalBinaryWrite(message.input.getBotPresence, writer.tag(59, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10589
|
+
if (message.input.oneofKind === "setBotPresenceState")
|
|
10590
|
+
SetBotPresenceStateInput.internalBinaryWrite(message.input.setBotPresenceState, writer.tag(60, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10591
|
+
if (message.input.oneofKind === "updateDialogFollowMode")
|
|
10592
|
+
UpdateDialogFollowModeInput.internalBinaryWrite(message.input.updateDialogFollowMode, writer.tag(61, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10385
10593
|
let u = options.writeUnknownFields;
|
|
10386
10594
|
if (u !== false)
|
|
10387
10595
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -10448,7 +10656,12 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
10448
10656
|
{ no: 53, name: "updateDialogOrder", kind: "message", oneof: "result", T: () => UpdateDialogOrderResult },
|
|
10449
10657
|
{ no: 54, name: "clearChatHistory", kind: "message", oneof: "result", T: () => ClearChatHistoryResult },
|
|
10450
10658
|
{ no: 55, name: "deleteBot", kind: "message", oneof: "result", T: () => DeleteBotResult },
|
|
10451
|
-
{ no: 56, name: "deleteMessageAttachment", kind: "message", oneof: "result", T: () => DeleteMessageAttachmentResult }
|
|
10659
|
+
{ no: 56, name: "deleteMessageAttachment", kind: "message", oneof: "result", T: () => DeleteMessageAttachmentResult },
|
|
10660
|
+
{ no: 57, name: "setBotAvatar", kind: "message", oneof: "result", T: () => SetBotAvatarResult },
|
|
10661
|
+
{ no: 58, name: "clearBotAvatar", kind: "message", oneof: "result", T: () => ClearBotAvatarResult },
|
|
10662
|
+
{ no: 59, name: "getBotPresence", kind: "message", oneof: "result", T: () => GetBotPresenceResult },
|
|
10663
|
+
{ no: 60, name: "setBotPresenceState", kind: "message", oneof: "result", T: () => SetBotPresenceStateResult },
|
|
10664
|
+
{ no: 61, name: "updateDialogFollowMode", kind: "message", oneof: "result", T: () => UpdateDialogFollowModeResult }
|
|
10452
10665
|
]);
|
|
10453
10666
|
}
|
|
10454
10667
|
create(value) {
|
|
@@ -10797,6 +11010,36 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
10797
11010
|
deleteMessageAttachment: DeleteMessageAttachmentResult.internalBinaryRead(reader, reader.uint32(), options, message.result.deleteMessageAttachment)
|
|
10798
11011
|
};
|
|
10799
11012
|
break;
|
|
11013
|
+
case 57:
|
|
11014
|
+
message.result = {
|
|
11015
|
+
oneofKind: "setBotAvatar",
|
|
11016
|
+
setBotAvatar: SetBotAvatarResult.internalBinaryRead(reader, reader.uint32(), options, message.result.setBotAvatar)
|
|
11017
|
+
};
|
|
11018
|
+
break;
|
|
11019
|
+
case 58:
|
|
11020
|
+
message.result = {
|
|
11021
|
+
oneofKind: "clearBotAvatar",
|
|
11022
|
+
clearBotAvatar: ClearBotAvatarResult.internalBinaryRead(reader, reader.uint32(), options, message.result.clearBotAvatar)
|
|
11023
|
+
};
|
|
11024
|
+
break;
|
|
11025
|
+
case 59:
|
|
11026
|
+
message.result = {
|
|
11027
|
+
oneofKind: "getBotPresence",
|
|
11028
|
+
getBotPresence: GetBotPresenceResult.internalBinaryRead(reader, reader.uint32(), options, message.result.getBotPresence)
|
|
11029
|
+
};
|
|
11030
|
+
break;
|
|
11031
|
+
case 60:
|
|
11032
|
+
message.result = {
|
|
11033
|
+
oneofKind: "setBotPresenceState",
|
|
11034
|
+
setBotPresenceState: SetBotPresenceStateResult.internalBinaryRead(reader, reader.uint32(), options, message.result.setBotPresenceState)
|
|
11035
|
+
};
|
|
11036
|
+
break;
|
|
11037
|
+
case 61:
|
|
11038
|
+
message.result = {
|
|
11039
|
+
oneofKind: "updateDialogFollowMode",
|
|
11040
|
+
updateDialogFollowMode: UpdateDialogFollowModeResult.internalBinaryRead(reader, reader.uint32(), options, message.result.updateDialogFollowMode)
|
|
11041
|
+
};
|
|
11042
|
+
break;
|
|
10800
11043
|
default:
|
|
10801
11044
|
let u = options.readUnknownField;
|
|
10802
11045
|
if (u === "throw")
|
|
@@ -10921,6 +11164,16 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
10921
11164
|
DeleteBotResult.internalBinaryWrite(message.result.deleteBot, writer.tag(55, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10922
11165
|
if (message.result.oneofKind === "deleteMessageAttachment")
|
|
10923
11166
|
DeleteMessageAttachmentResult.internalBinaryWrite(message.result.deleteMessageAttachment, writer.tag(56, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11167
|
+
if (message.result.oneofKind === "setBotAvatar")
|
|
11168
|
+
SetBotAvatarResult.internalBinaryWrite(message.result.setBotAvatar, writer.tag(57, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11169
|
+
if (message.result.oneofKind === "clearBotAvatar")
|
|
11170
|
+
ClearBotAvatarResult.internalBinaryWrite(message.result.clearBotAvatar, writer.tag(58, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11171
|
+
if (message.result.oneofKind === "getBotPresence")
|
|
11172
|
+
GetBotPresenceResult.internalBinaryWrite(message.result.getBotPresence, writer.tag(59, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11173
|
+
if (message.result.oneofKind === "setBotPresenceState")
|
|
11174
|
+
SetBotPresenceStateResult.internalBinaryWrite(message.result.setBotPresenceState, writer.tag(60, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11175
|
+
if (message.result.oneofKind === "updateDialogFollowMode")
|
|
11176
|
+
UpdateDialogFollowModeResult.internalBinaryWrite(message.result.updateDialogFollowMode, writer.tag(61, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10924
11177
|
let u = options.writeUnknownFields;
|
|
10925
11178
|
if (u !== false)
|
|
10926
11179
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -11175,7 +11428,8 @@ class UpdateSidecars$Type extends import_runtime4.MessageType {
|
|
|
11175
11428
|
super("UpdateSidecars", [
|
|
11176
11429
|
{ no: 1, name: "users", kind: "message", repeat: 1, T: () => User },
|
|
11177
11430
|
{ no: 2, name: "chats", kind: "message", repeat: 1, T: () => Chat },
|
|
11178
|
-
{ no: 3, name: "dialogs", kind: "message", repeat: 1, T: () => Dialog }
|
|
11431
|
+
{ no: 3, name: "dialogs", kind: "message", repeat: 1, T: () => Dialog },
|
|
11432
|
+
{ no: 4, name: "spaces", kind: "message", repeat: 1, T: () => Space }
|
|
11179
11433
|
]);
|
|
11180
11434
|
}
|
|
11181
11435
|
create(value) {
|
|
@@ -11183,6 +11437,7 @@ class UpdateSidecars$Type extends import_runtime4.MessageType {
|
|
|
11183
11437
|
message.users = [];
|
|
11184
11438
|
message.chats = [];
|
|
11185
11439
|
message.dialogs = [];
|
|
11440
|
+
message.spaces = [];
|
|
11186
11441
|
if (value !== undefined)
|
|
11187
11442
|
import_runtime3.reflectionMergePartial(this, message, value);
|
|
11188
11443
|
return message;
|
|
@@ -11201,6 +11456,9 @@ class UpdateSidecars$Type extends import_runtime4.MessageType {
|
|
|
11201
11456
|
case 3:
|
|
11202
11457
|
message.dialogs.push(Dialog.internalBinaryRead(reader, reader.uint32(), options));
|
|
11203
11458
|
break;
|
|
11459
|
+
case 4:
|
|
11460
|
+
message.spaces.push(Space.internalBinaryRead(reader, reader.uint32(), options));
|
|
11461
|
+
break;
|
|
11204
11462
|
default:
|
|
11205
11463
|
let u = options.readUnknownField;
|
|
11206
11464
|
if (u === "throw")
|
|
@@ -11219,6 +11477,8 @@ class UpdateSidecars$Type extends import_runtime4.MessageType {
|
|
|
11219
11477
|
Chat.internalBinaryWrite(message.chats[i], writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11220
11478
|
for (let i = 0;i < message.dialogs.length; i++)
|
|
11221
11479
|
Dialog.internalBinaryWrite(message.dialogs[i], writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11480
|
+
for (let i = 0;i < message.spaces.length; i++)
|
|
11481
|
+
Space.internalBinaryWrite(message.spaces[i], writer.tag(4, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
11222
11482
|
let u = options.writeUnknownFields;
|
|
11223
11483
|
if (u !== false)
|
|
11224
11484
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -12005,6 +12265,97 @@ class UpdateDialogOrderResult$Type extends import_runtime4.MessageType {
|
|
|
12005
12265
|
}
|
|
12006
12266
|
var UpdateDialogOrderResult = new UpdateDialogOrderResult$Type;
|
|
12007
12267
|
|
|
12268
|
+
class UpdateDialogFollowModeInput$Type extends import_runtime4.MessageType {
|
|
12269
|
+
constructor() {
|
|
12270
|
+
super("UpdateDialogFollowModeInput", [
|
|
12271
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => InputPeer },
|
|
12272
|
+
{ no: 2, name: "follow_mode", kind: "enum", opt: true, T: () => ["DialogFollowMode", DialogFollowMode] }
|
|
12273
|
+
]);
|
|
12274
|
+
}
|
|
12275
|
+
create(value) {
|
|
12276
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
12277
|
+
if (value !== undefined)
|
|
12278
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
12279
|
+
return message;
|
|
12280
|
+
}
|
|
12281
|
+
internalBinaryRead(reader, length, options, target) {
|
|
12282
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
12283
|
+
while (reader.pos < end) {
|
|
12284
|
+
let [fieldNo, wireType] = reader.tag();
|
|
12285
|
+
switch (fieldNo) {
|
|
12286
|
+
case 1:
|
|
12287
|
+
message.peerId = InputPeer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
12288
|
+
break;
|
|
12289
|
+
case 2:
|
|
12290
|
+
message.followMode = reader.int32();
|
|
12291
|
+
break;
|
|
12292
|
+
default:
|
|
12293
|
+
let u = options.readUnknownField;
|
|
12294
|
+
if (u === "throw")
|
|
12295
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
12296
|
+
let d = reader.skip(wireType);
|
|
12297
|
+
if (u !== false)
|
|
12298
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
12299
|
+
}
|
|
12300
|
+
}
|
|
12301
|
+
return message;
|
|
12302
|
+
}
|
|
12303
|
+
internalBinaryWrite(message, writer, options) {
|
|
12304
|
+
if (message.peerId)
|
|
12305
|
+
InputPeer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
12306
|
+
if (message.followMode !== undefined)
|
|
12307
|
+
writer.tag(2, import_runtime.WireType.Varint).int32(message.followMode);
|
|
12308
|
+
let u = options.writeUnknownFields;
|
|
12309
|
+
if (u !== false)
|
|
12310
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
12311
|
+
return writer;
|
|
12312
|
+
}
|
|
12313
|
+
}
|
|
12314
|
+
var UpdateDialogFollowModeInput = new UpdateDialogFollowModeInput$Type;
|
|
12315
|
+
|
|
12316
|
+
class UpdateDialogFollowModeResult$Type extends import_runtime4.MessageType {
|
|
12317
|
+
constructor() {
|
|
12318
|
+
super("UpdateDialogFollowModeResult", [
|
|
12319
|
+
{ no: 1, name: "updates", kind: "message", repeat: 1, T: () => Update }
|
|
12320
|
+
]);
|
|
12321
|
+
}
|
|
12322
|
+
create(value) {
|
|
12323
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
12324
|
+
message.updates = [];
|
|
12325
|
+
if (value !== undefined)
|
|
12326
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
12327
|
+
return message;
|
|
12328
|
+
}
|
|
12329
|
+
internalBinaryRead(reader, length, options, target) {
|
|
12330
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
12331
|
+
while (reader.pos < end) {
|
|
12332
|
+
let [fieldNo, wireType] = reader.tag();
|
|
12333
|
+
switch (fieldNo) {
|
|
12334
|
+
case 1:
|
|
12335
|
+
message.updates.push(Update.internalBinaryRead(reader, reader.uint32(), options));
|
|
12336
|
+
break;
|
|
12337
|
+
default:
|
|
12338
|
+
let u = options.readUnknownField;
|
|
12339
|
+
if (u === "throw")
|
|
12340
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
12341
|
+
let d = reader.skip(wireType);
|
|
12342
|
+
if (u !== false)
|
|
12343
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
12344
|
+
}
|
|
12345
|
+
}
|
|
12346
|
+
return message;
|
|
12347
|
+
}
|
|
12348
|
+
internalBinaryWrite(message, writer, options) {
|
|
12349
|
+
for (let i = 0;i < message.updates.length; i++)
|
|
12350
|
+
Update.internalBinaryWrite(message.updates[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
12351
|
+
let u = options.writeUnknownFields;
|
|
12352
|
+
if (u !== false)
|
|
12353
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
12354
|
+
return writer;
|
|
12355
|
+
}
|
|
12356
|
+
}
|
|
12357
|
+
var UpdateDialogFollowModeResult = new UpdateDialogFollowModeResult$Type;
|
|
12358
|
+
|
|
12008
12359
|
class MarkAsUnreadInput$Type extends import_runtime4.MessageType {
|
|
12009
12360
|
constructor() {
|
|
12010
12361
|
super("MarkAsUnreadInput", [
|
|
@@ -13267,6 +13618,375 @@ class UpdateBotProfileResult$Type extends import_runtime4.MessageType {
|
|
|
13267
13618
|
}
|
|
13268
13619
|
var UpdateBotProfileResult = new UpdateBotProfileResult$Type;
|
|
13269
13620
|
|
|
13621
|
+
class SetBotAvatarInput$Type extends import_runtime4.MessageType {
|
|
13622
|
+
constructor() {
|
|
13623
|
+
super("SetBotAvatarInput", [
|
|
13624
|
+
{ no: 1, name: "bot_user_id", kind: "scalar", T: 3, L: 0 },
|
|
13625
|
+
{ no: 2, name: "kind", kind: "enum", T: () => ["BotAvatar.Kind", BotAvatar_Kind] },
|
|
13626
|
+
{ no: 3, name: "display_name", kind: "scalar", T: 9 },
|
|
13627
|
+
{ no: 4, name: "description", kind: "scalar", opt: true, T: 9 },
|
|
13628
|
+
{ no: 5, name: "file_unique_id", kind: "scalar", T: 9 }
|
|
13629
|
+
]);
|
|
13630
|
+
}
|
|
13631
|
+
create(value) {
|
|
13632
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13633
|
+
message.botUserId = 0n;
|
|
13634
|
+
message.kind = 0;
|
|
13635
|
+
message.displayName = "";
|
|
13636
|
+
message.fileUniqueId = "";
|
|
13637
|
+
if (value !== undefined)
|
|
13638
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13639
|
+
return message;
|
|
13640
|
+
}
|
|
13641
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13642
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
13643
|
+
while (reader.pos < end) {
|
|
13644
|
+
let [fieldNo, wireType] = reader.tag();
|
|
13645
|
+
switch (fieldNo) {
|
|
13646
|
+
case 1:
|
|
13647
|
+
message.botUserId = reader.int64().toBigInt();
|
|
13648
|
+
break;
|
|
13649
|
+
case 2:
|
|
13650
|
+
message.kind = reader.int32();
|
|
13651
|
+
break;
|
|
13652
|
+
case 3:
|
|
13653
|
+
message.displayName = reader.string();
|
|
13654
|
+
break;
|
|
13655
|
+
case 4:
|
|
13656
|
+
message.description = reader.string();
|
|
13657
|
+
break;
|
|
13658
|
+
case 5:
|
|
13659
|
+
message.fileUniqueId = reader.string();
|
|
13660
|
+
break;
|
|
13661
|
+
default:
|
|
13662
|
+
let u = options.readUnknownField;
|
|
13663
|
+
if (u === "throw")
|
|
13664
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
13665
|
+
let d = reader.skip(wireType);
|
|
13666
|
+
if (u !== false)
|
|
13667
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
13668
|
+
}
|
|
13669
|
+
}
|
|
13670
|
+
return message;
|
|
13671
|
+
}
|
|
13672
|
+
internalBinaryWrite(message, writer, options) {
|
|
13673
|
+
if (message.botUserId !== 0n)
|
|
13674
|
+
writer.tag(1, import_runtime.WireType.Varint).int64(message.botUserId);
|
|
13675
|
+
if (message.kind !== 0)
|
|
13676
|
+
writer.tag(2, import_runtime.WireType.Varint).int32(message.kind);
|
|
13677
|
+
if (message.displayName !== "")
|
|
13678
|
+
writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.displayName);
|
|
13679
|
+
if (message.description !== undefined)
|
|
13680
|
+
writer.tag(4, import_runtime.WireType.LengthDelimited).string(message.description);
|
|
13681
|
+
if (message.fileUniqueId !== "")
|
|
13682
|
+
writer.tag(5, import_runtime.WireType.LengthDelimited).string(message.fileUniqueId);
|
|
13683
|
+
let u = options.writeUnknownFields;
|
|
13684
|
+
if (u !== false)
|
|
13685
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13686
|
+
return writer;
|
|
13687
|
+
}
|
|
13688
|
+
}
|
|
13689
|
+
var SetBotAvatarInput = new SetBotAvatarInput$Type;
|
|
13690
|
+
|
|
13691
|
+
class SetBotAvatarResult$Type extends import_runtime4.MessageType {
|
|
13692
|
+
constructor() {
|
|
13693
|
+
super("SetBotAvatarResult", [
|
|
13694
|
+
{ no: 1, name: "bot", kind: "message", T: () => User }
|
|
13695
|
+
]);
|
|
13696
|
+
}
|
|
13697
|
+
create(value) {
|
|
13698
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13699
|
+
if (value !== undefined)
|
|
13700
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13701
|
+
return message;
|
|
13702
|
+
}
|
|
13703
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13704
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
13705
|
+
while (reader.pos < end) {
|
|
13706
|
+
let [fieldNo, wireType] = reader.tag();
|
|
13707
|
+
switch (fieldNo) {
|
|
13708
|
+
case 1:
|
|
13709
|
+
message.bot = User.internalBinaryRead(reader, reader.uint32(), options, message.bot);
|
|
13710
|
+
break;
|
|
13711
|
+
default:
|
|
13712
|
+
let u = options.readUnknownField;
|
|
13713
|
+
if (u === "throw")
|
|
13714
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
13715
|
+
let d = reader.skip(wireType);
|
|
13716
|
+
if (u !== false)
|
|
13717
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
13718
|
+
}
|
|
13719
|
+
}
|
|
13720
|
+
return message;
|
|
13721
|
+
}
|
|
13722
|
+
internalBinaryWrite(message, writer, options) {
|
|
13723
|
+
if (message.bot)
|
|
13724
|
+
User.internalBinaryWrite(message.bot, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13725
|
+
let u = options.writeUnknownFields;
|
|
13726
|
+
if (u !== false)
|
|
13727
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13728
|
+
return writer;
|
|
13729
|
+
}
|
|
13730
|
+
}
|
|
13731
|
+
var SetBotAvatarResult = new SetBotAvatarResult$Type;
|
|
13732
|
+
|
|
13733
|
+
class ClearBotAvatarInput$Type extends import_runtime4.MessageType {
|
|
13734
|
+
constructor() {
|
|
13735
|
+
super("ClearBotAvatarInput", [
|
|
13736
|
+
{ no: 1, name: "bot_user_id", kind: "scalar", T: 3, L: 0 }
|
|
13737
|
+
]);
|
|
13738
|
+
}
|
|
13739
|
+
create(value) {
|
|
13740
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13741
|
+
message.botUserId = 0n;
|
|
13742
|
+
if (value !== undefined)
|
|
13743
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13744
|
+
return message;
|
|
13745
|
+
}
|
|
13746
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13747
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
13748
|
+
while (reader.pos < end) {
|
|
13749
|
+
let [fieldNo, wireType] = reader.tag();
|
|
13750
|
+
switch (fieldNo) {
|
|
13751
|
+
case 1:
|
|
13752
|
+
message.botUserId = reader.int64().toBigInt();
|
|
13753
|
+
break;
|
|
13754
|
+
default:
|
|
13755
|
+
let u = options.readUnknownField;
|
|
13756
|
+
if (u === "throw")
|
|
13757
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
13758
|
+
let d = reader.skip(wireType);
|
|
13759
|
+
if (u !== false)
|
|
13760
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
13761
|
+
}
|
|
13762
|
+
}
|
|
13763
|
+
return message;
|
|
13764
|
+
}
|
|
13765
|
+
internalBinaryWrite(message, writer, options) {
|
|
13766
|
+
if (message.botUserId !== 0n)
|
|
13767
|
+
writer.tag(1, import_runtime.WireType.Varint).int64(message.botUserId);
|
|
13768
|
+
let u = options.writeUnknownFields;
|
|
13769
|
+
if (u !== false)
|
|
13770
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13771
|
+
return writer;
|
|
13772
|
+
}
|
|
13773
|
+
}
|
|
13774
|
+
var ClearBotAvatarInput = new ClearBotAvatarInput$Type;
|
|
13775
|
+
|
|
13776
|
+
class ClearBotAvatarResult$Type extends import_runtime4.MessageType {
|
|
13777
|
+
constructor() {
|
|
13778
|
+
super("ClearBotAvatarResult", [
|
|
13779
|
+
{ no: 1, name: "bot", kind: "message", T: () => User }
|
|
13780
|
+
]);
|
|
13781
|
+
}
|
|
13782
|
+
create(value) {
|
|
13783
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13784
|
+
if (value !== undefined)
|
|
13785
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13786
|
+
return message;
|
|
13787
|
+
}
|
|
13788
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13789
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
13790
|
+
while (reader.pos < end) {
|
|
13791
|
+
let [fieldNo, wireType] = reader.tag();
|
|
13792
|
+
switch (fieldNo) {
|
|
13793
|
+
case 1:
|
|
13794
|
+
message.bot = User.internalBinaryRead(reader, reader.uint32(), options, message.bot);
|
|
13795
|
+
break;
|
|
13796
|
+
default:
|
|
13797
|
+
let u = options.readUnknownField;
|
|
13798
|
+
if (u === "throw")
|
|
13799
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
13800
|
+
let d = reader.skip(wireType);
|
|
13801
|
+
if (u !== false)
|
|
13802
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
13803
|
+
}
|
|
13804
|
+
}
|
|
13805
|
+
return message;
|
|
13806
|
+
}
|
|
13807
|
+
internalBinaryWrite(message, writer, options) {
|
|
13808
|
+
if (message.bot)
|
|
13809
|
+
User.internalBinaryWrite(message.bot, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13810
|
+
let u = options.writeUnknownFields;
|
|
13811
|
+
if (u !== false)
|
|
13812
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13813
|
+
return writer;
|
|
13814
|
+
}
|
|
13815
|
+
}
|
|
13816
|
+
var ClearBotAvatarResult = new ClearBotAvatarResult$Type;
|
|
13817
|
+
|
|
13818
|
+
class GetBotPresenceInput$Type extends import_runtime4.MessageType {
|
|
13819
|
+
constructor() {
|
|
13820
|
+
super("GetBotPresenceInput", [
|
|
13821
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => InputPeer }
|
|
13822
|
+
]);
|
|
13823
|
+
}
|
|
13824
|
+
create(value) {
|
|
13825
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13826
|
+
if (value !== undefined)
|
|
13827
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13828
|
+
return message;
|
|
13829
|
+
}
|
|
13830
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13831
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
13832
|
+
while (reader.pos < end) {
|
|
13833
|
+
let [fieldNo, wireType] = reader.tag();
|
|
13834
|
+
switch (fieldNo) {
|
|
13835
|
+
case 1:
|
|
13836
|
+
message.peerId = InputPeer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
13837
|
+
break;
|
|
13838
|
+
default:
|
|
13839
|
+
let u = options.readUnknownField;
|
|
13840
|
+
if (u === "throw")
|
|
13841
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
13842
|
+
let d = reader.skip(wireType);
|
|
13843
|
+
if (u !== false)
|
|
13844
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
13845
|
+
}
|
|
13846
|
+
}
|
|
13847
|
+
return message;
|
|
13848
|
+
}
|
|
13849
|
+
internalBinaryWrite(message, writer, options) {
|
|
13850
|
+
if (message.peerId)
|
|
13851
|
+
InputPeer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13852
|
+
let u = options.writeUnknownFields;
|
|
13853
|
+
if (u !== false)
|
|
13854
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13855
|
+
return writer;
|
|
13856
|
+
}
|
|
13857
|
+
}
|
|
13858
|
+
var GetBotPresenceInput = new GetBotPresenceInput$Type;
|
|
13859
|
+
|
|
13860
|
+
class GetBotPresenceResult$Type extends import_runtime4.MessageType {
|
|
13861
|
+
constructor() {
|
|
13862
|
+
super("GetBotPresenceResult", [
|
|
13863
|
+
{ no: 1, name: "bot_user_id", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
13864
|
+
{ no: 2, name: "avatar", kind: "message", T: () => BotAvatar },
|
|
13865
|
+
{ no: 3, name: "state", kind: "message", T: () => BotPresenceState },
|
|
13866
|
+
{ no: 4, name: "peer_id", kind: "message", T: () => Peer }
|
|
13867
|
+
]);
|
|
13868
|
+
}
|
|
13869
|
+
create(value) {
|
|
13870
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13871
|
+
if (value !== undefined)
|
|
13872
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13873
|
+
return message;
|
|
13874
|
+
}
|
|
13875
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13876
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
13877
|
+
while (reader.pos < end) {
|
|
13878
|
+
let [fieldNo, wireType] = reader.tag();
|
|
13879
|
+
switch (fieldNo) {
|
|
13880
|
+
case 1:
|
|
13881
|
+
message.botUserId = reader.int64().toBigInt();
|
|
13882
|
+
break;
|
|
13883
|
+
case 2:
|
|
13884
|
+
message.avatar = BotAvatar.internalBinaryRead(reader, reader.uint32(), options, message.avatar);
|
|
13885
|
+
break;
|
|
13886
|
+
case 3:
|
|
13887
|
+
message.state = BotPresenceState.internalBinaryRead(reader, reader.uint32(), options, message.state);
|
|
13888
|
+
break;
|
|
13889
|
+
case 4:
|
|
13890
|
+
message.peerId = Peer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
13891
|
+
break;
|
|
13892
|
+
default:
|
|
13893
|
+
let u = options.readUnknownField;
|
|
13894
|
+
if (u === "throw")
|
|
13895
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
13896
|
+
let d = reader.skip(wireType);
|
|
13897
|
+
if (u !== false)
|
|
13898
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
13899
|
+
}
|
|
13900
|
+
}
|
|
13901
|
+
return message;
|
|
13902
|
+
}
|
|
13903
|
+
internalBinaryWrite(message, writer, options) {
|
|
13904
|
+
if (message.botUserId !== undefined)
|
|
13905
|
+
writer.tag(1, import_runtime.WireType.Varint).int64(message.botUserId);
|
|
13906
|
+
if (message.avatar)
|
|
13907
|
+
BotAvatar.internalBinaryWrite(message.avatar, writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13908
|
+
if (message.state)
|
|
13909
|
+
BotPresenceState.internalBinaryWrite(message.state, writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13910
|
+
if (message.peerId)
|
|
13911
|
+
Peer.internalBinaryWrite(message.peerId, writer.tag(4, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13912
|
+
let u = options.writeUnknownFields;
|
|
13913
|
+
if (u !== false)
|
|
13914
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13915
|
+
return writer;
|
|
13916
|
+
}
|
|
13917
|
+
}
|
|
13918
|
+
var GetBotPresenceResult = new GetBotPresenceResult$Type;
|
|
13919
|
+
|
|
13920
|
+
class SetBotPresenceStateInput$Type extends import_runtime4.MessageType {
|
|
13921
|
+
constructor() {
|
|
13922
|
+
super("SetBotPresenceStateInput", [
|
|
13923
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => InputPeer },
|
|
13924
|
+
{ no: 2, name: "state", kind: "message", T: () => BotPresenceState }
|
|
13925
|
+
]);
|
|
13926
|
+
}
|
|
13927
|
+
create(value) {
|
|
13928
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13929
|
+
if (value !== undefined)
|
|
13930
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13931
|
+
return message;
|
|
13932
|
+
}
|
|
13933
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13934
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
13935
|
+
while (reader.pos < end) {
|
|
13936
|
+
let [fieldNo, wireType] = reader.tag();
|
|
13937
|
+
switch (fieldNo) {
|
|
13938
|
+
case 1:
|
|
13939
|
+
message.peerId = InputPeer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
13940
|
+
break;
|
|
13941
|
+
case 2:
|
|
13942
|
+
message.state = BotPresenceState.internalBinaryRead(reader, reader.uint32(), options, message.state);
|
|
13943
|
+
break;
|
|
13944
|
+
default:
|
|
13945
|
+
let u = options.readUnknownField;
|
|
13946
|
+
if (u === "throw")
|
|
13947
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
13948
|
+
let d = reader.skip(wireType);
|
|
13949
|
+
if (u !== false)
|
|
13950
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
13951
|
+
}
|
|
13952
|
+
}
|
|
13953
|
+
return message;
|
|
13954
|
+
}
|
|
13955
|
+
internalBinaryWrite(message, writer, options) {
|
|
13956
|
+
if (message.peerId)
|
|
13957
|
+
InputPeer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13958
|
+
if (message.state)
|
|
13959
|
+
BotPresenceState.internalBinaryWrite(message.state, writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13960
|
+
let u = options.writeUnknownFields;
|
|
13961
|
+
if (u !== false)
|
|
13962
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13963
|
+
return writer;
|
|
13964
|
+
}
|
|
13965
|
+
}
|
|
13966
|
+
var SetBotPresenceStateInput = new SetBotPresenceStateInput$Type;
|
|
13967
|
+
|
|
13968
|
+
class SetBotPresenceStateResult$Type extends import_runtime4.MessageType {
|
|
13969
|
+
constructor() {
|
|
13970
|
+
super("SetBotPresenceStateResult", []);
|
|
13971
|
+
}
|
|
13972
|
+
create(value) {
|
|
13973
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
13974
|
+
if (value !== undefined)
|
|
13975
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13976
|
+
return message;
|
|
13977
|
+
}
|
|
13978
|
+
internalBinaryRead(reader, length, options, target) {
|
|
13979
|
+
return target ?? this.create();
|
|
13980
|
+
}
|
|
13981
|
+
internalBinaryWrite(message, writer, options) {
|
|
13982
|
+
let u = options.writeUnknownFields;
|
|
13983
|
+
if (u !== false)
|
|
13984
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
13985
|
+
return writer;
|
|
13986
|
+
}
|
|
13987
|
+
}
|
|
13988
|
+
var SetBotPresenceStateResult = new SetBotPresenceStateResult$Type;
|
|
13989
|
+
|
|
13270
13990
|
class GetUserSettingsInput$Type extends import_runtime4.MessageType {
|
|
13271
13991
|
constructor() {
|
|
13272
13992
|
super("GetUserSettingsInput", []);
|
|
@@ -16405,7 +17125,9 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
16405
17125
|
{ no: 34, name: "chat_open", kind: "message", oneof: "update", T: () => UpdateChatOpen },
|
|
16406
17126
|
{ no: 35, name: "message_action_invoked", kind: "message", oneof: "update", T: () => UpdateMessageActionInvoked },
|
|
16407
17127
|
{ no: 36, name: "message_action_answered", kind: "message", oneof: "update", T: () => UpdateMessageActionAnswered },
|
|
16408
|
-
{ no: 37, name: "clear_chat_history", kind: "message", oneof: "update", T: () => UpdateClearChatHistory }
|
|
17128
|
+
{ no: 37, name: "clear_chat_history", kind: "message", oneof: "update", T: () => UpdateClearChatHistory },
|
|
17129
|
+
{ no: 38, name: "bot_presence", kind: "message", oneof: "update", T: () => UpdateBotPresence },
|
|
17130
|
+
{ no: 39, name: "dialog_follow_mode", kind: "message", oneof: "update", T: () => UpdateDialogFollowMode }
|
|
16409
17131
|
]);
|
|
16410
17132
|
}
|
|
16411
17133
|
create(value) {
|
|
@@ -16630,6 +17352,18 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
16630
17352
|
clearChatHistory: UpdateClearChatHistory.internalBinaryRead(reader, reader.uint32(), options, message.update.clearChatHistory)
|
|
16631
17353
|
};
|
|
16632
17354
|
break;
|
|
17355
|
+
case 38:
|
|
17356
|
+
message.update = {
|
|
17357
|
+
oneofKind: "botPresence",
|
|
17358
|
+
botPresence: UpdateBotPresence.internalBinaryRead(reader, reader.uint32(), options, message.update.botPresence)
|
|
17359
|
+
};
|
|
17360
|
+
break;
|
|
17361
|
+
case 39:
|
|
17362
|
+
message.update = {
|
|
17363
|
+
oneofKind: "dialogFollowMode",
|
|
17364
|
+
dialogFollowMode: UpdateDialogFollowMode.internalBinaryRead(reader, reader.uint32(), options, message.update.dialogFollowMode)
|
|
17365
|
+
};
|
|
17366
|
+
break;
|
|
16633
17367
|
default:
|
|
16634
17368
|
let u = options.readUnknownField;
|
|
16635
17369
|
if (u === "throw")
|
|
@@ -16714,6 +17448,10 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
16714
17448
|
UpdateMessageActionAnswered.internalBinaryWrite(message.update.messageActionAnswered, writer.tag(36, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16715
17449
|
if (message.update.oneofKind === "clearChatHistory")
|
|
16716
17450
|
UpdateClearChatHistory.internalBinaryWrite(message.update.clearChatHistory, writer.tag(37, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
17451
|
+
if (message.update.oneofKind === "botPresence")
|
|
17452
|
+
UpdateBotPresence.internalBinaryWrite(message.update.botPresence, writer.tag(38, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
17453
|
+
if (message.update.oneofKind === "dialogFollowMode")
|
|
17454
|
+
UpdateDialogFollowMode.internalBinaryWrite(message.update.dialogFollowMode, writer.tag(39, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16717
17455
|
let u = options.writeUnknownFields;
|
|
16718
17456
|
if (u !== false)
|
|
16719
17457
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -17574,6 +18312,54 @@ class UpdateDialogNotificationSettings$Type extends import_runtime4.MessageType
|
|
|
17574
18312
|
}
|
|
17575
18313
|
var UpdateDialogNotificationSettings = new UpdateDialogNotificationSettings$Type;
|
|
17576
18314
|
|
|
18315
|
+
class UpdateDialogFollowMode$Type extends import_runtime4.MessageType {
|
|
18316
|
+
constructor() {
|
|
18317
|
+
super("UpdateDialogFollowMode", [
|
|
18318
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => Peer },
|
|
18319
|
+
{ no: 2, name: "follow_mode", kind: "enum", opt: true, T: () => ["DialogFollowMode", DialogFollowMode] }
|
|
18320
|
+
]);
|
|
18321
|
+
}
|
|
18322
|
+
create(value) {
|
|
18323
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
18324
|
+
if (value !== undefined)
|
|
18325
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
18326
|
+
return message;
|
|
18327
|
+
}
|
|
18328
|
+
internalBinaryRead(reader, length, options, target) {
|
|
18329
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
18330
|
+
while (reader.pos < end) {
|
|
18331
|
+
let [fieldNo, wireType] = reader.tag();
|
|
18332
|
+
switch (fieldNo) {
|
|
18333
|
+
case 1:
|
|
18334
|
+
message.peerId = Peer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
18335
|
+
break;
|
|
18336
|
+
case 2:
|
|
18337
|
+
message.followMode = reader.int32();
|
|
18338
|
+
break;
|
|
18339
|
+
default:
|
|
18340
|
+
let u = options.readUnknownField;
|
|
18341
|
+
if (u === "throw")
|
|
18342
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
18343
|
+
let d = reader.skip(wireType);
|
|
18344
|
+
if (u !== false)
|
|
18345
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
18346
|
+
}
|
|
18347
|
+
}
|
|
18348
|
+
return message;
|
|
18349
|
+
}
|
|
18350
|
+
internalBinaryWrite(message, writer, options) {
|
|
18351
|
+
if (message.peerId)
|
|
18352
|
+
Peer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
18353
|
+
if (message.followMode !== undefined)
|
|
18354
|
+
writer.tag(2, import_runtime.WireType.Varint).int32(message.followMode);
|
|
18355
|
+
let u = options.writeUnknownFields;
|
|
18356
|
+
if (u !== false)
|
|
18357
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
18358
|
+
return writer;
|
|
18359
|
+
}
|
|
18360
|
+
}
|
|
18361
|
+
var UpdateDialogFollowMode = new UpdateDialogFollowMode$Type;
|
|
18362
|
+
|
|
17577
18363
|
class UpdateNewChat$Type extends import_runtime4.MessageType {
|
|
17578
18364
|
constructor() {
|
|
17579
18365
|
super("UpdateNewChat", [
|
|
@@ -18099,6 +18885,74 @@ class UpdateClearChatHistory$Type extends import_runtime4.MessageType {
|
|
|
18099
18885
|
}
|
|
18100
18886
|
var UpdateClearChatHistory = new UpdateClearChatHistory$Type;
|
|
18101
18887
|
|
|
18888
|
+
class UpdateBotPresence$Type extends import_runtime4.MessageType {
|
|
18889
|
+
constructor() {
|
|
18890
|
+
super("UpdateBotPresence", [
|
|
18891
|
+
{ no: 1, name: "bot_user_id", kind: "scalar", T: 3, L: 0 },
|
|
18892
|
+
{ no: 2, name: "peer_id", kind: "message", T: () => Peer },
|
|
18893
|
+
{ no: 3, name: "state", kind: "message", T: () => BotPresenceState },
|
|
18894
|
+
{ no: 4, name: "avatar", kind: "message", T: () => BotAvatar },
|
|
18895
|
+
{ no: 5, name: "avatar_changed", kind: "scalar", T: 8 }
|
|
18896
|
+
]);
|
|
18897
|
+
}
|
|
18898
|
+
create(value) {
|
|
18899
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
18900
|
+
message.botUserId = 0n;
|
|
18901
|
+
message.avatarChanged = false;
|
|
18902
|
+
if (value !== undefined)
|
|
18903
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
18904
|
+
return message;
|
|
18905
|
+
}
|
|
18906
|
+
internalBinaryRead(reader, length, options, target) {
|
|
18907
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
18908
|
+
while (reader.pos < end) {
|
|
18909
|
+
let [fieldNo, wireType] = reader.tag();
|
|
18910
|
+
switch (fieldNo) {
|
|
18911
|
+
case 1:
|
|
18912
|
+
message.botUserId = reader.int64().toBigInt();
|
|
18913
|
+
break;
|
|
18914
|
+
case 2:
|
|
18915
|
+
message.peerId = Peer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
18916
|
+
break;
|
|
18917
|
+
case 3:
|
|
18918
|
+
message.state = BotPresenceState.internalBinaryRead(reader, reader.uint32(), options, message.state);
|
|
18919
|
+
break;
|
|
18920
|
+
case 4:
|
|
18921
|
+
message.avatar = BotAvatar.internalBinaryRead(reader, reader.uint32(), options, message.avatar);
|
|
18922
|
+
break;
|
|
18923
|
+
case 5:
|
|
18924
|
+
message.avatarChanged = reader.bool();
|
|
18925
|
+
break;
|
|
18926
|
+
default:
|
|
18927
|
+
let u = options.readUnknownField;
|
|
18928
|
+
if (u === "throw")
|
|
18929
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
18930
|
+
let d = reader.skip(wireType);
|
|
18931
|
+
if (u !== false)
|
|
18932
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
18933
|
+
}
|
|
18934
|
+
}
|
|
18935
|
+
return message;
|
|
18936
|
+
}
|
|
18937
|
+
internalBinaryWrite(message, writer, options) {
|
|
18938
|
+
if (message.botUserId !== 0n)
|
|
18939
|
+
writer.tag(1, import_runtime.WireType.Varint).int64(message.botUserId);
|
|
18940
|
+
if (message.peerId)
|
|
18941
|
+
Peer.internalBinaryWrite(message.peerId, writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
18942
|
+
if (message.state)
|
|
18943
|
+
BotPresenceState.internalBinaryWrite(message.state, writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
18944
|
+
if (message.avatar)
|
|
18945
|
+
BotAvatar.internalBinaryWrite(message.avatar, writer.tag(4, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
18946
|
+
if (message.avatarChanged !== false)
|
|
18947
|
+
writer.tag(5, import_runtime.WireType.Varint).bool(message.avatarChanged);
|
|
18948
|
+
let u = options.writeUnknownFields;
|
|
18949
|
+
if (u !== false)
|
|
18950
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
18951
|
+
return writer;
|
|
18952
|
+
}
|
|
18953
|
+
}
|
|
18954
|
+
var UpdateBotPresence = new UpdateBotPresence$Type;
|
|
18955
|
+
|
|
18102
18956
|
class UpdateMessageId$Type extends import_runtime4.MessageType {
|
|
18103
18957
|
constructor() {
|
|
18104
18958
|
super("UpdateMessageId", [
|
|
@@ -21039,7 +21893,7 @@ class InlineSdkClient {
|
|
|
21039
21893
|
await this.handleUpdate(update);
|
|
21040
21894
|
}
|
|
21041
21895
|
}
|
|
21042
|
-
async handleUpdate(update) {
|
|
21896
|
+
async handleUpdate(update, options) {
|
|
21043
21897
|
const seq = update.seq ?? 0;
|
|
21044
21898
|
const date = update.date ?? 0n;
|
|
21045
21899
|
switch (update.update.oneofKind) {
|
|
@@ -21171,6 +22025,34 @@ class InlineSdkClient {
|
|
|
21171
22025
|
});
|
|
21172
22026
|
return;
|
|
21173
22027
|
}
|
|
22028
|
+
case "participantAdd": {
|
|
22029
|
+
const payload = update.update.participantAdd;
|
|
22030
|
+
if (options?.source !== "user" && options?.source !== "space") {
|
|
22031
|
+
this.bumpChatSeq(payload.chatId, seq);
|
|
22032
|
+
}
|
|
22033
|
+
await this.eventStream.send({
|
|
22034
|
+
kind: "chat.participant.add",
|
|
22035
|
+
chatId: payload.chatId,
|
|
22036
|
+
...payload.participant ? { participant: payload.participant } : {},
|
|
22037
|
+
seq,
|
|
22038
|
+
date
|
|
22039
|
+
});
|
|
22040
|
+
return;
|
|
22041
|
+
}
|
|
22042
|
+
case "participantDelete": {
|
|
22043
|
+
const payload = update.update.participantDelete;
|
|
22044
|
+
if (options?.source !== "user" && options?.source !== "space") {
|
|
22045
|
+
this.bumpChatSeq(payload.chatId, seq);
|
|
22046
|
+
}
|
|
22047
|
+
await this.eventStream.send({
|
|
22048
|
+
kind: "chat.participant.delete",
|
|
22049
|
+
chatId: payload.chatId,
|
|
22050
|
+
userId: payload.userId,
|
|
22051
|
+
seq,
|
|
22052
|
+
date
|
|
22053
|
+
});
|
|
22054
|
+
return;
|
|
22055
|
+
}
|
|
21174
22056
|
case "messageActionInvoked": {
|
|
21175
22057
|
const payload = update.update.messageActionInvoked;
|
|
21176
22058
|
if (this.shouldSkipUserSeq(seq)) {
|
|
@@ -21271,14 +22153,14 @@ class InlineSdkClient {
|
|
|
21271
22153
|
}
|
|
21272
22154
|
}
|
|
21273
22155
|
requestCatchUpUser() {
|
|
21274
|
-
const lastUserSeq = this.state.lastUserSeq
|
|
21275
|
-
if (lastUserSeq
|
|
22156
|
+
const lastUserSeq = this.state.lastUserSeq;
|
|
22157
|
+
if (lastUserSeq == null && !this.options.catchUpUserFromStart) {
|
|
21276
22158
|
return;
|
|
21277
22159
|
}
|
|
21278
22160
|
if (this.userCatchUpInFlight) {
|
|
21279
22161
|
return;
|
|
21280
22162
|
}
|
|
21281
|
-
this.userCatchUpInFlight = this.doCatchUpUser(lastUserSeq).catch((error) => {
|
|
22163
|
+
this.userCatchUpInFlight = this.doCatchUpUser(lastUserSeq ?? 0).catch((error) => {
|
|
21282
22164
|
this.log.warn?.("GET_UPDATES user catch-up failed; continuing live delivery", {
|
|
21283
22165
|
error: extractErrorMessage(error)
|
|
21284
22166
|
});
|
|
@@ -21319,7 +22201,7 @@ class InlineSdkClient {
|
|
|
21319
22201
|
return;
|
|
21320
22202
|
}
|
|
21321
22203
|
for (const update of payload.updates) {
|
|
21322
|
-
await this.handleUpdate(update);
|
|
22204
|
+
await this.handleUpdate(update, { source: "user" });
|
|
21323
22205
|
}
|
|
21324
22206
|
this.bumpUserSeq(deliveredSeq);
|
|
21325
22207
|
if (payload.date !== 0n) {
|
|
@@ -21418,7 +22300,7 @@ class InlineSdkClient {
|
|
|
21418
22300
|
}
|
|
21419
22301
|
this.bumpChatSeq(chatId, deliveredSeq);
|
|
21420
22302
|
for (const update of payload.updates) {
|
|
21421
|
-
await this.handleUpdate(update);
|
|
22303
|
+
await this.handleUpdate(update, { source: "chat" });
|
|
21422
22304
|
}
|
|
21423
22305
|
if (payload.date !== 0n) {
|
|
21424
22306
|
this.state.dateCursor = payload.date;
|
|
@@ -21520,7 +22402,7 @@ class InlineSdkClient {
|
|
|
21520
22402
|
}
|
|
21521
22403
|
this.bumpSpaceSeq(spaceId, deliveredSeq);
|
|
21522
22404
|
for (const update of payload.updates) {
|
|
21523
|
-
await this.handleUpdate(update);
|
|
22405
|
+
await this.handleUpdate(update, { source: "space" });
|
|
21524
22406
|
}
|
|
21525
22407
|
if (payload.date !== 0n) {
|
|
21526
22408
|
this.state.dateCursor = payload.date;
|
|
@@ -36462,6 +37344,8 @@ var InlineExecApprovalsSchema = exports_external.object({
|
|
|
36462
37344
|
var InlineReactionNotificationsSchema = exports_external.enum(["off", "own", "all", "allowlist"]);
|
|
36463
37345
|
var InlineStreamingModeSchema = exports_external.enum(["off", "partial", "block", "progress"]);
|
|
36464
37346
|
var InlineStreamingCommandTextSchema = exports_external.enum(["raw", "status"]);
|
|
37347
|
+
var INLINE_DEFAULT_GROUP_POLICY = "open";
|
|
37348
|
+
var INLINE_DEFAULT_REQUIRE_MENTION = true;
|
|
36465
37349
|
var InlineStreamingChunkSchema = exports_external.object({
|
|
36466
37350
|
minChars: exports_external.number().int().positive().optional(),
|
|
36467
37351
|
maxChars: exports_external.number().int().positive().optional(),
|
|
@@ -36533,7 +37417,7 @@ var InlineAccountSchemaBase = exports_external.object({
|
|
|
36533
37417
|
defaultTo: InlineTargetSchema.optional(),
|
|
36534
37418
|
systemPrompt: exports_external.string().optional(),
|
|
36535
37419
|
groupAllowFrom: exports_external.array(InlineAllowEntrySchema).optional(),
|
|
36536
|
-
groupPolicy: GroupPolicySchema.optional().default(
|
|
37420
|
+
groupPolicy: GroupPolicySchema.optional().default(INLINE_DEFAULT_GROUP_POLICY),
|
|
36537
37421
|
groups: exports_external.record(exports_external.string(), InlineGroupSchema.optional()).optional(),
|
|
36538
37422
|
requireMention: exports_external.boolean().optional(),
|
|
36539
37423
|
replyThreadMode: InlineReplyThreadModeSchema.optional(),
|
|
@@ -37266,6 +38150,80 @@ async function uploadInlineMediaFromUrl(params) {
|
|
|
37266
38150
|
}
|
|
37267
38151
|
}
|
|
37268
38152
|
|
|
38153
|
+
// src/inline/message-formatting.ts
|
|
38154
|
+
var INLINE_FORMATTING_RULES = [
|
|
38155
|
+
"Use Inline markdown.",
|
|
38156
|
+
"Prefer bullet lists over markdown tables.",
|
|
38157
|
+
"If a table is necessary, render it inside a fenced code block.",
|
|
38158
|
+
"Use plain URLs or markdown links; do not wrap bare URLs in inline code or backticks.",
|
|
38159
|
+
"Mention Inline users with markdown links like [@FirstName](inline://user?id=123); use inline://user?username=username only when the user id is unavailable.",
|
|
38160
|
+
"Link Inline chats/threads with markdown links like [Planning](inline://chat?id=123) or [Planning](inline://thread?id=123); use inline://thread?space_id=7 when only the title and space are known.",
|
|
38161
|
+
"Use inline code only for actual code, commands, file paths, env vars, or identifiers."
|
|
38162
|
+
];
|
|
38163
|
+
var INLINE_COPY_REPLACEMENTS = [
|
|
38164
|
+
[
|
|
38165
|
+
/Bind this (?:thread \(Discord\) or topic\/conversation \(Telegram\)|thread or topic\/conversation) to a session target\.?/gi,
|
|
38166
|
+
"Bind this Inline conversation to a session target."
|
|
38167
|
+
],
|
|
38168
|
+
[
|
|
38169
|
+
/Remove the current (?:thread \(Discord\) or topic\/conversation \(Telegram\)|thread or topic\/conversation) binding\.?/gi,
|
|
38170
|
+
"Remove the current Inline conversation binding."
|
|
38171
|
+
]
|
|
38172
|
+
];
|
|
38173
|
+
function normalizeInlineMarkdownLabel(raw, fallback) {
|
|
38174
|
+
return (raw ?? "").replace(/\s+/g, " ").trim() || fallback;
|
|
38175
|
+
}
|
|
38176
|
+
function escapeInlineMarkdownLabel(raw) {
|
|
38177
|
+
return raw.replace(/\\/g, "\\\\").replace(/\[/g, "\\[").replace(/\]/g, "\\]");
|
|
38178
|
+
}
|
|
38179
|
+
function encodeInlineMarkdownValue(raw) {
|
|
38180
|
+
return encodeURIComponent(String(raw).trim());
|
|
38181
|
+
}
|
|
38182
|
+
function isBareHttpUrl(text) {
|
|
38183
|
+
if (!/^https?:\/\/\S+$/i.test(text))
|
|
38184
|
+
return false;
|
|
38185
|
+
try {
|
|
38186
|
+
const url2 = new URL(text);
|
|
38187
|
+
return url2.protocol === "http:" || url2.protocol === "https:";
|
|
38188
|
+
} catch {
|
|
38189
|
+
return false;
|
|
38190
|
+
}
|
|
38191
|
+
}
|
|
38192
|
+
function adaptInlineVisibleCopy(text) {
|
|
38193
|
+
let result = text;
|
|
38194
|
+
for (const [from, to] of INLINE_COPY_REPLACEMENTS) {
|
|
38195
|
+
result = result.replace(from, to);
|
|
38196
|
+
}
|
|
38197
|
+
return result;
|
|
38198
|
+
}
|
|
38199
|
+
function buildInlineSystemPrompt(extraPrompt) {
|
|
38200
|
+
return extraPrompt?.trim() || "";
|
|
38201
|
+
}
|
|
38202
|
+
function buildInlineInboundFormattingHints() {
|
|
38203
|
+
return {
|
|
38204
|
+
text_markup: "inline_markdown",
|
|
38205
|
+
rules: [...INLINE_FORMATTING_RULES]
|
|
38206
|
+
};
|
|
38207
|
+
}
|
|
38208
|
+
function buildInlineThreadMarkdownLink(params) {
|
|
38209
|
+
const title = normalizeInlineMarkdownLabel(params.title, `thread:${String(params.threadId)}`);
|
|
38210
|
+
return `[${escapeInlineMarkdownLabel(title)}](inline://thread?id=${encodeInlineMarkdownValue(params.threadId)})`;
|
|
38211
|
+
}
|
|
38212
|
+
function buildInlineThreadTitleMarkdownLink(params) {
|
|
38213
|
+
const title = normalizeInlineMarkdownLabel(params.title, `space:${String(params.spaceId)}`);
|
|
38214
|
+
const label = normalizeInlineMarkdownLabel(params.label, title);
|
|
38215
|
+
const query = [`space_id=${encodeInlineMarkdownValue(params.spaceId)}`];
|
|
38216
|
+
if (label !== title) {
|
|
38217
|
+
query.push(`title=${encodeInlineMarkdownValue(title)}`);
|
|
38218
|
+
}
|
|
38219
|
+
return `[${escapeInlineMarkdownLabel(label)}](inline://thread?${query.join("&")})`;
|
|
38220
|
+
}
|
|
38221
|
+
function sanitizeInlineOutgoingText(text) {
|
|
38222
|
+
return adaptInlineVisibleCopy(text).replace(/`([^`\n]+)`/g, (full, content) => {
|
|
38223
|
+
return isBareHttpUrl(content) ? content : full;
|
|
38224
|
+
});
|
|
38225
|
+
}
|
|
38226
|
+
|
|
37269
38227
|
// src/inline/message-content.ts
|
|
37270
38228
|
var INLINE_MESSAGE_ENTITY_TYPE = {
|
|
37271
38229
|
MENTION: 1,
|
|
@@ -37277,7 +38235,9 @@ var INLINE_MESSAGE_ENTITY_TYPE = {
|
|
|
37277
38235
|
USERNAME_MENTION: 7,
|
|
37278
38236
|
CODE: 8,
|
|
37279
38237
|
PRE: 9,
|
|
37280
|
-
PHONE_NUMBER: 10
|
|
38238
|
+
PHONE_NUMBER: 10,
|
|
38239
|
+
THREAD: 11,
|
|
38240
|
+
THREAD_TITLE: 12
|
|
37281
38241
|
};
|
|
37282
38242
|
function compactWhitespace(raw) {
|
|
37283
38243
|
return (raw ?? "").replace(/\s+/g, " ").trim();
|
|
@@ -37445,6 +38405,10 @@ function mapEntityType(type) {
|
|
|
37445
38405
|
return "pre";
|
|
37446
38406
|
case INLINE_MESSAGE_ENTITY_TYPE.PHONE_NUMBER:
|
|
37447
38407
|
return "phone_number";
|
|
38408
|
+
case INLINE_MESSAGE_ENTITY_TYPE.THREAD:
|
|
38409
|
+
return "thread";
|
|
38410
|
+
case INLINE_MESSAGE_ENTITY_TYPE.THREAD_TITLE:
|
|
38411
|
+
return "thread_title";
|
|
37448
38412
|
default:
|
|
37449
38413
|
return "unknown";
|
|
37450
38414
|
}
|
|
@@ -37486,6 +38450,26 @@ function messageEntitySummaries(message) {
|
|
|
37486
38450
|
const language = compactWhitespace(entity.entity.pre.language);
|
|
37487
38451
|
if (language)
|
|
37488
38452
|
summary.language = language;
|
|
38453
|
+
} else if (entity.entity.oneofKind === "thread") {
|
|
38454
|
+
const chatId = entity.entity.thread.chatId.toString();
|
|
38455
|
+
summary.chatId = chatId;
|
|
38456
|
+
summary.markdownLink = buildInlineThreadMarkdownLink({
|
|
38457
|
+
threadId: chatId,
|
|
38458
|
+
...summary.text ? { title: summary.text } : {}
|
|
38459
|
+
});
|
|
38460
|
+
} else if (entity.entity.oneofKind === "threadTitle") {
|
|
38461
|
+
const spaceId = entity.entity.threadTitle.spaceId.toString();
|
|
38462
|
+
const title = compactWhitespace(entity.entity.threadTitle.title);
|
|
38463
|
+
summary.spaceId = spaceId;
|
|
38464
|
+
if (title)
|
|
38465
|
+
summary.title = title;
|
|
38466
|
+
if (title || summary.text) {
|
|
38467
|
+
summary.markdownLink = buildInlineThreadTitleMarkdownLink({
|
|
38468
|
+
spaceId,
|
|
38469
|
+
title: title || summary.text || `space:${spaceId}`,
|
|
38470
|
+
label: summary.text || title
|
|
38471
|
+
});
|
|
38472
|
+
}
|
|
37489
38473
|
}
|
|
37490
38474
|
entities.push(summary);
|
|
37491
38475
|
}
|
|
@@ -37538,6 +38522,13 @@ function formatEntitySummary(entity) {
|
|
|
37538
38522
|
return entity.userId ? `mention${quotedText} -> user:${entity.userId}` : `mention${quotedText}`;
|
|
37539
38523
|
case "text_link":
|
|
37540
38524
|
return entity.url ? `text link${quotedText} -> ${entity.url}` : `text link${quotedText}`;
|
|
38525
|
+
case "thread":
|
|
38526
|
+
return entity.chatId ? `thread link${quotedText} -> thread:${entity.chatId}` : `thread link${quotedText}`;
|
|
38527
|
+
case "thread_title":
|
|
38528
|
+
if (entity.spaceId && entity.title) {
|
|
38529
|
+
return `thread title link${quotedText} -> space:${entity.spaceId} title:"${entity.title}"`;
|
|
38530
|
+
}
|
|
38531
|
+
return entity.spaceId ? `thread title link${quotedText} -> space:${entity.spaceId}` : `thread title link${quotedText}`;
|
|
37541
38532
|
case "pre":
|
|
37542
38533
|
return entity.language ? `preformatted block${quotedText} (language: ${entity.language})` : `preformatted block${quotedText}`;
|
|
37543
38534
|
case "username_mention":
|
|
@@ -37582,57 +38573,6 @@ function summarizeInlineMessageContent(message) {
|
|
|
37582
38573
|
};
|
|
37583
38574
|
}
|
|
37584
38575
|
|
|
37585
|
-
// src/inline/message-formatting.ts
|
|
37586
|
-
var INLINE_FORMATTING_RULES = [
|
|
37587
|
-
"Use Inline markdown.",
|
|
37588
|
-
"Prefer bullet lists over markdown tables.",
|
|
37589
|
-
"If a table is necessary, render it inside a fenced code block.",
|
|
37590
|
-
"Use plain URLs or markdown links; do not wrap bare URLs in inline code or backticks.",
|
|
37591
|
-
"Mention Inline users with markdown links like [@FirstName](inline://user?id=123); use inline://user?username=username only when the user id is unavailable.",
|
|
37592
|
-
"Use inline code only for actual code, commands, file paths, env vars, or identifiers."
|
|
37593
|
-
];
|
|
37594
|
-
var INLINE_COPY_REPLACEMENTS = [
|
|
37595
|
-
[
|
|
37596
|
-
/Bind this (?:thread \(Discord\) or topic\/conversation \(Telegram\)|thread or topic\/conversation) to a session target\.?/gi,
|
|
37597
|
-
"Bind this Inline conversation to a session target."
|
|
37598
|
-
],
|
|
37599
|
-
[
|
|
37600
|
-
/Remove the current (?:thread \(Discord\) or topic\/conversation \(Telegram\)|thread or topic\/conversation) binding\.?/gi,
|
|
37601
|
-
"Remove the current Inline conversation binding."
|
|
37602
|
-
]
|
|
37603
|
-
];
|
|
37604
|
-
function isBareHttpUrl(text) {
|
|
37605
|
-
if (!/^https?:\/\/\S+$/i.test(text))
|
|
37606
|
-
return false;
|
|
37607
|
-
try {
|
|
37608
|
-
const url2 = new URL(text);
|
|
37609
|
-
return url2.protocol === "http:" || url2.protocol === "https:";
|
|
37610
|
-
} catch {
|
|
37611
|
-
return false;
|
|
37612
|
-
}
|
|
37613
|
-
}
|
|
37614
|
-
function adaptInlineVisibleCopy(text) {
|
|
37615
|
-
let result = text;
|
|
37616
|
-
for (const [from, to] of INLINE_COPY_REPLACEMENTS) {
|
|
37617
|
-
result = result.replace(from, to);
|
|
37618
|
-
}
|
|
37619
|
-
return result;
|
|
37620
|
-
}
|
|
37621
|
-
function buildInlineSystemPrompt(extraPrompt) {
|
|
37622
|
-
return extraPrompt?.trim() || "";
|
|
37623
|
-
}
|
|
37624
|
-
function buildInlineInboundFormattingHints() {
|
|
37625
|
-
return {
|
|
37626
|
-
text_markup: "inline_markdown",
|
|
37627
|
-
rules: [...INLINE_FORMATTING_RULES]
|
|
37628
|
-
};
|
|
37629
|
-
}
|
|
37630
|
-
function sanitizeInlineOutgoingText(text) {
|
|
37631
|
-
return adaptInlineVisibleCopy(text).replace(/`([^`\n]+)`/g, (full, content) => {
|
|
37632
|
-
return isBareHttpUrl(content) ? content : full;
|
|
37633
|
-
});
|
|
37634
|
-
}
|
|
37635
|
-
|
|
37636
38576
|
// src/inline/normalize.ts
|
|
37637
38577
|
function normalizeInlineTarget(raw) {
|
|
37638
38578
|
let normalized = raw.trim();
|
|
@@ -38344,6 +39284,46 @@ var GET_MESSAGES_METHOD = typeof Method.GET_MESSAGES === "number" && Number.isIn
|
|
|
38344
39284
|
var CREATE_SUBTHREAD_METHOD = typeof Method.CREATE_SUBTHREAD === "number" && Number.isInteger(Method.CREATE_SUBTHREAD) && Method.CREATE_SUBTHREAD > 0 ? Method.CREATE_SUBTHREAD : 42;
|
|
38345
39285
|
var INLINE_ACTION_MAX_ROWS = 8;
|
|
38346
39286
|
var INLINE_ACTION_MAX_PER_ROW = 8;
|
|
39287
|
+
var INLINE_BOT_PRESENCE_KINDS = [
|
|
39288
|
+
"idle",
|
|
39289
|
+
"happy",
|
|
39290
|
+
"waving",
|
|
39291
|
+
"jumping",
|
|
39292
|
+
"failed",
|
|
39293
|
+
"waiting",
|
|
39294
|
+
"running",
|
|
39295
|
+
"review"
|
|
39296
|
+
];
|
|
39297
|
+
var inlineBotPresenceChannelDataSchema = {
|
|
39298
|
+
type: "object",
|
|
39299
|
+
description: "Inline-specific metadata for a send. Use inline.botPresence for the bot's on-screen body.",
|
|
39300
|
+
additionalProperties: true,
|
|
39301
|
+
properties: {
|
|
39302
|
+
inline: {
|
|
39303
|
+
type: "object",
|
|
39304
|
+
additionalProperties: true,
|
|
39305
|
+
properties: {
|
|
39306
|
+
botPresence: {
|
|
39307
|
+
type: "object",
|
|
39308
|
+
description: "Optional Inline bot presence state generated from your current mood or process.",
|
|
39309
|
+
additionalProperties: true,
|
|
39310
|
+
properties: {
|
|
39311
|
+
kind: {
|
|
39312
|
+
type: "string",
|
|
39313
|
+
enum: INLINE_BOT_PRESENCE_KINDS,
|
|
39314
|
+
description: "Emotion/state for the on-screen bot presence."
|
|
39315
|
+
},
|
|
39316
|
+
comment: {
|
|
39317
|
+
type: "string",
|
|
39318
|
+
maxLength: 30,
|
|
39319
|
+
description: "Optional short expression from your actual current thought, status, mood, request, or aside. Text or one/two emoji."
|
|
39320
|
+
}
|
|
39321
|
+
}
|
|
39322
|
+
}
|
|
39323
|
+
}
|
|
39324
|
+
}
|
|
39325
|
+
}
|
|
39326
|
+
};
|
|
38347
39327
|
function suppressedInternalTextResult() {
|
|
38348
39328
|
return jsonResult({
|
|
38349
39329
|
ok: false,
|
|
@@ -39100,14 +40080,24 @@ function describeInlineMessageTool({
|
|
|
39100
40080
|
};
|
|
39101
40081
|
}
|
|
39102
40082
|
const buttonsEnabled = supportsInlineMessageButtons(actions);
|
|
40083
|
+
const sendEnabled = actions.includes("send");
|
|
39103
40084
|
const capabilities = buttonsEnabled ? ["presentation"] : [];
|
|
39104
|
-
const schema =
|
|
39105
|
-
|
|
40085
|
+
const schema = [];
|
|
40086
|
+
if (buttonsEnabled) {
|
|
40087
|
+
schema.push({
|
|
39106
40088
|
properties: {
|
|
39107
40089
|
buttons: createMessageToolButtonsSchema()
|
|
39108
40090
|
}
|
|
39109
|
-
}
|
|
39110
|
-
|
|
40091
|
+
});
|
|
40092
|
+
}
|
|
40093
|
+
if (sendEnabled) {
|
|
40094
|
+
schema.push({
|
|
40095
|
+
actions: ["send"],
|
|
40096
|
+
properties: {
|
|
40097
|
+
channelData: inlineBotPresenceChannelDataSchema
|
|
40098
|
+
}
|
|
40099
|
+
});
|
|
40100
|
+
}
|
|
39111
40101
|
return {
|
|
39112
40102
|
actions,
|
|
39113
40103
|
capabilities,
|
|
@@ -40360,6 +41350,23 @@ function buildUserPeer(userId) {
|
|
|
40360
41350
|
}
|
|
40361
41351
|
};
|
|
40362
41352
|
}
|
|
41353
|
+
async function sendInlineBotPresenceState(client, chatId, kind) {
|
|
41354
|
+
const invokeRaw = client.invokeRaw;
|
|
41355
|
+
if (typeof invokeRaw !== "function")
|
|
41356
|
+
return;
|
|
41357
|
+
await invokeRaw.call(client, Method.SET_BOT_PRESENCE_STATE, {
|
|
41358
|
+
oneofKind: "setBotPresenceState",
|
|
41359
|
+
setBotPresenceState: {
|
|
41360
|
+
peerId: {
|
|
41361
|
+
type: {
|
|
41362
|
+
oneofKind: "chat",
|
|
41363
|
+
chat: { chatId }
|
|
41364
|
+
}
|
|
41365
|
+
},
|
|
41366
|
+
state: { kind }
|
|
41367
|
+
}
|
|
41368
|
+
}).catch(() => {});
|
|
41369
|
+
}
|
|
40363
41370
|
function buildInlineApprovalActions(view) {
|
|
40364
41371
|
const buttons = [
|
|
40365
41372
|
view.actions.map((action) => ({
|
|
@@ -40463,8 +41470,12 @@ var inlineApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
|
|
|
40463
41470
|
if (!resolved) {
|
|
40464
41471
|
return null;
|
|
40465
41472
|
}
|
|
41473
|
+
let delivered = false;
|
|
40466
41474
|
if (preparedTarget.typingChatId != null) {
|
|
40467
|
-
await
|
|
41475
|
+
await Promise.all([
|
|
41476
|
+
resolved.context.client.sendTyping({ chatId: preparedTarget.typingChatId, typing: true }).catch(() => {}),
|
|
41477
|
+
sendInlineBotPresenceState(resolved.context.client, preparedTarget.typingChatId, BotPresenceState_Kind.WAITING)
|
|
41478
|
+
]);
|
|
40468
41479
|
}
|
|
40469
41480
|
try {
|
|
40470
41481
|
const result = await resolved.context.client.sendMessage({
|
|
@@ -40476,15 +41487,20 @@ var inlineApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
|
|
|
40476
41487
|
if (result.messageId == null) {
|
|
40477
41488
|
return null;
|
|
40478
41489
|
}
|
|
41490
|
+
delivered = true;
|
|
40479
41491
|
return {
|
|
40480
41492
|
messageId: result.messageId,
|
|
40481
41493
|
peerId: preparedTarget.peerId,
|
|
40482
41494
|
text: pendingPayload.text,
|
|
40483
|
-
parseMarkdown: resolved.context.parseMarkdown ?? true
|
|
41495
|
+
parseMarkdown: resolved.context.parseMarkdown ?? true,
|
|
41496
|
+
...preparedTarget.typingChatId != null ? { typingChatId: preparedTarget.typingChatId } : {}
|
|
40484
41497
|
};
|
|
40485
41498
|
} finally {
|
|
40486
41499
|
if (preparedTarget.typingChatId != null) {
|
|
40487
41500
|
await resolved.context.client.sendTyping({ chatId: preparedTarget.typingChatId, typing: false }).catch(() => {});
|
|
41501
|
+
if (!delivered) {
|
|
41502
|
+
await sendInlineBotPresenceState(resolved.context.client, preparedTarget.typingChatId, BotPresenceState_Kind.IDLE);
|
|
41503
|
+
}
|
|
40488
41504
|
}
|
|
40489
41505
|
}
|
|
40490
41506
|
}
|
|
@@ -40505,6 +41521,9 @@ var inlineApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
|
|
|
40505
41521
|
parseMarkdown: entry.parseMarkdown
|
|
40506
41522
|
}
|
|
40507
41523
|
});
|
|
41524
|
+
if (entry.typingChatId != null) {
|
|
41525
|
+
await sendInlineBotPresenceState(resolved.context.client, entry.typingChatId, BotPresenceState_Kind.IDLE);
|
|
41526
|
+
}
|
|
40508
41527
|
}
|
|
40509
41528
|
},
|
|
40510
41529
|
observe: {
|
|
@@ -40517,5 +41536,5 @@ export {
|
|
|
40517
41536
|
inlineApprovalNativeRuntime
|
|
40518
41537
|
};
|
|
40519
41538
|
|
|
40520
|
-
//# debugId=
|
|
41539
|
+
//# debugId=E7DCFACBDA8D313664756E2164756E21
|
|
40521
41540
|
//# sourceMappingURL=approval-handler.runtime.js.map
|