@inline-chat/hermes-agent-adapter 1.0.0-alpha.3 → 1.0.0

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.
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
18
18
  return cached;
19
19
  }
20
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
22
  if (mod && typeof mod === "object" || typeof mod === "function") {
23
23
  for (let key of __getOwnPropNames(mod))
24
24
  if (!__hasOwnProp.call(to, key))
@@ -189,38 +189,38 @@ var require_binary_format_contract = __commonJS(function(exports) {
189
189
  Object.defineProperty(exports, "__esModule", { value: true });
190
190
  exports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = undefined;
191
191
  var UnknownFieldHandler;
192
- (function(UnknownFieldHandler2) {
193
- UnknownFieldHandler2.symbol = Symbol.for("protobuf-ts/unknown");
194
- UnknownFieldHandler2.onRead = (typeName, message, fieldNo, wireType, data) => {
195
- let container = is(message) ? message[UnknownFieldHandler2.symbol] : message[UnknownFieldHandler2.symbol] = [];
192
+ (function(UnknownFieldHandler) {
193
+ UnknownFieldHandler.symbol = Symbol.for("protobuf-ts/unknown");
194
+ UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => {
195
+ let container = is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = [];
196
196
  container.push({ no: fieldNo, wireType, data });
197
197
  };
198
- UnknownFieldHandler2.onWrite = (typeName, message, writer) => {
199
- for (let { no, wireType, data } of UnknownFieldHandler2.list(message))
198
+ UnknownFieldHandler.onWrite = (typeName, message, writer) => {
199
+ for (let { no, wireType, data } of UnknownFieldHandler.list(message))
200
200
  writer.tag(no, wireType).raw(data);
201
201
  };
202
- UnknownFieldHandler2.list = (message, fieldNo) => {
202
+ UnknownFieldHandler.list = (message, fieldNo) => {
203
203
  if (is(message)) {
204
- let all = message[UnknownFieldHandler2.symbol];
204
+ let all = message[UnknownFieldHandler.symbol];
205
205
  return fieldNo ? all.filter((uf) => uf.no == fieldNo) : all;
206
206
  }
207
207
  return [];
208
208
  };
209
- UnknownFieldHandler2.last = (message, fieldNo) => UnknownFieldHandler2.list(message, fieldNo).slice(-1)[0];
210
- const is = (message) => message && Array.isArray(message[UnknownFieldHandler2.symbol]);
209
+ UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0];
210
+ const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]);
211
211
  })(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {}));
212
212
  function mergeBinaryOptions(a, b) {
213
213
  return Object.assign(Object.assign({}, a), b);
214
214
  }
215
215
  exports.mergeBinaryOptions = mergeBinaryOptions;
216
216
  var WireType;
217
- (function(WireType2) {
218
- WireType2[WireType2["Varint"] = 0] = "Varint";
219
- WireType2[WireType2["Bit64"] = 1] = "Bit64";
220
- WireType2[WireType2["LengthDelimited"] = 2] = "LengthDelimited";
221
- WireType2[WireType2["StartGroup"] = 3] = "StartGroup";
222
- WireType2[WireType2["EndGroup"] = 4] = "EndGroup";
223
- WireType2[WireType2["Bit32"] = 5] = "Bit32";
217
+ (function(WireType) {
218
+ WireType[WireType["Varint"] = 0] = "Varint";
219
+ WireType[WireType["Bit64"] = 1] = "Bit64";
220
+ WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited";
221
+ WireType[WireType["StartGroup"] = 3] = "StartGroup";
222
+ WireType[WireType["EndGroup"] = 4] = "EndGroup";
223
+ WireType[WireType["Bit32"] = 5] = "Bit32";
224
224
  })(WireType = exports.WireType || (exports.WireType = {}));
225
225
  });
226
226
 
@@ -967,34 +967,34 @@ var require_reflection_info = __commonJS(function(exports) {
967
967
  exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = undefined;
968
968
  var lower_camel_case_1 = require_lower_camel_case();
969
969
  var ScalarType;
970
- (function(ScalarType2) {
971
- ScalarType2[ScalarType2["DOUBLE"] = 1] = "DOUBLE";
972
- ScalarType2[ScalarType2["FLOAT"] = 2] = "FLOAT";
973
- ScalarType2[ScalarType2["INT64"] = 3] = "INT64";
974
- ScalarType2[ScalarType2["UINT64"] = 4] = "UINT64";
975
- ScalarType2[ScalarType2["INT32"] = 5] = "INT32";
976
- ScalarType2[ScalarType2["FIXED64"] = 6] = "FIXED64";
977
- ScalarType2[ScalarType2["FIXED32"] = 7] = "FIXED32";
978
- ScalarType2[ScalarType2["BOOL"] = 8] = "BOOL";
979
- ScalarType2[ScalarType2["STRING"] = 9] = "STRING";
980
- ScalarType2[ScalarType2["BYTES"] = 12] = "BYTES";
981
- ScalarType2[ScalarType2["UINT32"] = 13] = "UINT32";
982
- ScalarType2[ScalarType2["SFIXED32"] = 15] = "SFIXED32";
983
- ScalarType2[ScalarType2["SFIXED64"] = 16] = "SFIXED64";
984
- ScalarType2[ScalarType2["SINT32"] = 17] = "SINT32";
985
- ScalarType2[ScalarType2["SINT64"] = 18] = "SINT64";
970
+ (function(ScalarType) {
971
+ ScalarType[ScalarType["DOUBLE"] = 1] = "DOUBLE";
972
+ ScalarType[ScalarType["FLOAT"] = 2] = "FLOAT";
973
+ ScalarType[ScalarType["INT64"] = 3] = "INT64";
974
+ ScalarType[ScalarType["UINT64"] = 4] = "UINT64";
975
+ ScalarType[ScalarType["INT32"] = 5] = "INT32";
976
+ ScalarType[ScalarType["FIXED64"] = 6] = "FIXED64";
977
+ ScalarType[ScalarType["FIXED32"] = 7] = "FIXED32";
978
+ ScalarType[ScalarType["BOOL"] = 8] = "BOOL";
979
+ ScalarType[ScalarType["STRING"] = 9] = "STRING";
980
+ ScalarType[ScalarType["BYTES"] = 12] = "BYTES";
981
+ ScalarType[ScalarType["UINT32"] = 13] = "UINT32";
982
+ ScalarType[ScalarType["SFIXED32"] = 15] = "SFIXED32";
983
+ ScalarType[ScalarType["SFIXED64"] = 16] = "SFIXED64";
984
+ ScalarType[ScalarType["SINT32"] = 17] = "SINT32";
985
+ ScalarType[ScalarType["SINT64"] = 18] = "SINT64";
986
986
  })(ScalarType = exports.ScalarType || (exports.ScalarType = {}));
987
987
  var LongType;
988
- (function(LongType2) {
989
- LongType2[LongType2["BIGINT"] = 0] = "BIGINT";
990
- LongType2[LongType2["STRING"] = 1] = "STRING";
991
- LongType2[LongType2["NUMBER"] = 2] = "NUMBER";
988
+ (function(LongType) {
989
+ LongType[LongType["BIGINT"] = 0] = "BIGINT";
990
+ LongType[LongType["STRING"] = 1] = "STRING";
991
+ LongType[LongType["NUMBER"] = 2] = "NUMBER";
992
992
  })(LongType = exports.LongType || (exports.LongType = {}));
993
993
  var RepeatType;
994
- (function(RepeatType2) {
995
- RepeatType2[RepeatType2["NO"] = 0] = "NO";
996
- RepeatType2[RepeatType2["PACKED"] = 1] = "PACKED";
997
- RepeatType2[RepeatType2["UNPACKED"] = 2] = "UNPACKED";
994
+ (function(RepeatType) {
995
+ RepeatType[RepeatType["NO"] = 0] = "NO";
996
+ RepeatType[RepeatType["PACKED"] = 1] = "PACKED";
997
+ RepeatType[RepeatType["UNPACKED"] = 2] = "UNPACKED";
998
998
  })(RepeatType = exports.RepeatType || (exports.RepeatType = {}));
999
999
  function normalizeFieldInfo(field) {
1000
1000
  var _a, _b, _c, _d;
@@ -1567,8 +1567,8 @@ var require_reflection_json_reader = __commonJS(function(exports) {
1567
1567
  }
1568
1568
  try {
1569
1569
  encodeURIComponent(json);
1570
- } catch (e2) {
1571
- e2 = "invalid UTF8";
1570
+ } catch (e) {
1571
+ e = "invalid UTF8";
1572
1572
  break;
1573
1573
  }
1574
1574
  return json;
@@ -1606,9 +1606,9 @@ var require_reflection_json_writer = __commonJS(function(exports) {
1606
1606
  const json = {}, source = message;
1607
1607
  for (const field of this.fields) {
1608
1608
  if (!field.oneof) {
1609
- let jsonValue2 = this.field(field, source[field.localName], options);
1610
- if (jsonValue2 !== undefined)
1611
- json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2;
1609
+ let jsonValue = this.field(field, source[field.localName], options);
1610
+ if (jsonValue !== undefined)
1611
+ json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
1612
1612
  continue;
1613
1613
  }
1614
1614
  const group = source[field.oneof];
@@ -1857,7 +1857,7 @@ var require_reflection_binary_reader = __commonJS(function(exports) {
1857
1857
  (u === true ? binary_format_contract_1.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d);
1858
1858
  continue;
1859
1859
  }
1860
- let target = message, repeated = field.repeat, localName = field.localName;
1860
+ let target = message, { repeat: repeated, localName } = field;
1861
1861
  if (field.oneof) {
1862
1862
  target = target[field.oneof];
1863
1863
  if (target.oneofKind !== localName)
@@ -2005,7 +2005,7 @@ var require_reflection_binary_writer = __commonJS(function(exports) {
2005
2005
  write(message, writer, options) {
2006
2006
  this.prepare();
2007
2007
  for (const field of this.fields) {
2008
- let value, emitDefault, repeated = field.repeat, localName = field.localName;
2008
+ let value, emitDefault, { repeat: repeated, localName } = field;
2009
2009
  if (field.oneof) {
2010
2010
  const group = message[field.oneof];
2011
2011
  if (group.oneofKind !== localName)
@@ -2270,9 +2270,9 @@ var require_reflection_merge_partial = __commonJS(function(exports) {
2270
2270
  Object.assign(output[name], fieldValue);
2271
2271
  break;
2272
2272
  case "message":
2273
- let T2 = field.V.T();
2273
+ let T = field.V.T();
2274
2274
  for (let k of Object.keys(fieldValue))
2275
- output[name][k] = T2.create(fieldValue[k]);
2275
+ output[name][k] = T.create(fieldValue[k]);
2276
2276
  break;
2277
2277
  }
2278
2278
  break;
@@ -2487,12 +2487,12 @@ var require_enum_object = __commonJS(function(exports) {
2487
2487
  if (arg[nam] !== num)
2488
2488
  return false;
2489
2489
  } else {
2490
- let num2 = arg[k];
2491
- if (num2 === undefined)
2490
+ let num = arg[k];
2491
+ if (num === undefined)
2492
2492
  return false;
2493
- if (typeof num2 !== "number")
2493
+ if (typeof num !== "number")
2494
2494
  return false;
2495
- if (arg[num2] === undefined)
2495
+ if (arg[num] === undefined)
2496
2496
  return false;
2497
2497
  }
2498
2498
  }
@@ -2724,6 +2724,7 @@ var require_constants = __commonJS(function(exports, module) {
2724
2724
 
2725
2725
  // node_modules/ws/lib/buffer-util.js
2726
2726
  var require_buffer_util = __commonJS(function(exports, module) {
2727
+ var { websocketMask, websocketUnmask } = __require("http");
2727
2728
  var { EMPTY_BUFFER } = require_constants();
2728
2729
  var FastBuffer = Buffer[Symbol.species];
2729
2730
  function concat(list, totalLength) {
@@ -2781,14 +2782,27 @@ var require_buffer_util = __commonJS(function(exports, module) {
2781
2782
  toBuffer,
2782
2783
  unmask: _unmask
2783
2784
  };
2784
- if (!process.env.WS_NO_BUFFER_UTIL) {
2785
+ if (websocketMask) {
2786
+ module.exports.mask = function(source, mask, output, offset, length) {
2787
+ if (length < 24)
2788
+ _mask(source, mask, output, offset, length);
2789
+ else
2790
+ websocketMask(source, mask, output, offset, length);
2791
+ };
2792
+ module.exports.unmask = function(buffer, mask) {
2793
+ if (buffer.length < 24)
2794
+ _unmask(buffer, mask);
2795
+ else
2796
+ websocketUnmask(buffer, mask);
2797
+ };
2798
+ } else if (!process.env.WS_NO_BUFFER_UTIL) {
2785
2799
  try {
2786
2800
  const bufferUtil = (()=>{throw new Error("Cannot require module "+"bufferutil");})();
2787
- module.exports.mask = function(source, mask, output, offset, length) {
2801
+ module.exports.mask = function(source, mask2, output, offset, length) {
2788
2802
  if (length < 48)
2789
- _mask(source, mask, output, offset, length);
2803
+ _mask(source, mask2, output, offset, length);
2790
2804
  else
2791
- bufferUtil.mask(source, mask, output, offset, length);
2805
+ bufferUtil.mask(source, mask2, output, offset, length);
2792
2806
  };
2793
2807
  module.exports.unmask = function(buffer, mask) {
2794
2808
  if (buffer.length < 32)
@@ -3021,7 +3035,7 @@ var require_permessage_deflate = __commonJS(function(exports, module) {
3021
3035
  callback(err);
3022
3036
  return;
3023
3037
  }
3024
- const data2 = bufferUtil.concat(this._inflate[kBuffers], this._inflate[kTotalLength]);
3038
+ const data = bufferUtil.concat(this._inflate[kBuffers], this._inflate[kTotalLength]);
3025
3039
  if (this._inflate._readableState.endEmitted) {
3026
3040
  this._inflate.close();
3027
3041
  this._inflate = null;
@@ -3032,7 +3046,7 @@ var require_permessage_deflate = __commonJS(function(exports, module) {
3032
3046
  this._inflate.reset();
3033
3047
  }
3034
3048
  }
3035
- callback(null, data2);
3049
+ callback(null, data);
3036
3050
  });
3037
3051
  }
3038
3052
  _compress(data, fin, callback) {
@@ -3054,9 +3068,9 @@ var require_permessage_deflate = __commonJS(function(exports, module) {
3054
3068
  if (!this._deflate) {
3055
3069
  return;
3056
3070
  }
3057
- let data2 = bufferUtil.concat(this._deflate[kBuffers], this._deflate[kTotalLength]);
3071
+ let data = bufferUtil.concat(this._deflate[kBuffers], this._deflate[kTotalLength]);
3058
3072
  if (fin) {
3059
- data2 = new FastBuffer(data2.buffer, data2.byteOffset, data2.length - 4);
3073
+ data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
3060
3074
  }
3061
3075
  this._deflate[kCallback] = null;
3062
3076
  this._deflate[kTotalLength] = 0;
@@ -3064,7 +3078,7 @@ var require_permessage_deflate = __commonJS(function(exports, module) {
3064
3078
  if (fin && this.params[`${endpoint}_no_context_takeover`]) {
3065
3079
  this._deflate.reset();
3066
3080
  }
3067
- callback(null, data2);
3081
+ callback(null, data);
3068
3082
  });
3069
3083
  }
3070
3084
  }
@@ -3769,13 +3783,16 @@ var require_sender = __commonJS(function(exports, module) {
3769
3783
  target[2] = target[3] = 0;
3770
3784
  target.writeUIntBE(dataLength, 4, 6);
3771
3785
  }
3772
- if (!options.mask)
3773
- return [target, data];
3786
+ if (!options.mask) {
3787
+ return dataLength ? [target, data] : [target];
3788
+ }
3774
3789
  target[1] |= 128;
3775
3790
  target[offset - 4] = mask[0];
3776
3791
  target[offset - 3] = mask[1];
3777
3792
  target[offset - 2] = mask[2];
3778
3793
  target[offset - 1] = mask[3];
3794
+ if (!dataLength)
3795
+ return [target];
3779
3796
  if (skipMasking)
3780
3797
  return [target, data];
3781
3798
  if (merge) {
@@ -4789,7 +4806,7 @@ var require_websocket = __commonJS(function(exports, module) {
4789
4806
  }
4790
4807
  const defaultPort = isSecure ? 443 : 80;
4791
4808
  const key = randomBytes(16).toString("base64");
4792
- const request = isSecure ? https.request : http.request;
4809
+ const request3 = isSecure ? https.request : http.request;
4793
4810
  const protocolSet = new Set;
4794
4811
  let perMessageDeflate;
4795
4812
  opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
@@ -4835,9 +4852,14 @@ var require_websocket = __commonJS(function(exports, module) {
4835
4852
  opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
4836
4853
  }
4837
4854
  if (isIpcUrl) {
4838
- const parts = opts.path.split(":");
4839
- opts.socketPath = parts[0];
4840
- opts.path = parts[1];
4855
+ const i = opts.path.indexOf(":");
4856
+ if (i === -1) {
4857
+ opts.socketPath = opts.path;
4858
+ opts.path = "";
4859
+ } else {
4860
+ opts.socketPath = opts.path.slice(0, i);
4861
+ opts.path = opts.path.slice(i + 1);
4862
+ }
4841
4863
  }
4842
4864
  let req;
4843
4865
  if (opts.followRedirects) {
@@ -4848,8 +4870,8 @@ var require_websocket = __commonJS(function(exports, module) {
4848
4870
  const headers = options && options.headers;
4849
4871
  options = { ...options, headers: {} };
4850
4872
  if (headers) {
4851
- for (const [key2, value] of Object.entries(headers)) {
4852
- options.headers[key2.toLowerCase()] = value;
4873
+ for (const [key, value] of Object.entries(headers)) {
4874
+ options.headers[key.toLowerCase()] = value;
4853
4875
  }
4854
4876
  }
4855
4877
  } else if (websocket.listenerCount("redirect") === 0) {
@@ -4865,12 +4887,12 @@ var require_websocket = __commonJS(function(exports, module) {
4865
4887
  if (opts.auth && !options.headers.authorization) {
4866
4888
  options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
4867
4889
  }
4868
- req = websocket._req = request(opts);
4890
+ req = websocket._req = request3(opts);
4869
4891
  if (websocket._redirects) {
4870
4892
  websocket.emit("redirect", websocket.url, req);
4871
4893
  }
4872
4894
  } else {
4873
- req = websocket._req = request(opts);
4895
+ req = websocket._req = request3(opts);
4874
4896
  }
4875
4897
  if (opts.timeout) {
4876
4898
  req.on("timeout", () => {
@@ -5188,9 +5210,9 @@ var require_stream = __commonJS(function(exports, module) {
5188
5210
  return;
5189
5211
  }
5190
5212
  let called = false;
5191
- ws.once("error", function error(err2) {
5213
+ ws.once("error", function error(err) {
5192
5214
  called = true;
5193
- callback(err2);
5215
+ callback(err);
5194
5216
  });
5195
5217
  ws.once("close", function close() {
5196
5218
  if (!called)
@@ -5262,11 +5284,11 @@ var require_subprotocol = __commonJS(function(exports, module) {
5262
5284
  }
5263
5285
  if (end === -1)
5264
5286
  end = i;
5265
- const protocol2 = header.slice(start, end);
5266
- if (protocols.has(protocol2)) {
5267
- throw new SyntaxError(`The "${protocol2}" subprotocol is duplicated`);
5287
+ const protocol = header.slice(start, end);
5288
+ if (protocols.has(protocol)) {
5289
+ throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
5268
5290
  }
5269
- protocols.add(protocol2);
5291
+ protocols.add(protocol);
5270
5292
  start = end = -1;
5271
5293
  } else {
5272
5294
  throw new SyntaxError(`Unexpected character at index ${i}`);
@@ -5754,9 +5776,13 @@ function normalizeError(error, redact = defaultErrorText) {
5754
5776
  };
5755
5777
  }
5756
5778
  const message = redact(error);
5779
+ if (errorCode(error) === "commit-outcome-unknown") {
5780
+ return { status: 504, errorKind: "unknown", message, outcomeUnknown: true };
5781
+ }
5757
5782
  const lower = message.toLowerCase();
5758
- if (lower.includes("rate") && lower.includes("limit")) {
5759
- return { status: 429, errorKind: "rate_limited", message };
5783
+ if (isRateLimitCode(error) || lower.includes("rate") && lower.includes("limit")) {
5784
+ const retryAfterSeconds = error?.retryAfterSeconds;
5785
+ return typeof retryAfterSeconds === "number" && retryAfterSeconds > 0 ? { status: 429, errorKind: "rate_limited", message, retryAfterSeconds } : { status: 429, errorKind: "rate_limited", message };
5760
5786
  }
5761
5787
  if (lower.includes("forbidden") || lower.includes("unauthorized")) {
5762
5788
  return { status: 403, errorKind: "forbidden", message };
@@ -5769,6 +5795,15 @@ function normalizeError(error, redact = defaultErrorText) {
5769
5795
  }
5770
5796
  return { status: 500, errorKind: "unknown", message };
5771
5797
  }
5798
+ function errorCode(error) {
5799
+ return typeof error === "object" && error !== null ? error.code : undefined;
5800
+ }
5801
+ function isRateLimitCode(error) {
5802
+ if (errorCode(error) !== "rpc-error")
5803
+ return false;
5804
+ const rpcCode = error.rpcCode;
5805
+ return rpcCode === 3 || rpcCode === 429;
5806
+ }
5772
5807
  function statusForErrorKind(errorKind) {
5773
5808
  switch (errorKind) {
5774
5809
  case "bad_format":
@@ -6022,18 +6057,26 @@ function defaultErrorText(error) {
6022
6057
  }
6023
6058
 
6024
6059
  // src/sidecar/inbound-delivery.ts
6060
+ var MENTION_SENDER_LOOKUP_MS = 2000;
6025
6061
  function explicitlyMentionsSelf(event, meId) {
6026
6062
  if (!meId || event.kind !== "message.new" && event.kind !== "message.edit")
6027
6063
  return false;
6028
6064
  const message = event.message;
6029
6065
  return message?.entities?.entities?.some((e) => e.entity?.oneofKind === "mention" && e.entity.mention?.userId?.toString() === meId) ?? false;
6030
6066
  }
6067
+ function resolveMentionSender(event, owner) {
6068
+ const unverified = { provenanceVerified: false };
6069
+ return Promise.race([
6070
+ owner.resolveSender(event).catch(() => unverified),
6071
+ delay(owner.mentionSenderLookupMs ?? MENTION_SENDER_LOOKUP_MS, unverified, { signal: owner.signal, ref: false })
6072
+ ]);
6073
+ }
6031
6074
  async function deliverInboundEvent(event, owner) {
6032
6075
  if (inboundEventIsServiceMessage(event))
6033
6076
  return;
6034
6077
  const explicitMention = explicitlyMentionsSelf(event, owner.meId);
6035
6078
  while (!owner.signal.aborted) {
6036
- const resolution = explicitMention ? { provenanceVerified: false } : inboundEventNeedsSenderResolution(event) ? await owner.resolveSender(event) : { provenanceVerified: true };
6079
+ const resolution = explicitMention ? await resolveMentionSender(event, owner) : inboundEventNeedsSenderResolution(event) ? await owner.resolveSender(event) : { provenanceVerified: true };
6037
6080
  owner.signal.throwIfAborted();
6038
6081
  if (!explicitMention && !resolution.provenanceVerified && (event.kind === "message.new" || event.kind === "message.edit")) {
6039
6082
  await delay(1000, undefined, { signal: owner.signal });
@@ -6057,618 +6100,618 @@ var import_runtime2 = __toESM(require_commonjs(), 1);
6057
6100
  var import_runtime3 = __toESM(require_commonjs(), 1);
6058
6101
  var import_runtime4 = __toESM(require_commonjs(), 1);
6059
6102
  var ConnectionError_Reason;
6060
- (function(ConnectionError_Reason2) {
6061
- ConnectionError_Reason2[ConnectionError_Reason2["REASON_UNSPECIFIED"] = 0] = "REASON_UNSPECIFIED";
6062
- ConnectionError_Reason2[ConnectionError_Reason2["UNAUTHORIZED"] = 1] = "UNAUTHORIZED";
6063
- ConnectionError_Reason2[ConnectionError_Reason2["INVALID_AUTH"] = 2] = "INVALID_AUTH";
6064
- ConnectionError_Reason2[ConnectionError_Reason2["SESSION_REVOKED"] = 3] = "SESSION_REVOKED";
6103
+ (function(ConnectionError_Reason) {
6104
+ ConnectionError_Reason[ConnectionError_Reason["REASON_UNSPECIFIED"] = 0] = "REASON_UNSPECIFIED";
6105
+ ConnectionError_Reason[ConnectionError_Reason["UNAUTHORIZED"] = 1] = "UNAUTHORIZED";
6106
+ ConnectionError_Reason[ConnectionError_Reason["INVALID_AUTH"] = 2] = "INVALID_AUTH";
6107
+ ConnectionError_Reason[ConnectionError_Reason["SESSION_REVOKED"] = 3] = "SESSION_REVOKED";
6065
6108
  })(ConnectionError_Reason || (ConnectionError_Reason = {}));
6066
6109
  var BotAvatar_Kind;
6067
- (function(BotAvatar_Kind2) {
6068
- BotAvatar_Kind2[BotAvatar_Kind2["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6069
- BotAvatar_Kind2[BotAvatar_Kind2["CODEX_ATLAS"] = 1] = "CODEX_ATLAS";
6110
+ (function(BotAvatar_Kind) {
6111
+ BotAvatar_Kind[BotAvatar_Kind["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6112
+ BotAvatar_Kind[BotAvatar_Kind["CODEX_ATLAS"] = 1] = "CODEX_ATLAS";
6070
6113
  })(BotAvatar_Kind || (BotAvatar_Kind = {}));
6071
6114
  var BotPresenceState_Kind;
6072
- (function(BotPresenceState_Kind2) {
6073
- BotPresenceState_Kind2[BotPresenceState_Kind2["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6074
- BotPresenceState_Kind2[BotPresenceState_Kind2["HIDDEN"] = 1] = "HIDDEN";
6075
- BotPresenceState_Kind2[BotPresenceState_Kind2["IDLE"] = 2] = "IDLE";
6076
- BotPresenceState_Kind2[BotPresenceState_Kind2["HAPPY"] = 3] = "HAPPY";
6077
- BotPresenceState_Kind2[BotPresenceState_Kind2["WAVING"] = 4] = "WAVING";
6078
- BotPresenceState_Kind2[BotPresenceState_Kind2["JUMPING"] = 5] = "JUMPING";
6079
- BotPresenceState_Kind2[BotPresenceState_Kind2["FAILED"] = 6] = "FAILED";
6080
- BotPresenceState_Kind2[BotPresenceState_Kind2["WAITING"] = 7] = "WAITING";
6081
- BotPresenceState_Kind2[BotPresenceState_Kind2["RUNNING"] = 8] = "RUNNING";
6082
- BotPresenceState_Kind2[BotPresenceState_Kind2["REVIEW"] = 9] = "REVIEW";
6115
+ (function(BotPresenceState_Kind) {
6116
+ BotPresenceState_Kind[BotPresenceState_Kind["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6117
+ BotPresenceState_Kind[BotPresenceState_Kind["HIDDEN"] = 1] = "HIDDEN";
6118
+ BotPresenceState_Kind[BotPresenceState_Kind["IDLE"] = 2] = "IDLE";
6119
+ BotPresenceState_Kind[BotPresenceState_Kind["HAPPY"] = 3] = "HAPPY";
6120
+ BotPresenceState_Kind[BotPresenceState_Kind["WAVING"] = 4] = "WAVING";
6121
+ BotPresenceState_Kind[BotPresenceState_Kind["JUMPING"] = 5] = "JUMPING";
6122
+ BotPresenceState_Kind[BotPresenceState_Kind["FAILED"] = 6] = "FAILED";
6123
+ BotPresenceState_Kind[BotPresenceState_Kind["WAITING"] = 7] = "WAITING";
6124
+ BotPresenceState_Kind[BotPresenceState_Kind["RUNNING"] = 8] = "RUNNING";
6125
+ BotPresenceState_Kind[BotPresenceState_Kind["REVIEW"] = 9] = "REVIEW";
6083
6126
  })(BotPresenceState_Kind || (BotPresenceState_Kind = {}));
6084
6127
  var MessageSubthread_Kind;
6085
- (function(MessageSubthread_Kind2) {
6086
- MessageSubthread_Kind2[MessageSubthread_Kind2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6087
- MessageSubthread_Kind2[MessageSubthread_Kind2["REPLY"] = 1] = "REPLY";
6088
- MessageSubthread_Kind2[MessageSubthread_Kind2["SUBTHREAD"] = 2] = "SUBTHREAD";
6128
+ (function(MessageSubthread_Kind) {
6129
+ MessageSubthread_Kind[MessageSubthread_Kind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6130
+ MessageSubthread_Kind[MessageSubthread_Kind["REPLY"] = 1] = "REPLY";
6131
+ MessageSubthread_Kind[MessageSubthread_Kind["SUBTHREAD"] = 2] = "SUBTHREAD";
6089
6132
  })(MessageSubthread_Kind || (MessageSubthread_Kind = {}));
6090
6133
  var BlockList_Kind;
6091
- (function(BlockList_Kind2) {
6092
- BlockList_Kind2[BlockList_Kind2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6093
- BlockList_Kind2[BlockList_Kind2["UNORDERED"] = 1] = "UNORDERED";
6094
- BlockList_Kind2[BlockList_Kind2["ORDERED"] = 2] = "ORDERED";
6134
+ (function(BlockList_Kind) {
6135
+ BlockList_Kind[BlockList_Kind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6136
+ BlockList_Kind[BlockList_Kind["UNORDERED"] = 1] = "UNORDERED";
6137
+ BlockList_Kind[BlockList_Kind["ORDERED"] = 2] = "ORDERED";
6095
6138
  })(BlockList_Kind || (BlockList_Kind = {}));
6096
6139
  var BlockDisclosure_Kind;
6097
- (function(BlockDisclosure_Kind2) {
6098
- BlockDisclosure_Kind2[BlockDisclosure_Kind2["DEFAULT"] = 0] = "DEFAULT";
6099
- BlockDisclosure_Kind2[BlockDisclosure_Kind2["PROGRESS"] = 1] = "PROGRESS";
6140
+ (function(BlockDisclosure_Kind) {
6141
+ BlockDisclosure_Kind[BlockDisclosure_Kind["DEFAULT"] = 0] = "DEFAULT";
6142
+ BlockDisclosure_Kind[BlockDisclosure_Kind["PROGRESS"] = 1] = "PROGRESS";
6100
6143
  })(BlockDisclosure_Kind || (BlockDisclosure_Kind = {}));
6101
6144
  var BlockDisclosure_ActivityKind;
6102
- (function(BlockDisclosure_ActivityKind2) {
6103
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6104
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["REASONING"] = 1] = "REASONING";
6105
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["EXPLORE"] = 2] = "EXPLORE";
6106
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["READ"] = 3] = "READ";
6107
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["SEARCH"] = 4] = "SEARCH";
6108
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["EDIT"] = 5] = "EDIT";
6109
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["DELETE"] = 6] = "DELETE";
6110
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["MOVE"] = 7] = "MOVE";
6111
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["COMMAND"] = 8] = "COMMAND";
6112
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["WEB"] = 9] = "WEB";
6113
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["TOOL"] = 10] = "TOOL";
6114
- BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["AGENT"] = 11] = "AGENT";
6145
+ (function(BlockDisclosure_ActivityKind) {
6146
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6147
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["REASONING"] = 1] = "REASONING";
6148
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["EXPLORE"] = 2] = "EXPLORE";
6149
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["READ"] = 3] = "READ";
6150
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["SEARCH"] = 4] = "SEARCH";
6151
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["EDIT"] = 5] = "EDIT";
6152
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["DELETE"] = 6] = "DELETE";
6153
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["MOVE"] = 7] = "MOVE";
6154
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["COMMAND"] = 8] = "COMMAND";
6155
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["WEB"] = 9] = "WEB";
6156
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["TOOL"] = 10] = "TOOL";
6157
+ BlockDisclosure_ActivityKind[BlockDisclosure_ActivityKind["AGENT"] = 11] = "AGENT";
6115
6158
  })(BlockDisclosure_ActivityKind || (BlockDisclosure_ActivityKind = {}));
6116
6159
  var BlockTable_Alignment;
6117
- (function(BlockTable_Alignment2) {
6118
- BlockTable_Alignment2[BlockTable_Alignment2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6119
- BlockTable_Alignment2[BlockTable_Alignment2["LEFT"] = 1] = "LEFT";
6120
- BlockTable_Alignment2[BlockTable_Alignment2["CENTER"] = 2] = "CENTER";
6121
- BlockTable_Alignment2[BlockTable_Alignment2["RIGHT"] = 3] = "RIGHT";
6160
+ (function(BlockTable_Alignment) {
6161
+ BlockTable_Alignment[BlockTable_Alignment["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6162
+ BlockTable_Alignment[BlockTable_Alignment["LEFT"] = 1] = "LEFT";
6163
+ BlockTable_Alignment[BlockTable_Alignment["CENTER"] = 2] = "CENTER";
6164
+ BlockTable_Alignment[BlockTable_Alignment["RIGHT"] = 3] = "RIGHT";
6122
6165
  })(BlockTable_Alignment || (BlockTable_Alignment = {}));
6123
6166
  var MessageEntity_Type;
6124
- (function(MessageEntity_Type2) {
6125
- MessageEntity_Type2[MessageEntity_Type2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6126
- MessageEntity_Type2[MessageEntity_Type2["MENTION"] = 1] = "MENTION";
6127
- MessageEntity_Type2[MessageEntity_Type2["URL"] = 2] = "URL";
6128
- MessageEntity_Type2[MessageEntity_Type2["TEXT_URL"] = 3] = "TEXT_URL";
6129
- MessageEntity_Type2[MessageEntity_Type2["EMAIL"] = 4] = "EMAIL";
6130
- MessageEntity_Type2[MessageEntity_Type2["BOLD"] = 5] = "BOLD";
6131
- MessageEntity_Type2[MessageEntity_Type2["ITALIC"] = 6] = "ITALIC";
6132
- MessageEntity_Type2[MessageEntity_Type2["USERNAME_MENTION"] = 7] = "USERNAME_MENTION";
6133
- MessageEntity_Type2[MessageEntity_Type2["CODE"] = 8] = "CODE";
6134
- MessageEntity_Type2[MessageEntity_Type2["PRE"] = 9] = "PRE";
6135
- MessageEntity_Type2[MessageEntity_Type2["PHONE_NUMBER"] = 10] = "PHONE_NUMBER";
6136
- MessageEntity_Type2[MessageEntity_Type2["THREAD"] = 11] = "THREAD";
6137
- MessageEntity_Type2[MessageEntity_Type2["THREAD_TITLE"] = 12] = "THREAD_TITLE";
6138
- MessageEntity_Type2[MessageEntity_Type2["BOT_COMMAND"] = 13] = "BOT_COMMAND";
6139
- MessageEntity_Type2[MessageEntity_Type2["GROUP_MENTION"] = 14] = "GROUP_MENTION";
6140
- MessageEntity_Type2[MessageEntity_Type2["UNDERLINE"] = 15] = "UNDERLINE";
6141
- MessageEntity_Type2[MessageEntity_Type2["STRIKETHROUGH"] = 16] = "STRIKETHROUGH";
6142
- MessageEntity_Type2[MessageEntity_Type2["HIGHLIGHT"] = 17] = "HIGHLIGHT";
6143
- MessageEntity_Type2[MessageEntity_Type2["MATH"] = 18] = "MATH";
6167
+ (function(MessageEntity_Type) {
6168
+ MessageEntity_Type[MessageEntity_Type["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6169
+ MessageEntity_Type[MessageEntity_Type["MENTION"] = 1] = "MENTION";
6170
+ MessageEntity_Type[MessageEntity_Type["URL"] = 2] = "URL";
6171
+ MessageEntity_Type[MessageEntity_Type["TEXT_URL"] = 3] = "TEXT_URL";
6172
+ MessageEntity_Type[MessageEntity_Type["EMAIL"] = 4] = "EMAIL";
6173
+ MessageEntity_Type[MessageEntity_Type["BOLD"] = 5] = "BOLD";
6174
+ MessageEntity_Type[MessageEntity_Type["ITALIC"] = 6] = "ITALIC";
6175
+ MessageEntity_Type[MessageEntity_Type["USERNAME_MENTION"] = 7] = "USERNAME_MENTION";
6176
+ MessageEntity_Type[MessageEntity_Type["CODE"] = 8] = "CODE";
6177
+ MessageEntity_Type[MessageEntity_Type["PRE"] = 9] = "PRE";
6178
+ MessageEntity_Type[MessageEntity_Type["PHONE_NUMBER"] = 10] = "PHONE_NUMBER";
6179
+ MessageEntity_Type[MessageEntity_Type["THREAD"] = 11] = "THREAD";
6180
+ MessageEntity_Type[MessageEntity_Type["THREAD_TITLE"] = 12] = "THREAD_TITLE";
6181
+ MessageEntity_Type[MessageEntity_Type["BOT_COMMAND"] = 13] = "BOT_COMMAND";
6182
+ MessageEntity_Type[MessageEntity_Type["GROUP_MENTION"] = 14] = "GROUP_MENTION";
6183
+ MessageEntity_Type[MessageEntity_Type["UNDERLINE"] = 15] = "UNDERLINE";
6184
+ MessageEntity_Type[MessageEntity_Type["STRIKETHROUGH"] = 16] = "STRIKETHROUGH";
6185
+ MessageEntity_Type[MessageEntity_Type["HIGHLIGHT"] = 17] = "HIGHLIGHT";
6186
+ MessageEntity_Type[MessageEntity_Type["MATH"] = 18] = "MATH";
6144
6187
  })(MessageEntity_Type || (MessageEntity_Type = {}));
6145
6188
  var Member_Role;
6146
- (function(Member_Role2) {
6147
- Member_Role2[Member_Role2["OWNER"] = 0] = "OWNER";
6148
- Member_Role2[Member_Role2["ADMIN"] = 1] = "ADMIN";
6149
- Member_Role2[Member_Role2["MEMBER"] = 2] = "MEMBER";
6189
+ (function(Member_Role) {
6190
+ Member_Role[Member_Role["OWNER"] = 0] = "OWNER";
6191
+ Member_Role[Member_Role["ADMIN"] = 1] = "ADMIN";
6192
+ Member_Role[Member_Role["MEMBER"] = 2] = "MEMBER";
6150
6193
  })(Member_Role || (Member_Role = {}));
6151
6194
  var UrlPreview_MediaType;
6152
- (function(UrlPreview_MediaType2) {
6153
- UrlPreview_MediaType2[UrlPreview_MediaType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6154
- UrlPreview_MediaType2[UrlPreview_MediaType2["ARTICLE"] = 1] = "ARTICLE";
6155
- UrlPreview_MediaType2[UrlPreview_MediaType2["IMAGE"] = 2] = "IMAGE";
6156
- UrlPreview_MediaType2[UrlPreview_MediaType2["VIDEO"] = 3] = "VIDEO";
6157
- UrlPreview_MediaType2[UrlPreview_MediaType2["DOCUMENT"] = 4] = "DOCUMENT";
6158
- UrlPreview_MediaType2[UrlPreview_MediaType2["EMBED"] = 5] = "EMBED";
6195
+ (function(UrlPreview_MediaType) {
6196
+ UrlPreview_MediaType[UrlPreview_MediaType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6197
+ UrlPreview_MediaType[UrlPreview_MediaType["ARTICLE"] = 1] = "ARTICLE";
6198
+ UrlPreview_MediaType[UrlPreview_MediaType["IMAGE"] = 2] = "IMAGE";
6199
+ UrlPreview_MediaType[UrlPreview_MediaType["VIDEO"] = 3] = "VIDEO";
6200
+ UrlPreview_MediaType[UrlPreview_MediaType["DOCUMENT"] = 4] = "DOCUMENT";
6201
+ UrlPreview_MediaType[UrlPreview_MediaType["EMBED"] = 5] = "EMBED";
6159
6202
  })(UrlPreview_MediaType || (UrlPreview_MediaType = {}));
6160
6203
  var MessageAttachmentExternalTask_Status;
6161
- (function(MessageAttachmentExternalTask_Status2) {
6162
- MessageAttachmentExternalTask_Status2[MessageAttachmentExternalTask_Status2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6163
- MessageAttachmentExternalTask_Status2[MessageAttachmentExternalTask_Status2["BACKLOG"] = 1] = "BACKLOG";
6164
- MessageAttachmentExternalTask_Status2[MessageAttachmentExternalTask_Status2["TODO"] = 2] = "TODO";
6165
- MessageAttachmentExternalTask_Status2[MessageAttachmentExternalTask_Status2["IN_PROGRESS"] = 3] = "IN_PROGRESS";
6166
- MessageAttachmentExternalTask_Status2[MessageAttachmentExternalTask_Status2["DONE"] = 4] = "DONE";
6167
- MessageAttachmentExternalTask_Status2[MessageAttachmentExternalTask_Status2["CANCELLED"] = 5] = "CANCELLED";
6204
+ (function(MessageAttachmentExternalTask_Status) {
6205
+ MessageAttachmentExternalTask_Status[MessageAttachmentExternalTask_Status["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6206
+ MessageAttachmentExternalTask_Status[MessageAttachmentExternalTask_Status["BACKLOG"] = 1] = "BACKLOG";
6207
+ MessageAttachmentExternalTask_Status[MessageAttachmentExternalTask_Status["TODO"] = 2] = "TODO";
6208
+ MessageAttachmentExternalTask_Status[MessageAttachmentExternalTask_Status["IN_PROGRESS"] = 3] = "IN_PROGRESS";
6209
+ MessageAttachmentExternalTask_Status[MessageAttachmentExternalTask_Status["DONE"] = 4] = "DONE";
6210
+ MessageAttachmentExternalTask_Status[MessageAttachmentExternalTask_Status["CANCELLED"] = 5] = "CANCELLED";
6168
6211
  })(MessageAttachmentExternalTask_Status || (MessageAttachmentExternalTask_Status = {}));
6169
6212
  var Photo_Format;
6170
- (function(Photo_Format2) {
6171
- Photo_Format2[Photo_Format2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6172
- Photo_Format2[Photo_Format2["JPEG"] = 1] = "JPEG";
6173
- Photo_Format2[Photo_Format2["PNG"] = 2] = "PNG";
6213
+ (function(Photo_Format) {
6214
+ Photo_Format[Photo_Format["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6215
+ Photo_Format[Photo_Format["JPEG"] = 1] = "JPEG";
6216
+ Photo_Format[Photo_Format["PNG"] = 2] = "PNG";
6174
6217
  })(Photo_Format || (Photo_Format = {}));
6175
6218
  var RpcError_Code;
6176
- (function(RpcError_Code2) {
6177
- RpcError_Code2[RpcError_Code2["UNKNOWN"] = 0] = "UNKNOWN";
6178
- RpcError_Code2[RpcError_Code2["BAD_REQUEST"] = 1] = "BAD_REQUEST";
6179
- RpcError_Code2[RpcError_Code2["UNAUTHENTICATED"] = 2] = "UNAUTHENTICATED";
6180
- RpcError_Code2[RpcError_Code2["RATE_LIMIT"] = 3] = "RATE_LIMIT";
6181
- RpcError_Code2[RpcError_Code2["INTERNAL_ERROR"] = 4] = "INTERNAL_ERROR";
6182
- RpcError_Code2[RpcError_Code2["PEER_ID_INVALID"] = 5] = "PEER_ID_INVALID";
6183
- RpcError_Code2[RpcError_Code2["MESSAGE_ID_INVALID"] = 6] = "MESSAGE_ID_INVALID";
6184
- RpcError_Code2[RpcError_Code2["USER_ID_INVALID"] = 7] = "USER_ID_INVALID";
6185
- RpcError_Code2[RpcError_Code2["USER_ALREADY_MEMBER"] = 8] = "USER_ALREADY_MEMBER";
6186
- RpcError_Code2[RpcError_Code2["SPACE_ID_INVALID"] = 9] = "SPACE_ID_INVALID";
6187
- RpcError_Code2[RpcError_Code2["CHAT_ID_INVALID"] = 10] = "CHAT_ID_INVALID";
6188
- RpcError_Code2[RpcError_Code2["EMAIL_INVALID"] = 11] = "EMAIL_INVALID";
6189
- RpcError_Code2[RpcError_Code2["PHONE_NUMBER_INVALID"] = 12] = "PHONE_NUMBER_INVALID";
6190
- RpcError_Code2[RpcError_Code2["SPACE_ADMIN_REQUIRED"] = 13] = "SPACE_ADMIN_REQUIRED";
6191
- RpcError_Code2[RpcError_Code2["SPACE_OWNER_REQUIRED"] = 14] = "SPACE_OWNER_REQUIRED";
6192
- RpcError_Code2[RpcError_Code2["USERNAME_INVALID"] = 15] = "USERNAME_INVALID";
6193
- RpcError_Code2[RpcError_Code2["USERNAME_TAKEN"] = 16] = "USERNAME_TAKEN";
6194
- RpcError_Code2[RpcError_Code2["FIRST_NAME_INVALID"] = 17] = "FIRST_NAME_INVALID";
6195
- RpcError_Code2[RpcError_Code2["URL_PREVIEW_UNAVAILABLE"] = 18] = "URL_PREVIEW_UNAVAILABLE";
6196
- RpcError_Code2[RpcError_Code2["AGENT_SESSION_MESSAGE_IMMUTABLE"] = 19] = "AGENT_SESSION_MESSAGE_IMMUTABLE";
6197
- RpcError_Code2[RpcError_Code2["SPACE_INVITE_INVALID"] = 20] = "SPACE_INVITE_INVALID";
6219
+ (function(RpcError_Code) {
6220
+ RpcError_Code[RpcError_Code["UNKNOWN"] = 0] = "UNKNOWN";
6221
+ RpcError_Code[RpcError_Code["BAD_REQUEST"] = 1] = "BAD_REQUEST";
6222
+ RpcError_Code[RpcError_Code["UNAUTHENTICATED"] = 2] = "UNAUTHENTICATED";
6223
+ RpcError_Code[RpcError_Code["RATE_LIMIT"] = 3] = "RATE_LIMIT";
6224
+ RpcError_Code[RpcError_Code["INTERNAL_ERROR"] = 4] = "INTERNAL_ERROR";
6225
+ RpcError_Code[RpcError_Code["PEER_ID_INVALID"] = 5] = "PEER_ID_INVALID";
6226
+ RpcError_Code[RpcError_Code["MESSAGE_ID_INVALID"] = 6] = "MESSAGE_ID_INVALID";
6227
+ RpcError_Code[RpcError_Code["USER_ID_INVALID"] = 7] = "USER_ID_INVALID";
6228
+ RpcError_Code[RpcError_Code["USER_ALREADY_MEMBER"] = 8] = "USER_ALREADY_MEMBER";
6229
+ RpcError_Code[RpcError_Code["SPACE_ID_INVALID"] = 9] = "SPACE_ID_INVALID";
6230
+ RpcError_Code[RpcError_Code["CHAT_ID_INVALID"] = 10] = "CHAT_ID_INVALID";
6231
+ RpcError_Code[RpcError_Code["EMAIL_INVALID"] = 11] = "EMAIL_INVALID";
6232
+ RpcError_Code[RpcError_Code["PHONE_NUMBER_INVALID"] = 12] = "PHONE_NUMBER_INVALID";
6233
+ RpcError_Code[RpcError_Code["SPACE_ADMIN_REQUIRED"] = 13] = "SPACE_ADMIN_REQUIRED";
6234
+ RpcError_Code[RpcError_Code["SPACE_OWNER_REQUIRED"] = 14] = "SPACE_OWNER_REQUIRED";
6235
+ RpcError_Code[RpcError_Code["USERNAME_INVALID"] = 15] = "USERNAME_INVALID";
6236
+ RpcError_Code[RpcError_Code["USERNAME_TAKEN"] = 16] = "USERNAME_TAKEN";
6237
+ RpcError_Code[RpcError_Code["FIRST_NAME_INVALID"] = 17] = "FIRST_NAME_INVALID";
6238
+ RpcError_Code[RpcError_Code["URL_PREVIEW_UNAVAILABLE"] = 18] = "URL_PREVIEW_UNAVAILABLE";
6239
+ RpcError_Code[RpcError_Code["AGENT_SESSION_MESSAGE_IMMUTABLE"] = 19] = "AGENT_SESSION_MESSAGE_IMMUTABLE";
6240
+ RpcError_Code[RpcError_Code["SPACE_INVITE_INVALID"] = 20] = "SPACE_INVITE_INVALID";
6198
6241
  })(RpcError_Code || (RpcError_Code = {}));
6199
6242
  var SyncSkippedSequence_Reason;
6200
- (function(SyncSkippedSequence_Reason2) {
6201
- SyncSkippedSequence_Reason2[SyncSkippedSequence_Reason2["REASON_UNSPECIFIED"] = 0] = "REASON_UNSPECIFIED";
6202
- SyncSkippedSequence_Reason2[SyncSkippedSequence_Reason2["IRRELEVANT_TO_BUCKET"] = 1] = "IRRELEVANT_TO_BUCKET";
6203
- SyncSkippedSequence_Reason2[SyncSkippedSequence_Reason2["SNAPSHOT_REPAIR_REQUIRED"] = 2] = "SNAPSHOT_REPAIR_REQUIRED";
6243
+ (function(SyncSkippedSequence_Reason) {
6244
+ SyncSkippedSequence_Reason[SyncSkippedSequence_Reason["REASON_UNSPECIFIED"] = 0] = "REASON_UNSPECIFIED";
6245
+ SyncSkippedSequence_Reason[SyncSkippedSequence_Reason["IRRELEVANT_TO_BUCKET"] = 1] = "IRRELEVANT_TO_BUCKET";
6246
+ SyncSkippedSequence_Reason[SyncSkippedSequence_Reason["SNAPSHOT_REPAIR_REQUIRED"] = 2] = "SNAPSHOT_REPAIR_REQUIRED";
6204
6247
  })(SyncSkippedSequence_Reason || (SyncSkippedSequence_Reason = {}));
6205
6248
  var GetUpdatesResult_ResultType;
6206
- (function(GetUpdatesResult_ResultType2) {
6207
- GetUpdatesResult_ResultType2[GetUpdatesResult_ResultType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6208
- GetUpdatesResult_ResultType2[GetUpdatesResult_ResultType2["EMPTY"] = 1] = "EMPTY";
6209
- GetUpdatesResult_ResultType2[GetUpdatesResult_ResultType2["SLICE"] = 2] = "SLICE";
6210
- GetUpdatesResult_ResultType2[GetUpdatesResult_ResultType2["TOO_LONG"] = 3] = "TOO_LONG";
6249
+ (function(GetUpdatesResult_ResultType) {
6250
+ GetUpdatesResult_ResultType[GetUpdatesResult_ResultType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6251
+ GetUpdatesResult_ResultType[GetUpdatesResult_ResultType["EMPTY"] = 1] = "EMPTY";
6252
+ GetUpdatesResult_ResultType[GetUpdatesResult_ResultType["SLICE"] = 2] = "SLICE";
6253
+ GetUpdatesResult_ResultType[GetUpdatesResult_ResultType["TOO_LONG"] = 3] = "TOO_LONG";
6211
6254
  })(GetUpdatesResult_ResultType || (GetUpdatesResult_ResultType = {}));
6212
6255
  var NotificationSettings_Mode;
6213
- (function(NotificationSettings_Mode2) {
6214
- NotificationSettings_Mode2[NotificationSettings_Mode2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6215
- NotificationSettings_Mode2[NotificationSettings_Mode2["ALL"] = 1] = "ALL";
6216
- NotificationSettings_Mode2[NotificationSettings_Mode2["NONE"] = 2] = "NONE";
6217
- NotificationSettings_Mode2[NotificationSettings_Mode2["MENTIONS"] = 3] = "MENTIONS";
6218
- NotificationSettings_Mode2[NotificationSettings_Mode2["IMPORTANT_ONLY"] = 4] = "IMPORTANT_ONLY";
6219
- NotificationSettings_Mode2[NotificationSettings_Mode2["ONLY_MENTIONS"] = 5] = "ONLY_MENTIONS";
6256
+ (function(NotificationSettings_Mode) {
6257
+ NotificationSettings_Mode[NotificationSettings_Mode["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6258
+ NotificationSettings_Mode[NotificationSettings_Mode["ALL"] = 1] = "ALL";
6259
+ NotificationSettings_Mode[NotificationSettings_Mode["NONE"] = 2] = "NONE";
6260
+ NotificationSettings_Mode[NotificationSettings_Mode["MENTIONS"] = 3] = "MENTIONS";
6261
+ NotificationSettings_Mode[NotificationSettings_Mode["IMPORTANT_ONLY"] = 4] = "IMPORTANT_ONLY";
6262
+ NotificationSettings_Mode[NotificationSettings_Mode["ONLY_MENTIONS"] = 5] = "ONLY_MENTIONS";
6220
6263
  })(NotificationSettings_Mode || (NotificationSettings_Mode = {}));
6221
6264
  var DialogNotificationSettings_Mode;
6222
- (function(DialogNotificationSettings_Mode2) {
6223
- DialogNotificationSettings_Mode2[DialogNotificationSettings_Mode2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6224
- DialogNotificationSettings_Mode2[DialogNotificationSettings_Mode2["ALL"] = 1] = "ALL";
6225
- DialogNotificationSettings_Mode2[DialogNotificationSettings_Mode2["MENTIONS"] = 2] = "MENTIONS";
6226
- DialogNotificationSettings_Mode2[DialogNotificationSettings_Mode2["NONE"] = 3] = "NONE";
6265
+ (function(DialogNotificationSettings_Mode) {
6266
+ DialogNotificationSettings_Mode[DialogNotificationSettings_Mode["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6267
+ DialogNotificationSettings_Mode[DialogNotificationSettings_Mode["ALL"] = 1] = "ALL";
6268
+ DialogNotificationSettings_Mode[DialogNotificationSettings_Mode["MENTIONS"] = 2] = "MENTIONS";
6269
+ DialogNotificationSettings_Mode[DialogNotificationSettings_Mode["NONE"] = 3] = "NONE";
6227
6270
  })(DialogNotificationSettings_Mode || (DialogNotificationSettings_Mode = {}));
6228
6271
  var PushContentEncryptionKey_Algorithm;
6229
- (function(PushContentEncryptionKey_Algorithm2) {
6230
- PushContentEncryptionKey_Algorithm2[PushContentEncryptionKey_Algorithm2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6231
- PushContentEncryptionKey_Algorithm2[PushContentEncryptionKey_Algorithm2["X25519_HKDF_SHA256_AES256_GCM"] = 1] = "X25519_HKDF_SHA256_AES256_GCM";
6272
+ (function(PushContentEncryptionKey_Algorithm) {
6273
+ PushContentEncryptionKey_Algorithm[PushContentEncryptionKey_Algorithm["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6274
+ PushContentEncryptionKey_Algorithm[PushContentEncryptionKey_Algorithm["X25519_HKDF_SHA256_AES256_GCM"] = 1] = "X25519_HKDF_SHA256_AES256_GCM";
6232
6275
  })(PushContentEncryptionKey_Algorithm || (PushContentEncryptionKey_Algorithm = {}));
6233
6276
  var GetChatTranscriptInput_Mode;
6234
- (function(GetChatTranscriptInput_Mode2) {
6235
- GetChatTranscriptInput_Mode2[GetChatTranscriptInput_Mode2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6236
- GetChatTranscriptInput_Mode2[GetChatTranscriptInput_Mode2["HUMAN_READABLE"] = 1] = "HUMAN_READABLE";
6277
+ (function(GetChatTranscriptInput_Mode) {
6278
+ GetChatTranscriptInput_Mode[GetChatTranscriptInput_Mode["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6279
+ GetChatTranscriptInput_Mode[GetChatTranscriptInput_Mode["HUMAN_READABLE"] = 1] = "HUMAN_READABLE";
6237
6280
  })(GetChatTranscriptInput_Mode || (GetChatTranscriptInput_Mode = {}));
6238
6281
  var GetChatTranscriptInput_Length;
6239
- (function(GetChatTranscriptInput_Length2) {
6240
- GetChatTranscriptInput_Length2[GetChatTranscriptInput_Length2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6241
- GetChatTranscriptInput_Length2[GetChatTranscriptInput_Length2["CONCISE"] = 1] = "CONCISE";
6282
+ (function(GetChatTranscriptInput_Length) {
6283
+ GetChatTranscriptInput_Length[GetChatTranscriptInput_Length["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6284
+ GetChatTranscriptInput_Length[GetChatTranscriptInput_Length["CONCISE"] = 1] = "CONCISE";
6242
6285
  })(GetChatTranscriptInput_Length || (GetChatTranscriptInput_Length = {}));
6243
6286
  var GetChatTranscriptInput_Media;
6244
- (function(GetChatTranscriptInput_Media2) {
6245
- GetChatTranscriptInput_Media2[GetChatTranscriptInput_Media2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6246
- GetChatTranscriptInput_Media2[GetChatTranscriptInput_Media2["INCLUDED"] = 1] = "INCLUDED";
6247
- GetChatTranscriptInput_Media2[GetChatTranscriptInput_Media2["EXCLUDED"] = 2] = "EXCLUDED";
6287
+ (function(GetChatTranscriptInput_Media) {
6288
+ GetChatTranscriptInput_Media[GetChatTranscriptInput_Media["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6289
+ GetChatTranscriptInput_Media[GetChatTranscriptInput_Media["INCLUDED"] = 1] = "INCLUDED";
6290
+ GetChatTranscriptInput_Media[GetChatTranscriptInput_Media["EXCLUDED"] = 2] = "EXCLUDED";
6248
6291
  })(GetChatTranscriptInput_Media || (GetChatTranscriptInput_Media = {}));
6249
6292
  var GetChatTranscriptResult_StopReason;
6250
- (function(GetChatTranscriptResult_StopReason2) {
6251
- GetChatTranscriptResult_StopReason2[GetChatTranscriptResult_StopReason2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6252
- GetChatTranscriptResult_StopReason2[GetChatTranscriptResult_StopReason2["COMPLETE"] = 1] = "COMPLETE";
6253
- GetChatTranscriptResult_StopReason2[GetChatTranscriptResult_StopReason2["MESSAGE_LIMIT"] = 2] = "MESSAGE_LIMIT";
6254
- GetChatTranscriptResult_StopReason2[GetChatTranscriptResult_StopReason2["OUTPUT_LIMIT"] = 3] = "OUTPUT_LIMIT";
6293
+ (function(GetChatTranscriptResult_StopReason) {
6294
+ GetChatTranscriptResult_StopReason[GetChatTranscriptResult_StopReason["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6295
+ GetChatTranscriptResult_StopReason[GetChatTranscriptResult_StopReason["COMPLETE"] = 1] = "COMPLETE";
6296
+ GetChatTranscriptResult_StopReason[GetChatTranscriptResult_StopReason["MESSAGE_LIMIT"] = 2] = "MESSAGE_LIMIT";
6297
+ GetChatTranscriptResult_StopReason[GetChatTranscriptResult_StopReason["OUTPUT_LIMIT"] = 3] = "OUTPUT_LIMIT";
6255
6298
  })(GetChatTranscriptResult_StopReason || (GetChatTranscriptResult_StopReason = {}));
6256
6299
  var UpdateNewMessageNotification_Reason;
6257
- (function(UpdateNewMessageNotification_Reason2) {
6258
- UpdateNewMessageNotification_Reason2[UpdateNewMessageNotification_Reason2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6259
- UpdateNewMessageNotification_Reason2[UpdateNewMessageNotification_Reason2["MENTION"] = 1] = "MENTION";
6260
- UpdateNewMessageNotification_Reason2[UpdateNewMessageNotification_Reason2["IMPORTANT"] = 2] = "IMPORTANT";
6300
+ (function(UpdateNewMessageNotification_Reason) {
6301
+ UpdateNewMessageNotification_Reason[UpdateNewMessageNotification_Reason["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6302
+ UpdateNewMessageNotification_Reason[UpdateNewMessageNotification_Reason["MENTION"] = 1] = "MENTION";
6303
+ UpdateNewMessageNotification_Reason[UpdateNewMessageNotification_Reason["IMPORTANT"] = 2] = "IMPORTANT";
6261
6304
  })(UpdateNewMessageNotification_Reason || (UpdateNewMessageNotification_Reason = {}));
6262
6305
  var UpdateComposeAction_ComposeAction;
6263
- (function(UpdateComposeAction_ComposeAction2) {
6264
- UpdateComposeAction_ComposeAction2[UpdateComposeAction_ComposeAction2["NONE"] = 0] = "NONE";
6265
- UpdateComposeAction_ComposeAction2[UpdateComposeAction_ComposeAction2["TYPING"] = 1] = "TYPING";
6266
- UpdateComposeAction_ComposeAction2[UpdateComposeAction_ComposeAction2["UPLOADING_PHOTO"] = 2] = "UPLOADING_PHOTO";
6267
- UpdateComposeAction_ComposeAction2[UpdateComposeAction_ComposeAction2["UPLOADING_DOCUMENT"] = 3] = "UPLOADING_DOCUMENT";
6268
- UpdateComposeAction_ComposeAction2[UpdateComposeAction_ComposeAction2["UPLOADING_VIDEO"] = 4] = "UPLOADING_VIDEO";
6269
- UpdateComposeAction_ComposeAction2[UpdateComposeAction_ComposeAction2["RECORDING_VOICE"] = 5] = "RECORDING_VOICE";
6270
- UpdateComposeAction_ComposeAction2[UpdateComposeAction_ComposeAction2["WORKING"] = 6] = "WORKING";
6306
+ (function(UpdateComposeAction_ComposeAction) {
6307
+ UpdateComposeAction_ComposeAction[UpdateComposeAction_ComposeAction["NONE"] = 0] = "NONE";
6308
+ UpdateComposeAction_ComposeAction[UpdateComposeAction_ComposeAction["TYPING"] = 1] = "TYPING";
6309
+ UpdateComposeAction_ComposeAction[UpdateComposeAction_ComposeAction["UPLOADING_PHOTO"] = 2] = "UPLOADING_PHOTO";
6310
+ UpdateComposeAction_ComposeAction[UpdateComposeAction_ComposeAction["UPLOADING_DOCUMENT"] = 3] = "UPLOADING_DOCUMENT";
6311
+ UpdateComposeAction_ComposeAction[UpdateComposeAction_ComposeAction["UPLOADING_VIDEO"] = 4] = "UPLOADING_VIDEO";
6312
+ UpdateComposeAction_ComposeAction[UpdateComposeAction_ComposeAction["RECORDING_VOICE"] = 5] = "RECORDING_VOICE";
6313
+ UpdateComposeAction_ComposeAction[UpdateComposeAction_ComposeAction["WORKING"] = 6] = "WORKING";
6271
6314
  })(UpdateComposeAction_ComposeAction || (UpdateComposeAction_ComposeAction = {}));
6272
6315
  var UserStatus_Status;
6273
- (function(UserStatus_Status2) {
6274
- UserStatus_Status2[UserStatus_Status2["UNKNOWN"] = 0] = "UNKNOWN";
6275
- UserStatus_Status2[UserStatus_Status2["ONLINE"] = 1] = "ONLINE";
6276
- UserStatus_Status2[UserStatus_Status2["OFFLINE"] = 2] = "OFFLINE";
6316
+ (function(UserStatus_Status) {
6317
+ UserStatus_Status[UserStatus_Status["UNKNOWN"] = 0] = "UNKNOWN";
6318
+ UserStatus_Status[UserStatus_Status["ONLINE"] = 1] = "ONLINE";
6319
+ UserStatus_Status[UserStatus_Status["OFFLINE"] = 2] = "OFFLINE";
6277
6320
  })(UserStatus_Status || (UserStatus_Status = {}));
6278
6321
  var BotCapability_Kind;
6279
- (function(BotCapability_Kind2) {
6280
- BotCapability_Kind2[BotCapability_Kind2["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6281
- BotCapability_Kind2[BotCapability_Kind2["CHAT_SETTINGS"] = 1] = "CHAT_SETTINGS";
6282
- BotCapability_Kind2[BotCapability_Kind2["AGENT_CONFIGURATION"] = 2] = "AGENT_CONFIGURATION";
6322
+ (function(BotCapability_Kind) {
6323
+ BotCapability_Kind[BotCapability_Kind["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6324
+ BotCapability_Kind[BotCapability_Kind["CHAT_SETTINGS"] = 1] = "CHAT_SETTINGS";
6325
+ BotCapability_Kind[BotCapability_Kind["AGENT_CONFIGURATION"] = 2] = "AGENT_CONFIGURATION";
6283
6326
  })(BotCapability_Kind || (BotCapability_Kind = {}));
6284
6327
  var BotChatSettingsInfo_Tone;
6285
- (function(BotChatSettingsInfo_Tone2) {
6286
- BotChatSettingsInfo_Tone2[BotChatSettingsInfo_Tone2["TONE_UNSPECIFIED"] = 0] = "TONE_UNSPECIFIED";
6287
- BotChatSettingsInfo_Tone2[BotChatSettingsInfo_Tone2["NEUTRAL"] = 1] = "NEUTRAL";
6288
- BotChatSettingsInfo_Tone2[BotChatSettingsInfo_Tone2["SUCCESS"] = 2] = "SUCCESS";
6289
- BotChatSettingsInfo_Tone2[BotChatSettingsInfo_Tone2["WARNING"] = 3] = "WARNING";
6290
- BotChatSettingsInfo_Tone2[BotChatSettingsInfo_Tone2["ERROR"] = 4] = "ERROR";
6328
+ (function(BotChatSettingsInfo_Tone) {
6329
+ BotChatSettingsInfo_Tone[BotChatSettingsInfo_Tone["TONE_UNSPECIFIED"] = 0] = "TONE_UNSPECIFIED";
6330
+ BotChatSettingsInfo_Tone[BotChatSettingsInfo_Tone["NEUTRAL"] = 1] = "NEUTRAL";
6331
+ BotChatSettingsInfo_Tone[BotChatSettingsInfo_Tone["SUCCESS"] = 2] = "SUCCESS";
6332
+ BotChatSettingsInfo_Tone[BotChatSettingsInfo_Tone["WARNING"] = 3] = "WARNING";
6333
+ BotChatSettingsInfo_Tone[BotChatSettingsInfo_Tone["ERROR"] = 4] = "ERROR";
6291
6334
  })(BotChatSettingsInfo_Tone || (BotChatSettingsInfo_Tone = {}));
6292
6335
  var BotChatSettingsProblem_Code;
6293
- (function(BotChatSettingsProblem_Code2) {
6294
- BotChatSettingsProblem_Code2[BotChatSettingsProblem_Code2["CODE_UNSPECIFIED"] = 0] = "CODE_UNSPECIFIED";
6295
- BotChatSettingsProblem_Code2[BotChatSettingsProblem_Code2["UNAVAILABLE"] = 1] = "UNAVAILABLE";
6296
- BotChatSettingsProblem_Code2[BotChatSettingsProblem_Code2["INVALID_VALUE"] = 2] = "INVALID_VALUE";
6297
- BotChatSettingsProblem_Code2[BotChatSettingsProblem_Code2["STALE"] = 3] = "STALE";
6298
- BotChatSettingsProblem_Code2[BotChatSettingsProblem_Code2["FAILED"] = 4] = "FAILED";
6299
- BotChatSettingsProblem_Code2[BotChatSettingsProblem_Code2["UNREACHABLE"] = 5] = "UNREACHABLE";
6336
+ (function(BotChatSettingsProblem_Code) {
6337
+ BotChatSettingsProblem_Code[BotChatSettingsProblem_Code["CODE_UNSPECIFIED"] = 0] = "CODE_UNSPECIFIED";
6338
+ BotChatSettingsProblem_Code[BotChatSettingsProblem_Code["UNAVAILABLE"] = 1] = "UNAVAILABLE";
6339
+ BotChatSettingsProblem_Code[BotChatSettingsProblem_Code["INVALID_VALUE"] = 2] = "INVALID_VALUE";
6340
+ BotChatSettingsProblem_Code[BotChatSettingsProblem_Code["STALE"] = 3] = "STALE";
6341
+ BotChatSettingsProblem_Code[BotChatSettingsProblem_Code["FAILED"] = 4] = "FAILED";
6342
+ BotChatSettingsProblem_Code[BotChatSettingsProblem_Code["UNREACHABLE"] = 5] = "UNREACHABLE";
6300
6343
  })(BotChatSettingsProblem_Code || (BotChatSettingsProblem_Code = {}));
6301
6344
  var AuthBeginResult_Delivery;
6302
- (function(AuthBeginResult_Delivery2) {
6303
- AuthBeginResult_Delivery2[AuthBeginResult_Delivery2["DELIVERY_UNSPECIFIED"] = 0] = "DELIVERY_UNSPECIFIED";
6304
- AuthBeginResult_Delivery2[AuthBeginResult_Delivery2["EMAIL"] = 1] = "EMAIL";
6305
- AuthBeginResult_Delivery2[AuthBeginResult_Delivery2["SMS"] = 2] = "SMS";
6345
+ (function(AuthBeginResult_Delivery) {
6346
+ AuthBeginResult_Delivery[AuthBeginResult_Delivery["DELIVERY_UNSPECIFIED"] = 0] = "DELIVERY_UNSPECIFIED";
6347
+ AuthBeginResult_Delivery[AuthBeginResult_Delivery["EMAIL"] = 1] = "EMAIL";
6348
+ AuthBeginResult_Delivery[AuthBeginResult_Delivery["SMS"] = 2] = "SMS";
6306
6349
  })(AuthBeginResult_Delivery || (AuthBeginResult_Delivery = {}));
6307
6350
  var UploadFailure_Code;
6308
- (function(UploadFailure_Code2) {
6309
- UploadFailure_Code2[UploadFailure_Code2["UPLOAD_FAILURE_CODE_UNSPECIFIED"] = 0] = "UPLOAD_FAILURE_CODE_UNSPECIFIED";
6310
- UploadFailure_Code2[UploadFailure_Code2["UPLOAD_FAILURE_INTEGRITY"] = 1] = "UPLOAD_FAILURE_INTEGRITY";
6311
- UploadFailure_Code2[UploadFailure_Code2["UPLOAD_FAILURE_INVALID_MEDIA"] = 2] = "UPLOAD_FAILURE_INVALID_MEDIA";
6312
- UploadFailure_Code2[UploadFailure_Code2["UPLOAD_FAILURE_PROCESSING"] = 3] = "UPLOAD_FAILURE_PROCESSING";
6313
- UploadFailure_Code2[UploadFailure_Code2["UPLOAD_FAILURE_STORAGE"] = 4] = "UPLOAD_FAILURE_STORAGE";
6351
+ (function(UploadFailure_Code) {
6352
+ UploadFailure_Code[UploadFailure_Code["UPLOAD_FAILURE_CODE_UNSPECIFIED"] = 0] = "UPLOAD_FAILURE_CODE_UNSPECIFIED";
6353
+ UploadFailure_Code[UploadFailure_Code["UPLOAD_FAILURE_INTEGRITY"] = 1] = "UPLOAD_FAILURE_INTEGRITY";
6354
+ UploadFailure_Code[UploadFailure_Code["UPLOAD_FAILURE_INVALID_MEDIA"] = 2] = "UPLOAD_FAILURE_INVALID_MEDIA";
6355
+ UploadFailure_Code[UploadFailure_Code["UPLOAD_FAILURE_PROCESSING"] = 3] = "UPLOAD_FAILURE_PROCESSING";
6356
+ UploadFailure_Code[UploadFailure_Code["UPLOAD_FAILURE_STORAGE"] = 4] = "UPLOAD_FAILURE_STORAGE";
6314
6357
  })(UploadFailure_Code || (UploadFailure_Code = {}));
6315
6358
  var RequestBotFilesystemInput_Operation;
6316
- (function(RequestBotFilesystemInput_Operation2) {
6317
- RequestBotFilesystemInput_Operation2[RequestBotFilesystemInput_Operation2["OPERATION_UNSPECIFIED"] = 0] = "OPERATION_UNSPECIFIED";
6318
- RequestBotFilesystemInput_Operation2[RequestBotFilesystemInput_Operation2["LIST"] = 1] = "LIST";
6319
- RequestBotFilesystemInput_Operation2[RequestBotFilesystemInput_Operation2["REGISTER_FOLDER"] = 2] = "REGISTER_FOLDER";
6359
+ (function(RequestBotFilesystemInput_Operation) {
6360
+ RequestBotFilesystemInput_Operation[RequestBotFilesystemInput_Operation["OPERATION_UNSPECIFIED"] = 0] = "OPERATION_UNSPECIFIED";
6361
+ RequestBotFilesystemInput_Operation[RequestBotFilesystemInput_Operation["LIST"] = 1] = "LIST";
6362
+ RequestBotFilesystemInput_Operation[RequestBotFilesystemInput_Operation["REGISTER_FOLDER"] = 2] = "REGISTER_FOLDER";
6320
6363
  })(RequestBotFilesystemInput_Operation || (RequestBotFilesystemInput_Operation = {}));
6321
6364
  var BotFilesystemEntry_Kind;
6322
- (function(BotFilesystemEntry_Kind2) {
6323
- BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6324
- BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["FILE"] = 1] = "FILE";
6325
- BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["DIRECTORY"] = 2] = "DIRECTORY";
6326
- BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["SYMLINK"] = 3] = "SYMLINK";
6327
- BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["OTHER"] = 4] = "OTHER";
6365
+ (function(BotFilesystemEntry_Kind) {
6366
+ BotFilesystemEntry_Kind[BotFilesystemEntry_Kind["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
6367
+ BotFilesystemEntry_Kind[BotFilesystemEntry_Kind["FILE"] = 1] = "FILE";
6368
+ BotFilesystemEntry_Kind[BotFilesystemEntry_Kind["DIRECTORY"] = 2] = "DIRECTORY";
6369
+ BotFilesystemEntry_Kind[BotFilesystemEntry_Kind["SYMLINK"] = 3] = "SYMLINK";
6370
+ BotFilesystemEntry_Kind[BotFilesystemEntry_Kind["OTHER"] = 4] = "OTHER";
6328
6371
  })(BotFilesystemEntry_Kind || (BotFilesystemEntry_Kind = {}));
6329
6372
  var DialogFollowMode;
6330
- (function(DialogFollowMode2) {
6331
- DialogFollowMode2[DialogFollowMode2["DIALOG_FOLLOW_MODE_UNSPECIFIED"] = 0] = "DIALOG_FOLLOW_MODE_UNSPECIFIED";
6332
- DialogFollowMode2[DialogFollowMode2["FOLLOWING"] = 1] = "FOLLOWING";
6333
- DialogFollowMode2[DialogFollowMode2["UNFOLLOWED"] = 2] = "UNFOLLOWED";
6373
+ (function(DialogFollowMode) {
6374
+ DialogFollowMode[DialogFollowMode["DIALOG_FOLLOW_MODE_UNSPECIFIED"] = 0] = "DIALOG_FOLLOW_MODE_UNSPECIFIED";
6375
+ DialogFollowMode[DialogFollowMode["FOLLOWING"] = 1] = "FOLLOWING";
6376
+ DialogFollowMode[DialogFollowMode["UNFOLLOWED"] = 2] = "UNFOLLOWED";
6334
6377
  })(DialogFollowMode || (DialogFollowMode = {}));
6335
6378
  var GridTranscriptMessageKind;
6336
- (function(GridTranscriptMessageKind2) {
6337
- GridTranscriptMessageKind2[GridTranscriptMessageKind2["GRID_TRANSCRIPT_TURN"] = 0] = "GRID_TRANSCRIPT_TURN";
6338
- GridTranscriptMessageKind2[GridTranscriptMessageKind2["GRID_TRANSCRIPT_STARTED"] = 1] = "GRID_TRANSCRIPT_STARTED";
6339
- GridTranscriptMessageKind2[GridTranscriptMessageKind2["GRID_TRANSCRIPT_STOPPED"] = 2] = "GRID_TRANSCRIPT_STOPPED";
6340
- GridTranscriptMessageKind2[GridTranscriptMessageKind2["GRID_TRANSCRIPT_INTERRUPTED"] = 3] = "GRID_TRANSCRIPT_INTERRUPTED";
6341
- GridTranscriptMessageKind2[GridTranscriptMessageKind2["GRID_TRANSCRIPT_LINK"] = 4] = "GRID_TRANSCRIPT_LINK";
6379
+ (function(GridTranscriptMessageKind) {
6380
+ GridTranscriptMessageKind[GridTranscriptMessageKind["GRID_TRANSCRIPT_TURN"] = 0] = "GRID_TRANSCRIPT_TURN";
6381
+ GridTranscriptMessageKind[GridTranscriptMessageKind["GRID_TRANSCRIPT_STARTED"] = 1] = "GRID_TRANSCRIPT_STARTED";
6382
+ GridTranscriptMessageKind[GridTranscriptMessageKind["GRID_TRANSCRIPT_STOPPED"] = 2] = "GRID_TRANSCRIPT_STOPPED";
6383
+ GridTranscriptMessageKind[GridTranscriptMessageKind["GRID_TRANSCRIPT_INTERRUPTED"] = 3] = "GRID_TRANSCRIPT_INTERRUPTED";
6384
+ GridTranscriptMessageKind[GridTranscriptMessageKind["GRID_TRANSCRIPT_LINK"] = 4] = "GRID_TRANSCRIPT_LINK";
6342
6385
  })(GridTranscriptMessageKind || (GridTranscriptMessageKind = {}));
6343
6386
  var AgentSessionProvider;
6344
- (function(AgentSessionProvider2) {
6345
- AgentSessionProvider2[AgentSessionProvider2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6346
- AgentSessionProvider2[AgentSessionProvider2["CODEX"] = 1] = "CODEX";
6347
- AgentSessionProvider2[AgentSessionProvider2["CODEX_CLOUD"] = 2] = "CODEX_CLOUD";
6348
- AgentSessionProvider2[AgentSessionProvider2["CLAUDE"] = 3] = "CLAUDE";
6349
- AgentSessionProvider2[AgentSessionProvider2["OPEN_CODE"] = 4] = "OPEN_CODE";
6350
- AgentSessionProvider2[AgentSessionProvider2["AMP"] = 5] = "AMP";
6387
+ (function(AgentSessionProvider) {
6388
+ AgentSessionProvider[AgentSessionProvider["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6389
+ AgentSessionProvider[AgentSessionProvider["CODEX"] = 1] = "CODEX";
6390
+ AgentSessionProvider[AgentSessionProvider["CODEX_CLOUD"] = 2] = "CODEX_CLOUD";
6391
+ AgentSessionProvider[AgentSessionProvider["CLAUDE"] = 3] = "CLAUDE";
6392
+ AgentSessionProvider[AgentSessionProvider["OPEN_CODE"] = 4] = "OPEN_CODE";
6393
+ AgentSessionProvider[AgentSessionProvider["AMP"] = 5] = "AMP";
6351
6394
  })(AgentSessionProvider || (AgentSessionProvider = {}));
6352
6395
  var AgentSessionMessageRole;
6353
- (function(AgentSessionMessageRole2) {
6354
- AgentSessionMessageRole2[AgentSessionMessageRole2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6355
- AgentSessionMessageRole2[AgentSessionMessageRole2["USER"] = 1] = "USER";
6356
- AgentSessionMessageRole2[AgentSessionMessageRole2["ASSISTANT"] = 2] = "ASSISTANT";
6396
+ (function(AgentSessionMessageRole) {
6397
+ AgentSessionMessageRole[AgentSessionMessageRole["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6398
+ AgentSessionMessageRole[AgentSessionMessageRole["USER"] = 1] = "USER";
6399
+ AgentSessionMessageRole[AgentSessionMessageRole["ASSISTANT"] = 2] = "ASSISTANT";
6357
6400
  })(AgentSessionMessageRole || (AgentSessionMessageRole = {}));
6358
6401
  var AgentSessionMessageRelation;
6359
- (function(AgentSessionMessageRelation2) {
6360
- AgentSessionMessageRelation2[AgentSessionMessageRelation2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6361
- AgentSessionMessageRelation2[AgentSessionMessageRelation2["IMPORTED"] = 1] = "IMPORTED";
6362
- AgentSessionMessageRelation2[AgentSessionMessageRelation2["LINKED"] = 2] = "LINKED";
6402
+ (function(AgentSessionMessageRelation) {
6403
+ AgentSessionMessageRelation[AgentSessionMessageRelation["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6404
+ AgentSessionMessageRelation[AgentSessionMessageRelation["IMPORTED"] = 1] = "IMPORTED";
6405
+ AgentSessionMessageRelation[AgentSessionMessageRelation["LINKED"] = 2] = "LINKED";
6363
6406
  })(AgentSessionMessageRelation || (AgentSessionMessageRelation = {}));
6364
6407
  var MessageSendMode;
6365
- (function(MessageSendMode2) {
6366
- MessageSendMode2[MessageSendMode2["MODE_UNSPECIFIED"] = 0] = "MODE_UNSPECIFIED";
6367
- MessageSendMode2[MessageSendMode2["MODE_SILENT"] = 1] = "MODE_SILENT";
6408
+ (function(MessageSendMode) {
6409
+ MessageSendMode[MessageSendMode["MODE_UNSPECIFIED"] = 0] = "MODE_UNSPECIFIED";
6410
+ MessageSendMode[MessageSendMode["MODE_SILENT"] = 1] = "MODE_SILENT";
6368
6411
  })(MessageSendMode || (MessageSendMode = {}));
6369
6412
  var ConnectAgentSessionState;
6370
- (function(ConnectAgentSessionState2) {
6371
- ConnectAgentSessionState2[ConnectAgentSessionState2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6372
- ConnectAgentSessionState2[ConnectAgentSessionState2["CREATED"] = 1] = "CREATED";
6373
- ConnectAgentSessionState2[ConnectAgentSessionState2["ALREADY_CONNECTED"] = 2] = "ALREADY_CONNECTED";
6374
- ConnectAgentSessionState2[ConnectAgentSessionState2["CONNECTED_ELSEWHERE"] = 3] = "CONNECTED_ELSEWHERE";
6413
+ (function(ConnectAgentSessionState) {
6414
+ ConnectAgentSessionState[ConnectAgentSessionState["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6415
+ ConnectAgentSessionState[ConnectAgentSessionState["CREATED"] = 1] = "CREATED";
6416
+ ConnectAgentSessionState[ConnectAgentSessionState["ALREADY_CONNECTED"] = 2] = "ALREADY_CONNECTED";
6417
+ ConnectAgentSessionState[ConnectAgentSessionState["CONNECTED_ELSEWHERE"] = 3] = "CONNECTED_ELSEWHERE";
6375
6418
  })(ConnectAgentSessionState || (ConnectAgentSessionState = {}));
6376
6419
  var AgentSessionSyncMode;
6377
- (function(AgentSessionSyncMode2) {
6378
- AgentSessionSyncMode2[AgentSessionSyncMode2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6379
- AgentSessionSyncMode2[AgentSessionSyncMode2["HISTORY"] = 1] = "HISTORY";
6380
- AgentSessionSyncMode2[AgentSessionSyncMode2["LIVE"] = 2] = "LIVE";
6420
+ (function(AgentSessionSyncMode) {
6421
+ AgentSessionSyncMode[AgentSessionSyncMode["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6422
+ AgentSessionSyncMode[AgentSessionSyncMode["HISTORY"] = 1] = "HISTORY";
6423
+ AgentSessionSyncMode[AgentSessionSyncMode["LIVE"] = 2] = "LIVE";
6381
6424
  })(AgentSessionSyncMode || (AgentSessionSyncMode = {}));
6382
6425
  var AgentSessionMessageSyncState;
6383
- (function(AgentSessionMessageSyncState2) {
6384
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6385
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["CREATED"] = 1] = "CREATED";
6386
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["EDITED"] = 2] = "EDITED";
6387
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["LINKED"] = 3] = "LINKED";
6388
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["UNCHANGED"] = 4] = "UNCHANGED";
6389
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["STALE"] = 5] = "STALE";
6390
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["TOMBSTONED"] = 6] = "TOMBSTONED";
6391
- AgentSessionMessageSyncState2[AgentSessionMessageSyncState2["CONFLICT"] = 7] = "CONFLICT";
6426
+ (function(AgentSessionMessageSyncState) {
6427
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6428
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["CREATED"] = 1] = "CREATED";
6429
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["EDITED"] = 2] = "EDITED";
6430
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["LINKED"] = 3] = "LINKED";
6431
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["UNCHANGED"] = 4] = "UNCHANGED";
6432
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["STALE"] = 5] = "STALE";
6433
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["TOMBSTONED"] = 6] = "TOMBSTONED";
6434
+ AgentSessionMessageSyncState[AgentSessionMessageSyncState["CONFLICT"] = 7] = "CONFLICT";
6392
6435
  })(AgentSessionMessageSyncState || (AgentSessionMessageSyncState = {}));
6393
6436
  var Method;
6394
- (function(Method2) {
6395
- Method2[Method2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6396
- Method2[Method2["GET_ME"] = 1] = "GET_ME";
6397
- Method2[Method2["SEND_MESSAGE"] = 2] = "SEND_MESSAGE";
6398
- Method2[Method2["GET_PEER_PHOTO"] = 3] = "GET_PEER_PHOTO";
6399
- Method2[Method2["DELETE_MESSAGES"] = 4] = "DELETE_MESSAGES";
6400
- Method2[Method2["GET_CHAT_HISTORY"] = 5] = "GET_CHAT_HISTORY";
6401
- Method2[Method2["ADD_REACTION"] = 6] = "ADD_REACTION";
6402
- Method2[Method2["DELETE_REACTION"] = 7] = "DELETE_REACTION";
6403
- Method2[Method2["EDIT_MESSAGE"] = 8] = "EDIT_MESSAGE";
6404
- Method2[Method2["CREATE_CHAT"] = 9] = "CREATE_CHAT";
6405
- Method2[Method2["GET_SPACE_MEMBERS"] = 10] = "GET_SPACE_MEMBERS";
6406
- Method2[Method2["DELETE_CHAT"] = 11] = "DELETE_CHAT";
6407
- Method2[Method2["INVITE_TO_SPACE"] = 12] = "INVITE_TO_SPACE";
6408
- Method2[Method2["GET_CHAT_PARTICIPANTS"] = 13] = "GET_CHAT_PARTICIPANTS";
6409
- Method2[Method2["ADD_CHAT_PARTICIPANT"] = 14] = "ADD_CHAT_PARTICIPANT";
6410
- Method2[Method2["REMOVE_CHAT_PARTICIPANT"] = 15] = "REMOVE_CHAT_PARTICIPANT";
6411
- Method2[Method2["TRANSLATE_MESSAGES"] = 16] = "TRANSLATE_MESSAGES";
6412
- Method2[Method2["GET_CHATS"] = 17] = "GET_CHATS";
6413
- Method2[Method2["UPDATE_USER_SETTINGS"] = 18] = "UPDATE_USER_SETTINGS";
6414
- Method2[Method2["GET_USER_SETTINGS"] = 19] = "GET_USER_SETTINGS";
6415
- Method2[Method2["SEND_COMPOSE_ACTION"] = 20] = "SEND_COMPOSE_ACTION";
6416
- Method2[Method2["CREATE_BOT"] = 21] = "CREATE_BOT";
6417
- Method2[Method2["DELETE_MEMBER"] = 22] = "DELETE_MEMBER";
6418
- Method2[Method2["MARK_AS_UNREAD"] = 23] = "MARK_AS_UNREAD";
6419
- Method2[Method2["GET_UPDATES_STATE"] = 24] = "GET_UPDATES_STATE";
6420
- Method2[Method2["GET_CHAT"] = 25] = "GET_CHAT";
6421
- Method2[Method2["GET_UPDATES"] = 26] = "GET_UPDATES";
6422
- Method2[Method2["UPDATE_MEMBER_ACCESS"] = 27] = "UPDATE_MEMBER_ACCESS";
6423
- Method2[Method2["SEARCH_MESSAGES"] = 28] = "SEARCH_MESSAGES";
6424
- Method2[Method2["FORWARD_MESSAGES"] = 29] = "FORWARD_MESSAGES";
6425
- Method2[Method2["UPDATE_CHAT_VISIBILITY"] = 30] = "UPDATE_CHAT_VISIBILITY";
6426
- Method2[Method2["PIN_MESSAGE"] = 31] = "PIN_MESSAGE";
6427
- Method2[Method2["UPDATE_CHAT_INFO"] = 32] = "UPDATE_CHAT_INFO";
6428
- Method2[Method2["LIST_BOTS"] = 33] = "LIST_BOTS";
6429
- Method2[Method2["REVEAL_BOT_TOKEN"] = 34] = "REVEAL_BOT_TOKEN";
6430
- Method2[Method2["MOVE_THREAD"] = 35] = "MOVE_THREAD";
6431
- Method2[Method2["ROTATE_BOT_TOKEN"] = 36] = "ROTATE_BOT_TOKEN";
6432
- Method2[Method2["UPDATE_BOT_PROFILE"] = 37] = "UPDATE_BOT_PROFILE";
6433
- Method2[Method2["GET_MESSAGES"] = 38] = "GET_MESSAGES";
6434
- Method2[Method2["UPDATE_DIALOG_NOTIFICATION_SETTINGS"] = 39] = "UPDATE_DIALOG_NOTIFICATION_SETTINGS";
6435
- Method2[Method2["READ_MESSAGES"] = 40] = "READ_MESSAGES";
6436
- Method2[Method2["REGISTER_DEVICE"] = 41] = "REGISTER_DEVICE";
6437
- Method2[Method2["CREATE_SUBTHREAD"] = 42] = "CREATE_SUBTHREAD";
6438
- Method2[Method2["GET_BOT_COMMANDS"] = 43] = "GET_BOT_COMMANDS";
6439
- Method2[Method2["SET_BOT_COMMANDS"] = 44] = "SET_BOT_COMMANDS";
6440
- Method2[Method2["GET_PEER_BOT_COMMANDS"] = 45] = "GET_PEER_BOT_COMMANDS";
6441
- Method2[Method2["SHOW_IN_CHAT_LIST"] = 46] = "SHOW_IN_CHAT_LIST";
6442
- Method2[Method2["RESERVE_CHAT_IDS"] = 47] = "RESERVE_CHAT_IDS";
6443
- Method2[Method2["INVOKE_MESSAGE_ACTION"] = 48] = "INVOKE_MESSAGE_ACTION";
6444
- Method2[Method2["ANSWER_MESSAGE_ACTION"] = 49] = "ANSWER_MESSAGE_ACTION";
6445
- Method2[Method2["REVOKE_SESSION"] = 50] = "REVOKE_SESSION";
6446
- Method2[Method2["UPDATE_DIALOG_OPEN"] = 51] = "UPDATE_DIALOG_OPEN";
6447
- Method2[Method2["UPDATE_DIALOG_ORDER"] = 52] = "UPDATE_DIALOG_ORDER";
6448
- Method2[Method2["CLEAR_CHAT_HISTORY"] = 53] = "CLEAR_CHAT_HISTORY";
6449
- Method2[Method2["DELETE_BOT"] = 54] = "DELETE_BOT";
6450
- Method2[Method2["DELETE_MESSAGE_ATTACHMENT"] = 55] = "DELETE_MESSAGE_ATTACHMENT";
6451
- Method2[Method2["SET_BOT_AVATAR"] = 56] = "SET_BOT_AVATAR";
6452
- Method2[Method2["CLEAR_BOT_AVATAR"] = 57] = "CLEAR_BOT_AVATAR";
6453
- Method2[Method2["GET_BOT_PRESENCE"] = 58] = "GET_BOT_PRESENCE";
6454
- Method2[Method2["SET_BOT_PRESENCE_STATE"] = 59] = "SET_BOT_PRESENCE_STATE";
6455
- Method2[Method2["UPDATE_DIALOG_FOLLOW_MODE"] = 60] = "UPDATE_DIALOG_FOLLOW_MODE";
6456
- Method2[Method2["GET_SESSIONS"] = 61] = "GET_SESSIONS";
6457
- Method2[Method2["CHECK_USERNAME"] = 62] = "CHECK_USERNAME";
6458
- Method2[Method2["CHANGE_USERNAME"] = 63] = "CHANGE_USERNAME";
6459
- Method2[Method2["UPDATE_PROFILE"] = 64] = "UPDATE_PROFILE";
6460
- Method2[Method2["GET_SPACE_URL_PREVIEW_EXCLUSIONS"] = 65] = "GET_SPACE_URL_PREVIEW_EXCLUSIONS";
6461
- Method2[Method2["ADD_SPACE_URL_PREVIEW_EXCLUSION"] = 66] = "ADD_SPACE_URL_PREVIEW_EXCLUSION";
6462
- Method2[Method2["REMOVE_SPACE_URL_PREVIEW_EXCLUSION"] = 67] = "REMOVE_SPACE_URL_PREVIEW_EXCLUSION";
6463
- Method2[Method2["GET_USER_GROUPS"] = 68] = "GET_USER_GROUPS";
6464
- Method2[Method2["CREATE_USER_GROUP"] = 69] = "CREATE_USER_GROUP";
6465
- Method2[Method2["UPDATE_USER_GROUP"] = 70] = "UPDATE_USER_GROUP";
6466
- Method2[Method2["DELETE_USER_GROUP"] = 71] = "DELETE_USER_GROUP";
6467
- Method2[Method2["GET_SPACE_SETTINGS"] = 72] = "GET_SPACE_SETTINGS";
6468
- Method2[Method2["TOGGLE_SPACE_GRID"] = 73] = "TOGGLE_SPACE_GRID";
6469
- Method2[Method2["GET_THREAD_REFERENCES"] = 74] = "GET_THREAD_REFERENCES";
6470
- Method2[Method2["GET_THREAD_SUBTHREADS"] = 75] = "GET_THREAD_SUBTHREADS";
6471
- Method2[Method2["GET_PEER_BOTS"] = 76] = "GET_PEER_BOTS";
6472
- Method2[Method2["GET_MY_BOT_CAPABILITIES"] = 77] = "GET_MY_BOT_CAPABILITIES";
6473
- Method2[Method2["SET_MY_BOT_CAPABILITIES"] = 78] = "SET_MY_BOT_CAPABILITIES";
6474
- Method2[Method2["REQUEST_BOT_CHAT_SETTINGS"] = 79] = "REQUEST_BOT_CHAT_SETTINGS";
6475
- Method2[Method2["INVOKE_BOT_CHAT_SETTINGS_ITEM"] = 80] = "INVOKE_BOT_CHAT_SETTINGS_ITEM";
6476
- Method2[Method2["ANSWER_BOT_CHAT_SETTINGS"] = 81] = "ANSWER_BOT_CHAT_SETTINGS";
6477
- Method2[Method2["GET_GRID"] = 83] = "GET_GRID";
6478
- Method2[Method2["CREATE_GRID_ROOM"] = 84] = "CREATE_GRID_ROOM";
6479
- Method2[Method2["JOIN_GRID_ROOM"] = 85] = "JOIN_GRID_ROOM";
6480
- Method2[Method2["LEAVE_GRID_ROOM"] = 86] = "LEAVE_GRID_ROOM";
6481
- Method2[Method2["SET_GRID_ROOM_TITLE"] = 87] = "SET_GRID_ROOM_TITLE";
6482
- Method2[Method2["SET_GRID_ROOM_LOCKED"] = 88] = "SET_GRID_ROOM_LOCKED";
6483
- Method2[Method2["DELETE_GRID_ROOM"] = 89] = "DELETE_GRID_ROOM";
6484
- Method2[Method2["PREPARE_GRID_CONNECTION"] = 90] = "PREPARE_GRID_CONNECTION";
6485
- Method2[Method2["SET_GRID_AVATAR_MICROPHONE_ENABLED"] = 91] = "SET_GRID_AVATAR_MICROPHONE_ENABLED";
6486
- Method2[Method2["GET_GRID_HOME"] = 92] = "GET_GRID_HOME";
6487
- Method2[Method2["CREATE_CLI_SESSION"] = 93] = "CREATE_CLI_SESSION";
6488
- Method2[Method2["SET_PROFILE_PHOTO"] = 94] = "SET_PROFILE_PHOTO";
6489
- Method2[Method2["GET_EXTERNAL_PROFILE_PHOTO"] = 95] = "GET_EXTERNAL_PROFILE_PHOTO";
6490
- Method2[Method2["GET_CHAT_TRANSCRIPT"] = 96] = "GET_CHAT_TRANSCRIPT";
6491
- Method2[Method2["SEARCH_EXTERNAL_RESOURCES"] = 97] = "SEARCH_EXTERNAL_RESOURCES";
6492
- Method2[Method2["JOIN_PUBLIC_SPACE"] = 98] = "JOIN_PUBLIC_SPACE";
6493
- Method2[Method2["COLLAPSE_HISTORY"] = 99] = "COLLAPSE_HISTORY";
6494
- Method2[Method2["LIST_CONNECTORS"] = 100] = "LIST_CONNECTORS";
6495
- Method2[Method2["PREPARE_CONNECTOR_OAUTH"] = 101] = "PREPARE_CONNECTOR_OAUTH";
6496
- Method2[Method2["DISCONNECT_CONNECTOR"] = 102] = "DISCONNECT_CONNECTOR";
6497
- Method2[Method2["SEARCH_USERS"] = 103] = "SEARCH_USERS";
6498
- Method2[Method2["INVITE_TO_INLINE"] = 104] = "INVITE_TO_INLINE";
6499
- Method2[Method2["RESOLVE_URL_PREVIEW"] = 105] = "RESOLVE_URL_PREVIEW";
6500
- Method2[Method2["CREATE_BOT_AGENT"] = 106] = "CREATE_BOT_AGENT";
6501
- Method2[Method2["GET_BOT_AGENT"] = 107] = "GET_BOT_AGENT";
6502
- Method2[Method2["LIST_BOT_AGENTS"] = 108] = "LIST_BOT_AGENTS";
6503
- Method2[Method2["CREATE_SPACE"] = 109] = "CREATE_SPACE";
6504
- Method2[Method2["DELETE_SPACE"] = 110] = "DELETE_SPACE";
6505
- Method2[Method2["LEAVE_SPACE"] = 111] = "LEAVE_SPACE";
6506
- Method2[Method2["GET_CONNECTOR_CONFIG"] = 112] = "GET_CONNECTOR_CONFIG";
6507
- Method2[Method2["SET_CONNECTOR_CONFIG"] = 113] = "SET_CONNECTOR_CONFIG";
6508
- Method2[Method2["CREATE_EXTERNAL_TASK"] = 114] = "CREATE_EXTERNAL_TASK";
6509
- Method2[Method2["UNREGISTER_DEVICE"] = 115] = "UNREGISTER_DEVICE";
6510
- Method2[Method2["LOG_OUT"] = 116] = "LOG_OUT";
6511
- Method2[Method2["CREATE_UPLOAD"] = 117] = "CREATE_UPLOAD";
6512
- Method2[Method2["SAVE_UPLOAD_PART"] = 118] = "SAVE_UPLOAD_PART";
6513
- Method2[Method2["GET_UPLOAD_STATE"] = 119] = "GET_UPLOAD_STATE";
6514
- Method2[Method2["FINISH_UPLOAD"] = 120] = "FINISH_UPLOAD";
6515
- Method2[Method2["CANCEL_UPLOAD"] = 121] = "CANCEL_UPLOAD";
6516
- Method2[Method2["UPDATE_SESSION"] = 122] = "UPDATE_SESSION";
6517
- Method2[Method2["UPDATE_DIALOG_ARCHIVED"] = 123] = "UPDATE_DIALOG_ARCHIVED";
6518
- Method2[Method2["CREATE_DIALOG_FOLDER"] = 124] = "CREATE_DIALOG_FOLDER";
6519
- Method2[Method2["UPDATE_DIALOG_FOLDER"] = 125] = "UPDATE_DIALOG_FOLDER";
6520
- Method2[Method2["DELETE_DIALOG_FOLDER"] = 126] = "DELETE_DIALOG_FOLDER";
6521
- Method2[Method2["GET_SPACE"] = 127] = "GET_SPACE";
6522
- Method2[Method2["CONNECT_AGENT_SESSION"] = 128] = "CONNECT_AGENT_SESSION";
6523
- Method2[Method2["SYNC_AGENT_SESSION_MESSAGES"] = 129] = "SYNC_AGENT_SESSION_MESSAGES";
6524
- Method2[Method2["GET_AGENT_SESSION"] = 130] = "GET_AGENT_SESSION";
6525
- Method2[Method2["UPDATE_BOT_AGENT"] = 131] = "UPDATE_BOT_AGENT";
6526
- Method2[Method2["DELETE_BOT_AGENT"] = 132] = "DELETE_BOT_AGENT";
6527
- Method2[Method2["JOIN_SPACE_BY_INVITE_TOKEN"] = 133] = "JOIN_SPACE_BY_INVITE_TOKEN";
6528
- Method2[Method2["GET_SPACE_INVITE_LINK"] = 134] = "GET_SPACE_INVITE_LINK";
6529
- Method2[Method2["SET_SPACE_INVITE_LINK_ENABLED"] = 135] = "SET_SPACE_INVITE_LINK_ENABLED";
6530
- Method2[Method2["GET_FILE_PART"] = 136] = "GET_FILE_PART";
6531
- Method2[Method2["ACKNOWLEDGE_MESSAGES"] = 137] = "ACKNOWLEDGE_MESSAGES";
6532
- Method2[Method2["GET_USERS"] = 138] = "GET_USERS";
6533
- Method2[Method2["GET_BOT_SKILLS"] = 139] = "GET_BOT_SKILLS";
6534
- Method2[Method2["GET_BOT_CONFIGURATION_CATALOG"] = 140] = "GET_BOT_CONFIGURATION_CATALOG";
6535
- Method2[Method2["UPDATE_DIALOG_TRANSLATION"] = 141] = "UPDATE_DIALOG_TRANSLATION";
6536
- Method2[Method2["TRANSCRIBE_VOICE_DRAFT"] = 142] = "TRANSCRIBE_VOICE_DRAFT";
6537
- Method2[Method2["REQUEST_BOT_FILESYSTEM"] = 143] = "REQUEST_BOT_FILESYSTEM";
6538
- Method2[Method2["ANSWER_BOT_FILESYSTEM"] = 144] = "ANSWER_BOT_FILESYSTEM";
6539
- Method2[Method2["SET_SPACE_PHOTO"] = 145] = "SET_SPACE_PHOTO";
6540
- Method2[Method2["MOVE_GRID_CALL_HERE"] = 146] = "MOVE_GRID_CALL_HERE";
6541
- Method2[Method2["OPEN_GRID_THREAD"] = 147] = "OPEN_GRID_THREAD";
6542
- Method2[Method2["SET_GRID_TRANSCRIPTION"] = 148] = "SET_GRID_TRANSCRIPTION";
6543
- Method2[Method2["LIST_GRID_TRANSCRIPTS"] = 149] = "LIST_GRID_TRANSCRIPTS";
6437
+ (function(Method) {
6438
+ Method[Method["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6439
+ Method[Method["GET_ME"] = 1] = "GET_ME";
6440
+ Method[Method["SEND_MESSAGE"] = 2] = "SEND_MESSAGE";
6441
+ Method[Method["GET_PEER_PHOTO"] = 3] = "GET_PEER_PHOTO";
6442
+ Method[Method["DELETE_MESSAGES"] = 4] = "DELETE_MESSAGES";
6443
+ Method[Method["GET_CHAT_HISTORY"] = 5] = "GET_CHAT_HISTORY";
6444
+ Method[Method["ADD_REACTION"] = 6] = "ADD_REACTION";
6445
+ Method[Method["DELETE_REACTION"] = 7] = "DELETE_REACTION";
6446
+ Method[Method["EDIT_MESSAGE"] = 8] = "EDIT_MESSAGE";
6447
+ Method[Method["CREATE_CHAT"] = 9] = "CREATE_CHAT";
6448
+ Method[Method["GET_SPACE_MEMBERS"] = 10] = "GET_SPACE_MEMBERS";
6449
+ Method[Method["DELETE_CHAT"] = 11] = "DELETE_CHAT";
6450
+ Method[Method["INVITE_TO_SPACE"] = 12] = "INVITE_TO_SPACE";
6451
+ Method[Method["GET_CHAT_PARTICIPANTS"] = 13] = "GET_CHAT_PARTICIPANTS";
6452
+ Method[Method["ADD_CHAT_PARTICIPANT"] = 14] = "ADD_CHAT_PARTICIPANT";
6453
+ Method[Method["REMOVE_CHAT_PARTICIPANT"] = 15] = "REMOVE_CHAT_PARTICIPANT";
6454
+ Method[Method["TRANSLATE_MESSAGES"] = 16] = "TRANSLATE_MESSAGES";
6455
+ Method[Method["GET_CHATS"] = 17] = "GET_CHATS";
6456
+ Method[Method["UPDATE_USER_SETTINGS"] = 18] = "UPDATE_USER_SETTINGS";
6457
+ Method[Method["GET_USER_SETTINGS"] = 19] = "GET_USER_SETTINGS";
6458
+ Method[Method["SEND_COMPOSE_ACTION"] = 20] = "SEND_COMPOSE_ACTION";
6459
+ Method[Method["CREATE_BOT"] = 21] = "CREATE_BOT";
6460
+ Method[Method["DELETE_MEMBER"] = 22] = "DELETE_MEMBER";
6461
+ Method[Method["MARK_AS_UNREAD"] = 23] = "MARK_AS_UNREAD";
6462
+ Method[Method["GET_UPDATES_STATE"] = 24] = "GET_UPDATES_STATE";
6463
+ Method[Method["GET_CHAT"] = 25] = "GET_CHAT";
6464
+ Method[Method["GET_UPDATES"] = 26] = "GET_UPDATES";
6465
+ Method[Method["UPDATE_MEMBER_ACCESS"] = 27] = "UPDATE_MEMBER_ACCESS";
6466
+ Method[Method["SEARCH_MESSAGES"] = 28] = "SEARCH_MESSAGES";
6467
+ Method[Method["FORWARD_MESSAGES"] = 29] = "FORWARD_MESSAGES";
6468
+ Method[Method["UPDATE_CHAT_VISIBILITY"] = 30] = "UPDATE_CHAT_VISIBILITY";
6469
+ Method[Method["PIN_MESSAGE"] = 31] = "PIN_MESSAGE";
6470
+ Method[Method["UPDATE_CHAT_INFO"] = 32] = "UPDATE_CHAT_INFO";
6471
+ Method[Method["LIST_BOTS"] = 33] = "LIST_BOTS";
6472
+ Method[Method["REVEAL_BOT_TOKEN"] = 34] = "REVEAL_BOT_TOKEN";
6473
+ Method[Method["MOVE_THREAD"] = 35] = "MOVE_THREAD";
6474
+ Method[Method["ROTATE_BOT_TOKEN"] = 36] = "ROTATE_BOT_TOKEN";
6475
+ Method[Method["UPDATE_BOT_PROFILE"] = 37] = "UPDATE_BOT_PROFILE";
6476
+ Method[Method["GET_MESSAGES"] = 38] = "GET_MESSAGES";
6477
+ Method[Method["UPDATE_DIALOG_NOTIFICATION_SETTINGS"] = 39] = "UPDATE_DIALOG_NOTIFICATION_SETTINGS";
6478
+ Method[Method["READ_MESSAGES"] = 40] = "READ_MESSAGES";
6479
+ Method[Method["REGISTER_DEVICE"] = 41] = "REGISTER_DEVICE";
6480
+ Method[Method["CREATE_SUBTHREAD"] = 42] = "CREATE_SUBTHREAD";
6481
+ Method[Method["GET_BOT_COMMANDS"] = 43] = "GET_BOT_COMMANDS";
6482
+ Method[Method["SET_BOT_COMMANDS"] = 44] = "SET_BOT_COMMANDS";
6483
+ Method[Method["GET_PEER_BOT_COMMANDS"] = 45] = "GET_PEER_BOT_COMMANDS";
6484
+ Method[Method["SHOW_IN_CHAT_LIST"] = 46] = "SHOW_IN_CHAT_LIST";
6485
+ Method[Method["RESERVE_CHAT_IDS"] = 47] = "RESERVE_CHAT_IDS";
6486
+ Method[Method["INVOKE_MESSAGE_ACTION"] = 48] = "INVOKE_MESSAGE_ACTION";
6487
+ Method[Method["ANSWER_MESSAGE_ACTION"] = 49] = "ANSWER_MESSAGE_ACTION";
6488
+ Method[Method["REVOKE_SESSION"] = 50] = "REVOKE_SESSION";
6489
+ Method[Method["UPDATE_DIALOG_OPEN"] = 51] = "UPDATE_DIALOG_OPEN";
6490
+ Method[Method["UPDATE_DIALOG_ORDER"] = 52] = "UPDATE_DIALOG_ORDER";
6491
+ Method[Method["CLEAR_CHAT_HISTORY"] = 53] = "CLEAR_CHAT_HISTORY";
6492
+ Method[Method["DELETE_BOT"] = 54] = "DELETE_BOT";
6493
+ Method[Method["DELETE_MESSAGE_ATTACHMENT"] = 55] = "DELETE_MESSAGE_ATTACHMENT";
6494
+ Method[Method["SET_BOT_AVATAR"] = 56] = "SET_BOT_AVATAR";
6495
+ Method[Method["CLEAR_BOT_AVATAR"] = 57] = "CLEAR_BOT_AVATAR";
6496
+ Method[Method["GET_BOT_PRESENCE"] = 58] = "GET_BOT_PRESENCE";
6497
+ Method[Method["SET_BOT_PRESENCE_STATE"] = 59] = "SET_BOT_PRESENCE_STATE";
6498
+ Method[Method["UPDATE_DIALOG_FOLLOW_MODE"] = 60] = "UPDATE_DIALOG_FOLLOW_MODE";
6499
+ Method[Method["GET_SESSIONS"] = 61] = "GET_SESSIONS";
6500
+ Method[Method["CHECK_USERNAME"] = 62] = "CHECK_USERNAME";
6501
+ Method[Method["CHANGE_USERNAME"] = 63] = "CHANGE_USERNAME";
6502
+ Method[Method["UPDATE_PROFILE"] = 64] = "UPDATE_PROFILE";
6503
+ Method[Method["GET_SPACE_URL_PREVIEW_EXCLUSIONS"] = 65] = "GET_SPACE_URL_PREVIEW_EXCLUSIONS";
6504
+ Method[Method["ADD_SPACE_URL_PREVIEW_EXCLUSION"] = 66] = "ADD_SPACE_URL_PREVIEW_EXCLUSION";
6505
+ Method[Method["REMOVE_SPACE_URL_PREVIEW_EXCLUSION"] = 67] = "REMOVE_SPACE_URL_PREVIEW_EXCLUSION";
6506
+ Method[Method["GET_USER_GROUPS"] = 68] = "GET_USER_GROUPS";
6507
+ Method[Method["CREATE_USER_GROUP"] = 69] = "CREATE_USER_GROUP";
6508
+ Method[Method["UPDATE_USER_GROUP"] = 70] = "UPDATE_USER_GROUP";
6509
+ Method[Method["DELETE_USER_GROUP"] = 71] = "DELETE_USER_GROUP";
6510
+ Method[Method["GET_SPACE_SETTINGS"] = 72] = "GET_SPACE_SETTINGS";
6511
+ Method[Method["TOGGLE_SPACE_GRID"] = 73] = "TOGGLE_SPACE_GRID";
6512
+ Method[Method["GET_THREAD_REFERENCES"] = 74] = "GET_THREAD_REFERENCES";
6513
+ Method[Method["GET_THREAD_SUBTHREADS"] = 75] = "GET_THREAD_SUBTHREADS";
6514
+ Method[Method["GET_PEER_BOTS"] = 76] = "GET_PEER_BOTS";
6515
+ Method[Method["GET_MY_BOT_CAPABILITIES"] = 77] = "GET_MY_BOT_CAPABILITIES";
6516
+ Method[Method["SET_MY_BOT_CAPABILITIES"] = 78] = "SET_MY_BOT_CAPABILITIES";
6517
+ Method[Method["REQUEST_BOT_CHAT_SETTINGS"] = 79] = "REQUEST_BOT_CHAT_SETTINGS";
6518
+ Method[Method["INVOKE_BOT_CHAT_SETTINGS_ITEM"] = 80] = "INVOKE_BOT_CHAT_SETTINGS_ITEM";
6519
+ Method[Method["ANSWER_BOT_CHAT_SETTINGS"] = 81] = "ANSWER_BOT_CHAT_SETTINGS";
6520
+ Method[Method["GET_GRID"] = 83] = "GET_GRID";
6521
+ Method[Method["CREATE_GRID_ROOM"] = 84] = "CREATE_GRID_ROOM";
6522
+ Method[Method["JOIN_GRID_ROOM"] = 85] = "JOIN_GRID_ROOM";
6523
+ Method[Method["LEAVE_GRID_ROOM"] = 86] = "LEAVE_GRID_ROOM";
6524
+ Method[Method["SET_GRID_ROOM_TITLE"] = 87] = "SET_GRID_ROOM_TITLE";
6525
+ Method[Method["SET_GRID_ROOM_LOCKED"] = 88] = "SET_GRID_ROOM_LOCKED";
6526
+ Method[Method["DELETE_GRID_ROOM"] = 89] = "DELETE_GRID_ROOM";
6527
+ Method[Method["PREPARE_GRID_CONNECTION"] = 90] = "PREPARE_GRID_CONNECTION";
6528
+ Method[Method["SET_GRID_AVATAR_MICROPHONE_ENABLED"] = 91] = "SET_GRID_AVATAR_MICROPHONE_ENABLED";
6529
+ Method[Method["GET_GRID_HOME"] = 92] = "GET_GRID_HOME";
6530
+ Method[Method["CREATE_CLI_SESSION"] = 93] = "CREATE_CLI_SESSION";
6531
+ Method[Method["SET_PROFILE_PHOTO"] = 94] = "SET_PROFILE_PHOTO";
6532
+ Method[Method["GET_EXTERNAL_PROFILE_PHOTO"] = 95] = "GET_EXTERNAL_PROFILE_PHOTO";
6533
+ Method[Method["GET_CHAT_TRANSCRIPT"] = 96] = "GET_CHAT_TRANSCRIPT";
6534
+ Method[Method["SEARCH_EXTERNAL_RESOURCES"] = 97] = "SEARCH_EXTERNAL_RESOURCES";
6535
+ Method[Method["JOIN_PUBLIC_SPACE"] = 98] = "JOIN_PUBLIC_SPACE";
6536
+ Method[Method["COLLAPSE_HISTORY"] = 99] = "COLLAPSE_HISTORY";
6537
+ Method[Method["LIST_CONNECTORS"] = 100] = "LIST_CONNECTORS";
6538
+ Method[Method["PREPARE_CONNECTOR_OAUTH"] = 101] = "PREPARE_CONNECTOR_OAUTH";
6539
+ Method[Method["DISCONNECT_CONNECTOR"] = 102] = "DISCONNECT_CONNECTOR";
6540
+ Method[Method["SEARCH_USERS"] = 103] = "SEARCH_USERS";
6541
+ Method[Method["INVITE_TO_INLINE"] = 104] = "INVITE_TO_INLINE";
6542
+ Method[Method["RESOLVE_URL_PREVIEW"] = 105] = "RESOLVE_URL_PREVIEW";
6543
+ Method[Method["CREATE_BOT_AGENT"] = 106] = "CREATE_BOT_AGENT";
6544
+ Method[Method["GET_BOT_AGENT"] = 107] = "GET_BOT_AGENT";
6545
+ Method[Method["LIST_BOT_AGENTS"] = 108] = "LIST_BOT_AGENTS";
6546
+ Method[Method["CREATE_SPACE"] = 109] = "CREATE_SPACE";
6547
+ Method[Method["DELETE_SPACE"] = 110] = "DELETE_SPACE";
6548
+ Method[Method["LEAVE_SPACE"] = 111] = "LEAVE_SPACE";
6549
+ Method[Method["GET_CONNECTOR_CONFIG"] = 112] = "GET_CONNECTOR_CONFIG";
6550
+ Method[Method["SET_CONNECTOR_CONFIG"] = 113] = "SET_CONNECTOR_CONFIG";
6551
+ Method[Method["CREATE_EXTERNAL_TASK"] = 114] = "CREATE_EXTERNAL_TASK";
6552
+ Method[Method["UNREGISTER_DEVICE"] = 115] = "UNREGISTER_DEVICE";
6553
+ Method[Method["LOG_OUT"] = 116] = "LOG_OUT";
6554
+ Method[Method["CREATE_UPLOAD"] = 117] = "CREATE_UPLOAD";
6555
+ Method[Method["SAVE_UPLOAD_PART"] = 118] = "SAVE_UPLOAD_PART";
6556
+ Method[Method["GET_UPLOAD_STATE"] = 119] = "GET_UPLOAD_STATE";
6557
+ Method[Method["FINISH_UPLOAD"] = 120] = "FINISH_UPLOAD";
6558
+ Method[Method["CANCEL_UPLOAD"] = 121] = "CANCEL_UPLOAD";
6559
+ Method[Method["UPDATE_SESSION"] = 122] = "UPDATE_SESSION";
6560
+ Method[Method["UPDATE_DIALOG_ARCHIVED"] = 123] = "UPDATE_DIALOG_ARCHIVED";
6561
+ Method[Method["CREATE_DIALOG_FOLDER"] = 124] = "CREATE_DIALOG_FOLDER";
6562
+ Method[Method["UPDATE_DIALOG_FOLDER"] = 125] = "UPDATE_DIALOG_FOLDER";
6563
+ Method[Method["DELETE_DIALOG_FOLDER"] = 126] = "DELETE_DIALOG_FOLDER";
6564
+ Method[Method["GET_SPACE"] = 127] = "GET_SPACE";
6565
+ Method[Method["CONNECT_AGENT_SESSION"] = 128] = "CONNECT_AGENT_SESSION";
6566
+ Method[Method["SYNC_AGENT_SESSION_MESSAGES"] = 129] = "SYNC_AGENT_SESSION_MESSAGES";
6567
+ Method[Method["GET_AGENT_SESSION"] = 130] = "GET_AGENT_SESSION";
6568
+ Method[Method["UPDATE_BOT_AGENT"] = 131] = "UPDATE_BOT_AGENT";
6569
+ Method[Method["DELETE_BOT_AGENT"] = 132] = "DELETE_BOT_AGENT";
6570
+ Method[Method["JOIN_SPACE_BY_INVITE_TOKEN"] = 133] = "JOIN_SPACE_BY_INVITE_TOKEN";
6571
+ Method[Method["GET_SPACE_INVITE_LINK"] = 134] = "GET_SPACE_INVITE_LINK";
6572
+ Method[Method["SET_SPACE_INVITE_LINK_ENABLED"] = 135] = "SET_SPACE_INVITE_LINK_ENABLED";
6573
+ Method[Method["GET_FILE_PART"] = 136] = "GET_FILE_PART";
6574
+ Method[Method["ACKNOWLEDGE_MESSAGES"] = 137] = "ACKNOWLEDGE_MESSAGES";
6575
+ Method[Method["GET_USERS"] = 138] = "GET_USERS";
6576
+ Method[Method["GET_BOT_SKILLS"] = 139] = "GET_BOT_SKILLS";
6577
+ Method[Method["GET_BOT_CONFIGURATION_CATALOG"] = 140] = "GET_BOT_CONFIGURATION_CATALOG";
6578
+ Method[Method["UPDATE_DIALOG_TRANSLATION"] = 141] = "UPDATE_DIALOG_TRANSLATION";
6579
+ Method[Method["TRANSCRIBE_VOICE_DRAFT"] = 142] = "TRANSCRIBE_VOICE_DRAFT";
6580
+ Method[Method["REQUEST_BOT_FILESYSTEM"] = 143] = "REQUEST_BOT_FILESYSTEM";
6581
+ Method[Method["ANSWER_BOT_FILESYSTEM"] = 144] = "ANSWER_BOT_FILESYSTEM";
6582
+ Method[Method["SET_SPACE_PHOTO"] = 145] = "SET_SPACE_PHOTO";
6583
+ Method[Method["MOVE_GRID_CALL_HERE"] = 146] = "MOVE_GRID_CALL_HERE";
6584
+ Method[Method["OPEN_GRID_THREAD"] = 147] = "OPEN_GRID_THREAD";
6585
+ Method[Method["SET_GRID_TRANSCRIPTION"] = 148] = "SET_GRID_TRANSCRIPTION";
6586
+ Method[Method["LIST_GRID_TRANSCRIPTS"] = 149] = "LIST_GRID_TRANSCRIPTS";
6544
6587
  })(Method || (Method = {}));
6545
6588
  var GridTranscriptionState;
6546
- (function(GridTranscriptionState2) {
6547
- GridTranscriptionState2[GridTranscriptionState2["GRID_TRANSCRIPTION_UNSPECIFIED"] = 0] = "GRID_TRANSCRIPTION_UNSPECIFIED";
6548
- GridTranscriptionState2[GridTranscriptionState2["GRID_TRANSCRIPTION_STARTING"] = 1] = "GRID_TRANSCRIPTION_STARTING";
6549
- GridTranscriptionState2[GridTranscriptionState2["GRID_TRANSCRIPTION_ACTIVE"] = 2] = "GRID_TRANSCRIPTION_ACTIVE";
6550
- GridTranscriptionState2[GridTranscriptionState2["GRID_TRANSCRIPTION_STOPPING"] = 3] = "GRID_TRANSCRIPTION_STOPPING";
6551
- GridTranscriptionState2[GridTranscriptionState2["GRID_TRANSCRIPTION_STOPPED"] = 4] = "GRID_TRANSCRIPTION_STOPPED";
6552
- GridTranscriptionState2[GridTranscriptionState2["GRID_TRANSCRIPTION_INTERRUPTED"] = 5] = "GRID_TRANSCRIPTION_INTERRUPTED";
6589
+ (function(GridTranscriptionState) {
6590
+ GridTranscriptionState[GridTranscriptionState["GRID_TRANSCRIPTION_UNSPECIFIED"] = 0] = "GRID_TRANSCRIPTION_UNSPECIFIED";
6591
+ GridTranscriptionState[GridTranscriptionState["GRID_TRANSCRIPTION_STARTING"] = 1] = "GRID_TRANSCRIPTION_STARTING";
6592
+ GridTranscriptionState[GridTranscriptionState["GRID_TRANSCRIPTION_ACTIVE"] = 2] = "GRID_TRANSCRIPTION_ACTIVE";
6593
+ GridTranscriptionState[GridTranscriptionState["GRID_TRANSCRIPTION_STOPPING"] = 3] = "GRID_TRANSCRIPTION_STOPPING";
6594
+ GridTranscriptionState[GridTranscriptionState["GRID_TRANSCRIPTION_STOPPED"] = 4] = "GRID_TRANSCRIPTION_STOPPED";
6595
+ GridTranscriptionState[GridTranscriptionState["GRID_TRANSCRIPTION_INTERRUPTED"] = 5] = "GRID_TRANSCRIPTION_INTERRUPTED";
6553
6596
  })(GridTranscriptionState || (GridTranscriptionState = {}));
6554
6597
  var GridTranscriptDestination;
6555
- (function(GridTranscriptDestination2) {
6556
- GridTranscriptDestination2[GridTranscriptDestination2["GRID_TRANSCRIPT_LAST"] = 0] = "GRID_TRANSCRIPT_LAST";
6557
- GridTranscriptDestination2[GridTranscriptDestination2["GRID_TRANSCRIPT_NEW"] = 1] = "GRID_TRANSCRIPT_NEW";
6558
- GridTranscriptDestination2[GridTranscriptDestination2["GRID_TRANSCRIPT_EXISTING"] = 2] = "GRID_TRANSCRIPT_EXISTING";
6598
+ (function(GridTranscriptDestination) {
6599
+ GridTranscriptDestination[GridTranscriptDestination["GRID_TRANSCRIPT_LAST"] = 0] = "GRID_TRANSCRIPT_LAST";
6600
+ GridTranscriptDestination[GridTranscriptDestination["GRID_TRANSCRIPT_NEW"] = 1] = "GRID_TRANSCRIPT_NEW";
6601
+ GridTranscriptDestination[GridTranscriptDestination["GRID_TRANSCRIPT_EXISTING"] = 2] = "GRID_TRANSCRIPT_EXISTING";
6559
6602
  })(GridTranscriptDestination || (GridTranscriptDestination = {}));
6560
6603
  var GridConnectionUnavailableReason;
6561
- (function(GridConnectionUnavailableReason2) {
6562
- GridConnectionUnavailableReason2[GridConnectionUnavailableReason2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6563
- GridConnectionUnavailableReason2[GridConnectionUnavailableReason2["NOT_ACTIVE"] = 1] = "NOT_ACTIVE";
6564
- GridConnectionUnavailableReason2[GridConnectionUnavailableReason2["PROVIDER_UNAVAILABLE"] = 2] = "PROVIDER_UNAVAILABLE";
6604
+ (function(GridConnectionUnavailableReason) {
6605
+ GridConnectionUnavailableReason[GridConnectionUnavailableReason["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6606
+ GridConnectionUnavailableReason[GridConnectionUnavailableReason["NOT_ACTIVE"] = 1] = "NOT_ACTIVE";
6607
+ GridConnectionUnavailableReason[GridConnectionUnavailableReason["PROVIDER_UNAVAILABLE"] = 2] = "PROVIDER_UNAVAILABLE";
6565
6608
  })(GridConnectionUnavailableReason || (GridConnectionUnavailableReason = {}));
6566
6609
  var UsernameAvailability;
6567
- (function(UsernameAvailability2) {
6568
- UsernameAvailability2[UsernameAvailability2["USERNAME_AVAILABILITY_UNSPECIFIED"] = 0] = "USERNAME_AVAILABILITY_UNSPECIFIED";
6569
- UsernameAvailability2[UsernameAvailability2["USERNAME_AVAILABLE"] = 1] = "USERNAME_AVAILABLE";
6570
- UsernameAvailability2[UsernameAvailability2["USERNAME_CURRENT"] = 2] = "USERNAME_CURRENT";
6571
- UsernameAvailability2[UsernameAvailability2["USERNAME_TAKEN"] = 3] = "USERNAME_TAKEN";
6572
- UsernameAvailability2[UsernameAvailability2["USERNAME_RESERVED"] = 4] = "USERNAME_RESERVED";
6573
- UsernameAvailability2[UsernameAvailability2["USERNAME_INVALID"] = 5] = "USERNAME_INVALID";
6610
+ (function(UsernameAvailability) {
6611
+ UsernameAvailability[UsernameAvailability["USERNAME_AVAILABILITY_UNSPECIFIED"] = 0] = "USERNAME_AVAILABILITY_UNSPECIFIED";
6612
+ UsernameAvailability[UsernameAvailability["USERNAME_AVAILABLE"] = 1] = "USERNAME_AVAILABLE";
6613
+ UsernameAvailability[UsernameAvailability["USERNAME_CURRENT"] = 2] = "USERNAME_CURRENT";
6614
+ UsernameAvailability[UsernameAvailability["USERNAME_TAKEN"] = 3] = "USERNAME_TAKEN";
6615
+ UsernameAvailability[UsernameAvailability["USERNAME_RESERVED"] = 4] = "USERNAME_RESERVED";
6616
+ UsernameAvailability[UsernameAvailability["USERNAME_INVALID"] = 5] = "USERNAME_INVALID";
6574
6617
  })(UsernameAvailability || (UsernameAvailability = {}));
6575
6618
  var ExternalProfileProvider;
6576
- (function(ExternalProfileProvider2) {
6577
- ExternalProfileProvider2[ExternalProfileProvider2["EXTERNAL_PROFILE_PROVIDER_UNSPECIFIED"] = 0] = "EXTERNAL_PROFILE_PROVIDER_UNSPECIFIED";
6578
- ExternalProfileProvider2[ExternalProfileProvider2["EXTERNAL_PROFILE_PROVIDER_X"] = 1] = "EXTERNAL_PROFILE_PROVIDER_X";
6619
+ (function(ExternalProfileProvider) {
6620
+ ExternalProfileProvider[ExternalProfileProvider["EXTERNAL_PROFILE_PROVIDER_UNSPECIFIED"] = 0] = "EXTERNAL_PROFILE_PROVIDER_UNSPECIFIED";
6621
+ ExternalProfileProvider[ExternalProfileProvider["EXTERNAL_PROFILE_PROVIDER_X"] = 1] = "EXTERNAL_PROFILE_PROVIDER_X";
6579
6622
  })(ExternalProfileProvider || (ExternalProfileProvider = {}));
6580
6623
  var ExternalProfilePhotoStatus;
6581
- (function(ExternalProfilePhotoStatus2) {
6582
- ExternalProfilePhotoStatus2[ExternalProfilePhotoStatus2["EXTERNAL_PROFILE_PHOTO_STATUS_UNSPECIFIED"] = 0] = "EXTERNAL_PROFILE_PHOTO_STATUS_UNSPECIFIED";
6583
- ExternalProfilePhotoStatus2[ExternalProfilePhotoStatus2["EXTERNAL_PROFILE_PHOTO_FOUND"] = 1] = "EXTERNAL_PROFILE_PHOTO_FOUND";
6584
- ExternalProfilePhotoStatus2[ExternalProfilePhotoStatus2["EXTERNAL_PROFILE_PHOTO_NOT_FOUND"] = 2] = "EXTERNAL_PROFILE_PHOTO_NOT_FOUND";
6585
- ExternalProfilePhotoStatus2[ExternalProfilePhotoStatus2["EXTERNAL_PROFILE_PHOTO_UNAVAILABLE"] = 3] = "EXTERNAL_PROFILE_PHOTO_UNAVAILABLE";
6624
+ (function(ExternalProfilePhotoStatus) {
6625
+ ExternalProfilePhotoStatus[ExternalProfilePhotoStatus["EXTERNAL_PROFILE_PHOTO_STATUS_UNSPECIFIED"] = 0] = "EXTERNAL_PROFILE_PHOTO_STATUS_UNSPECIFIED";
6626
+ ExternalProfilePhotoStatus[ExternalProfilePhotoStatus["EXTERNAL_PROFILE_PHOTO_FOUND"] = 1] = "EXTERNAL_PROFILE_PHOTO_FOUND";
6627
+ ExternalProfilePhotoStatus[ExternalProfilePhotoStatus["EXTERNAL_PROFILE_PHOTO_NOT_FOUND"] = 2] = "EXTERNAL_PROFILE_PHOTO_NOT_FOUND";
6628
+ ExternalProfilePhotoStatus[ExternalProfilePhotoStatus["EXTERNAL_PROFILE_PHOTO_UNAVAILABLE"] = 3] = "EXTERNAL_PROFILE_PHOTO_UNAVAILABLE";
6586
6629
  })(ExternalProfilePhotoStatus || (ExternalProfilePhotoStatus = {}));
6587
6630
  var PushNotificationProvider;
6588
- (function(PushNotificationProvider2) {
6589
- PushNotificationProvider2[PushNotificationProvider2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6590
- PushNotificationProvider2[PushNotificationProvider2["APNS"] = 1] = "APNS";
6591
- PushNotificationProvider2[PushNotificationProvider2["EXPO_ANDROID"] = 2] = "EXPO_ANDROID";
6631
+ (function(PushNotificationProvider) {
6632
+ PushNotificationProvider[PushNotificationProvider["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6633
+ PushNotificationProvider[PushNotificationProvider["APNS"] = 1] = "APNS";
6634
+ PushNotificationProvider[PushNotificationProvider["EXPO_ANDROID"] = 2] = "EXPO_ANDROID";
6592
6635
  })(PushNotificationProvider || (PushNotificationProvider = {}));
6593
6636
  var DeleteDialogFolderDisposition;
6594
- (function(DeleteDialogFolderDisposition2) {
6595
- DeleteDialogFolderDisposition2[DeleteDialogFolderDisposition2["DELETE_DIALOG_FOLDER_DISPOSITION_UNSPECIFIED"] = 0] = "DELETE_DIALOG_FOLDER_DISPOSITION_UNSPECIFIED";
6596
- DeleteDialogFolderDisposition2[DeleteDialogFolderDisposition2["CLOSE_DIALOGS"] = 1] = "CLOSE_DIALOGS";
6597
- DeleteDialogFolderDisposition2[DeleteDialogFolderDisposition2["KEEP_DIALOGS"] = 2] = "KEEP_DIALOGS";
6637
+ (function(DeleteDialogFolderDisposition) {
6638
+ DeleteDialogFolderDisposition[DeleteDialogFolderDisposition["DELETE_DIALOG_FOLDER_DISPOSITION_UNSPECIFIED"] = 0] = "DELETE_DIALOG_FOLDER_DISPOSITION_UNSPECIFIED";
6639
+ DeleteDialogFolderDisposition[DeleteDialogFolderDisposition["CLOSE_DIALOGS"] = 1] = "CLOSE_DIALOGS";
6640
+ DeleteDialogFolderDisposition[DeleteDialogFolderDisposition["KEEP_DIALOGS"] = 2] = "KEEP_DIALOGS";
6598
6641
  })(DeleteDialogFolderDisposition || (DeleteDialogFolderDisposition = {}));
6599
6642
  var GetChatHistoryMode;
6600
- (function(GetChatHistoryMode2) {
6601
- GetChatHistoryMode2[GetChatHistoryMode2["HISTORY_MODE_UNSPECIFIED"] = 0] = "HISTORY_MODE_UNSPECIFIED";
6602
- GetChatHistoryMode2[GetChatHistoryMode2["HISTORY_MODE_LATEST"] = 1] = "HISTORY_MODE_LATEST";
6603
- GetChatHistoryMode2[GetChatHistoryMode2["HISTORY_MODE_OLDER"] = 2] = "HISTORY_MODE_OLDER";
6604
- GetChatHistoryMode2[GetChatHistoryMode2["HISTORY_MODE_NEWER"] = 3] = "HISTORY_MODE_NEWER";
6605
- GetChatHistoryMode2[GetChatHistoryMode2["HISTORY_MODE_AROUND"] = 4] = "HISTORY_MODE_AROUND";
6643
+ (function(GetChatHistoryMode) {
6644
+ GetChatHistoryMode[GetChatHistoryMode["HISTORY_MODE_UNSPECIFIED"] = 0] = "HISTORY_MODE_UNSPECIFIED";
6645
+ GetChatHistoryMode[GetChatHistoryMode["HISTORY_MODE_LATEST"] = 1] = "HISTORY_MODE_LATEST";
6646
+ GetChatHistoryMode[GetChatHistoryMode["HISTORY_MODE_OLDER"] = 2] = "HISTORY_MODE_OLDER";
6647
+ GetChatHistoryMode[GetChatHistoryMode["HISTORY_MODE_NEWER"] = 3] = "HISTORY_MODE_NEWER";
6648
+ GetChatHistoryMode[GetChatHistoryMode["HISTORY_MODE_AROUND"] = 4] = "HISTORY_MODE_AROUND";
6606
6649
  })(GetChatHistoryMode || (GetChatHistoryMode = {}));
6607
6650
  var ThreadReferenceKind;
6608
- (function(ThreadReferenceKind2) {
6609
- ThreadReferenceKind2[ThreadReferenceKind2["THREAD_REFERENCE_KIND_UNSPECIFIED"] = 0] = "THREAD_REFERENCE_KIND_UNSPECIFIED";
6610
- ThreadReferenceKind2[ThreadReferenceKind2["THREAD_LINK"] = 1] = "THREAD_LINK";
6611
- ThreadReferenceKind2[ThreadReferenceKind2["REPLY_THREAD"] = 2] = "REPLY_THREAD";
6651
+ (function(ThreadReferenceKind) {
6652
+ ThreadReferenceKind[ThreadReferenceKind["THREAD_REFERENCE_KIND_UNSPECIFIED"] = 0] = "THREAD_REFERENCE_KIND_UNSPECIFIED";
6653
+ ThreadReferenceKind[ThreadReferenceKind["THREAD_LINK"] = 1] = "THREAD_LINK";
6654
+ ThreadReferenceKind[ThreadReferenceKind["REPLY_THREAD"] = 2] = "REPLY_THREAD";
6612
6655
  })(ThreadReferenceKind || (ThreadReferenceKind = {}));
6613
6656
  var SearchMessagesFilter;
6614
- (function(SearchMessagesFilter2) {
6615
- SearchMessagesFilter2[SearchMessagesFilter2["FILTER_UNSPECIFIED"] = 0] = "FILTER_UNSPECIFIED";
6616
- SearchMessagesFilter2[SearchMessagesFilter2["FILTER_PHOTOS"] = 1] = "FILTER_PHOTOS";
6617
- SearchMessagesFilter2[SearchMessagesFilter2["FILTER_VIDEOS"] = 2] = "FILTER_VIDEOS";
6618
- SearchMessagesFilter2[SearchMessagesFilter2["FILTER_PHOTO_VIDEO"] = 3] = "FILTER_PHOTO_VIDEO";
6619
- SearchMessagesFilter2[SearchMessagesFilter2["FILTER_DOCUMENTS"] = 4] = "FILTER_DOCUMENTS";
6620
- SearchMessagesFilter2[SearchMessagesFilter2["FILTER_LINKS"] = 5] = "FILTER_LINKS";
6621
- SearchMessagesFilter2[SearchMessagesFilter2["FILTER_VOICE_MEMOS"] = 6] = "FILTER_VOICE_MEMOS";
6657
+ (function(SearchMessagesFilter) {
6658
+ SearchMessagesFilter[SearchMessagesFilter["FILTER_UNSPECIFIED"] = 0] = "FILTER_UNSPECIFIED";
6659
+ SearchMessagesFilter[SearchMessagesFilter["FILTER_PHOTOS"] = 1] = "FILTER_PHOTOS";
6660
+ SearchMessagesFilter[SearchMessagesFilter["FILTER_VIDEOS"] = 2] = "FILTER_VIDEOS";
6661
+ SearchMessagesFilter[SearchMessagesFilter["FILTER_PHOTO_VIDEO"] = 3] = "FILTER_PHOTO_VIDEO";
6662
+ SearchMessagesFilter[SearchMessagesFilter["FILTER_DOCUMENTS"] = 4] = "FILTER_DOCUMENTS";
6663
+ SearchMessagesFilter[SearchMessagesFilter["FILTER_LINKS"] = 5] = "FILTER_LINKS";
6664
+ SearchMessagesFilter[SearchMessagesFilter["FILTER_VOICE_MEMOS"] = 6] = "FILTER_VOICE_MEMOS";
6622
6665
  })(SearchMessagesFilter || (SearchMessagesFilter = {}));
6623
6666
  var ExternalResourceProvider;
6624
- (function(ExternalResourceProvider2) {
6625
- ExternalResourceProvider2[ExternalResourceProvider2["EXTERNAL_RESOURCE_PROVIDER_UNSPECIFIED"] = 0] = "EXTERNAL_RESOURCE_PROVIDER_UNSPECIFIED";
6626
- ExternalResourceProvider2[ExternalResourceProvider2["NOTION"] = 1] = "NOTION";
6627
- ExternalResourceProvider2[ExternalResourceProvider2["LINEAR"] = 2] = "LINEAR";
6628
- ExternalResourceProvider2[ExternalResourceProvider2["GITHUB"] = 3] = "GITHUB";
6667
+ (function(ExternalResourceProvider) {
6668
+ ExternalResourceProvider[ExternalResourceProvider["EXTERNAL_RESOURCE_PROVIDER_UNSPECIFIED"] = 0] = "EXTERNAL_RESOURCE_PROVIDER_UNSPECIFIED";
6669
+ ExternalResourceProvider[ExternalResourceProvider["NOTION"] = 1] = "NOTION";
6670
+ ExternalResourceProvider[ExternalResourceProvider["LINEAR"] = 2] = "LINEAR";
6671
+ ExternalResourceProvider[ExternalResourceProvider["GITHUB"] = 3] = "GITHUB";
6629
6672
  })(ExternalResourceProvider || (ExternalResourceProvider = {}));
6630
6673
  var ExternalResourceKind;
6631
- (function(ExternalResourceKind2) {
6632
- ExternalResourceKind2[ExternalResourceKind2["EXTERNAL_RESOURCE_KIND_UNSPECIFIED"] = 0] = "EXTERNAL_RESOURCE_KIND_UNSPECIFIED";
6633
- ExternalResourceKind2[ExternalResourceKind2["PAGE"] = 1] = "PAGE";
6634
- ExternalResourceKind2[ExternalResourceKind2["DATABASE"] = 2] = "DATABASE";
6635
- ExternalResourceKind2[ExternalResourceKind2["ISSUE"] = 3] = "ISSUE";
6636
- ExternalResourceKind2[ExternalResourceKind2["PULL_REQUEST"] = 4] = "PULL_REQUEST";
6637
- ExternalResourceKind2[ExternalResourceKind2["REPOSITORY"] = 5] = "REPOSITORY";
6638
- ExternalResourceKind2[ExternalResourceKind2["OTHER"] = 6] = "OTHER";
6674
+ (function(ExternalResourceKind) {
6675
+ ExternalResourceKind[ExternalResourceKind["EXTERNAL_RESOURCE_KIND_UNSPECIFIED"] = 0] = "EXTERNAL_RESOURCE_KIND_UNSPECIFIED";
6676
+ ExternalResourceKind[ExternalResourceKind["PAGE"] = 1] = "PAGE";
6677
+ ExternalResourceKind[ExternalResourceKind["DATABASE"] = 2] = "DATABASE";
6678
+ ExternalResourceKind[ExternalResourceKind["ISSUE"] = 3] = "ISSUE";
6679
+ ExternalResourceKind[ExternalResourceKind["PULL_REQUEST"] = 4] = "PULL_REQUEST";
6680
+ ExternalResourceKind[ExternalResourceKind["REPOSITORY"] = 5] = "REPOSITORY";
6681
+ ExternalResourceKind[ExternalResourceKind["OTHER"] = 6] = "OTHER";
6639
6682
  })(ExternalResourceKind || (ExternalResourceKind = {}));
6640
6683
  var ConnectorProvider;
6641
- (function(ConnectorProvider2) {
6642
- ConnectorProvider2[ConnectorProvider2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6643
- ConnectorProvider2[ConnectorProvider2["NOTION"] = 1] = "NOTION";
6644
- ConnectorProvider2[ConnectorProvider2["LINEAR"] = 2] = "LINEAR";
6645
- ConnectorProvider2[ConnectorProvider2["GITHUB"] = 3] = "GITHUB";
6684
+ (function(ConnectorProvider) {
6685
+ ConnectorProvider[ConnectorProvider["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6686
+ ConnectorProvider[ConnectorProvider["NOTION"] = 1] = "NOTION";
6687
+ ConnectorProvider[ConnectorProvider["LINEAR"] = 2] = "LINEAR";
6688
+ ConnectorProvider[ConnectorProvider["GITHUB"] = 3] = "GITHUB";
6646
6689
  })(ConnectorProvider || (ConnectorProvider = {}));
6647
6690
  var HttpUploadKind;
6648
- (function(HttpUploadKind2) {
6649
- HttpUploadKind2[HttpUploadKind2["HTTP_UPLOAD_KIND_UNSPECIFIED"] = 0] = "HTTP_UPLOAD_KIND_UNSPECIFIED";
6650
- HttpUploadKind2[HttpUploadKind2["PHOTO"] = 1] = "PHOTO";
6651
- HttpUploadKind2[HttpUploadKind2["VIDEO"] = 2] = "VIDEO";
6652
- HttpUploadKind2[HttpUploadKind2["DOCUMENT"] = 3] = "DOCUMENT";
6653
- HttpUploadKind2[HttpUploadKind2["VOICE"] = 4] = "VOICE";
6691
+ (function(HttpUploadKind) {
6692
+ HttpUploadKind[HttpUploadKind["HTTP_UPLOAD_KIND_UNSPECIFIED"] = 0] = "HTTP_UPLOAD_KIND_UNSPECIFIED";
6693
+ HttpUploadKind[HttpUploadKind["PHOTO"] = 1] = "PHOTO";
6694
+ HttpUploadKind[HttpUploadKind["VIDEO"] = 2] = "VIDEO";
6695
+ HttpUploadKind[HttpUploadKind["DOCUMENT"] = 3] = "DOCUMENT";
6696
+ HttpUploadKind[HttpUploadKind["VOICE"] = 4] = "VOICE";
6654
6697
  })(HttpUploadKind || (HttpUploadKind = {}));
6655
6698
  var UploadKind;
6656
- (function(UploadKind2) {
6657
- UploadKind2[UploadKind2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6658
- UploadKind2[UploadKind2["PHOTO"] = 1] = "PHOTO";
6659
- UploadKind2[UploadKind2["VIDEO"] = 2] = "VIDEO";
6660
- UploadKind2[UploadKind2["DOCUMENT"] = 3] = "DOCUMENT";
6661
- UploadKind2[UploadKind2["VOICE"] = 4] = "VOICE";
6699
+ (function(UploadKind) {
6700
+ UploadKind[UploadKind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6701
+ UploadKind[UploadKind["PHOTO"] = 1] = "PHOTO";
6702
+ UploadKind[UploadKind["VIDEO"] = 2] = "VIDEO";
6703
+ UploadKind[UploadKind["DOCUMENT"] = 3] = "DOCUMENT";
6704
+ UploadKind[UploadKind["VOICE"] = 4] = "VOICE";
6662
6705
  })(UploadKind || (UploadKind = {}));
6663
6706
  var UploadStatus;
6664
- (function(UploadStatus2) {
6665
- UploadStatus2[UploadStatus2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6666
- UploadStatus2[UploadStatus2["UPLOADING"] = 1] = "UPLOADING";
6667
- UploadStatus2[UploadStatus2["PROCESSING"] = 2] = "PROCESSING";
6668
- UploadStatus2[UploadStatus2["COMPLETE"] = 3] = "COMPLETE";
6669
- UploadStatus2[UploadStatus2["FAILED"] = 4] = "FAILED";
6670
- UploadStatus2[UploadStatus2["CANCELED"] = 5] = "CANCELED";
6671
- UploadStatus2[UploadStatus2["EXPIRED"] = 6] = "EXPIRED";
6707
+ (function(UploadStatus) {
6708
+ UploadStatus[UploadStatus["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6709
+ UploadStatus[UploadStatus["UPLOADING"] = 1] = "UPLOADING";
6710
+ UploadStatus[UploadStatus["PROCESSING"] = 2] = "PROCESSING";
6711
+ UploadStatus[UploadStatus["COMPLETE"] = 3] = "COMPLETE";
6712
+ UploadStatus[UploadStatus["FAILED"] = 4] = "FAILED";
6713
+ UploadStatus[UploadStatus["CANCELED"] = 5] = "CANCELED";
6714
+ UploadStatus[UploadStatus["EXPIRED"] = 6] = "EXPIRED";
6672
6715
  })(UploadStatus || (UploadStatus = {}));
6673
6716
 
6674
6717
  class ClientMessage$Type extends import_runtime4.MessageType {
@@ -43143,25 +43186,25 @@ var sbox = /* @__PURE__ */ (() => {
43143
43186
  var invSbox = /* @__PURE__ */ sbox.map((_, j) => sbox.indexOf(j));
43144
43187
  var rotr32_8 = (n) => n << 24 | n >>> 8;
43145
43188
  var rotl32_8 = (n) => n << 8 | n >>> 24;
43146
- function genTtable(sbox2, fn) {
43147
- if (sbox2.length !== 256)
43189
+ function genTtable(sbox, fn) {
43190
+ if (sbox.length !== 256)
43148
43191
  throw new Error("Wrong sbox length");
43149
- const T0 = new Uint32Array(256).map((_, j) => fn(sbox2[j]));
43192
+ const T0 = new Uint32Array(256).map((_, j) => fn(sbox[j]));
43150
43193
  const T1 = T0.map(rotl32_8);
43151
43194
  const T2 = T1.map(rotl32_8);
43152
43195
  const T3 = T2.map(rotl32_8);
43153
43196
  const T01 = new Uint32Array(256 * 256);
43154
43197
  const T23 = new Uint32Array(256 * 256);
43155
- const sbox22 = new Uint16Array(256 * 256);
43198
+ const sbox2 = new Uint16Array(256 * 256);
43156
43199
  for (let i = 0;i < 256; i++) {
43157
43200
  for (let j = 0;j < 256; j++) {
43158
43201
  const idx = i * 256 + j;
43159
43202
  T01[idx] = T0[i] ^ T1[j];
43160
43203
  T23[idx] = T2[i] ^ T3[j];
43161
- sbox22[idx] = sbox2[i] << 8 | sbox2[j];
43204
+ sbox2[idx] = sbox[i] << 8 | sbox[j];
43162
43205
  }
43163
43206
  }
43164
- return { sbox: sbox2, sbox2: sbox22, T0, T1, T2, T3, T01, T23 };
43207
+ return { sbox, sbox2, T0, T1, T2, T3, T01, T23 };
43165
43208
  }
43166
43209
  var tableEncoding = /* @__PURE__ */ genTtable(sbox, (s) => mul(s, 3) << 24 | s << 16 | s << 8 | mul(s, 2));
43167
43210
  var tableDecoding = /* @__PURE__ */ genTtable(invSbox, (s) => mul(s, 11) << 24 | mul(s, 13) << 16 | mul(s, 9) << 8 | mul(s, 14));
@@ -43226,11 +43269,11 @@ function encrypt(xk, s0, s1, s2, s3) {
43226
43269
  s0 ^= xk[k++], s1 ^= xk[k++], s2 ^= xk[k++], s3 ^= xk[k++];
43227
43270
  const rounds = xk.length / 4 - 2;
43228
43271
  for (let i = 0;i < rounds; i++) {
43229
- const t02 = xk[k++] ^ apply0123(T01, T23, s0, s1, s2, s3);
43230
- const t12 = xk[k++] ^ apply0123(T01, T23, s1, s2, s3, s0);
43231
- const t22 = xk[k++] ^ apply0123(T01, T23, s2, s3, s0, s1);
43232
- const t32 = xk[k++] ^ apply0123(T01, T23, s3, s0, s1, s2);
43233
- s0 = t02, s1 = t12, s2 = t22, s3 = t32;
43272
+ const t0 = xk[k++] ^ apply0123(T01, T23, s0, s1, s2, s3);
43273
+ const t1 = xk[k++] ^ apply0123(T01, T23, s1, s2, s3, s0);
43274
+ const t2 = xk[k++] ^ apply0123(T01, T23, s2, s3, s0, s1);
43275
+ const t3 = xk[k++] ^ apply0123(T01, T23, s3, s0, s1, s2);
43276
+ s0 = t0, s1 = t1, s2 = t2, s3 = t3;
43234
43277
  }
43235
43278
  const t0 = xk[k++] ^ applySbox(sbox2, s0, s1, s2, s3);
43236
43279
  const t1 = xk[k++] ^ applySbox(sbox2, s1, s2, s3, s0);
@@ -43244,11 +43287,11 @@ function decrypt(xk, s0, s1, s2, s3) {
43244
43287
  s0 ^= xk[k++], s1 ^= xk[k++], s2 ^= xk[k++], s3 ^= xk[k++];
43245
43288
  const rounds = xk.length / 4 - 2;
43246
43289
  for (let i = 0;i < rounds; i++) {
43247
- const t02 = xk[k++] ^ apply0123(T01, T23, s0, s3, s2, s1);
43248
- const t12 = xk[k++] ^ apply0123(T01, T23, s1, s0, s3, s2);
43249
- const t22 = xk[k++] ^ apply0123(T01, T23, s2, s1, s0, s3);
43250
- const t32 = xk[k++] ^ apply0123(T01, T23, s3, s2, s1, s0);
43251
- s0 = t02, s1 = t12, s2 = t22, s3 = t32;
43290
+ const t0 = xk[k++] ^ apply0123(T01, T23, s0, s3, s2, s1);
43291
+ const t1 = xk[k++] ^ apply0123(T01, T23, s1, s0, s3, s2);
43292
+ const t2 = xk[k++] ^ apply0123(T01, T23, s2, s1, s0, s3);
43293
+ const t3 = xk[k++] ^ apply0123(T01, T23, s3, s2, s1, s0);
43294
+ s0 = t0, s1 = t1, s2 = t2, s3 = t3;
43252
43295
  }
43253
43296
  const t0 = xk[k++] ^ applySbox(sbox2, s0, s3, s2, s1);
43254
43297
  const t1 = xk[k++] ^ applySbox(sbox2, s1, s0, s3, s2);
@@ -43663,9 +43706,9 @@ var decodeInlineApplicationObject = (bytes) => {
43663
43706
  const reader = new TlReader(bytes.slice(4));
43664
43707
  if (constructor === INLINE_INVOKE_CONSTRUCTOR) {
43665
43708
  const layer = reader.readInt();
43666
- const payload2 = reader.readBytes();
43709
+ const payload = reader.readBytes();
43667
43710
  reader.expectEnd();
43668
- return { kind: "invoke", layer, payload: payload2 };
43711
+ return { kind: "invoke", layer, payload };
43669
43712
  }
43670
43713
  const payload = reader.readBytes();
43671
43714
  reader.expectEnd();
@@ -44622,16 +44665,16 @@ var rawDataBytes = (data) => {
44622
44665
  throw new InlineProtocolV3Error("protocol", "Unsupported WebSocket frame type");
44623
44666
  };
44624
44667
  var randomInt64 = (random) => {
44625
- const bytes2 = random(8);
44626
- if (bytes2.length !== 8)
44668
+ const bytes = random(8);
44669
+ if (bytes.length !== 8)
44627
44670
  throw new InlineProtocolV3Error("protocol", "CSPRNG returned an invalid value");
44628
- return new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength).getBigInt64(0, true);
44671
+ return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getBigInt64(0, true);
44629
44672
  };
44630
44673
  var randomLowBits = (random) => {
44631
- const bytes2 = random(4);
44632
- if (bytes2.length !== 4)
44674
+ const bytes = random(4);
44675
+ if (bytes.length !== 4)
44633
44676
  throw new InlineProtocolV3Error("protocol", "CSPRNG returned an invalid value");
44634
- return new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength).getUint32(0, true) & 1073741823;
44677
+ return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getUint32(0, true) & 1073741823;
44635
44678
  };
44636
44679
  var recordPadding = (bodyLength, random) => {
44637
44680
  const length = 12 + (16 - (32 + bodyLength + 12) % 16) % 16;
@@ -44752,9 +44795,9 @@ class InlineProtocolV3Connection {
44752
44795
  async#invoke(request, onDispatched, signal) {
44753
44796
  const payload = RealtimeV3Request.toBinary(request);
44754
44797
  const result = await this.#sendContent(encodeInlineInvoke(payload), onDispatched, signal);
44755
- let application2;
44798
+ let application;
44756
44799
  try {
44757
- application2 = decodeInlineApplicationObject(result);
44800
+ application = decodeInlineApplicationObject(result);
44758
44801
  } catch (error) {
44759
44802
  if (serviceConstructor(result) === ServiceConstructor.rpcError) {
44760
44803
  const rpcError = decodeRpcError(result);
@@ -44767,10 +44810,10 @@ class InlineProtocolV3Connection {
44767
44810
  }
44768
44811
  throw error;
44769
44812
  }
44770
- if (application2.kind !== "result") {
44813
+ if (application.kind !== "result") {
44771
44814
  throw new InlineProtocolV3Error("protocol", "Expected an Inline application result");
44772
44815
  }
44773
- return RealtimeV3Response.fromBinary(application2.payload);
44816
+ return RealtimeV3Response.fromBinary(application.payload);
44774
44817
  }
44775
44818
  async authBegin(request) {
44776
44819
  const response = await this.invoke({ body: { oneofKind: "authBegin", authBegin: request } });
@@ -44858,15 +44901,15 @@ class InlineProtocolV3Connection {
44858
44901
  if (!authorization?.temporary || authorization.expiresAt === undefined || this.#closing)
44859
44902
  return;
44860
44903
  const boundary = authorization.expiresAt * 1000 - TEMPORARY_KEY_ROTATION_MILLISECONDS;
44861
- const delay3 = boundary - this.#clock.nowMilliseconds();
44862
- if (!Number.isFinite(delay3) || delay3 <= 0) {
44904
+ const delay = boundary - this.#clock.nowMilliseconds();
44905
+ if (!Number.isFinite(delay) || delay <= 0) {
44863
44906
  this.#markRotationDue();
44864
44907
  return;
44865
44908
  }
44866
44909
  const timer = setTimeout(() => {
44867
44910
  this.#rotationTimer = undefined;
44868
44911
  this.#scheduleRotationTimer();
44869
- }, Math.min(delay3, 2147000000));
44912
+ }, Math.min(delay, 2147000000));
44870
44913
  if (typeof timer !== "number" && typeof timer.unref === "function")
44871
44914
  timer.unref();
44872
44915
  this.#rotationTimer = timer;
@@ -44968,17 +45011,17 @@ class InlineProtocolV3Connection {
44968
45011
  this.#sendRaw(this.#carrier.wireHeader);
44969
45012
  }
44970
45013
  async#handshake(temporary) {
44971
- const handshake2 = new InlineHandshakeClient({
45014
+ const handshake = new InlineHandshakeClient({
44972
45015
  rsaKeys: this.#rsaKeys,
44973
45016
  randomBytes: this.#random,
44974
45017
  dc: 1
44975
45018
  });
44976
- let request = handshake2.begin(temporary);
45019
+ let request = handshake.begin(temporary);
44977
45020
  for (;; ) {
44978
45021
  const messageId = this.#messageIds.next(Date.now(), randomLowBits(this.#random), 0);
44979
45022
  this.#sendPacket(encodeUnencryptedRecord(messageId, request));
44980
45023
  const response = decodeUnencryptedRecord(await this.#receivePacket(this.#options.requestTimeoutMs ?? REQUEST_TIMEOUT_MS));
44981
- const result = handshake2.receive(response.body);
45024
+ const result = handshake.receive(response.body);
44982
45025
  if ("request" in result) {
44983
45026
  request = result.request;
44984
45027
  continue;
@@ -45062,20 +45105,20 @@ class InlineProtocolV3Connection {
45062
45105
  const fields = await this.#receiveEncrypted();
45063
45106
  if (fields.sequenceNumber % 2 === 1)
45064
45107
  await this.#sendAcknowledgements([fields.messageId]);
45065
- const constructor3 = serviceConstructor(fields.body);
45066
- if (constructor3 === ServiceConstructor.newSessionCreated) {
45108
+ const constructor = serviceConstructor(fields.body);
45109
+ if (constructor === ServiceConstructor.newSessionCreated) {
45067
45110
  this.#setServerSalt(readInt64LE(fields.body, 20));
45068
45111
  continue;
45069
45112
  }
45070
- if (constructor3 === ServiceConstructor.msgsAck) {
45113
+ if (constructor === ServiceConstructor.msgsAck) {
45071
45114
  decodeMsgsAck(fields.body);
45072
45115
  continue;
45073
45116
  }
45074
- if (constructor3 === ServiceConstructor.badMsgNotification || constructor3 === ServiceConstructor.badServerSalt) {
45117
+ if (constructor === ServiceConstructor.badMsgNotification || constructor === ServiceConstructor.badServerSalt) {
45075
45118
  this.#handleBadMessage(fields.body, fields.messageId);
45076
45119
  continue;
45077
45120
  }
45078
- if (constructor3 === ServiceConstructor.rpcResult) {
45121
+ if (constructor === ServiceConstructor.rpcResult) {
45079
45122
  const result = decodeRpcResult(fields.body);
45080
45123
  const pending = this.#pendingContent.get(result.requestMessageId);
45081
45124
  if (!pending)
@@ -45087,7 +45130,7 @@ class InlineProtocolV3Connection {
45087
45130
  pending.resolve({ messageId: result.requestMessageId, result: result.result });
45088
45131
  continue;
45089
45132
  }
45090
- if (constructor3 === ServiceConstructor.pong) {
45133
+ if (constructor === ServiceConstructor.pong) {
45091
45134
  if (fields.body.length !== 20)
45092
45135
  throw new InlineProtocolV3Error("protocol", "Invalid pong");
45093
45136
  const requestMessageId = readInt64LE(fields.body, 4);
@@ -45106,9 +45149,9 @@ class InlineProtocolV3Connection {
45106
45149
  continue;
45107
45150
  }
45108
45151
  try {
45109
- const application2 = decodeInlineApplicationObject(fields.body);
45110
- if (application2.kind === "update") {
45111
- this.#options.onUpdate?.(RealtimeV3Update.fromBinary(application2.payload));
45152
+ const application = decodeInlineApplicationObject(fields.body);
45153
+ if (application.kind === "update") {
45154
+ this.#options.onUpdate?.(RealtimeV3Update.fromBinary(application.payload));
45112
45155
  }
45113
45156
  } catch {}
45114
45157
  }
@@ -45202,14 +45245,14 @@ class InlineProtocolV3Connection {
45202
45245
  const authorization = this.#authorization;
45203
45246
  if (!authorization)
45204
45247
  throw new InlineProtocolV3Error("unauthorized", "Authorization-key handshake is incomplete");
45205
- const record2 = encryptRecord(authorization.key, "client-to-server", {
45248
+ const record = encryptRecord(authorization.key, "client-to-server", {
45206
45249
  serverSalt: authorization.serverSalt,
45207
45250
  sessionId: this.#sessionId,
45208
45251
  messageId,
45209
45252
  sequenceNumber,
45210
45253
  body
45211
45254
  }, recordPadding(body.length, this.#random));
45212
- this.#sendPacket(record2, quickAck);
45255
+ this.#sendPacket(record, quickAck);
45213
45256
  }
45214
45257
  #nextClientMessageId() {
45215
45258
  return this.#messageIds.next(this.#clock.nowMilliseconds(), randomLowBits(this.#random), 0);
@@ -45220,32 +45263,32 @@ class InlineProtocolV3Connection {
45220
45263
  this.#authorization.serverSalt = serverSalt;
45221
45264
  }
45222
45265
  #sendPacket(packet, quickAck = false) {
45223
- const carrier2 = this.#carrier;
45224
- if (!carrier2)
45266
+ const carrier = this.#carrier;
45267
+ if (!carrier)
45225
45268
  throw new InlineProtocolV3Error("closed", "Inline Protocol carrier is unavailable");
45226
- this.#sendRaw(carrier2.outbound.process(encodeAbridgedPacket(packet, quickAck)));
45269
+ this.#sendRaw(carrier.outbound.process(encodeAbridgedPacket(packet, quickAck)));
45227
45270
  }
45228
45271
  async#receivePacket(timeoutMs) {
45229
- const carrier2 = this.#carrier;
45230
- if (!carrier2)
45272
+ const carrier = this.#carrier;
45273
+ if (!carrier)
45231
45274
  throw new InlineProtocolV3Error("closed", "Inline Protocol carrier is unavailable");
45232
45275
  for (;; ) {
45233
45276
  const wire = await this.#inbox.next(timeoutMs);
45234
- const frame = decodeAbridgedFrame(carrier2.inbound.process(wire));
45277
+ const frame = decodeAbridgedFrame(carrier.inbound.process(wire));
45235
45278
  if (frame.kind === "quickAck")
45236
45279
  continue;
45237
45280
  return frame.payload;
45238
45281
  }
45239
45282
  }
45240
- #sendRaw(bytes2) {
45283
+ #sendRaw(bytes) {
45241
45284
  const socket = this.#socket;
45242
45285
  if (!socket || socket.readyState !== import_websocket.default.OPEN)
45243
45286
  throw new InlineProtocolV3Error("closed", "Inline Protocol connection is not open");
45244
45287
  const bufferedAmount = Number.isFinite(socket.bufferedAmount) ? socket.bufferedAmount : 0;
45245
- if (bufferedAmount + bytes2.byteLength > MAXIMUM_OUTBOUND_BUFFER_BYTES) {
45288
+ if (bufferedAmount + bytes.byteLength > MAXIMUM_OUTBOUND_BUFFER_BYTES) {
45246
45289
  throw new InlineProtocolV3Error("closed", `Inline Protocol outbound buffer exceeded ${MAXIMUM_OUTBOUND_BUFFER_BYTES} bytes`);
45247
45290
  }
45248
- socket.send(bytes2);
45291
+ socket.send(bytes);
45249
45292
  }
45250
45293
  }
45251
45294
 
@@ -45977,9 +46020,9 @@ var reconnectPolicyForRpc = (method, input) => {
45977
46020
  return replaySafeRpcMethods.has(method) ? "replay-safe" : "never-replay";
45978
46021
  };
45979
46022
  var randomMessageId = () => {
45980
- const bytes2 = new Uint8Array(8);
45981
- globalThis.crypto.getRandomValues(bytes2);
45982
- const value = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength).getBigInt64(0, true);
46023
+ const bytes = new Uint8Array(8);
46024
+ globalThis.crypto.getRandomValues(bytes);
46025
+ const value = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getBigInt64(0, true);
45983
46026
  return value === 0n ? 1n : value;
45984
46027
  };
45985
46028
  var normalizeMessageRandomId = (value) => {
@@ -46492,8 +46535,8 @@ class InlineSdkClient {
46492
46535
  }
46493
46536
  async registerDesiredBotCapabilities() {
46494
46537
  if (this.botCapabilitiesRegistrationInFlight) {
46495
- const result2 = await this.botCapabilitiesRegistrationInFlight;
46496
- return this.registeredBotCapabilitiesRevision < this.desiredBotCapabilitiesRevision ? await this.registerDesiredBotCapabilities() : result2;
46538
+ const result = await this.botCapabilitiesRegistrationInFlight;
46539
+ return this.registeredBotCapabilitiesRevision < this.desiredBotCapabilitiesRevision ? await this.registerDesiredBotCapabilities() : result;
46497
46540
  }
46498
46541
  const capabilities = this.desiredBotCapabilities;
46499
46542
  if (capabilities == null)
@@ -46502,9 +46545,9 @@ class InlineSdkClient {
46502
46545
  const registration = this.invoke(Method.SET_MY_BOT_CAPABILITIES, {
46503
46546
  oneofKind: "setMyBotCapabilities",
46504
46547
  setMyBotCapabilities: { capabilities }
46505
- }).then((result2) => {
46548
+ }).then((result) => {
46506
46549
  this.registeredBotCapabilitiesRevision = Math.max(this.registeredBotCapabilitiesRevision, revision);
46507
- return { capabilities: result2.setMyBotCapabilities.capabilities };
46550
+ return { capabilities: result.setMyBotCapabilities.capabilities };
46508
46551
  });
46509
46552
  this.botCapabilitiesRegistrationInFlight = registration;
46510
46553
  let result;
@@ -47135,14 +47178,14 @@ class InlineSdkClient {
47135
47178
  try {
47136
47179
  acknowledged = this.eventStream.send(event);
47137
47180
  } catch (error) {
47138
- const bucket2 = this.bucketForEvent(event);
47139
- if (bucket2) {
47140
- this.fenceLiveCursor(bucket2);
47141
- this.markUpdateBucketDegraded(bucket2);
47142
- this.requestCatchUpAfterEventOverflow(bucket2, event);
47181
+ const bucket = this.bucketForEvent(event);
47182
+ if (bucket) {
47183
+ this.fenceLiveCursor(bucket);
47184
+ this.markUpdateBucketDegraded(bucket);
47185
+ this.requestCatchUpAfterEventOverflow(bucket, event);
47143
47186
  }
47144
47187
  this.log.warn?.("Inbound event buffer overflow; durable cursor remains unchanged and transport will recover", {
47145
- bucket: bucket2 ? this.updateBucketKey(bucket2) : "none",
47188
+ bucket: bucket ? this.updateBucketKey(bucket) : "none",
47146
47189
  error: extractErrorMessage(error)
47147
47190
  });
47148
47191
  this.requestRecoveryReconnect("inbound-event-buffer-overflow");
@@ -47347,8 +47390,8 @@ class InlineSdkClient {
47347
47390
  requestCatchUpForDegradedBucket(bucket) {
47348
47391
  switch (bucket.kind) {
47349
47392
  case "chat": {
47350
- const request2 = this.catchUpRequestedByChatId.get(bucket.chatId) ?? this.peerResolutionRequestedByChatId.get(bucket.chatId);
47351
- const updateSeq = request2 && !request2.toLatest ? request2.endSeq : undefined;
47393
+ const request = this.catchUpRequestedByChatId.get(bucket.chatId) ?? this.peerResolutionRequestedByChatId.get(bucket.chatId);
47394
+ const updateSeq = request && !request.toLatest ? request.endSeq : undefined;
47352
47395
  const peer = bucket.peer ?? this.persistedChatPeer(bucket.chatId);
47353
47396
  if (peer && this.isReliableChatPeer(peer)) {
47354
47397
  this.requestCatchUpChat({ chatId: bucket.chatId, peer, updateSeq });
@@ -47358,10 +47401,10 @@ class InlineSdkClient {
47358
47401
  return;
47359
47402
  }
47360
47403
  case "space": {
47361
- const request2 = this.catchUpRequestedBySpaceId.get(bucket.spaceId);
47404
+ const request = this.catchUpRequestedBySpaceId.get(bucket.spaceId);
47362
47405
  this.requestCatchUpSpace({
47363
47406
  spaceId: bucket.spaceId,
47364
- updateSeq: request2 && !request2.toLatest ? request2.endSeq : undefined
47407
+ updateSeq: request && !request.toLatest ? request.endSeq : undefined
47365
47408
  });
47366
47409
  return;
47367
47410
  }
@@ -47840,20 +47883,20 @@ class InlineSdkClient {
47840
47883
  });
47841
47884
  const payload = result.getUpdates;
47842
47885
  if (payload.resultType === GetUpdatesResult_ResultType.TOO_LONG) {
47843
- const deliveredSeq2 = Number(payload.seq ?? 0n);
47844
- if (endSeq != null && requestEndSeq != null && deliveredSeq2 !== requestEndSeq) {
47886
+ const deliveredSeq = Number(payload.seq ?? 0n);
47887
+ if (endSeq != null && requestEndSeq != null && deliveredSeq !== requestEndSeq) {
47845
47888
  this.markUpdateBucketDegraded({ kind: "chat", chatId, peer });
47846
47889
  this.log.warn?.("GET_UPDATES TOO_LONG pointer did not cover the requested chat target", {
47847
47890
  chatId: chatId.toString(),
47848
47891
  requestedEndSeq: requestEndSeq,
47849
- deliveredSeq: deliveredSeq2
47892
+ deliveredSeq
47850
47893
  });
47851
47894
  return true;
47852
47895
  }
47853
- const shouldContinue = this.shouldContinueBoundedCatchUp(cursor, deliveredSeq2, requestEndSeq, endSeq);
47854
- const repaired = await this.repairUpdateBucketAuthoritatively({ kind: "chat", chatId, peer }, deliveredSeq2, payload.date, !shouldContinue);
47896
+ const shouldContinue = this.shouldContinueBoundedCatchUp(cursor, deliveredSeq, requestEndSeq, endSeq);
47897
+ const repaired = await this.repairUpdateBucketAuthoritatively({ kind: "chat", chatId, peer }, deliveredSeq, payload.date, !shouldContinue);
47855
47898
  if (repaired && shouldContinue) {
47856
- cursor = deliveredSeq2;
47899
+ cursor = deliveredSeq;
47857
47900
  continue;
47858
47901
  }
47859
47902
  return true;
@@ -47987,20 +48030,20 @@ class InlineSdkClient {
47987
48030
  });
47988
48031
  const payload = result.getUpdates;
47989
48032
  if (payload.resultType === GetUpdatesResult_ResultType.TOO_LONG) {
47990
- const deliveredSeq2 = Number(payload.seq ?? 0n);
47991
- if (endSeq != null && requestEndSeq != null && deliveredSeq2 !== requestEndSeq) {
48033
+ const deliveredSeq = Number(payload.seq ?? 0n);
48034
+ if (endSeq != null && requestEndSeq != null && deliveredSeq !== requestEndSeq) {
47992
48035
  this.markUpdateBucketDegraded({ kind: "space", spaceId });
47993
48036
  this.log.warn?.("GET_UPDATES TOO_LONG pointer did not cover the requested space target", {
47994
48037
  spaceId: spaceId.toString(),
47995
48038
  requestedEndSeq: requestEndSeq,
47996
- deliveredSeq: deliveredSeq2
48039
+ deliveredSeq
47997
48040
  });
47998
48041
  return true;
47999
48042
  }
48000
- const shouldContinue = this.shouldContinueBoundedCatchUp(cursor, deliveredSeq2, requestEndSeq, endSeq);
48001
- const repaired = await this.repairUpdateBucketAuthoritatively({ kind: "space", spaceId }, deliveredSeq2, payload.date, !shouldContinue);
48043
+ const shouldContinue = this.shouldContinueBoundedCatchUp(cursor, deliveredSeq, requestEndSeq, endSeq);
48044
+ const repaired = await this.repairUpdateBucketAuthoritatively({ kind: "space", spaceId }, deliveredSeq, payload.date, !shouldContinue);
48002
48045
  if (repaired && shouldContinue) {
48003
- cursor = deliveredSeq2;
48046
+ cursor = deliveredSeq;
48004
48047
  continue;
48005
48048
  }
48006
48049
  return true;
@@ -48845,16 +48888,16 @@ class InlineUserDirectory {
48845
48888
  this.onError = options.onError;
48846
48889
  }
48847
48890
  async resolve(params) {
48848
- const cached2 = this.getFresh(params.userId.toString());
48849
- if (hasDisplayIdentity(cached2))
48850
- return cached2;
48891
+ const cached = this.getFresh(params.userId.toString());
48892
+ if (hasDisplayIdentity(cached))
48893
+ return cached;
48851
48894
  return (await this.resolveWithProvenance(params)).profile;
48852
48895
  }
48853
48896
  async resolveWithProvenance(params) {
48854
48897
  const userId = params.userId.toString();
48855
- const cached2 = this.getFresh(userId);
48856
- if (cached2?.bot != null) {
48857
- return { profile: cached2, provenanceVerified: true };
48898
+ const cached = this.getFresh(userId);
48899
+ if (cached?.bot != null) {
48900
+ return { profile: cached, provenanceVerified: true };
48858
48901
  }
48859
48902
  if (params.direct) {
48860
48903
  const directoryHydrated = await this.hydrateDirectory();
@@ -48911,16 +48954,16 @@ class InlineUserDirectory {
48911
48954
  }
48912
48955
  }
48913
48956
  getFresh(userId) {
48914
- const cached2 = this.profiles.get(userId);
48915
- if (!cached2)
48957
+ const cached = this.profiles.get(userId);
48958
+ if (!cached)
48916
48959
  return;
48917
- if (cached2.expiresAt <= this.now()) {
48960
+ if (cached.expiresAt <= this.now()) {
48918
48961
  this.profiles.delete(userId);
48919
48962
  return;
48920
48963
  }
48921
48964
  this.profiles.delete(userId);
48922
- this.profiles.set(userId, cached2);
48923
- return cached2.profile;
48965
+ this.profiles.set(userId, cached);
48966
+ return cached.profile;
48924
48967
  }
48925
48968
  async hydrateChat(chatId) {
48926
48969
  const key = chatId.toString();
@@ -49005,8 +49048,8 @@ function readBooleanProfileField(value, previous, key) {
49005
49048
  function readUsers(result, kind) {
49006
49049
  if (!result || typeof result !== "object")
49007
49050
  return [];
49008
- const record2 = result;
49009
- const payload = record2[kind];
49051
+ const record = result;
49052
+ const payload = record[kind];
49010
49053
  if (!payload || typeof payload !== "object")
49011
49054
  return [];
49012
49055
  const users = payload.users;
@@ -49347,8 +49390,8 @@ async function handleRequest(req, res) {
49347
49390
  return;
49348
49391
  }
49349
49392
  if (url.pathname === "/inbound/ack") {
49350
- const body2 = asRecord(await readJsonBody(req));
49351
- const deliveryId = readRequiredString(body2, "deliveryId");
49393
+ const body = asRecord(await readJsonBody(req));
49394
+ const deliveryId = readRequiredString(body, "deliveryId");
49352
49395
  inboundStream.acknowledge(deliveryId);
49353
49396
  writeJson(res, 200, { ok: true, result: {} });
49354
49397
  return;
@@ -49453,14 +49496,14 @@ async function handleRequest(req, res) {
49453
49496
  }
49454
49497
  }
49455
49498
  async function endpointSend(res, body) {
49456
- const record2 = asRecord(body);
49457
- const target = parseTarget(record2);
49458
- const text = readOptionalString(record2, "text");
49459
- const replyToMsgId = readOptionalInlineId(record2, "replyToMsgId");
49460
- const parseMarkdown = readOptionalBoolean(record2, "parseMarkdown") ?? true;
49461
- const actions = parseActions(record2.actions);
49462
- const sendMode = readOptionalString(record2, "sendMode");
49463
- const media = parseSendMedia(record2.media);
49499
+ const record = asRecord(body);
49500
+ const target = parseTarget(record);
49501
+ const text = readOptionalString(record, "text");
49502
+ const replyToMsgId = readOptionalInlineId(record, "replyToMsgId");
49503
+ const parseMarkdown = readOptionalBoolean(record, "parseMarkdown") ?? true;
49504
+ const actions = parseActions(record.actions);
49505
+ const sendMode = readOptionalString(record, "sendMode");
49506
+ const media = parseSendMedia(record.media);
49464
49507
  if (!text && !media) {
49465
49508
  throw new SidecarError("send requires text or media", "bad_format");
49466
49509
  }
@@ -49475,12 +49518,12 @@ async function endpointSend(res, body) {
49475
49518
  writeJson(res, 200, { ok: true, result: { messageId: result.messageId?.toString() ?? null } });
49476
49519
  }
49477
49520
  async function endpointEdit(res, body) {
49478
- const record2 = asRecord(body);
49479
- const target = parseTarget(record2);
49480
- const messageId = readRequiredInlineId(record2, "messageId");
49481
- const text = readRequiredString(record2, "text");
49482
- const actions = parseActions(record2.actions);
49483
- const parseMarkdown = readOptionalBoolean(record2, "parseMarkdown") ?? true;
49521
+ const record = asRecord(body);
49522
+ const target = parseTarget(record);
49523
+ const messageId = readRequiredInlineId(record, "messageId");
49524
+ const text = readRequiredString(record, "text");
49525
+ const actions = parseActions(record.actions);
49526
+ const parseMarkdown = readOptionalBoolean(record, "parseMarkdown") ?? true;
49484
49527
  await client.invoke(Method.EDIT_MESSAGE, {
49485
49528
  oneofKind: "editMessage",
49486
49529
  editMessage: {
@@ -49494,9 +49537,9 @@ async function endpointEdit(res, body) {
49494
49537
  writeJson(res, 200, { ok: true, result: { messageId: messageId.toString() } });
49495
49538
  }
49496
49539
  async function endpointDelete(res, body) {
49497
- const record2 = asRecord(body);
49498
- const target = parseTarget(record2);
49499
- const messageId = readRequiredInlineId(record2, "messageId");
49540
+ const record = asRecord(body);
49541
+ const target = parseTarget(record);
49542
+ const messageId = readRequiredInlineId(record, "messageId");
49500
49543
  await client.invoke(Method.DELETE_MESSAGES, {
49501
49544
  oneofKind: "deleteMessages",
49502
49545
  deleteMessages: {
@@ -49507,9 +49550,9 @@ async function endpointDelete(res, body) {
49507
49550
  writeJson(res, 200, { ok: true, result: { messageId: messageId.toString() } });
49508
49551
  }
49509
49552
  async function endpointTyping(res, body) {
49510
- const record2 = asRecord(body);
49511
- const target = parseTarget(record2);
49512
- const state = readOptionalString(record2, "state") ?? "start";
49553
+ const record = asRecord(body);
49554
+ const target = parseTarget(record);
49555
+ const state = readOptionalString(record, "state") ?? "start";
49513
49556
  if ("userId" in target) {
49514
49557
  writeJson(res, 200, { ok: true, result: { skipped: "typing is chat-only" } });
49515
49558
  return;
@@ -49525,10 +49568,10 @@ async function endpointTyping(res, body) {
49525
49568
  writeJson(res, 200, { ok: true, result: {} });
49526
49569
  }
49527
49570
  async function endpointPresence(res, body) {
49528
- const record2 = asRecord(body);
49529
- const target = parseTarget(record2);
49530
- const kind = readRequiredString(record2, "kind");
49531
- const comment = readOptionalString(record2, "comment");
49571
+ const record = asRecord(body);
49572
+ const target = parseTarget(record);
49573
+ const kind = readRequiredString(record, "kind");
49574
+ const comment = readOptionalString(record, "comment");
49532
49575
  if ("chatId" in target) {
49533
49576
  await client.setBotPresenceState({ chatId: target.chatId, kind, ...comment ? { comment } : {} });
49534
49577
  } else {
@@ -49537,15 +49580,15 @@ async function endpointPresence(res, body) {
49537
49580
  writeJson(res, 200, { ok: true, result: {} });
49538
49581
  }
49539
49582
  async function endpointSendAttachment(res, body) {
49540
- const record2 = asRecord(body);
49541
- const target = parseTarget(record2);
49542
- const filePath = readRequiredString(record2, "path");
49543
- const kind = normalizeUploadKind(readOptionalString(record2, "kind"), filePath);
49544
- const caption = readOptionalString(record2, "caption");
49545
- const parseMarkdown = readOptionalBoolean(record2, "parseMarkdown") ?? true;
49546
- const replyToMsgId = readOptionalInlineId(record2, "replyToMsgId");
49547
- const fileName = readOptionalString(record2, "fileName") || path.basename(filePath);
49548
- const contentType = readOptionalString(record2, "mimeType");
49583
+ const record = asRecord(body);
49584
+ const target = parseTarget(record);
49585
+ const filePath = readRequiredString(record, "path");
49586
+ const kind = normalizeUploadKind(readOptionalString(record, "kind"), filePath);
49587
+ const caption = readOptionalString(record, "caption");
49588
+ const parseMarkdown = readOptionalBoolean(record, "parseMarkdown") ?? true;
49589
+ const replyToMsgId = readOptionalInlineId(record, "replyToMsgId");
49590
+ const fileName = readOptionalString(record, "fileName") || path.basename(filePath);
49591
+ const contentType = readOptionalString(record, "mimeType");
49549
49592
  const info = await statAttachment(filePath);
49550
49593
  if (info.size > uploadMaxBytes) {
49551
49594
  throw new SidecarError(`attachment exceeds Inline upload cap (${info.size} > ${uploadMaxBytes} bytes)`, "too_long");
@@ -49598,8 +49641,8 @@ function hasNodeErrorCode(error, ...codes) {
49598
49641
  return Boolean(error && typeof error === "object" && "code" in error && typeof error.code === "string" && codes.includes(error.code));
49599
49642
  }
49600
49643
  async function endpointChat(res, body) {
49601
- const record2 = asRecord(body);
49602
- const target = parseTarget(record2);
49644
+ const record = asRecord(body);
49645
+ const target = parseTarget(record);
49603
49646
  if ("userId" in target) {
49604
49647
  const sender = await userDirectory.resolve({ userId: target.userId, chatId: target.userId, direct: true });
49605
49648
  writeJson(res, 200, {
@@ -49642,9 +49685,9 @@ async function endpointChat(res, body) {
49642
49685
  });
49643
49686
  }
49644
49687
  async function endpointFollowMode(res, body) {
49645
- const record2 = asRecord(body);
49646
- const target = parseTarget(record2);
49647
- const mode = readRequiredString(record2, "mode");
49688
+ const record = asRecord(body);
49689
+ const target = parseTarget(record);
49690
+ const mode = readRequiredString(record, "mode");
49648
49691
  const followMode = mode === "following" ? DialogFollowMode.FOLLOWING : mode === "unfollowed" ? DialogFollowMode.UNFOLLOWED : null;
49649
49692
  if (followMode == null) {
49650
49693
  throw new SidecarError("mode must be following or unfollowed", "bad_format");
@@ -49659,18 +49702,18 @@ async function endpointFollowMode(res, body) {
49659
49702
  writeJson(res, 200, { ok: true, result: { mode } });
49660
49703
  }
49661
49704
  async function endpointMessages(res, body) {
49662
- const record2 = asRecord(body);
49663
- const target = parseTarget(record2);
49664
- const messageIds = readInlineIdArray(record2, "messageIds", 100, true);
49705
+ const record = asRecord(body);
49706
+ const target = parseTarget(record);
49707
+ const messageIds = readInlineIdArray(record, "messageIds", 100, true);
49665
49708
  const result = "chatId" in target ? await client.getMessages({ chatId: target.chatId, messageIds }) : await client.getMessages({ userId: target.userId, messageIds });
49666
49709
  const ordered = orderMessagesByRequestedIds(result.messages, messageIds);
49667
49710
  writeJson(res, 200, { ok: true, result: { messages: safeJson(await enrichMessages(ordered, target)) } });
49668
49711
  }
49669
49712
  async function endpointHistory(res, body) {
49670
- const record2 = asRecord(body);
49671
- const target = parseTarget(record2);
49672
- const limit = readOptionalNumber(record2, "limit") ?? 20;
49673
- const anchorId = readOptionalInlineId(record2, "anchorId");
49713
+ const record = asRecord(body);
49714
+ const target = parseTarget(record);
49715
+ const limit = readOptionalNumber(record, "limit") ?? 20;
49716
+ const anchorId = readOptionalInlineId(record, "anchorId");
49674
49717
  const result = await client.invoke(Method.GET_CHAT_HISTORY, {
49675
49718
  oneofKind: "getChatHistory",
49676
49719
  getChatHistory: {
@@ -49684,13 +49727,13 @@ async function endpointHistory(res, body) {
49684
49727
  writeJson(res, 200, { ok: true, result: { messages: safeJson(await enrichMessages(messages, target)) } });
49685
49728
  }
49686
49729
  async function endpointSearch(res, body) {
49687
- const record2 = asRecord(body);
49688
- const target = parseTarget(record2);
49689
- const query = readRequiredString(record2, "query").trim();
49730
+ const record = asRecord(body);
49731
+ const target = parseTarget(record);
49732
+ const query = readRequiredString(record, "query").trim();
49690
49733
  if (!query)
49691
49734
  throw new SidecarError("search requires query", "bad_format");
49692
- const limit = clampResultLimit(readOptionalNumber(record2, "limit") ?? 20, 100);
49693
- const offsetId = readOptionalInlineId(record2, "offsetId");
49735
+ const limit = clampResultLimit(readOptionalNumber(record, "limit") ?? 20, 100);
49736
+ const offsetId = readOptionalInlineId(record, "offsetId");
49694
49737
  const result = await client.invokeUncheckedRaw(Method.SEARCH_MESSAGES, {
49695
49738
  oneofKind: "searchMessages",
49696
49739
  searchMessages: {
@@ -49705,13 +49748,13 @@ async function endpointSearch(res, body) {
49705
49748
  writeJson(res, 200, { ok: true, result: { messages: safeJson(await enrichMessages(messages, target)) } });
49706
49749
  }
49707
49750
  async function endpointReaction(res, body) {
49708
- const record2 = asRecord(body);
49709
- const target = parseTarget(record2);
49710
- const messageId = readRequiredInlineId(record2, "messageId");
49711
- const emoji = readRequiredString(record2, "emoji").trim();
49751
+ const record = asRecord(body);
49752
+ const target = parseTarget(record);
49753
+ const messageId = readRequiredInlineId(record, "messageId");
49754
+ const emoji = readRequiredString(record, "emoji").trim();
49712
49755
  if (!emoji)
49713
49756
  throw new SidecarError("reaction requires emoji", "bad_format");
49714
- const remove = readOptionalBoolean(record2, "remove") ?? false;
49757
+ const remove = readOptionalBoolean(record, "remove") ?? false;
49715
49758
  if (remove) {
49716
49759
  await client.invokeUncheckedRaw(Method.DELETE_REACTION, {
49717
49760
  oneofKind: "deleteReaction",
@@ -49734,9 +49777,9 @@ async function endpointReaction(res, body) {
49734
49777
  writeJson(res, 200, { ok: true, result: { messageId: messageId.toString(), emoji, removed: remove } });
49735
49778
  }
49736
49779
  async function endpointReactions(res, body) {
49737
- const record2 = asRecord(body);
49738
- const target = parseTarget(record2);
49739
- const messageId = readRequiredInlineId(record2, "messageId");
49780
+ const record = asRecord(body);
49781
+ const target = parseTarget(record);
49782
+ const messageId = readRequiredInlineId(record, "messageId");
49740
49783
  const result = "chatId" in target ? await client.getMessages({ chatId: target.chatId, messageIds: [messageId] }) : await client.getMessages({ userId: target.userId, messageIds: [messageId] });
49741
49784
  const message = result.messages[0] ?? null;
49742
49785
  const enriched = message == null ? null : (await enrichMessages([message], target))[0] ?? message;
@@ -49749,10 +49792,10 @@ async function endpointReactions(res, body) {
49749
49792
  });
49750
49793
  }
49751
49794
  async function endpointPin(res, body) {
49752
- const record2 = asRecord(body);
49753
- const target = parseTarget(record2);
49754
- const messageId = readRequiredInlineId(record2, "messageId");
49755
- const unpin = readOptionalBoolean(record2, "unpin") ?? false;
49795
+ const record = asRecord(body);
49796
+ const target = parseTarget(record);
49797
+ const messageId = readRequiredInlineId(record, "messageId");
49798
+ const unpin = readOptionalBoolean(record, "unpin") ?? false;
49756
49799
  await client.invokeUncheckedRaw(Method.PIN_MESSAGE, {
49757
49800
  oneofKind: "pinMessage",
49758
49801
  pinMessage: {
@@ -49764,8 +49807,8 @@ async function endpointPin(res, body) {
49764
49807
  writeJson(res, 200, { ok: true, result: { messageId: messageId.toString(), unpinned: unpin } });
49765
49808
  }
49766
49809
  async function endpointPins(res, body) {
49767
- const record2 = asRecord(body);
49768
- const target = parseTarget(record2);
49810
+ const record = asRecord(body);
49811
+ const target = parseTarget(record);
49769
49812
  if ("userId" in target) {
49770
49813
  throw new SidecarError("pins requires a chat target", "bad_format");
49771
49814
  }
@@ -49782,12 +49825,12 @@ async function endpointPins(res, body) {
49782
49825
  });
49783
49826
  }
49784
49827
  async function endpointCreateSubthread(res, body) {
49785
- const record2 = asRecord(body);
49786
- const parentChatId = readRequiredInlineId(record2, "parentChatId");
49787
- const parentMessageId = readOptionalInlineId(record2, "parentMessageId");
49788
- const title = readOptionalString(record2, "title");
49789
- const description = readOptionalString(record2, "description");
49790
- const emoji = readOptionalString(record2, "emoji");
49828
+ const record = asRecord(body);
49829
+ const parentChatId = readRequiredInlineId(record, "parentChatId");
49830
+ const parentMessageId = readOptionalInlineId(record, "parentMessageId");
49831
+ const title = readOptionalString(record, "title");
49832
+ const description = readOptionalString(record, "description");
49833
+ const emoji = readOptionalString(record, "emoji");
49791
49834
  const result = await client.invokeUncheckedRaw(Method.CREATE_SUBTHREAD, {
49792
49835
  oneofKind: "createSubthread",
49793
49836
  createSubthread: {
@@ -49810,9 +49853,9 @@ async function endpointCreateSubthread(res, body) {
49810
49853
  });
49811
49854
  }
49812
49855
  async function endpointAddParticipants(res, body) {
49813
- const record2 = asRecord(body);
49814
- const chatId = readRequiredInlineId(record2, "chatId");
49815
- const userIds = readInlineIdArray(record2, "userIds", 50, true);
49856
+ const record = asRecord(body);
49857
+ const chatId = readRequiredInlineId(record, "chatId");
49858
+ const userIds = readInlineIdArray(record, "userIds", 50, true);
49816
49859
  const added = [];
49817
49860
  for (const userId of userIds) {
49818
49861
  await client.invokeUncheckedRaw(Method.ADD_CHAT_PARTICIPANT, {
@@ -49824,10 +49867,10 @@ async function endpointAddParticipants(res, body) {
49824
49867
  writeJson(res, 200, { ok: true, result: { chatId: chatId.toString(), addedUserIds: added } });
49825
49868
  }
49826
49869
  async function endpointUpdateChat(res, body) {
49827
- const record2 = asRecord(body);
49828
- const chatId = readRequiredInlineId(record2, "chatId");
49829
- const title = readOptionalString(record2, "title");
49830
- const emoji = readOptionalString(record2, "emoji");
49870
+ const record = asRecord(body);
49871
+ const chatId = readRequiredInlineId(record, "chatId");
49872
+ const title = readOptionalString(record, "title");
49873
+ const emoji = readOptionalString(record, "emoji");
49831
49874
  if (title === undefined && emoji === undefined) {
49832
49875
  throw new SidecarError("update-chat requires title or emoji", "bad_format");
49833
49876
  }
@@ -49840,8 +49883,8 @@ async function endpointUpdateChat(res, body) {
49840
49883
  writeJson(res, 200, { ok: true, result: { chatId: chatId.toString(), chat: safeJson(chat ?? null) } });
49841
49884
  }
49842
49885
  async function endpointDeleteChat(res, body) {
49843
- const record2 = asRecord(body);
49844
- const chatId = readRequiredInlineId(record2, "chatId");
49886
+ const record = asRecord(body);
49887
+ const chatId = readRequiredInlineId(record, "chatId");
49845
49888
  await client.invokeUncheckedRaw(Method.DELETE_CHAT, {
49846
49889
  oneofKind: "deleteChat",
49847
49890
  deleteChat: { peerId: inputPeerFromTarget({ chatId }) }
@@ -49849,13 +49892,13 @@ async function endpointDeleteChat(res, body) {
49849
49892
  writeJson(res, 200, { ok: true, result: { chatId: chatId.toString(), deleted: true } });
49850
49893
  }
49851
49894
  async function endpointCreateChat(res, body) {
49852
- const record2 = asRecord(body);
49853
- const title = readRequiredString(record2, "title");
49854
- const description = readOptionalString(record2, "description");
49855
- const emoji = readOptionalString(record2, "emoji");
49856
- const spaceId = readOptionalInlineId(record2, "spaceId");
49857
- const isPublic = readOptionalBoolean(record2, "isPublic") ?? false;
49858
- const participantUserIds = readInlineIdArray(record2, "participantUserIds", 50);
49895
+ const record = asRecord(body);
49896
+ const title = readRequiredString(record, "title");
49897
+ const description = readOptionalString(record, "description");
49898
+ const emoji = readOptionalString(record, "emoji");
49899
+ const spaceId = readOptionalInlineId(record, "spaceId");
49900
+ const isPublic = readOptionalBoolean(record, "isPublic") ?? false;
49901
+ const participantUserIds = readInlineIdArray(record, "participantUserIds", 50);
49859
49902
  if (title.length > 200)
49860
49903
  throw new SidecarError("create-chat title is too long", "bad_format");
49861
49904
  if (description && description.length > 1000) {
@@ -49915,15 +49958,15 @@ async function callBotApi(methodName, method, body, query) {
49915
49958
  return asOptionalRecord(payload.result) ?? {};
49916
49959
  }
49917
49960
  async function endpointCreateAgent(res, body) {
49918
- const record2 = asRecord(body);
49919
- const name = readRequiredString(record2, "name");
49961
+ const record = asRecord(body);
49962
+ const name = readRequiredString(record, "name");
49920
49963
  const result = await callBotApi("createAgent", "POST", {
49921
49964
  name,
49922
- ...readOptionalString(record2, "handle") ? { handle: readOptionalString(record2, "handle") } : {},
49923
- ...readOptionalString(record2, "emoji") ? { emoji: readOptionalString(record2, "emoji") } : {},
49924
- ...readOptionalString(record2, "description") ? { description: readOptionalString(record2, "description") } : {},
49925
- ...readOptionalString(record2, "skill_key") ? { skill_key: readOptionalString(record2, "skill_key") } : {},
49926
- ...readOptionalString(record2, "instructions") ? { instructions: readOptionalString(record2, "instructions") } : {}
49965
+ ...readOptionalString(record, "handle") ? { handle: readOptionalString(record, "handle") } : {},
49966
+ ...readOptionalString(record, "emoji") ? { emoji: readOptionalString(record, "emoji") } : {},
49967
+ ...readOptionalString(record, "description") ? { description: readOptionalString(record, "description") } : {},
49968
+ ...readOptionalString(record, "skill_key") ? { skill_key: readOptionalString(record, "skill_key") } : {},
49969
+ ...readOptionalString(record, "instructions") ? { instructions: readOptionalString(record, "instructions") } : {}
49927
49970
  });
49928
49971
  const agent = asOptionalRecord(result.agent);
49929
49972
  if (!agent) {
@@ -49932,8 +49975,8 @@ async function endpointCreateAgent(res, body) {
49932
49975
  writeJson(res, 200, { ok: true, result: { agent: safeJson(agent) } });
49933
49976
  }
49934
49977
  async function endpointGetAgent(res, body) {
49935
- const record2 = asRecord(body);
49936
- const agentId = readRequiredInlineId(record2, "agentId");
49978
+ const record = asRecord(body);
49979
+ const agentId = readRequiredInlineId(record, "agentId");
49937
49980
  const result = await callBotApi("getAgent", "GET", undefined, { agent_id: String(agentId) });
49938
49981
  if (!asOptionalRecord(result.agent)) {
49939
49982
  throw new SidecarError("Agent not found", "not_found");
@@ -49944,29 +49987,29 @@ async function endpointListAgents(res) {
49944
49987
  const result = await callBotApi("getMyAgents", "GET");
49945
49988
  writeJson(res, 200, { ok: true, result: safeJson(result) });
49946
49989
  }
49947
- function readAgentPatchString(record2, key) {
49948
- if (!(key in record2))
49990
+ function readAgentPatchString(record, key) {
49991
+ if (!(key in record))
49949
49992
  return;
49950
- const value = record2[key];
49993
+ const value = record[key];
49951
49994
  if (typeof value !== "string") {
49952
49995
  throw new SidecarError(`${key} must be a string`, "bad_format");
49953
49996
  }
49954
49997
  return value.trim();
49955
49998
  }
49956
49999
  async function endpointUpdateAgent(res, body) {
49957
- const record2 = asRecord(body);
49958
- const agentId = readRequiredInlineId(record2, "agentId");
49959
- const name = readAgentPatchString(record2, "name");
50000
+ const record = asRecord(body);
50001
+ const agentId = readRequiredInlineId(record, "agentId");
50002
+ const name = readAgentPatchString(record, "name");
49960
50003
  if (name !== undefined && !name) {
49961
50004
  throw new SidecarError("name cannot be empty", "bad_format");
49962
50005
  }
49963
50006
  const patch = {
49964
50007
  ...name !== undefined ? { name } : {},
49965
- ...agentPatchField(record2, "handle"),
49966
- ...agentPatchField(record2, "emoji"),
49967
- ...agentPatchField(record2, "description"),
49968
- ...agentPatchField(record2, "skill_key"),
49969
- ...agentPatchField(record2, "instructions")
50008
+ ...agentPatchField(record, "handle"),
50009
+ ...agentPatchField(record, "emoji"),
50010
+ ...agentPatchField(record, "description"),
50011
+ ...agentPatchField(record, "skill_key"),
50012
+ ...agentPatchField(record, "instructions")
49970
50013
  };
49971
50014
  if (Object.keys(patch).length === 0) {
49972
50015
  throw new SidecarError("update-agent requires at least one field", "bad_format");
@@ -49980,13 +50023,13 @@ async function endpointUpdateAgent(res, body) {
49980
50023
  throw new SidecarError("update-agent returned no Agent", "unknown");
49981
50024
  writeJson(res, 200, { ok: true, result: { agent: safeJson(agent) } });
49982
50025
  }
49983
- function agentPatchField(record2, key) {
49984
- const value = readAgentPatchString(record2, key);
50026
+ function agentPatchField(record, key) {
50027
+ const value = readAgentPatchString(record, key);
49985
50028
  return value === undefined ? {} : { [key]: value };
49986
50029
  }
49987
50030
  async function endpointDeleteAgent(res, body) {
49988
- const record2 = asRecord(body);
49989
- const agentId = readRequiredInlineId(record2, "agentId");
50031
+ const record = asRecord(body);
50032
+ const agentId = readRequiredInlineId(record, "agentId");
49990
50033
  const result = await callBotApi("deleteAgent", "POST", { agent_id: String(agentId) });
49991
50034
  writeJson(res, 200, { ok: true, result: safeJson(result) });
49992
50035
  }
@@ -50025,26 +50068,26 @@ function senderDisplayName(sender) {
50025
50068
  }
50026
50069
  async function enrichMessages(messages, target) {
50027
50070
  return Promise.all(messages.map(async (message) => {
50028
- const record2 = asOptionalRecord(message);
50029
- if (!record2)
50071
+ const record = asOptionalRecord(message);
50072
+ if (!record)
50030
50073
  return message;
50031
- const userId = asPositiveBigInt(record2.fromId);
50032
- const chatId = "chatId" in target ? target.chatId : asPositiveBigInt(record2.chatId);
50074
+ const userId = asPositiveBigInt(record.fromId);
50075
+ const chatId = "chatId" in target ? target.chatId : asPositiveBigInt(record.chatId);
50033
50076
  if (!userId || !chatId)
50034
50077
  return message;
50035
50078
  const sender = await userDirectory.resolve({
50036
50079
  userId,
50037
50080
  chatId,
50038
- direct: "userId" in target || messagePeerIsDirect(record2)
50081
+ direct: "userId" in target || messagePeerIsDirect(record)
50039
50082
  });
50040
- return sender ? { ...record2, sender } : message;
50083
+ return sender ? { ...record, sender } : message;
50041
50084
  }));
50042
50085
  }
50043
50086
  function orderMessagesByRequestedIds(messages, requestedIds) {
50044
50087
  const byId = new Map;
50045
50088
  for (const message of messages) {
50046
- const record2 = asOptionalRecord(message);
50047
- const id = asPositiveBigInt(record2?.id);
50089
+ const record = asOptionalRecord(message);
50090
+ const id = asPositiveBigInt(record?.id);
50048
50091
  if (id && !byId.has(id.toString()))
50049
50092
  byId.set(id.toString(), message);
50050
50093
  }
@@ -50089,9 +50132,9 @@ function clampResultLimit(value, max) {
50089
50132
  return Math.min(value, max);
50090
50133
  }
50091
50134
  async function endpointAnswerAction(res, body) {
50092
- const record2 = asRecord(body);
50093
- const interactionId = readRequiredInlineId(record2, "interactionId");
50094
- const toastText = readOptionalString(record2, "toast");
50135
+ const record = asRecord(body);
50136
+ const interactionId = readRequiredInlineId(record, "interactionId");
50137
+ const toastText = readOptionalString(record, "toast");
50095
50138
  await client.answerMessageAction({
50096
50139
  interactionId,
50097
50140
  ...toastText ? { ui: MessageActionResponseUi.create({
@@ -50101,12 +50144,12 @@ async function endpointAnswerAction(res, body) {
50101
50144
  writeJson(res, 200, { ok: true, result: {} });
50102
50145
  }
50103
50146
  async function endpointAnswerBotSettings(res, body) {
50104
- const record2 = asRecord(body);
50105
- if (record2.requestId == null || record2.requestId === "") {
50147
+ const record = asRecord(body);
50148
+ if (record.requestId == null || record.requestId === "") {
50106
50149
  throw new SidecarError("missing requestId", "bad_format");
50107
50150
  }
50108
- const requestId = parseUnsigned64Id(record2.requestId, "requestId");
50109
- const response = asRecord(record2.response);
50151
+ const requestId = parseUnsigned64Id(record.requestId, "requestId");
50152
+ const response = asRecord(record.response);
50110
50153
  await client.answerBotChatSettings({ requestId, response });
50111
50154
  writeJson(res, 200, { ok: true, result: {} });
50112
50155
  }
@@ -50488,7 +50531,9 @@ var server = http.createServer((req, res) => {
50488
50531
  writeJson(res, err.status, {
50489
50532
  ok: false,
50490
50533
  error: err.message,
50491
- errorKind: err.errorKind
50534
+ errorKind: err.errorKind,
50535
+ ...err.outcomeUnknown ? { outcomeUnknown: true } : {},
50536
+ ...err.retryAfterSeconds ? { retryAfterSeconds: err.retryAfterSeconds } : {}
50492
50537
  });
50493
50538
  });
50494
50539
  });