@inline-openclaw/inline 0.0.37 → 0.0.39
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 +20 -3
- package/dist/account-inspect-api.js +34 -7
- package/dist/account-inspect-api.js.map +4 -4
- package/dist/approval-handler.runtime.js +1032 -92
- package/dist/approval-handler.runtime.js.map +14 -14
- package/dist/channel-plugin-api.js +1854 -332
- package/dist/channel-plugin-api.js.map +19 -18
- package/dist/index.d.ts +1 -1
- package/dist/inline/accounts.d.ts.map +1 -1
- package/dist/inline/actions.d.ts +1 -1
- package/dist/inline/actions.d.ts.map +1 -1
- package/dist/inline/approval-native.d.ts.map +1 -1
- package/dist/inline/bot-commands-sync.d.ts +4 -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 +125 -0
- package/dist/inline/config-schema.d.ts.map +1 -1
- package/dist/inline/exec-approvals.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 +10 -0
- package/dist/inline/parent-context-tool.d.ts.map +1 -0
- package/dist/inline/policy.d.ts +30 -1
- package/dist/inline/policy.d.ts.map +1 -1
- package/dist/inline/reply-threads.d.ts +12 -0
- package/dist/inline/reply-threads.d.ts.map +1 -1
- package/dist/inline/shared.d.ts +1 -1
- package/dist/inline/thread-participation.d.ts +10 -0
- package/dist/inline/thread-participation.d.ts.map +1 -0
- package/dist/inline/tool-targets.d.ts +36 -0
- package/dist/inline/tool-targets.d.ts.map +1 -0
- package/dist/runtime-register-api.d.ts.map +1 -1
- package/dist/runtime-register-api.js +1807 -153
- package/dist/runtime-register-api.js.map +20 -16
- package/dist/runtime-setter-api.js +11 -15
- package/dist/runtime-setter-api.js.map +3 -3
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/setup-entry.d.ts +1 -1
- package/dist/setup-plugin-api.js +34 -7
- package/dist/setup-plugin-api.js.map +4 -4
- package/openclaw.plugin.json +723 -56
- package/package.json +6 -6
|
@@ -2695,7 +2695,7 @@ var require_commonjs = __commonJS((exports) => {
|
|
|
2695
2695
|
} });
|
|
2696
2696
|
});
|
|
2697
2697
|
|
|
2698
|
-
// ../../node_modules/.bun/ws@8.
|
|
2698
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/constants.js
|
|
2699
2699
|
var require_constants = __commonJS((exports, module) => {
|
|
2700
2700
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
2701
2701
|
var hasBlob = typeof Blob !== "undefined";
|
|
@@ -2715,7 +2715,7 @@ var require_constants = __commonJS((exports, module) => {
|
|
|
2715
2715
|
};
|
|
2716
2716
|
});
|
|
2717
2717
|
|
|
2718
|
-
// ../../node_modules/.bun/ws@8.
|
|
2718
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/buffer-util.js
|
|
2719
2719
|
var require_buffer_util = __commonJS((exports, module) => {
|
|
2720
2720
|
var { EMPTY_BUFFER } = require_constants();
|
|
2721
2721
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -2793,7 +2793,7 @@ var require_buffer_util = __commonJS((exports, module) => {
|
|
|
2793
2793
|
}
|
|
2794
2794
|
});
|
|
2795
2795
|
|
|
2796
|
-
// ../../node_modules/.bun/ws@8.
|
|
2796
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/limiter.js
|
|
2797
2797
|
var require_limiter = __commonJS((exports, module) => {
|
|
2798
2798
|
var kDone = Symbol("kDone");
|
|
2799
2799
|
var kRun = Symbol("kRun");
|
|
@@ -2825,7 +2825,7 @@ var require_limiter = __commonJS((exports, module) => {
|
|
|
2825
2825
|
module.exports = Limiter;
|
|
2826
2826
|
});
|
|
2827
2827
|
|
|
2828
|
-
// ../../node_modules/.bun/ws@8.
|
|
2828
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js
|
|
2829
2829
|
var require_permessage_deflate = __commonJS((exports, module) => {
|
|
2830
2830
|
var zlib = __require("zlib");
|
|
2831
2831
|
var bufferUtil = require_buffer_util();
|
|
@@ -3089,7 +3089,7 @@ var require_permessage_deflate = __commonJS((exports, module) => {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
});
|
|
3091
3091
|
|
|
3092
|
-
// ../../node_modules/.bun/ws@8.
|
|
3092
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/validation.js
|
|
3093
3093
|
var require_validation = __commonJS((exports, module) => {
|
|
3094
3094
|
var { isUtf8 } = __require("buffer");
|
|
3095
3095
|
var { hasBlob } = require_constants();
|
|
@@ -3276,7 +3276,7 @@ var require_validation = __commonJS((exports, module) => {
|
|
|
3276
3276
|
}
|
|
3277
3277
|
});
|
|
3278
3278
|
|
|
3279
|
-
// ../../node_modules/.bun/ws@8.
|
|
3279
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/receiver.js
|
|
3280
3280
|
var require_receiver = __commonJS((exports, module) => {
|
|
3281
3281
|
var { Writable } = __require("stream");
|
|
3282
3282
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -3304,6 +3304,8 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
3304
3304
|
this._binaryType = options.binaryType || BINARY_TYPES[0];
|
|
3305
3305
|
this._extensions = options.extensions || {};
|
|
3306
3306
|
this._isServer = !!options.isServer;
|
|
3307
|
+
this._maxBufferedChunks = options.maxBufferedChunks | 0;
|
|
3308
|
+
this._maxFragments = options.maxFragments | 0;
|
|
3307
3309
|
this._maxPayload = options.maxPayload | 0;
|
|
3308
3310
|
this._skipUTF8Validation = !!options.skipUTF8Validation;
|
|
3309
3311
|
this[kWebSocket] = undefined;
|
|
@@ -3326,6 +3328,10 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
3326
3328
|
_write(chunk, encoding, cb) {
|
|
3327
3329
|
if (this._opcode === 8 && this._state == GET_INFO)
|
|
3328
3330
|
return cb();
|
|
3331
|
+
if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) {
|
|
3332
|
+
cb(this.createError(RangeError, "Too many buffered chunks", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS"));
|
|
3333
|
+
return;
|
|
3334
|
+
}
|
|
3329
3335
|
this._bufferedBytes += chunk.length;
|
|
3330
3336
|
this._buffers.push(chunk);
|
|
3331
3337
|
this.startLoop(cb);
|
|
@@ -3529,6 +3535,11 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
3529
3535
|
return;
|
|
3530
3536
|
}
|
|
3531
3537
|
if (data.length) {
|
|
3538
|
+
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
3539
|
+
const error = this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS");
|
|
3540
|
+
cb(error);
|
|
3541
|
+
return;
|
|
3542
|
+
}
|
|
3532
3543
|
this._messageLength = this._totalPayloadLength;
|
|
3533
3544
|
this._fragments.push(data);
|
|
3534
3545
|
}
|
|
@@ -3546,6 +3557,11 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
3546
3557
|
cb(error);
|
|
3547
3558
|
return;
|
|
3548
3559
|
}
|
|
3560
|
+
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
3561
|
+
const error = this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS");
|
|
3562
|
+
cb(error);
|
|
3563
|
+
return;
|
|
3564
|
+
}
|
|
3549
3565
|
this._fragments.push(buf);
|
|
3550
3566
|
}
|
|
3551
3567
|
this.dataMessage(cb);
|
|
@@ -3657,7 +3673,7 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
3657
3673
|
module.exports = Receiver;
|
|
3658
3674
|
});
|
|
3659
3675
|
|
|
3660
|
-
// ../../node_modules/.bun/ws@8.
|
|
3676
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/sender.js
|
|
3661
3677
|
var require_sender = __commonJS((exports, module) => {
|
|
3662
3678
|
var { Duplex } = __require("stream");
|
|
3663
3679
|
var { randomFillSync } = __require("crypto");
|
|
@@ -4016,7 +4032,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
4016
4032
|
}
|
|
4017
4033
|
});
|
|
4018
4034
|
|
|
4019
|
-
// ../../node_modules/.bun/ws@8.
|
|
4035
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/event-target.js
|
|
4020
4036
|
var require_event_target = __commonJS((exports, module) => {
|
|
4021
4037
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
4022
4038
|
var kCode = Symbol("kCode");
|
|
@@ -4167,7 +4183,7 @@ var require_event_target = __commonJS((exports, module) => {
|
|
|
4167
4183
|
}
|
|
4168
4184
|
});
|
|
4169
4185
|
|
|
4170
|
-
// ../../node_modules/.bun/ws@8.
|
|
4186
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/extension.js
|
|
4171
4187
|
var require_extension = __commonJS((exports, module) => {
|
|
4172
4188
|
var { tokenChars } = require_validation();
|
|
4173
4189
|
function push(dest, name, elem) {
|
|
@@ -4332,7 +4348,7 @@ var require_extension = __commonJS((exports, module) => {
|
|
|
4332
4348
|
module.exports = { format, parse };
|
|
4333
4349
|
});
|
|
4334
4350
|
|
|
4335
|
-
// ../../node_modules/.bun/ws@8.
|
|
4351
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/websocket.js
|
|
4336
4352
|
var require_websocket = __commonJS((exports, module) => {
|
|
4337
4353
|
var EventEmitter = __require("events");
|
|
4338
4354
|
var https = __require("https");
|
|
@@ -4453,6 +4469,8 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
4453
4469
|
binaryType: this.binaryType,
|
|
4454
4470
|
extensions: this._extensions,
|
|
4455
4471
|
isServer: this._isServer,
|
|
4472
|
+
maxBufferedChunks: options.maxBufferedChunks,
|
|
4473
|
+
maxFragments: options.maxFragments,
|
|
4456
4474
|
maxPayload: options.maxPayload,
|
|
4457
4475
|
skipUTF8Validation: options.skipUTF8Validation
|
|
4458
4476
|
});
|
|
@@ -4695,6 +4713,8 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
4695
4713
|
autoPong: true,
|
|
4696
4714
|
closeTimeout: CLOSE_TIMEOUT,
|
|
4697
4715
|
protocolVersion: protocolVersions[1],
|
|
4716
|
+
maxBufferedChunks: 1024 * 1024,
|
|
4717
|
+
maxFragments: 128 * 1024,
|
|
4698
4718
|
maxPayload: 100 * 1024 * 1024,
|
|
4699
4719
|
skipUTF8Validation: false,
|
|
4700
4720
|
perMessageDeflate: true,
|
|
@@ -4933,6 +4953,8 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
4933
4953
|
websocket.setSocket(socket, head, {
|
|
4934
4954
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
4935
4955
|
generateMask: opts.generateMask,
|
|
4956
|
+
maxBufferedChunks: opts.maxBufferedChunks,
|
|
4957
|
+
maxFragments: opts.maxFragments,
|
|
4936
4958
|
maxPayload: opts.maxPayload,
|
|
4937
4959
|
skipUTF8Validation: opts.skipUTF8Validation
|
|
4938
4960
|
});
|
|
@@ -5098,7 +5120,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
5098
5120
|
}
|
|
5099
5121
|
});
|
|
5100
5122
|
|
|
5101
|
-
// ../../node_modules/.bun/ws@8.
|
|
5123
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/stream.js
|
|
5102
5124
|
var require_stream = __commonJS((exports, module) => {
|
|
5103
5125
|
var WebSocket = require_websocket();
|
|
5104
5126
|
var { Duplex } = __require("stream");
|
|
@@ -5201,7 +5223,7 @@ var require_stream = __commonJS((exports, module) => {
|
|
|
5201
5223
|
module.exports = createWebSocketStream;
|
|
5202
5224
|
});
|
|
5203
5225
|
|
|
5204
|
-
// ../../node_modules/.bun/ws@8.
|
|
5226
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/subprotocol.js
|
|
5205
5227
|
var require_subprotocol = __commonJS((exports, module) => {
|
|
5206
5228
|
var { tokenChars } = require_validation();
|
|
5207
5229
|
function parse(header) {
|
|
@@ -5246,7 +5268,7 @@ var require_subprotocol = __commonJS((exports, module) => {
|
|
|
5246
5268
|
module.exports = { parse };
|
|
5247
5269
|
});
|
|
5248
5270
|
|
|
5249
|
-
// ../../node_modules/.bun/ws@8.
|
|
5271
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/lib/websocket-server.js
|
|
5250
5272
|
var require_websocket_server = __commonJS((exports, module) => {
|
|
5251
5273
|
var EventEmitter = __require("events");
|
|
5252
5274
|
var http = __require("http");
|
|
@@ -5268,6 +5290,8 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
5268
5290
|
options = {
|
|
5269
5291
|
allowSynchronousEvents: true,
|
|
5270
5292
|
autoPong: true,
|
|
5293
|
+
maxBufferedChunks: 1024 * 1024,
|
|
5294
|
+
maxFragments: 128 * 1024,
|
|
5271
5295
|
maxPayload: 100 * 1024 * 1024,
|
|
5272
5296
|
skipUTF8Validation: false,
|
|
5273
5297
|
perMessageDeflate: false,
|
|
@@ -5494,6 +5518,8 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
5494
5518
|
socket.removeListener("error", socketOnError);
|
|
5495
5519
|
ws.setSocket(socket, head, {
|
|
5496
5520
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
5521
|
+
maxBufferedChunks: this.options.maxBufferedChunks,
|
|
5522
|
+
maxFragments: this.options.maxFragments,
|
|
5497
5523
|
maxPayload: this.options.maxPayload,
|
|
5498
5524
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
5499
5525
|
});
|
|
@@ -5594,6 +5620,15 @@ var Member_Role;
|
|
|
5594
5620
|
Member_Role2[Member_Role2["ADMIN"] = 1] = "ADMIN";
|
|
5595
5621
|
Member_Role2[Member_Role2["MEMBER"] = 2] = "MEMBER";
|
|
5596
5622
|
})(Member_Role || (Member_Role = {}));
|
|
5623
|
+
var UrlPreview_MediaType;
|
|
5624
|
+
(function(UrlPreview_MediaType2) {
|
|
5625
|
+
UrlPreview_MediaType2[UrlPreview_MediaType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5626
|
+
UrlPreview_MediaType2[UrlPreview_MediaType2["ARTICLE"] = 1] = "ARTICLE";
|
|
5627
|
+
UrlPreview_MediaType2[UrlPreview_MediaType2["IMAGE"] = 2] = "IMAGE";
|
|
5628
|
+
UrlPreview_MediaType2[UrlPreview_MediaType2["VIDEO"] = 3] = "VIDEO";
|
|
5629
|
+
UrlPreview_MediaType2[UrlPreview_MediaType2["DOCUMENT"] = 4] = "DOCUMENT";
|
|
5630
|
+
UrlPreview_MediaType2[UrlPreview_MediaType2["EMBED"] = 5] = "EMBED";
|
|
5631
|
+
})(UrlPreview_MediaType || (UrlPreview_MediaType = {}));
|
|
5597
5632
|
var MessageAttachmentExternalTask_Status;
|
|
5598
5633
|
(function(MessageAttachmentExternalTask_Status2) {
|
|
5599
5634
|
MessageAttachmentExternalTask_Status2[MessageAttachmentExternalTask_Status2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
@@ -5736,6 +5771,9 @@ var Method;
|
|
|
5736
5771
|
Method2[Method2["REVOKE_SESSION"] = 50] = "REVOKE_SESSION";
|
|
5737
5772
|
Method2[Method2["UPDATE_DIALOG_OPEN"] = 51] = "UPDATE_DIALOG_OPEN";
|
|
5738
5773
|
Method2[Method2["UPDATE_DIALOG_ORDER"] = 52] = "UPDATE_DIALOG_ORDER";
|
|
5774
|
+
Method2[Method2["CLEAR_CHAT_HISTORY"] = 53] = "CLEAR_CHAT_HISTORY";
|
|
5775
|
+
Method2[Method2["DELETE_BOT"] = 54] = "DELETE_BOT";
|
|
5776
|
+
Method2[Method2["DELETE_MESSAGE_ATTACHMENT"] = 55] = "DELETE_MESSAGE_ATTACHMENT";
|
|
5739
5777
|
})(Method || (Method = {}));
|
|
5740
5778
|
var PushNotificationProvider;
|
|
5741
5779
|
(function(PushNotificationProvider2) {
|
|
@@ -8108,7 +8146,8 @@ class Space$Type extends import_runtime4.MessageType {
|
|
|
8108
8146
|
{ no: 1, name: "id", kind: "scalar", T: 3, L: 0 },
|
|
8109
8147
|
{ no: 2, name: "name", kind: "scalar", T: 9 },
|
|
8110
8148
|
{ no: 3, name: "creator", kind: "scalar", T: 8 },
|
|
8111
|
-
{ no: 4, name: "date", kind: "scalar", T: 3, L: 0 }
|
|
8149
|
+
{ no: 4, name: "date", kind: "scalar", T: 3, L: 0 },
|
|
8150
|
+
{ no: 5, name: "is_public", kind: "scalar", opt: true, T: 8 }
|
|
8112
8151
|
]);
|
|
8113
8152
|
}
|
|
8114
8153
|
create(value) {
|
|
@@ -8138,6 +8177,9 @@ class Space$Type extends import_runtime4.MessageType {
|
|
|
8138
8177
|
case 4:
|
|
8139
8178
|
message.date = reader.int64().toBigInt();
|
|
8140
8179
|
break;
|
|
8180
|
+
case 5:
|
|
8181
|
+
message.isPublic = reader.bool();
|
|
8182
|
+
break;
|
|
8141
8183
|
default:
|
|
8142
8184
|
let u = options.readUnknownField;
|
|
8143
8185
|
if (u === "throw")
|
|
@@ -8158,6 +8200,8 @@ class Space$Type extends import_runtime4.MessageType {
|
|
|
8158
8200
|
writer.tag(3, import_runtime.WireType.Varint).bool(message.creator);
|
|
8159
8201
|
if (message.date !== 0n)
|
|
8160
8202
|
writer.tag(4, import_runtime.WireType.Varint).int64(message.date);
|
|
8203
|
+
if (message.isPublic !== undefined)
|
|
8204
|
+
writer.tag(5, import_runtime.WireType.Varint).bool(message.isPublic);
|
|
8161
8205
|
let u = options.writeUnknownFields;
|
|
8162
8206
|
if (u !== false)
|
|
8163
8207
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -8478,7 +8522,13 @@ class UrlPreview$Type extends import_runtime4.MessageType {
|
|
|
8478
8522
|
{ no: 4, name: "title", kind: "scalar", opt: true, T: 9 },
|
|
8479
8523
|
{ no: 5, name: "description", kind: "scalar", opt: true, T: 9 },
|
|
8480
8524
|
{ no: 6, name: "photo", kind: "message", T: () => Photo },
|
|
8481
|
-
{ no: 7, name: "duration", kind: "scalar", opt: true, T: 3, L: 0 }
|
|
8525
|
+
{ no: 7, name: "duration", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
8526
|
+
{ no: 8, name: "media_type", kind: "enum", opt: true, T: () => ["UrlPreview.MediaType", UrlPreview_MediaType, "MEDIA_TYPE_"] },
|
|
8527
|
+
{ no: 9, name: "display_url", kind: "scalar", opt: true, T: 9 },
|
|
8528
|
+
{ no: 10, name: "provider", kind: "scalar", opt: true, T: 9 },
|
|
8529
|
+
{ no: 11, name: "author", kind: "scalar", opt: true, T: 9 },
|
|
8530
|
+
{ no: 12, name: "media", kind: "message", T: () => UrlPreviewMedia },
|
|
8531
|
+
{ no: 13, name: "layout", kind: "message", T: () => UrlPreviewLayout }
|
|
8482
8532
|
]);
|
|
8483
8533
|
}
|
|
8484
8534
|
create(value) {
|
|
@@ -8514,6 +8564,24 @@ class UrlPreview$Type extends import_runtime4.MessageType {
|
|
|
8514
8564
|
case 7:
|
|
8515
8565
|
message.duration = reader.int64().toBigInt();
|
|
8516
8566
|
break;
|
|
8567
|
+
case 8:
|
|
8568
|
+
message.mediaType = reader.int32();
|
|
8569
|
+
break;
|
|
8570
|
+
case 9:
|
|
8571
|
+
message.displayUrl = reader.string();
|
|
8572
|
+
break;
|
|
8573
|
+
case 10:
|
|
8574
|
+
message.provider = reader.string();
|
|
8575
|
+
break;
|
|
8576
|
+
case 11:
|
|
8577
|
+
message.author = reader.string();
|
|
8578
|
+
break;
|
|
8579
|
+
case 12:
|
|
8580
|
+
message.media = UrlPreviewMedia.internalBinaryRead(reader, reader.uint32(), options, message.media);
|
|
8581
|
+
break;
|
|
8582
|
+
case 13:
|
|
8583
|
+
message.layout = UrlPreviewLayout.internalBinaryRead(reader, reader.uint32(), options, message.layout);
|
|
8584
|
+
break;
|
|
8517
8585
|
default:
|
|
8518
8586
|
let u = options.readUnknownField;
|
|
8519
8587
|
if (u === "throw")
|
|
@@ -8540,6 +8608,18 @@ class UrlPreview$Type extends import_runtime4.MessageType {
|
|
|
8540
8608
|
Photo.internalBinaryWrite(message.photo, writer.tag(6, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8541
8609
|
if (message.duration !== undefined)
|
|
8542
8610
|
writer.tag(7, import_runtime.WireType.Varint).int64(message.duration);
|
|
8611
|
+
if (message.mediaType !== undefined)
|
|
8612
|
+
writer.tag(8, import_runtime.WireType.Varint).int32(message.mediaType);
|
|
8613
|
+
if (message.displayUrl !== undefined)
|
|
8614
|
+
writer.tag(9, import_runtime.WireType.LengthDelimited).string(message.displayUrl);
|
|
8615
|
+
if (message.provider !== undefined)
|
|
8616
|
+
writer.tag(10, import_runtime.WireType.LengthDelimited).string(message.provider);
|
|
8617
|
+
if (message.author !== undefined)
|
|
8618
|
+
writer.tag(11, import_runtime.WireType.LengthDelimited).string(message.author);
|
|
8619
|
+
if (message.media)
|
|
8620
|
+
UrlPreviewMedia.internalBinaryWrite(message.media, writer.tag(12, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8621
|
+
if (message.layout)
|
|
8622
|
+
UrlPreviewLayout.internalBinaryWrite(message.layout, writer.tag(13, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8543
8623
|
let u = options.writeUnknownFields;
|
|
8544
8624
|
if (u !== false)
|
|
8545
8625
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -8548,6 +8628,272 @@ class UrlPreview$Type extends import_runtime4.MessageType {
|
|
|
8548
8628
|
}
|
|
8549
8629
|
var UrlPreview = new UrlPreview$Type;
|
|
8550
8630
|
|
|
8631
|
+
class UrlPreviewMedia$Type extends import_runtime4.MessageType {
|
|
8632
|
+
constructor() {
|
|
8633
|
+
super("UrlPreviewMedia", [
|
|
8634
|
+
{ no: 1, name: "photo", kind: "message", oneof: "media", T: () => Photo },
|
|
8635
|
+
{ no: 2, name: "video", kind: "message", oneof: "media", T: () => Video },
|
|
8636
|
+
{ no: 3, name: "document", kind: "message", oneof: "media", T: () => Document },
|
|
8637
|
+
{ no: 4, name: "external_video", kind: "message", oneof: "media", T: () => UrlPreviewExternalVideo },
|
|
8638
|
+
{ no: 5, name: "embed", kind: "message", oneof: "media", T: () => UrlPreviewEmbed }
|
|
8639
|
+
]);
|
|
8640
|
+
}
|
|
8641
|
+
create(value) {
|
|
8642
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
8643
|
+
message.media = { oneofKind: undefined };
|
|
8644
|
+
if (value !== undefined)
|
|
8645
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
8646
|
+
return message;
|
|
8647
|
+
}
|
|
8648
|
+
internalBinaryRead(reader, length, options, target) {
|
|
8649
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
8650
|
+
while (reader.pos < end) {
|
|
8651
|
+
let [fieldNo, wireType] = reader.tag();
|
|
8652
|
+
switch (fieldNo) {
|
|
8653
|
+
case 1:
|
|
8654
|
+
message.media = {
|
|
8655
|
+
oneofKind: "photo",
|
|
8656
|
+
photo: Photo.internalBinaryRead(reader, reader.uint32(), options, message.media.photo)
|
|
8657
|
+
};
|
|
8658
|
+
break;
|
|
8659
|
+
case 2:
|
|
8660
|
+
message.media = {
|
|
8661
|
+
oneofKind: "video",
|
|
8662
|
+
video: Video.internalBinaryRead(reader, reader.uint32(), options, message.media.video)
|
|
8663
|
+
};
|
|
8664
|
+
break;
|
|
8665
|
+
case 3:
|
|
8666
|
+
message.media = {
|
|
8667
|
+
oneofKind: "document",
|
|
8668
|
+
document: Document.internalBinaryRead(reader, reader.uint32(), options, message.media.document)
|
|
8669
|
+
};
|
|
8670
|
+
break;
|
|
8671
|
+
case 4:
|
|
8672
|
+
message.media = {
|
|
8673
|
+
oneofKind: "externalVideo",
|
|
8674
|
+
externalVideo: UrlPreviewExternalVideo.internalBinaryRead(reader, reader.uint32(), options, message.media.externalVideo)
|
|
8675
|
+
};
|
|
8676
|
+
break;
|
|
8677
|
+
case 5:
|
|
8678
|
+
message.media = {
|
|
8679
|
+
oneofKind: "embed",
|
|
8680
|
+
embed: UrlPreviewEmbed.internalBinaryRead(reader, reader.uint32(), options, message.media.embed)
|
|
8681
|
+
};
|
|
8682
|
+
break;
|
|
8683
|
+
default:
|
|
8684
|
+
let u = options.readUnknownField;
|
|
8685
|
+
if (u === "throw")
|
|
8686
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
8687
|
+
let d = reader.skip(wireType);
|
|
8688
|
+
if (u !== false)
|
|
8689
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
8690
|
+
}
|
|
8691
|
+
}
|
|
8692
|
+
return message;
|
|
8693
|
+
}
|
|
8694
|
+
internalBinaryWrite(message, writer, options) {
|
|
8695
|
+
if (message.media.oneofKind === "photo")
|
|
8696
|
+
Photo.internalBinaryWrite(message.media.photo, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8697
|
+
if (message.media.oneofKind === "video")
|
|
8698
|
+
Video.internalBinaryWrite(message.media.video, writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8699
|
+
if (message.media.oneofKind === "document")
|
|
8700
|
+
Document.internalBinaryWrite(message.media.document, writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8701
|
+
if (message.media.oneofKind === "externalVideo")
|
|
8702
|
+
UrlPreviewExternalVideo.internalBinaryWrite(message.media.externalVideo, writer.tag(4, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8703
|
+
if (message.media.oneofKind === "embed")
|
|
8704
|
+
UrlPreviewEmbed.internalBinaryWrite(message.media.embed, writer.tag(5, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
8705
|
+
let u = options.writeUnknownFields;
|
|
8706
|
+
if (u !== false)
|
|
8707
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
8708
|
+
return writer;
|
|
8709
|
+
}
|
|
8710
|
+
}
|
|
8711
|
+
var UrlPreviewMedia = new UrlPreviewMedia$Type;
|
|
8712
|
+
|
|
8713
|
+
class UrlPreviewExternalVideo$Type extends import_runtime4.MessageType {
|
|
8714
|
+
constructor() {
|
|
8715
|
+
super("UrlPreviewExternalVideo", [
|
|
8716
|
+
{ no: 1, name: "url", kind: "scalar", T: 9 },
|
|
8717
|
+
{ no: 2, name: "mime_type", kind: "scalar", opt: true, T: 9 },
|
|
8718
|
+
{ no: 3, name: "w", kind: "scalar", opt: true, T: 5 },
|
|
8719
|
+
{ no: 4, name: "h", kind: "scalar", opt: true, T: 5 },
|
|
8720
|
+
{ no: 5, name: "duration", kind: "scalar", opt: true, T: 5 }
|
|
8721
|
+
]);
|
|
8722
|
+
}
|
|
8723
|
+
create(value) {
|
|
8724
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
8725
|
+
message.url = "";
|
|
8726
|
+
if (value !== undefined)
|
|
8727
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
8728
|
+
return message;
|
|
8729
|
+
}
|
|
8730
|
+
internalBinaryRead(reader, length, options, target) {
|
|
8731
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
8732
|
+
while (reader.pos < end) {
|
|
8733
|
+
let [fieldNo, wireType] = reader.tag();
|
|
8734
|
+
switch (fieldNo) {
|
|
8735
|
+
case 1:
|
|
8736
|
+
message.url = reader.string();
|
|
8737
|
+
break;
|
|
8738
|
+
case 2:
|
|
8739
|
+
message.mimeType = reader.string();
|
|
8740
|
+
break;
|
|
8741
|
+
case 3:
|
|
8742
|
+
message.w = reader.int32();
|
|
8743
|
+
break;
|
|
8744
|
+
case 4:
|
|
8745
|
+
message.h = reader.int32();
|
|
8746
|
+
break;
|
|
8747
|
+
case 5:
|
|
8748
|
+
message.duration = reader.int32();
|
|
8749
|
+
break;
|
|
8750
|
+
default:
|
|
8751
|
+
let u = options.readUnknownField;
|
|
8752
|
+
if (u === "throw")
|
|
8753
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
8754
|
+
let d = reader.skip(wireType);
|
|
8755
|
+
if (u !== false)
|
|
8756
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
8757
|
+
}
|
|
8758
|
+
}
|
|
8759
|
+
return message;
|
|
8760
|
+
}
|
|
8761
|
+
internalBinaryWrite(message, writer, options) {
|
|
8762
|
+
if (message.url !== "")
|
|
8763
|
+
writer.tag(1, import_runtime.WireType.LengthDelimited).string(message.url);
|
|
8764
|
+
if (message.mimeType !== undefined)
|
|
8765
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.mimeType);
|
|
8766
|
+
if (message.w !== undefined)
|
|
8767
|
+
writer.tag(3, import_runtime.WireType.Varint).int32(message.w);
|
|
8768
|
+
if (message.h !== undefined)
|
|
8769
|
+
writer.tag(4, import_runtime.WireType.Varint).int32(message.h);
|
|
8770
|
+
if (message.duration !== undefined)
|
|
8771
|
+
writer.tag(5, import_runtime.WireType.Varint).int32(message.duration);
|
|
8772
|
+
let u = options.writeUnknownFields;
|
|
8773
|
+
if (u !== false)
|
|
8774
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
8775
|
+
return writer;
|
|
8776
|
+
}
|
|
8777
|
+
}
|
|
8778
|
+
var UrlPreviewExternalVideo = new UrlPreviewExternalVideo$Type;
|
|
8779
|
+
|
|
8780
|
+
class UrlPreviewEmbed$Type extends import_runtime4.MessageType {
|
|
8781
|
+
constructor() {
|
|
8782
|
+
super("UrlPreviewEmbed", [
|
|
8783
|
+
{ no: 1, name: "url", kind: "scalar", T: 9 },
|
|
8784
|
+
{ no: 2, name: "type", kind: "scalar", opt: true, T: 9 },
|
|
8785
|
+
{ no: 3, name: "w", kind: "scalar", opt: true, T: 5 },
|
|
8786
|
+
{ no: 4, name: "h", kind: "scalar", opt: true, T: 5 },
|
|
8787
|
+
{ no: 5, name: "duration", kind: "scalar", opt: true, T: 5 }
|
|
8788
|
+
]);
|
|
8789
|
+
}
|
|
8790
|
+
create(value) {
|
|
8791
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
8792
|
+
message.url = "";
|
|
8793
|
+
if (value !== undefined)
|
|
8794
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
8795
|
+
return message;
|
|
8796
|
+
}
|
|
8797
|
+
internalBinaryRead(reader, length, options, target) {
|
|
8798
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
8799
|
+
while (reader.pos < end) {
|
|
8800
|
+
let [fieldNo, wireType] = reader.tag();
|
|
8801
|
+
switch (fieldNo) {
|
|
8802
|
+
case 1:
|
|
8803
|
+
message.url = reader.string();
|
|
8804
|
+
break;
|
|
8805
|
+
case 2:
|
|
8806
|
+
message.type = reader.string();
|
|
8807
|
+
break;
|
|
8808
|
+
case 3:
|
|
8809
|
+
message.w = reader.int32();
|
|
8810
|
+
break;
|
|
8811
|
+
case 4:
|
|
8812
|
+
message.h = reader.int32();
|
|
8813
|
+
break;
|
|
8814
|
+
case 5:
|
|
8815
|
+
message.duration = reader.int32();
|
|
8816
|
+
break;
|
|
8817
|
+
default:
|
|
8818
|
+
let u = options.readUnknownField;
|
|
8819
|
+
if (u === "throw")
|
|
8820
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
8821
|
+
let d = reader.skip(wireType);
|
|
8822
|
+
if (u !== false)
|
|
8823
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
8824
|
+
}
|
|
8825
|
+
}
|
|
8826
|
+
return message;
|
|
8827
|
+
}
|
|
8828
|
+
internalBinaryWrite(message, writer, options) {
|
|
8829
|
+
if (message.url !== "")
|
|
8830
|
+
writer.tag(1, import_runtime.WireType.LengthDelimited).string(message.url);
|
|
8831
|
+
if (message.type !== undefined)
|
|
8832
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.type);
|
|
8833
|
+
if (message.w !== undefined)
|
|
8834
|
+
writer.tag(3, import_runtime.WireType.Varint).int32(message.w);
|
|
8835
|
+
if (message.h !== undefined)
|
|
8836
|
+
writer.tag(4, import_runtime.WireType.Varint).int32(message.h);
|
|
8837
|
+
if (message.duration !== undefined)
|
|
8838
|
+
writer.tag(5, import_runtime.WireType.Varint).int32(message.duration);
|
|
8839
|
+
let u = options.writeUnknownFields;
|
|
8840
|
+
if (u !== false)
|
|
8841
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
8842
|
+
return writer;
|
|
8843
|
+
}
|
|
8844
|
+
}
|
|
8845
|
+
var UrlPreviewEmbed = new UrlPreviewEmbed$Type;
|
|
8846
|
+
|
|
8847
|
+
class UrlPreviewLayout$Type extends import_runtime4.MessageType {
|
|
8848
|
+
constructor() {
|
|
8849
|
+
super("UrlPreviewLayout", [
|
|
8850
|
+
{ no: 1, name: "has_large_media", kind: "scalar", T: 8 },
|
|
8851
|
+
{ no: 2, name: "show_large_media", kind: "scalar", T: 8 }
|
|
8852
|
+
]);
|
|
8853
|
+
}
|
|
8854
|
+
create(value) {
|
|
8855
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
8856
|
+
message.hasLargeMedia = false;
|
|
8857
|
+
message.showLargeMedia = false;
|
|
8858
|
+
if (value !== undefined)
|
|
8859
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
8860
|
+
return message;
|
|
8861
|
+
}
|
|
8862
|
+
internalBinaryRead(reader, length, options, target) {
|
|
8863
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
8864
|
+
while (reader.pos < end) {
|
|
8865
|
+
let [fieldNo, wireType] = reader.tag();
|
|
8866
|
+
switch (fieldNo) {
|
|
8867
|
+
case 1:
|
|
8868
|
+
message.hasLargeMedia = reader.bool();
|
|
8869
|
+
break;
|
|
8870
|
+
case 2:
|
|
8871
|
+
message.showLargeMedia = reader.bool();
|
|
8872
|
+
break;
|
|
8873
|
+
default:
|
|
8874
|
+
let u = options.readUnknownField;
|
|
8875
|
+
if (u === "throw")
|
|
8876
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
8877
|
+
let d = reader.skip(wireType);
|
|
8878
|
+
if (u !== false)
|
|
8879
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
8880
|
+
}
|
|
8881
|
+
}
|
|
8882
|
+
return message;
|
|
8883
|
+
}
|
|
8884
|
+
internalBinaryWrite(message, writer, options) {
|
|
8885
|
+
if (message.hasLargeMedia !== false)
|
|
8886
|
+
writer.tag(1, import_runtime.WireType.Varint).bool(message.hasLargeMedia);
|
|
8887
|
+
if (message.showLargeMedia !== false)
|
|
8888
|
+
writer.tag(2, import_runtime.WireType.Varint).bool(message.showLargeMedia);
|
|
8889
|
+
let u = options.writeUnknownFields;
|
|
8890
|
+
if (u !== false)
|
|
8891
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
8892
|
+
return writer;
|
|
8893
|
+
}
|
|
8894
|
+
}
|
|
8895
|
+
var UrlPreviewLayout = new UrlPreviewLayout$Type;
|
|
8896
|
+
|
|
8551
8897
|
class MessageAttachmentExternalTask$Type extends import_runtime4.MessageType {
|
|
8552
8898
|
constructor() {
|
|
8553
8899
|
super("MessageAttachmentExternalTask", [
|
|
@@ -9441,7 +9787,10 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
9441
9787
|
{ no: 50, name: "answerMessageAction", kind: "message", oneof: "input", T: () => AnswerMessageActionInput },
|
|
9442
9788
|
{ no: 51, name: "revokeSession", kind: "message", oneof: "input", T: () => RevokeSessionInput },
|
|
9443
9789
|
{ no: 52, name: "updateDialogOpen", kind: "message", oneof: "input", T: () => UpdateDialogOpenInput },
|
|
9444
|
-
{ no: 53, name: "updateDialogOrder", kind: "message", oneof: "input", T: () => UpdateDialogOrderInput }
|
|
9790
|
+
{ no: 53, name: "updateDialogOrder", kind: "message", oneof: "input", T: () => UpdateDialogOrderInput },
|
|
9791
|
+
{ no: 54, name: "clearChatHistory", kind: "message", oneof: "input", T: () => ClearChatHistoryInput },
|
|
9792
|
+
{ no: 55, name: "deleteBot", kind: "message", oneof: "input", T: () => DeleteBotInput },
|
|
9793
|
+
{ no: 56, name: "deleteMessageAttachment", kind: "message", oneof: "input", T: () => DeleteMessageAttachmentInput }
|
|
9445
9794
|
]);
|
|
9446
9795
|
}
|
|
9447
9796
|
create(value) {
|
|
@@ -9772,6 +10121,24 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
9772
10121
|
updateDialogOrder: UpdateDialogOrderInput.internalBinaryRead(reader, reader.uint32(), options, message.input.updateDialogOrder)
|
|
9773
10122
|
};
|
|
9774
10123
|
break;
|
|
10124
|
+
case 54:
|
|
10125
|
+
message.input = {
|
|
10126
|
+
oneofKind: "clearChatHistory",
|
|
10127
|
+
clearChatHistory: ClearChatHistoryInput.internalBinaryRead(reader, reader.uint32(), options, message.input.clearChatHistory)
|
|
10128
|
+
};
|
|
10129
|
+
break;
|
|
10130
|
+
case 55:
|
|
10131
|
+
message.input = {
|
|
10132
|
+
oneofKind: "deleteBot",
|
|
10133
|
+
deleteBot: DeleteBotInput.internalBinaryRead(reader, reader.uint32(), options, message.input.deleteBot)
|
|
10134
|
+
};
|
|
10135
|
+
break;
|
|
10136
|
+
case 56:
|
|
10137
|
+
message.input = {
|
|
10138
|
+
oneofKind: "deleteMessageAttachment",
|
|
10139
|
+
deleteMessageAttachment: DeleteMessageAttachmentInput.internalBinaryRead(reader, reader.uint32(), options, message.input.deleteMessageAttachment)
|
|
10140
|
+
};
|
|
10141
|
+
break;
|
|
9775
10142
|
default:
|
|
9776
10143
|
let u = options.readUnknownField;
|
|
9777
10144
|
if (u === "throw")
|
|
@@ -9890,6 +10257,12 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
9890
10257
|
UpdateDialogOpenInput.internalBinaryWrite(message.input.updateDialogOpen, writer.tag(52, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
9891
10258
|
if (message.input.oneofKind === "updateDialogOrder")
|
|
9892
10259
|
UpdateDialogOrderInput.internalBinaryWrite(message.input.updateDialogOrder, writer.tag(53, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10260
|
+
if (message.input.oneofKind === "clearChatHistory")
|
|
10261
|
+
ClearChatHistoryInput.internalBinaryWrite(message.input.clearChatHistory, writer.tag(54, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10262
|
+
if (message.input.oneofKind === "deleteBot")
|
|
10263
|
+
DeleteBotInput.internalBinaryWrite(message.input.deleteBot, writer.tag(55, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10264
|
+
if (message.input.oneofKind === "deleteMessageAttachment")
|
|
10265
|
+
DeleteMessageAttachmentInput.internalBinaryWrite(message.input.deleteMessageAttachment, writer.tag(56, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
9893
10266
|
let u = options.writeUnknownFields;
|
|
9894
10267
|
if (u !== false)
|
|
9895
10268
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -9953,7 +10326,10 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
9953
10326
|
{ no: 50, name: "answerMessageAction", kind: "message", oneof: "result", T: () => AnswerMessageActionResult },
|
|
9954
10327
|
{ no: 51, name: "revokeSession", kind: "message", oneof: "result", T: () => RevokeSessionResult },
|
|
9955
10328
|
{ no: 52, name: "updateDialogOpen", kind: "message", oneof: "result", T: () => UpdateDialogOpenResult },
|
|
9956
|
-
{ no: 53, name: "updateDialogOrder", kind: "message", oneof: "result", T: () => UpdateDialogOrderResult }
|
|
10329
|
+
{ no: 53, name: "updateDialogOrder", kind: "message", oneof: "result", T: () => UpdateDialogOrderResult },
|
|
10330
|
+
{ no: 54, name: "clearChatHistory", kind: "message", oneof: "result", T: () => ClearChatHistoryResult },
|
|
10331
|
+
{ no: 55, name: "deleteBot", kind: "message", oneof: "result", T: () => DeleteBotResult },
|
|
10332
|
+
{ no: 56, name: "deleteMessageAttachment", kind: "message", oneof: "result", T: () => DeleteMessageAttachmentResult }
|
|
9957
10333
|
]);
|
|
9958
10334
|
}
|
|
9959
10335
|
create(value) {
|
|
@@ -10284,6 +10660,24 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
10284
10660
|
updateDialogOrder: UpdateDialogOrderResult.internalBinaryRead(reader, reader.uint32(), options, message.result.updateDialogOrder)
|
|
10285
10661
|
};
|
|
10286
10662
|
break;
|
|
10663
|
+
case 54:
|
|
10664
|
+
message.result = {
|
|
10665
|
+
oneofKind: "clearChatHistory",
|
|
10666
|
+
clearChatHistory: ClearChatHistoryResult.internalBinaryRead(reader, reader.uint32(), options, message.result.clearChatHistory)
|
|
10667
|
+
};
|
|
10668
|
+
break;
|
|
10669
|
+
case 55:
|
|
10670
|
+
message.result = {
|
|
10671
|
+
oneofKind: "deleteBot",
|
|
10672
|
+
deleteBot: DeleteBotResult.internalBinaryRead(reader, reader.uint32(), options, message.result.deleteBot)
|
|
10673
|
+
};
|
|
10674
|
+
break;
|
|
10675
|
+
case 56:
|
|
10676
|
+
message.result = {
|
|
10677
|
+
oneofKind: "deleteMessageAttachment",
|
|
10678
|
+
deleteMessageAttachment: DeleteMessageAttachmentResult.internalBinaryRead(reader, reader.uint32(), options, message.result.deleteMessageAttachment)
|
|
10679
|
+
};
|
|
10680
|
+
break;
|
|
10287
10681
|
default:
|
|
10288
10682
|
let u = options.readUnknownField;
|
|
10289
10683
|
if (u === "throw")
|
|
@@ -10402,6 +10796,12 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
10402
10796
|
UpdateDialogOpenResult.internalBinaryWrite(message.result.updateDialogOpen, writer.tag(52, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10403
10797
|
if (message.result.oneofKind === "updateDialogOrder")
|
|
10404
10798
|
UpdateDialogOrderResult.internalBinaryWrite(message.result.updateDialogOrder, writer.tag(53, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10799
|
+
if (message.result.oneofKind === "clearChatHistory")
|
|
10800
|
+
ClearChatHistoryResult.internalBinaryWrite(message.result.clearChatHistory, writer.tag(54, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10801
|
+
if (message.result.oneofKind === "deleteBot")
|
|
10802
|
+
DeleteBotResult.internalBinaryWrite(message.result.deleteBot, writer.tag(55, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10803
|
+
if (message.result.oneofKind === "deleteMessageAttachment")
|
|
10804
|
+
DeleteMessageAttachmentResult.internalBinaryWrite(message.result.deleteMessageAttachment, writer.tag(56, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
10405
10805
|
let u = options.writeUnknownFields;
|
|
10406
10806
|
if (u !== false)
|
|
10407
10807
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -10587,7 +10987,8 @@ class GetUpdatesInput$Type extends import_runtime4.MessageType {
|
|
|
10587
10987
|
{ no: 1, name: "bucket", kind: "message", T: () => UpdateBucket },
|
|
10588
10988
|
{ no: 2, name: "start_seq", kind: "scalar", T: 3, L: 0 },
|
|
10589
10989
|
{ no: 3, name: "total_limit", kind: "scalar", T: 5 },
|
|
10590
|
-
{ no: 4, name: "seq_end", kind: "scalar", T: 3, L: 0 }
|
|
10990
|
+
{ no: 4, name: "seq_end", kind: "scalar", T: 3, L: 0 },
|
|
10991
|
+
{ no: 5, name: "limit", kind: "scalar", T: 5 }
|
|
10591
10992
|
]);
|
|
10592
10993
|
}
|
|
10593
10994
|
create(value) {
|
|
@@ -10595,6 +10996,7 @@ class GetUpdatesInput$Type extends import_runtime4.MessageType {
|
|
|
10595
10996
|
message.startSeq = 0n;
|
|
10596
10997
|
message.totalLimit = 0;
|
|
10597
10998
|
message.seqEnd = 0n;
|
|
10999
|
+
message.limit = 0;
|
|
10598
11000
|
if (value !== undefined)
|
|
10599
11001
|
import_runtime3.reflectionMergePartial(this, message, value);
|
|
10600
11002
|
return message;
|
|
@@ -10616,6 +11018,9 @@ class GetUpdatesInput$Type extends import_runtime4.MessageType {
|
|
|
10616
11018
|
case 4:
|
|
10617
11019
|
message.seqEnd = reader.int64().toBigInt();
|
|
10618
11020
|
break;
|
|
11021
|
+
case 5:
|
|
11022
|
+
message.limit = reader.int32();
|
|
11023
|
+
break;
|
|
10619
11024
|
default:
|
|
10620
11025
|
let u = options.readUnknownField;
|
|
10621
11026
|
if (u === "throw")
|
|
@@ -10636,6 +11041,8 @@ class GetUpdatesInput$Type extends import_runtime4.MessageType {
|
|
|
10636
11041
|
writer.tag(3, import_runtime.WireType.Varint).int32(message.totalLimit);
|
|
10637
11042
|
if (message.seqEnd !== 0n)
|
|
10638
11043
|
writer.tag(4, import_runtime.WireType.Varint).int64(message.seqEnd);
|
|
11044
|
+
if (message.limit !== 0)
|
|
11045
|
+
writer.tag(5, import_runtime.WireType.Varint).int32(message.limit);
|
|
10639
11046
|
let u = options.writeUnknownFields;
|
|
10640
11047
|
if (u !== false)
|
|
10641
11048
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -11762,6 +12169,191 @@ class ListBotsResult$Type extends import_runtime4.MessageType {
|
|
|
11762
12169
|
}
|
|
11763
12170
|
var ListBotsResult = new ListBotsResult$Type;
|
|
11764
12171
|
|
|
12172
|
+
class DeleteBotInput$Type extends import_runtime4.MessageType {
|
|
12173
|
+
constructor() {
|
|
12174
|
+
super("DeleteBotInput", [
|
|
12175
|
+
{ no: 1, name: "bot_user_id", kind: "scalar", T: 3, L: 0 }
|
|
12176
|
+
]);
|
|
12177
|
+
}
|
|
12178
|
+
create(value) {
|
|
12179
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
12180
|
+
message.botUserId = 0n;
|
|
12181
|
+
if (value !== undefined)
|
|
12182
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
12183
|
+
return message;
|
|
12184
|
+
}
|
|
12185
|
+
internalBinaryRead(reader, length, options, target) {
|
|
12186
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
12187
|
+
while (reader.pos < end) {
|
|
12188
|
+
let [fieldNo, wireType] = reader.tag();
|
|
12189
|
+
switch (fieldNo) {
|
|
12190
|
+
case 1:
|
|
12191
|
+
message.botUserId = reader.int64().toBigInt();
|
|
12192
|
+
break;
|
|
12193
|
+
default:
|
|
12194
|
+
let u = options.readUnknownField;
|
|
12195
|
+
if (u === "throw")
|
|
12196
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
12197
|
+
let d = reader.skip(wireType);
|
|
12198
|
+
if (u !== false)
|
|
12199
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
12200
|
+
}
|
|
12201
|
+
}
|
|
12202
|
+
return message;
|
|
12203
|
+
}
|
|
12204
|
+
internalBinaryWrite(message, writer, options) {
|
|
12205
|
+
if (message.botUserId !== 0n)
|
|
12206
|
+
writer.tag(1, import_runtime.WireType.Varint).int64(message.botUserId);
|
|
12207
|
+
let u = options.writeUnknownFields;
|
|
12208
|
+
if (u !== false)
|
|
12209
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
12210
|
+
return writer;
|
|
12211
|
+
}
|
|
12212
|
+
}
|
|
12213
|
+
var DeleteBotInput = new DeleteBotInput$Type;
|
|
12214
|
+
|
|
12215
|
+
class DeleteBotResult$Type extends import_runtime4.MessageType {
|
|
12216
|
+
constructor() {
|
|
12217
|
+
super("DeleteBotResult", [
|
|
12218
|
+
{ no: 1, name: "bot_user_id", kind: "scalar", T: 3, L: 0 }
|
|
12219
|
+
]);
|
|
12220
|
+
}
|
|
12221
|
+
create(value) {
|
|
12222
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
12223
|
+
message.botUserId = 0n;
|
|
12224
|
+
if (value !== undefined)
|
|
12225
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
12226
|
+
return message;
|
|
12227
|
+
}
|
|
12228
|
+
internalBinaryRead(reader, length, options, target) {
|
|
12229
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
12230
|
+
while (reader.pos < end) {
|
|
12231
|
+
let [fieldNo, wireType] = reader.tag();
|
|
12232
|
+
switch (fieldNo) {
|
|
12233
|
+
case 1:
|
|
12234
|
+
message.botUserId = reader.int64().toBigInt();
|
|
12235
|
+
break;
|
|
12236
|
+
default:
|
|
12237
|
+
let u = options.readUnknownField;
|
|
12238
|
+
if (u === "throw")
|
|
12239
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
12240
|
+
let d = reader.skip(wireType);
|
|
12241
|
+
if (u !== false)
|
|
12242
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
12243
|
+
}
|
|
12244
|
+
}
|
|
12245
|
+
return message;
|
|
12246
|
+
}
|
|
12247
|
+
internalBinaryWrite(message, writer, options) {
|
|
12248
|
+
if (message.botUserId !== 0n)
|
|
12249
|
+
writer.tag(1, import_runtime.WireType.Varint).int64(message.botUserId);
|
|
12250
|
+
let u = options.writeUnknownFields;
|
|
12251
|
+
if (u !== false)
|
|
12252
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
12253
|
+
return writer;
|
|
12254
|
+
}
|
|
12255
|
+
}
|
|
12256
|
+
var DeleteBotResult = new DeleteBotResult$Type;
|
|
12257
|
+
|
|
12258
|
+
class DeleteMessageAttachmentInput$Type extends import_runtime4.MessageType {
|
|
12259
|
+
constructor() {
|
|
12260
|
+
super("DeleteMessageAttachmentInput", [
|
|
12261
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => InputPeer },
|
|
12262
|
+
{ no: 2, name: "message_id", kind: "scalar", T: 3, L: 0 },
|
|
12263
|
+
{ no: 3, name: "attachment_id", kind: "scalar", T: 3, L: 0 }
|
|
12264
|
+
]);
|
|
12265
|
+
}
|
|
12266
|
+
create(value) {
|
|
12267
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
12268
|
+
message.messageId = 0n;
|
|
12269
|
+
message.attachmentId = 0n;
|
|
12270
|
+
if (value !== undefined)
|
|
12271
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
12272
|
+
return message;
|
|
12273
|
+
}
|
|
12274
|
+
internalBinaryRead(reader, length, options, target) {
|
|
12275
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
12276
|
+
while (reader.pos < end) {
|
|
12277
|
+
let [fieldNo, wireType] = reader.tag();
|
|
12278
|
+
switch (fieldNo) {
|
|
12279
|
+
case 1:
|
|
12280
|
+
message.peerId = InputPeer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
12281
|
+
break;
|
|
12282
|
+
case 2:
|
|
12283
|
+
message.messageId = reader.int64().toBigInt();
|
|
12284
|
+
break;
|
|
12285
|
+
case 3:
|
|
12286
|
+
message.attachmentId = reader.int64().toBigInt();
|
|
12287
|
+
break;
|
|
12288
|
+
default:
|
|
12289
|
+
let u = options.readUnknownField;
|
|
12290
|
+
if (u === "throw")
|
|
12291
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
12292
|
+
let d = reader.skip(wireType);
|
|
12293
|
+
if (u !== false)
|
|
12294
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
12295
|
+
}
|
|
12296
|
+
}
|
|
12297
|
+
return message;
|
|
12298
|
+
}
|
|
12299
|
+
internalBinaryWrite(message, writer, options) {
|
|
12300
|
+
if (message.peerId)
|
|
12301
|
+
InputPeer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
12302
|
+
if (message.messageId !== 0n)
|
|
12303
|
+
writer.tag(2, import_runtime.WireType.Varint).int64(message.messageId);
|
|
12304
|
+
if (message.attachmentId !== 0n)
|
|
12305
|
+
writer.tag(3, import_runtime.WireType.Varint).int64(message.attachmentId);
|
|
12306
|
+
let u = options.writeUnknownFields;
|
|
12307
|
+
if (u !== false)
|
|
12308
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
12309
|
+
return writer;
|
|
12310
|
+
}
|
|
12311
|
+
}
|
|
12312
|
+
var DeleteMessageAttachmentInput = new DeleteMessageAttachmentInput$Type;
|
|
12313
|
+
|
|
12314
|
+
class DeleteMessageAttachmentResult$Type extends import_runtime4.MessageType {
|
|
12315
|
+
constructor() {
|
|
12316
|
+
super("DeleteMessageAttachmentResult", [
|
|
12317
|
+
{ no: 1, name: "updates", kind: "message", repeat: 1, T: () => Update }
|
|
12318
|
+
]);
|
|
12319
|
+
}
|
|
12320
|
+
create(value) {
|
|
12321
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
12322
|
+
message.updates = [];
|
|
12323
|
+
if (value !== undefined)
|
|
12324
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
12325
|
+
return message;
|
|
12326
|
+
}
|
|
12327
|
+
internalBinaryRead(reader, length, options, target) {
|
|
12328
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
12329
|
+
while (reader.pos < end) {
|
|
12330
|
+
let [fieldNo, wireType] = reader.tag();
|
|
12331
|
+
switch (fieldNo) {
|
|
12332
|
+
case 1:
|
|
12333
|
+
message.updates.push(Update.internalBinaryRead(reader, reader.uint32(), options));
|
|
12334
|
+
break;
|
|
12335
|
+
default:
|
|
12336
|
+
let u = options.readUnknownField;
|
|
12337
|
+
if (u === "throw")
|
|
12338
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
12339
|
+
let d = reader.skip(wireType);
|
|
12340
|
+
if (u !== false)
|
|
12341
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
12342
|
+
}
|
|
12343
|
+
}
|
|
12344
|
+
return message;
|
|
12345
|
+
}
|
|
12346
|
+
internalBinaryWrite(message, writer, options) {
|
|
12347
|
+
for (let i = 0;i < message.updates.length; i++)
|
|
12348
|
+
Update.internalBinaryWrite(message.updates[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
12349
|
+
let u = options.writeUnknownFields;
|
|
12350
|
+
if (u !== false)
|
|
12351
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
12352
|
+
return writer;
|
|
12353
|
+
}
|
|
12354
|
+
}
|
|
12355
|
+
var DeleteMessageAttachmentResult = new DeleteMessageAttachmentResult$Type;
|
|
12356
|
+
|
|
11765
12357
|
class RevokeSessionInput$Type extends import_runtime4.MessageType {
|
|
11766
12358
|
constructor() {
|
|
11767
12359
|
super("RevokeSessionInput", [
|
|
@@ -13778,6 +14370,118 @@ class DeleteMessagesResult$Type extends import_runtime4.MessageType {
|
|
|
13778
14370
|
}
|
|
13779
14371
|
var DeleteMessagesResult = new DeleteMessagesResult$Type;
|
|
13780
14372
|
|
|
14373
|
+
class ClearChatHistoryInput$Type extends import_runtime4.MessageType {
|
|
14374
|
+
constructor() {
|
|
14375
|
+
super("ClearChatHistoryInput", [
|
|
14376
|
+
{ no: 1, name: "peer_id", kind: "message", oneof: "target", T: () => InputPeer },
|
|
14377
|
+
{ no: 4, name: "space_id", kind: "scalar", oneof: "target", T: 3, L: 0 },
|
|
14378
|
+
{ no: 2, name: "keep_last_days", kind: "scalar", T: 5 },
|
|
14379
|
+
{ no: 3, name: "delete_reply_threads", kind: "scalar", T: 8 }
|
|
14380
|
+
]);
|
|
14381
|
+
}
|
|
14382
|
+
create(value) {
|
|
14383
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
14384
|
+
message.target = { oneofKind: undefined };
|
|
14385
|
+
message.keepLastDays = 0;
|
|
14386
|
+
message.deleteReplyThreads = false;
|
|
14387
|
+
if (value !== undefined)
|
|
14388
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
14389
|
+
return message;
|
|
14390
|
+
}
|
|
14391
|
+
internalBinaryRead(reader, length, options, target) {
|
|
14392
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
14393
|
+
while (reader.pos < end) {
|
|
14394
|
+
let [fieldNo, wireType] = reader.tag();
|
|
14395
|
+
switch (fieldNo) {
|
|
14396
|
+
case 1:
|
|
14397
|
+
message.target = {
|
|
14398
|
+
oneofKind: "peerId",
|
|
14399
|
+
peerId: InputPeer.internalBinaryRead(reader, reader.uint32(), options, message.target.peerId)
|
|
14400
|
+
};
|
|
14401
|
+
break;
|
|
14402
|
+
case 4:
|
|
14403
|
+
message.target = {
|
|
14404
|
+
oneofKind: "spaceId",
|
|
14405
|
+
spaceId: reader.int64().toBigInt()
|
|
14406
|
+
};
|
|
14407
|
+
break;
|
|
14408
|
+
case 2:
|
|
14409
|
+
message.keepLastDays = reader.int32();
|
|
14410
|
+
break;
|
|
14411
|
+
case 3:
|
|
14412
|
+
message.deleteReplyThreads = reader.bool();
|
|
14413
|
+
break;
|
|
14414
|
+
default:
|
|
14415
|
+
let u = options.readUnknownField;
|
|
14416
|
+
if (u === "throw")
|
|
14417
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
14418
|
+
let d = reader.skip(wireType);
|
|
14419
|
+
if (u !== false)
|
|
14420
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
14421
|
+
}
|
|
14422
|
+
}
|
|
14423
|
+
return message;
|
|
14424
|
+
}
|
|
14425
|
+
internalBinaryWrite(message, writer, options) {
|
|
14426
|
+
if (message.target.oneofKind === "peerId")
|
|
14427
|
+
InputPeer.internalBinaryWrite(message.target.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
14428
|
+
if (message.target.oneofKind === "spaceId")
|
|
14429
|
+
writer.tag(4, import_runtime.WireType.Varint).int64(message.target.spaceId);
|
|
14430
|
+
if (message.keepLastDays !== 0)
|
|
14431
|
+
writer.tag(2, import_runtime.WireType.Varint).int32(message.keepLastDays);
|
|
14432
|
+
if (message.deleteReplyThreads !== false)
|
|
14433
|
+
writer.tag(3, import_runtime.WireType.Varint).bool(message.deleteReplyThreads);
|
|
14434
|
+
let u = options.writeUnknownFields;
|
|
14435
|
+
if (u !== false)
|
|
14436
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
14437
|
+
return writer;
|
|
14438
|
+
}
|
|
14439
|
+
}
|
|
14440
|
+
var ClearChatHistoryInput = new ClearChatHistoryInput$Type;
|
|
14441
|
+
|
|
14442
|
+
class ClearChatHistoryResult$Type extends import_runtime4.MessageType {
|
|
14443
|
+
constructor() {
|
|
14444
|
+
super("ClearChatHistoryResult", [
|
|
14445
|
+
{ no: 1, name: "updates", kind: "message", repeat: 1, T: () => Update }
|
|
14446
|
+
]);
|
|
14447
|
+
}
|
|
14448
|
+
create(value) {
|
|
14449
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
14450
|
+
message.updates = [];
|
|
14451
|
+
if (value !== undefined)
|
|
14452
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
14453
|
+
return message;
|
|
14454
|
+
}
|
|
14455
|
+
internalBinaryRead(reader, length, options, target) {
|
|
14456
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
14457
|
+
while (reader.pos < end) {
|
|
14458
|
+
let [fieldNo, wireType] = reader.tag();
|
|
14459
|
+
switch (fieldNo) {
|
|
14460
|
+
case 1:
|
|
14461
|
+
message.updates.push(Update.internalBinaryRead(reader, reader.uint32(), options));
|
|
14462
|
+
break;
|
|
14463
|
+
default:
|
|
14464
|
+
let u = options.readUnknownField;
|
|
14465
|
+
if (u === "throw")
|
|
14466
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
14467
|
+
let d = reader.skip(wireType);
|
|
14468
|
+
if (u !== false)
|
|
14469
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
14470
|
+
}
|
|
14471
|
+
}
|
|
14472
|
+
return message;
|
|
14473
|
+
}
|
|
14474
|
+
internalBinaryWrite(message, writer, options) {
|
|
14475
|
+
for (let i = 0;i < message.updates.length; i++)
|
|
14476
|
+
Update.internalBinaryWrite(message.updates[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
14477
|
+
let u = options.writeUnknownFields;
|
|
14478
|
+
if (u !== false)
|
|
14479
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
14480
|
+
return writer;
|
|
14481
|
+
}
|
|
14482
|
+
}
|
|
14483
|
+
var ClearChatHistoryResult = new ClearChatHistoryResult$Type;
|
|
14484
|
+
|
|
13781
14485
|
class EditMessageInput$Type extends import_runtime4.MessageType {
|
|
13782
14486
|
constructor() {
|
|
13783
14487
|
super("EditMessageInput", [
|
|
@@ -15519,7 +16223,8 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
15519
16223
|
{ no: 33, name: "dialog_notification_settings", kind: "message", oneof: "update", T: () => UpdateDialogNotificationSettings },
|
|
15520
16224
|
{ no: 34, name: "chat_open", kind: "message", oneof: "update", T: () => UpdateChatOpen },
|
|
15521
16225
|
{ no: 35, name: "message_action_invoked", kind: "message", oneof: "update", T: () => UpdateMessageActionInvoked },
|
|
15522
|
-
{ no: 36, name: "message_action_answered", kind: "message", oneof: "update", T: () => UpdateMessageActionAnswered }
|
|
16226
|
+
{ no: 36, name: "message_action_answered", kind: "message", oneof: "update", T: () => UpdateMessageActionAnswered },
|
|
16227
|
+
{ no: 37, name: "clear_chat_history", kind: "message", oneof: "update", T: () => UpdateClearChatHistory }
|
|
15523
16228
|
]);
|
|
15524
16229
|
}
|
|
15525
16230
|
create(value) {
|
|
@@ -15738,6 +16443,12 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
15738
16443
|
messageActionAnswered: UpdateMessageActionAnswered.internalBinaryRead(reader, reader.uint32(), options, message.update.messageActionAnswered)
|
|
15739
16444
|
};
|
|
15740
16445
|
break;
|
|
16446
|
+
case 37:
|
|
16447
|
+
message.update = {
|
|
16448
|
+
oneofKind: "clearChatHistory",
|
|
16449
|
+
clearChatHistory: UpdateClearChatHistory.internalBinaryRead(reader, reader.uint32(), options, message.update.clearChatHistory)
|
|
16450
|
+
};
|
|
16451
|
+
break;
|
|
15741
16452
|
default:
|
|
15742
16453
|
let u = options.readUnknownField;
|
|
15743
16454
|
if (u === "throw")
|
|
@@ -15820,6 +16531,8 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
15820
16531
|
UpdateMessageActionInvoked.internalBinaryWrite(message.update.messageActionInvoked, writer.tag(35, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15821
16532
|
if (message.update.oneofKind === "messageActionAnswered")
|
|
15822
16533
|
UpdateMessageActionAnswered.internalBinaryWrite(message.update.messageActionAnswered, writer.tag(36, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16534
|
+
if (message.update.oneofKind === "clearChatHistory")
|
|
16535
|
+
UpdateClearChatHistory.internalBinaryWrite(message.update.clearChatHistory, writer.tag(37, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15823
16536
|
let u = options.writeUnknownFields;
|
|
15824
16537
|
if (u !== false)
|
|
15825
16538
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -17086,6 +17799,119 @@ class UpdateDeleteMessages$Type extends import_runtime4.MessageType {
|
|
|
17086
17799
|
}
|
|
17087
17800
|
var UpdateDeleteMessages = new UpdateDeleteMessages$Type;
|
|
17088
17801
|
|
|
17802
|
+
class UpdateClearChatHistory$Type extends import_runtime4.MessageType {
|
|
17803
|
+
constructor() {
|
|
17804
|
+
super("UpdateClearChatHistory", [
|
|
17805
|
+
{ no: 1, name: "peer_id", kind: "message", oneof: "target", T: () => Peer },
|
|
17806
|
+
{ no: 4, name: "space_id", kind: "scalar", oneof: "target", T: 3, L: 0 },
|
|
17807
|
+
{ no: 2, name: "before_date", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
17808
|
+
{ no: 3, name: "delete_reply_threads", kind: "scalar", T: 8 },
|
|
17809
|
+
{ no: 5, name: "deleted_chat_ids", kind: "scalar", repeat: 1, T: 3, L: 0 },
|
|
17810
|
+
{ no: 6, name: "orphaned_chat_ids", kind: "scalar", repeat: 1, T: 3, L: 0 },
|
|
17811
|
+
{ no: 7, name: "detached_chat_ids", kind: "scalar", repeat: 1, T: 3, L: 0 }
|
|
17812
|
+
]);
|
|
17813
|
+
}
|
|
17814
|
+
create(value) {
|
|
17815
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
17816
|
+
message.target = { oneofKind: undefined };
|
|
17817
|
+
message.deleteReplyThreads = false;
|
|
17818
|
+
message.deletedChatIds = [];
|
|
17819
|
+
message.orphanedChatIds = [];
|
|
17820
|
+
message.detachedChatIds = [];
|
|
17821
|
+
if (value !== undefined)
|
|
17822
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
17823
|
+
return message;
|
|
17824
|
+
}
|
|
17825
|
+
internalBinaryRead(reader, length, options, target) {
|
|
17826
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
17827
|
+
while (reader.pos < end) {
|
|
17828
|
+
let [fieldNo, wireType] = reader.tag();
|
|
17829
|
+
switch (fieldNo) {
|
|
17830
|
+
case 1:
|
|
17831
|
+
message.target = {
|
|
17832
|
+
oneofKind: "peerId",
|
|
17833
|
+
peerId: Peer.internalBinaryRead(reader, reader.uint32(), options, message.target.peerId)
|
|
17834
|
+
};
|
|
17835
|
+
break;
|
|
17836
|
+
case 4:
|
|
17837
|
+
message.target = {
|
|
17838
|
+
oneofKind: "spaceId",
|
|
17839
|
+
spaceId: reader.int64().toBigInt()
|
|
17840
|
+
};
|
|
17841
|
+
break;
|
|
17842
|
+
case 2:
|
|
17843
|
+
message.beforeDate = reader.int64().toBigInt();
|
|
17844
|
+
break;
|
|
17845
|
+
case 3:
|
|
17846
|
+
message.deleteReplyThreads = reader.bool();
|
|
17847
|
+
break;
|
|
17848
|
+
case 5:
|
|
17849
|
+
if (wireType === import_runtime.WireType.LengthDelimited)
|
|
17850
|
+
for (let e = reader.int32() + reader.pos;reader.pos < e; )
|
|
17851
|
+
message.deletedChatIds.push(reader.int64().toBigInt());
|
|
17852
|
+
else
|
|
17853
|
+
message.deletedChatIds.push(reader.int64().toBigInt());
|
|
17854
|
+
break;
|
|
17855
|
+
case 6:
|
|
17856
|
+
if (wireType === import_runtime.WireType.LengthDelimited)
|
|
17857
|
+
for (let e = reader.int32() + reader.pos;reader.pos < e; )
|
|
17858
|
+
message.orphanedChatIds.push(reader.int64().toBigInt());
|
|
17859
|
+
else
|
|
17860
|
+
message.orphanedChatIds.push(reader.int64().toBigInt());
|
|
17861
|
+
break;
|
|
17862
|
+
case 7:
|
|
17863
|
+
if (wireType === import_runtime.WireType.LengthDelimited)
|
|
17864
|
+
for (let e = reader.int32() + reader.pos;reader.pos < e; )
|
|
17865
|
+
message.detachedChatIds.push(reader.int64().toBigInt());
|
|
17866
|
+
else
|
|
17867
|
+
message.detachedChatIds.push(reader.int64().toBigInt());
|
|
17868
|
+
break;
|
|
17869
|
+
default:
|
|
17870
|
+
let u = options.readUnknownField;
|
|
17871
|
+
if (u === "throw")
|
|
17872
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
17873
|
+
let d = reader.skip(wireType);
|
|
17874
|
+
if (u !== false)
|
|
17875
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
17876
|
+
}
|
|
17877
|
+
}
|
|
17878
|
+
return message;
|
|
17879
|
+
}
|
|
17880
|
+
internalBinaryWrite(message, writer, options) {
|
|
17881
|
+
if (message.target.oneofKind === "peerId")
|
|
17882
|
+
Peer.internalBinaryWrite(message.target.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
17883
|
+
if (message.target.oneofKind === "spaceId")
|
|
17884
|
+
writer.tag(4, import_runtime.WireType.Varint).int64(message.target.spaceId);
|
|
17885
|
+
if (message.beforeDate !== undefined)
|
|
17886
|
+
writer.tag(2, import_runtime.WireType.Varint).int64(message.beforeDate);
|
|
17887
|
+
if (message.deleteReplyThreads !== false)
|
|
17888
|
+
writer.tag(3, import_runtime.WireType.Varint).bool(message.deleteReplyThreads);
|
|
17889
|
+
if (message.deletedChatIds.length) {
|
|
17890
|
+
writer.tag(5, import_runtime.WireType.LengthDelimited).fork();
|
|
17891
|
+
for (let i = 0;i < message.deletedChatIds.length; i++)
|
|
17892
|
+
writer.int64(message.deletedChatIds[i]);
|
|
17893
|
+
writer.join();
|
|
17894
|
+
}
|
|
17895
|
+
if (message.orphanedChatIds.length) {
|
|
17896
|
+
writer.tag(6, import_runtime.WireType.LengthDelimited).fork();
|
|
17897
|
+
for (let i = 0;i < message.orphanedChatIds.length; i++)
|
|
17898
|
+
writer.int64(message.orphanedChatIds[i]);
|
|
17899
|
+
writer.join();
|
|
17900
|
+
}
|
|
17901
|
+
if (message.detachedChatIds.length) {
|
|
17902
|
+
writer.tag(7, import_runtime.WireType.LengthDelimited).fork();
|
|
17903
|
+
for (let i = 0;i < message.detachedChatIds.length; i++)
|
|
17904
|
+
writer.int64(message.detachedChatIds[i]);
|
|
17905
|
+
writer.join();
|
|
17906
|
+
}
|
|
17907
|
+
let u = options.writeUnknownFields;
|
|
17908
|
+
if (u !== false)
|
|
17909
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
17910
|
+
return writer;
|
|
17911
|
+
}
|
|
17912
|
+
}
|
|
17913
|
+
var UpdateClearChatHistory = new UpdateClearChatHistory$Type;
|
|
17914
|
+
|
|
17089
17915
|
class UpdateMessageId$Type extends import_runtime4.MessageType {
|
|
17090
17916
|
constructor() {
|
|
17091
17917
|
super("UpdateMessageId", [
|
|
@@ -19226,7 +20052,7 @@ function describeConnectionError(error) {
|
|
|
19226
20052
|
return `server connection error${code != null ? ` (code=${code})` : ""}: ${message}`;
|
|
19227
20053
|
}
|
|
19228
20054
|
|
|
19229
|
-
// ../../node_modules/.bun/ws@8.
|
|
20055
|
+
// ../../node_modules/.bun/ws@8.21.0/node_modules/ws/wrapper.mjs
|
|
19230
20056
|
var import_stream = __toESM(require_stream(), 1);
|
|
19231
20057
|
var import_extension = __toESM(require_extension(), 1);
|
|
19232
20058
|
var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
|
|
@@ -19520,7 +20346,8 @@ var rpcInputKindByMethod = {
|
|
|
19520
20346
|
37: "updateBotProfile",
|
|
19521
20347
|
38: "getMessages",
|
|
19522
20348
|
48: "invokeMessageAction",
|
|
19523
|
-
49: "answerMessageAction"
|
|
20349
|
+
49: "answerMessageAction",
|
|
20350
|
+
53: "clearChatHistory"
|
|
19524
20351
|
};
|
|
19525
20352
|
var rpcResultKindByMethod = {
|
|
19526
20353
|
0: undefined,
|
|
@@ -19563,7 +20390,8 @@ var rpcResultKindByMethod = {
|
|
|
19563
20390
|
37: "updateBotProfile",
|
|
19564
20391
|
38: "getMessages",
|
|
19565
20392
|
48: "invokeMessageAction",
|
|
19566
|
-
49: "answerMessageAction"
|
|
20393
|
+
49: "answerMessageAction",
|
|
20394
|
+
53: "clearChatHistory"
|
|
19567
20395
|
};
|
|
19568
20396
|
|
|
19569
20397
|
// ../sdk/dist/sdk/logger.js
|
|
@@ -19600,6 +20428,7 @@ var defaultApiBaseUrl = "https://api.inline.chat";
|
|
|
19600
20428
|
var defaultVideoWidth = 1280;
|
|
19601
20429
|
var defaultVideoHeight = 720;
|
|
19602
20430
|
var defaultVideoDuration = 1;
|
|
20431
|
+
var defaultCatchUpPageLimit = 200;
|
|
19603
20432
|
var defaultCatchUpTotalLimit = 1000;
|
|
19604
20433
|
var defaultColdStartCatchUpWindow = defaultCatchUpTotalLimit;
|
|
19605
20434
|
function extractFirstMessageId(updates) {
|
|
@@ -19738,7 +20567,12 @@ class InlineSdkClient {
|
|
|
19738
20567
|
const chat = result.getChat.chat;
|
|
19739
20568
|
if (!chat)
|
|
19740
20569
|
throw new Error("getChat: missing chat");
|
|
19741
|
-
return {
|
|
20570
|
+
return {
|
|
20571
|
+
chatId: chat.id,
|
|
20572
|
+
peer: chat.peerId,
|
|
20573
|
+
title: chat.title,
|
|
20574
|
+
...chat.lastMsgId != null ? { lastMsgId: chat.lastMsgId } : {}
|
|
20575
|
+
};
|
|
19742
20576
|
}
|
|
19743
20577
|
async getMessages(params) {
|
|
19744
20578
|
const peerId = this.inputPeerFromTarget(params, "getMessages");
|
|
@@ -19752,6 +20586,18 @@ class InlineSdkClient {
|
|
|
19752
20586
|
});
|
|
19753
20587
|
return { messages: result.getMessages.messages };
|
|
19754
20588
|
}
|
|
20589
|
+
async clearChatHistory(params) {
|
|
20590
|
+
const keepLastDays = normalizeKeepLastDays(params.keepLastDays);
|
|
20591
|
+
const target = this.clearHistoryTargetFromParams(params);
|
|
20592
|
+
await this.invoke(Method.CLEAR_CHAT_HISTORY, {
|
|
20593
|
+
oneofKind: "clearChatHistory",
|
|
20594
|
+
clearChatHistory: {
|
|
20595
|
+
target,
|
|
20596
|
+
keepLastDays,
|
|
20597
|
+
deleteReplyThreads: params.deleteReplyThreads ?? false
|
|
20598
|
+
}
|
|
20599
|
+
});
|
|
20600
|
+
}
|
|
19755
20601
|
async sendMessage(params) {
|
|
19756
20602
|
if (params.entities != null && params.parseMarkdown != null) {
|
|
19757
20603
|
throw new Error("sendMessage: provide either `entities` or `parseMarkdown`, not both");
|
|
@@ -20053,6 +20899,36 @@ class InlineSdkClient {
|
|
|
20053
20899
|
});
|
|
20054
20900
|
return;
|
|
20055
20901
|
}
|
|
20902
|
+
case "clearChatHistory": {
|
|
20903
|
+
const payload = update.update.clearChatHistory;
|
|
20904
|
+
if (payload.target.oneofKind === "spaceId") {
|
|
20905
|
+
await this.eventStream.send({
|
|
20906
|
+
kind: "space.history.clear",
|
|
20907
|
+
spaceId: payload.target.spaceId,
|
|
20908
|
+
...payload.beforeDate != null ? { beforeDate: payload.beforeDate } : {},
|
|
20909
|
+
deleteReplyThreads: payload.deleteReplyThreads,
|
|
20910
|
+
seq,
|
|
20911
|
+
date
|
|
20912
|
+
});
|
|
20913
|
+
return;
|
|
20914
|
+
}
|
|
20915
|
+
const peerId = payload.target.oneofKind === "peerId" ? payload.target.peerId : undefined;
|
|
20916
|
+
const chatId = peerId?.type.oneofKind === "chat" ? peerId.type.chat.chatId : null;
|
|
20917
|
+
if (!chatId) {
|
|
20918
|
+
this.log.warn?.("Skipping clearChatHistory update without chat peer", peerId);
|
|
20919
|
+
return;
|
|
20920
|
+
}
|
|
20921
|
+
this.bumpChatSeq(chatId, seq);
|
|
20922
|
+
await this.eventStream.send({
|
|
20923
|
+
kind: "message.history.clear",
|
|
20924
|
+
chatId,
|
|
20925
|
+
...payload.beforeDate != null ? { beforeDate: payload.beforeDate } : {},
|
|
20926
|
+
deleteReplyThreads: payload.deleteReplyThreads,
|
|
20927
|
+
seq,
|
|
20928
|
+
date
|
|
20929
|
+
});
|
|
20930
|
+
return;
|
|
20931
|
+
}
|
|
20056
20932
|
case "updateReaction": {
|
|
20057
20933
|
const reaction = update.update.updateReaction.reaction;
|
|
20058
20934
|
if (!reaction)
|
|
@@ -20196,7 +21072,8 @@ class InlineSdkClient {
|
|
|
20196
21072
|
}
|
|
20197
21073
|
}),
|
|
20198
21074
|
startSeq: BigInt(cursor),
|
|
20199
|
-
totalLimit: defaultCatchUpTotalLimit
|
|
21075
|
+
totalLimit: defaultCatchUpTotalLimit,
|
|
21076
|
+
limit: defaultCatchUpPageLimit
|
|
20200
21077
|
})
|
|
20201
21078
|
});
|
|
20202
21079
|
const payload = result.getUpdates;
|
|
@@ -20293,7 +21170,8 @@ class InlineSdkClient {
|
|
|
20293
21170
|
}),
|
|
20294
21171
|
startSeq: BigInt(cursor),
|
|
20295
21172
|
seqEnd: BigInt(endSeq),
|
|
20296
|
-
totalLimit: defaultCatchUpTotalLimit
|
|
21173
|
+
totalLimit: defaultCatchUpTotalLimit,
|
|
21174
|
+
limit: defaultCatchUpPageLimit
|
|
20297
21175
|
})
|
|
20298
21176
|
});
|
|
20299
21177
|
const payload = result.getUpdates;
|
|
@@ -20357,6 +21235,18 @@ class InlineSdkClient {
|
|
|
20357
21235
|
type: { oneofKind: "chat", chat: { chatId: asInlineId(params.chatId, "chatId") } }
|
|
20358
21236
|
});
|
|
20359
21237
|
}
|
|
21238
|
+
clearHistoryTargetFromParams(params) {
|
|
21239
|
+
const hasChatId = params.chatId != null;
|
|
21240
|
+
const hasUserId = params.userId != null;
|
|
21241
|
+
const hasSpaceId = params.spaceId != null;
|
|
21242
|
+
if ([hasChatId, hasUserId, hasSpaceId].filter(Boolean).length !== 1) {
|
|
21243
|
+
throw new Error("clearChatHistory: provide exactly one of `chatId`, `userId`, or `spaceId`");
|
|
21244
|
+
}
|
|
21245
|
+
if (hasSpaceId) {
|
|
21246
|
+
return { oneofKind: "spaceId", spaceId: asInlineId(params.spaceId, "spaceId") };
|
|
21247
|
+
}
|
|
21248
|
+
return { oneofKind: "peerId", peerId: this.inputPeerFromTarget(params, "clearChatHistory") };
|
|
21249
|
+
}
|
|
20360
21250
|
async loadState() {
|
|
20361
21251
|
const store = this.options.state;
|
|
20362
21252
|
if (!store)
|
|
@@ -20533,6 +21423,12 @@ function normalizePositiveInt(value, field) {
|
|
|
20533
21423
|
}
|
|
20534
21424
|
return value;
|
|
20535
21425
|
}
|
|
21426
|
+
function normalizeKeepLastDays(value) {
|
|
21427
|
+
if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0 || value > 36500) {
|
|
21428
|
+
throw new Error("clearChatHistory: `keepLastDays` must be 0 or a positive integer up to 36500");
|
|
21429
|
+
}
|
|
21430
|
+
return value;
|
|
21431
|
+
}
|
|
20536
21432
|
async function parseJsonResponse(response) {
|
|
20537
21433
|
const contentType = response.headers.get("content-type") ?? "";
|
|
20538
21434
|
if (!contentType.includes("application/json")) {
|
|
@@ -35193,10 +36089,15 @@ var InlineActionsSchema = exports_external.object({
|
|
|
35193
36089
|
var InlineCapabilitiesSchema = exports_external.object({
|
|
35194
36090
|
replyThreads: exports_external.boolean().optional()
|
|
35195
36091
|
}).strict();
|
|
36092
|
+
var InlineReplyThreadModeSchema = exports_external.enum(["auto", "thread", "main"]);
|
|
35196
36093
|
var InlineTargetSchema = exports_external.union([exports_external.string(), exports_external.number()]);
|
|
35197
36094
|
var InlineAllowEntrySchema = exports_external.union([exports_external.string(), exports_external.number()]);
|
|
35198
36095
|
var InlineGroupSchema = exports_external.object({
|
|
35199
36096
|
requireMention: exports_external.boolean().optional(),
|
|
36097
|
+
replyThreadMode: InlineReplyThreadModeSchema.optional(),
|
|
36098
|
+
replyThreadAutoCreateMinMessages: exports_external.number().int().min(0).optional(),
|
|
36099
|
+
replyThreadRequireExplicitMention: exports_external.boolean().optional(),
|
|
36100
|
+
replyThreadParentHistoryLimit: exports_external.number().int().min(0).optional(),
|
|
35200
36101
|
allowFrom: exports_external.array(InlineAllowEntrySchema).optional(),
|
|
35201
36102
|
systemPrompt: exports_external.string().optional(),
|
|
35202
36103
|
tools: ToolPolicySchema.optional(),
|
|
@@ -35236,6 +36137,7 @@ var InlineStreamingSchema = exports_external.union([
|
|
|
35236
36137
|
label: exports_external.union([exports_external.string(), exports_external.literal(false)]).optional(),
|
|
35237
36138
|
labels: exports_external.array(exports_external.string()).optional(),
|
|
35238
36139
|
maxLines: exports_external.number().int().positive().optional(),
|
|
36140
|
+
maxLineChars: exports_external.number().int().positive().optional(),
|
|
35239
36141
|
render: exports_external.enum(["text", "rich"]).optional(),
|
|
35240
36142
|
toolProgress: exports_external.boolean().optional(),
|
|
35241
36143
|
commandText: InlineStreamingCommandTextSchema.optional()
|
|
@@ -35263,6 +36165,7 @@ var InlineRuntimeStreamingSchema = exports_external.union([
|
|
|
35263
36165
|
label: exports_external.union([exports_external.string(), exports_external.literal(false)]).optional(),
|
|
35264
36166
|
labels: exports_external.array(exports_external.string()).optional(),
|
|
35265
36167
|
maxLines: exports_external.number().int().positive().optional(),
|
|
36168
|
+
maxLineChars: exports_external.number().int().positive().optional(),
|
|
35266
36169
|
render: exports_external.enum(["text", "rich"]).optional(),
|
|
35267
36170
|
toolProgress: exports_external.boolean().optional(),
|
|
35268
36171
|
commandText: InlineStreamingCommandTextSchema.optional()
|
|
@@ -35288,6 +36191,10 @@ var InlineAccountSchemaBase = exports_external.object({
|
|
|
35288
36191
|
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
35289
36192
|
groups: exports_external.record(exports_external.string(), InlineGroupSchema.optional()).optional(),
|
|
35290
36193
|
requireMention: exports_external.boolean().optional(),
|
|
36194
|
+
replyThreadMode: InlineReplyThreadModeSchema.optional(),
|
|
36195
|
+
replyThreadAutoCreateMinMessages: exports_external.number().int().min(0).optional(),
|
|
36196
|
+
replyThreadRequireExplicitMention: exports_external.boolean().optional(),
|
|
36197
|
+
replyThreadParentHistoryLimit: exports_external.number().int().min(0).optional(),
|
|
35291
36198
|
replyToBotWithoutMention: exports_external.boolean().optional(),
|
|
35292
36199
|
historyLimit: exports_external.number().int().min(0).optional(),
|
|
35293
36200
|
dmHistoryLimit: exports_external.number().int().min(0).optional(),
|
|
@@ -35559,9 +36466,7 @@ function inspectInlineAccount(params) {
|
|
|
35559
36466
|
}
|
|
35560
36467
|
const tokenFile = account.tokenFile?.trim() ?? "";
|
|
35561
36468
|
if (tokenFile) {
|
|
35562
|
-
const token =
|
|
35563
|
-
rejectSymlink: true
|
|
35564
|
-
}) ?? "";
|
|
36469
|
+
const token = tryReadInlineTokenFile(tokenFile);
|
|
35565
36470
|
return {
|
|
35566
36471
|
...account,
|
|
35567
36472
|
token: token || null,
|
|
@@ -35621,18 +36526,58 @@ async function resolveInlineToken(account) {
|
|
|
35621
36526
|
}
|
|
35622
36527
|
throw new Error("Inline token missing (set channels.inline.token, channels.inline.tokenFile, INLINE_TOKEN, or INLINE_BOT_TOKEN)");
|
|
35623
36528
|
}
|
|
35624
|
-
const token =
|
|
35625
|
-
rejectSymlink: true
|
|
35626
|
-
});
|
|
36529
|
+
const token = readInlineTokenFile(tokenFile);
|
|
35627
36530
|
if (!token)
|
|
35628
36531
|
throw new Error(`Inline tokenFile is empty or unreadable: ${tokenFile}`);
|
|
35629
36532
|
return token;
|
|
35630
36533
|
}
|
|
36534
|
+
function tryReadInlineTokenFile(tokenFile) {
|
|
36535
|
+
try {
|
|
36536
|
+
return tryReadSecretFileSync(tokenFile, "Inline bot token", {
|
|
36537
|
+
rejectSymlink: true
|
|
36538
|
+
}) ?? "";
|
|
36539
|
+
} catch {
|
|
36540
|
+
return "";
|
|
36541
|
+
}
|
|
36542
|
+
}
|
|
36543
|
+
function readInlineTokenFile(tokenFile) {
|
|
36544
|
+
try {
|
|
36545
|
+
return tryReadSecretFileSync(tokenFile, "Inline bot token", {
|
|
36546
|
+
rejectSymlink: true
|
|
36547
|
+
}) ?? "";
|
|
36548
|
+
} catch (error51) {
|
|
36549
|
+
throw new Error(`Inline tokenFile is empty or unreadable: ${tokenFile}`, {
|
|
36550
|
+
cause: error51
|
|
36551
|
+
});
|
|
36552
|
+
}
|
|
36553
|
+
}
|
|
35631
36554
|
|
|
35632
36555
|
// src/inline/reply-threads.ts
|
|
35633
36556
|
var GET_CHAT_METHOD = typeof Method.GET_CHAT === "number" && Number.isInteger(Method.GET_CHAT) && Method.GET_CHAT > 0 ? Method.GET_CHAT : 25;
|
|
35634
36557
|
var GET_CHAT_HISTORY_METHOD = typeof Method.GET_CHAT_HISTORY === "number" && Number.isInteger(Method.GET_CHAT_HISTORY) && Method.GET_CHAT_HISTORY > 0 ? Method.GET_CHAT_HISTORY : 5;
|
|
35635
36558
|
var GET_MESSAGES_METHOD = typeof Method.GET_MESSAGES === "number" && Number.isInteger(Method.GET_MESSAGES) && Method.GET_MESSAGES > 0 ? Method.GET_MESSAGES : 38;
|
|
36559
|
+
var CREATE_SUBTHREAD_METHOD = typeof Method.CREATE_SUBTHREAD === "number" && Number.isInteger(Method.CREATE_SUBTHREAD) && Method.CREATE_SUBTHREAD > 0 ? Method.CREATE_SUBTHREAD : 42;
|
|
36560
|
+
function isPlacementMode(raw) {
|
|
36561
|
+
return raw === "thread" || raw === "main";
|
|
36562
|
+
}
|
|
36563
|
+
function hasReplyThreadConfig(config2) {
|
|
36564
|
+
if (isPlacementMode(config2.replyThreadMode))
|
|
36565
|
+
return true;
|
|
36566
|
+
if (typeof config2.replyThreadAutoCreateMinMessages === "number")
|
|
36567
|
+
return true;
|
|
36568
|
+
if (typeof config2.replyThreadRequireExplicitMention === "boolean")
|
|
36569
|
+
return true;
|
|
36570
|
+
if (typeof config2.replyThreadParentHistoryLimit === "number")
|
|
36571
|
+
return true;
|
|
36572
|
+
if (!config2.groups || typeof config2.groups !== "object" || Array.isArray(config2.groups))
|
|
36573
|
+
return false;
|
|
36574
|
+
return Object.values(config2.groups).some((group) => {
|
|
36575
|
+
if (!group || typeof group !== "object" || Array.isArray(group))
|
|
36576
|
+
return false;
|
|
36577
|
+
const groupConfig = group;
|
|
36578
|
+
return isPlacementMode(groupConfig.replyThreadMode) || typeof groupConfig.replyThreadAutoCreateMinMessages === "number" || typeof groupConfig.replyThreadRequireExplicitMention === "boolean" || typeof groupConfig.replyThreadParentHistoryLimit === "number";
|
|
36579
|
+
});
|
|
36580
|
+
}
|
|
35636
36581
|
function buildChatPeer(chatId) {
|
|
35637
36582
|
return {
|
|
35638
36583
|
type: {
|
|
@@ -35647,7 +36592,7 @@ function getInlineReplyThreadsCapabilityConfig(params) {
|
|
|
35647
36592
|
accountId: params.accountId ?? null
|
|
35648
36593
|
});
|
|
35649
36594
|
return {
|
|
35650
|
-
replyThreads: account.config.capabilities?.replyThreads === true
|
|
36595
|
+
replyThreads: account.config.capabilities?.replyThreads === true || hasReplyThreadConfig(account.config)
|
|
35651
36596
|
};
|
|
35652
36597
|
}
|
|
35653
36598
|
function isInlineReplyThreadsEnabled(params) {
|
|
@@ -35719,13 +36664,35 @@ async function loadInlineReplyThreadAnchorMessage(params) {
|
|
|
35719
36664
|
}
|
|
35720
36665
|
return (historyResult.getChatHistory.messages ?? []).find((item) => item.id === params.parentMessageId) ?? null;
|
|
35721
36666
|
}
|
|
36667
|
+
async function createInlineReplyThreadForMessage(params) {
|
|
36668
|
+
const result = await params.client.invokeRaw(CREATE_SUBTHREAD_METHOD, {
|
|
36669
|
+
oneofKind: "createSubthread",
|
|
36670
|
+
createSubthread: {
|
|
36671
|
+
parentChatId: params.parentChatId,
|
|
36672
|
+
parentMessageId: params.parentMessageId,
|
|
36673
|
+
participants: []
|
|
36674
|
+
}
|
|
36675
|
+
});
|
|
36676
|
+
if (result.oneofKind !== "createSubthread") {
|
|
36677
|
+
return null;
|
|
36678
|
+
}
|
|
36679
|
+
const chat = result.createSubthread.chat;
|
|
36680
|
+
if (!chat?.id) {
|
|
36681
|
+
return null;
|
|
36682
|
+
}
|
|
36683
|
+
return {
|
|
36684
|
+
childChatId: chat.id,
|
|
36685
|
+
parentChatId: chat.parentChatId ?? params.parentChatId,
|
|
36686
|
+
parentMessageId: chat.parentMessageId ?? params.parentMessageId,
|
|
36687
|
+
title: chat.title?.trim() || null,
|
|
36688
|
+
anchorMessage: result.createSubthread.anchorMessage ?? null
|
|
36689
|
+
};
|
|
36690
|
+
}
|
|
35722
36691
|
|
|
35723
36692
|
// src/inline/media.ts
|
|
35724
36693
|
import path from "node:path";
|
|
35725
36694
|
|
|
35726
36695
|
// src/sdk-runtime-compat.ts
|
|
35727
|
-
var HISTORY_CONTEXT_MARKER = "[Chat messages since your last reply - for context]";
|
|
35728
|
-
var CURRENT_MESSAGE_MARKER = "[Current message - respond to this]";
|
|
35729
36696
|
var MAX_HISTORY_KEYS = 1000;
|
|
35730
36697
|
var DEFAULT_GROUP_HISTORY_LIMIT = 50;
|
|
35731
36698
|
function evictOldHistoryKeys(historyMap, maxKeys = MAX_HISTORY_KEYS) {
|
|
@@ -35741,20 +36708,6 @@ function evictOldHistoryKeys(historyMap, maxKeys = MAX_HISTORY_KEYS) {
|
|
|
35741
36708
|
}
|
|
35742
36709
|
}
|
|
35743
36710
|
}
|
|
35744
|
-
function buildHistoryContext(params) {
|
|
35745
|
-
const lineBreak = params.lineBreak ?? `
|
|
35746
|
-
`;
|
|
35747
|
-
if (!params.historyText.trim()) {
|
|
35748
|
-
return params.currentMessage;
|
|
35749
|
-
}
|
|
35750
|
-
return [
|
|
35751
|
-
HISTORY_CONTEXT_MARKER,
|
|
35752
|
-
params.historyText,
|
|
35753
|
-
"",
|
|
35754
|
-
CURRENT_MESSAGE_MARKER,
|
|
35755
|
-
params.currentMessage
|
|
35756
|
-
].join(lineBreak);
|
|
35757
|
-
}
|
|
35758
36711
|
function appendHistoryEntry(params) {
|
|
35759
36712
|
if (params.limit <= 0) {
|
|
35760
36713
|
return [];
|
|
@@ -35771,32 +36724,6 @@ function appendHistoryEntry(params) {
|
|
|
35771
36724
|
evictOldHistoryKeys(params.historyMap);
|
|
35772
36725
|
return history;
|
|
35773
36726
|
}
|
|
35774
|
-
function buildHistoryContextFromEntries(params) {
|
|
35775
|
-
const lineBreak = params.lineBreak ?? `
|
|
35776
|
-
`;
|
|
35777
|
-
const entries = params.excludeLast === false ? params.entries : params.entries.slice(0, -1);
|
|
35778
|
-
if (entries.length === 0) {
|
|
35779
|
-
return params.currentMessage;
|
|
35780
|
-
}
|
|
35781
|
-
return buildHistoryContext({
|
|
35782
|
-
historyText: entries.map(params.formatEntry).join(lineBreak),
|
|
35783
|
-
currentMessage: params.currentMessage,
|
|
35784
|
-
lineBreak
|
|
35785
|
-
});
|
|
35786
|
-
}
|
|
35787
|
-
function buildPendingHistoryContextFromMap(params) {
|
|
35788
|
-
if (params.limit <= 0) {
|
|
35789
|
-
return params.currentMessage;
|
|
35790
|
-
}
|
|
35791
|
-
const entries = params.historyMap.get(params.historyKey) ?? [];
|
|
35792
|
-
return buildHistoryContextFromEntries({
|
|
35793
|
-
entries,
|
|
35794
|
-
currentMessage: params.currentMessage,
|
|
35795
|
-
formatEntry: params.formatEntry,
|
|
35796
|
-
...params.lineBreak !== undefined ? { lineBreak: params.lineBreak } : {},
|
|
35797
|
-
excludeLast: false
|
|
35798
|
-
});
|
|
35799
|
-
}
|
|
35800
36727
|
function clearHistoryEntriesIfEnabled(params) {
|
|
35801
36728
|
if (params.limit <= 0) {
|
|
35802
36729
|
return;
|
|
@@ -35916,20 +36843,16 @@ async function createChannelReplyPipelineCompat(params) {
|
|
|
35916
36843
|
}
|
|
35917
36844
|
|
|
35918
36845
|
// src/runtime.ts
|
|
35919
|
-
|
|
35920
|
-
|
|
35921
|
-
|
|
35922
|
-
|
|
35923
|
-
|
|
35924
|
-
|
|
35925
|
-
}
|
|
35926
|
-
|
|
35927
|
-
|
|
35928
|
-
|
|
35929
|
-
throw new Error("Inline runtime not initialized");
|
|
35930
|
-
}
|
|
35931
|
-
return runtime;
|
|
35932
|
-
}
|
|
36846
|
+
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
36847
|
+
var {
|
|
36848
|
+
setRuntime: setInlineRuntime,
|
|
36849
|
+
clearRuntime: clearInlineRuntime,
|
|
36850
|
+
tryGetRuntime: getOptionalInlineRuntime,
|
|
36851
|
+
getRuntime: getInlineRuntime
|
|
36852
|
+
} = createPluginRuntimeStore({
|
|
36853
|
+
pluginId: "inline",
|
|
36854
|
+
errorMessage: "Inline runtime not initialized"
|
|
36855
|
+
});
|
|
35933
36856
|
|
|
35934
36857
|
// src/inline/media.ts
|
|
35935
36858
|
var DEFAULT_MEDIA_MAX_MB = 300;
|
|
@@ -36899,7 +37822,7 @@ for (const group of ACTION_GROUPS) {
|
|
|
36899
37822
|
}
|
|
36900
37823
|
var SUPPORTED_ACTIONS = Array.from(ACTION_TO_GATE_KEY.keys());
|
|
36901
37824
|
var GET_MESSAGES_METHOD2 = typeof Method.GET_MESSAGES === "number" && Number.isInteger(Method.GET_MESSAGES) && Method.GET_MESSAGES > 0 ? Method.GET_MESSAGES : null;
|
|
36902
|
-
var
|
|
37825
|
+
var CREATE_SUBTHREAD_METHOD2 = typeof Method.CREATE_SUBTHREAD === "number" && Number.isInteger(Method.CREATE_SUBTHREAD) && Method.CREATE_SUBTHREAD > 0 ? Method.CREATE_SUBTHREAD : 42;
|
|
36903
37826
|
var INLINE_ACTION_MAX_ROWS = 8;
|
|
36904
37827
|
var INLINE_ACTION_MAX_PER_ROW = 8;
|
|
36905
37828
|
function suppressedInternalTextResult() {
|
|
@@ -37145,6 +38068,20 @@ function resolveReactionMessageId(params) {
|
|
|
37145
38068
|
}
|
|
37146
38069
|
return;
|
|
37147
38070
|
}
|
|
38071
|
+
function resolveThreadParentMessageId(params) {
|
|
38072
|
+
const explicit = readFlexibleId(params.args, "parentMessageId") ?? readFlexibleId(params.args, "messageId") ?? readFlexibleId(params.args, "replyTo") ?? readFlexibleId(params.args, "replyToId") ?? readStringParam(params.args, "parentMessageId") ?? readStringParam(params.args, "messageId") ?? readStringParam(params.args, "replyTo") ?? readStringParam(params.args, "replyToId");
|
|
38073
|
+
if (explicit)
|
|
38074
|
+
return explicit;
|
|
38075
|
+
const fromContext = params.toolContext?.currentMessageId;
|
|
38076
|
+
if (typeof fromContext === "number" && Number.isFinite(fromContext)) {
|
|
38077
|
+
return String(Math.trunc(fromContext));
|
|
38078
|
+
}
|
|
38079
|
+
if (typeof fromContext === "string") {
|
|
38080
|
+
const trimmed = fromContext.trim();
|
|
38081
|
+
return trimmed || undefined;
|
|
38082
|
+
}
|
|
38083
|
+
return;
|
|
38084
|
+
}
|
|
37148
38085
|
function parseOptionalInlineId(raw, label) {
|
|
37149
38086
|
if (raw == null)
|
|
37150
38087
|
return;
|
|
@@ -38185,8 +39122,11 @@ var inlineMessageActions = {
|
|
|
38185
39122
|
});
|
|
38186
39123
|
if (replyThreadsEnabled) {
|
|
38187
39124
|
const parentChatId = resolveChatIdFromParams(params);
|
|
38188
|
-
const parentMessageId = parseOptionalInlineId(
|
|
38189
|
-
|
|
39125
|
+
const parentMessageId = parseOptionalInlineId(resolveThreadParentMessageId({
|
|
39126
|
+
args: params,
|
|
39127
|
+
...toolContext != null ? { toolContext: { currentMessageId: toolContext.currentMessageId } } : {}
|
|
39128
|
+
}), "parentMessageId");
|
|
39129
|
+
const result2 = await client.invokeRaw(CREATE_SUBTHREAD_METHOD2, {
|
|
38190
39130
|
oneofKind: "createSubthread",
|
|
38191
39131
|
createSubthread: {
|
|
38192
39132
|
parentChatId,
|
|
@@ -38938,5 +39878,5 @@ export {
|
|
|
38938
39878
|
inlineApprovalNativeRuntime
|
|
38939
39879
|
};
|
|
38940
39880
|
|
|
38941
|
-
//# debugId=
|
|
39881
|
+
//# debugId=57EFBB1CEE3A32B664756E2164756E21
|
|
38942
39882
|
//# sourceMappingURL=approval-handler.runtime.js.map
|