discord-protos 1.2.81 → 1.2.83

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.
@@ -599,6 +599,19 @@ export interface Experiment_UserPremiumType {
599
599
  */
600
600
  premiumTypes: number[];
601
601
  }
602
+ /**
603
+ * @generated from protobuf message discord_protos.discord_experimentation.v1.Experiment.UnitIdMatchesFilterSnapshot
604
+ */
605
+ export interface Experiment_UnitIdMatchesFilterSnapshot {
606
+ /**
607
+ * @generated from protobuf field: string filter_snapshot_name = 1
608
+ */
609
+ filterSnapshotName: string;
610
+ /**
611
+ * @generated from protobuf field: repeated fixed64 target_filter_values = 2
612
+ */
613
+ targetFilterValues: bigint[];
614
+ }
602
615
  /**
603
616
  * @generated from protobuf message discord_protos.discord_experimentation.v1.Experiment.Filter
604
617
  */
@@ -720,6 +733,12 @@ export interface Experiment_Filter {
720
733
  * @generated from protobuf field: discord_protos.discord_experimentation.v1.Experiment.UserPremiumType user_premium_type = 20
721
734
  */
722
735
  userPremiumType: Experiment_UserPremiumType;
736
+ } | {
737
+ oneofKind: "unitIdMatchesFilterSnapshot";
738
+ /**
739
+ * @generated from protobuf field: discord_protos.discord_experimentation.v1.Experiment.UnitIdMatchesFilterSnapshot unit_id_matches_filter_snapshot = 21
740
+ */
741
+ unitIdMatchesFilterSnapshot: Experiment_UnitIdMatchesFilterSnapshot;
723
742
  } | {
724
743
  oneofKind: undefined;
725
744
  };
@@ -1267,6 +1286,16 @@ declare class Experiment_UserPremiumType$Type extends MessageType<Experiment_Use
1267
1286
  * @generated MessageType for protobuf message discord_protos.discord_experimentation.v1.Experiment.UserPremiumType
1268
1287
  */
1269
1288
  export declare const Experiment_UserPremiumType: Experiment_UserPremiumType$Type;
1289
+ declare class Experiment_UnitIdMatchesFilterSnapshot$Type extends MessageType<Experiment_UnitIdMatchesFilterSnapshot> {
1290
+ constructor();
1291
+ create(value?: PartialMessage<Experiment_UnitIdMatchesFilterSnapshot>): Experiment_UnitIdMatchesFilterSnapshot;
1292
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Experiment_UnitIdMatchesFilterSnapshot): Experiment_UnitIdMatchesFilterSnapshot;
1293
+ internalBinaryWrite(message: Experiment_UnitIdMatchesFilterSnapshot, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
1294
+ }
1295
+ /**
1296
+ * @generated MessageType for protobuf message discord_protos.discord_experimentation.v1.Experiment.UnitIdMatchesFilterSnapshot
1297
+ */
1298
+ export declare const Experiment_UnitIdMatchesFilterSnapshot: Experiment_UnitIdMatchesFilterSnapshot$Type;
1270
1299
  declare class Experiment_Filter$Type extends MessageType<Experiment_Filter> {
1271
1300
  constructor();
1272
1301
  create(value?: PartialMessage<Experiment_Filter>): Experiment_Filter;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Experiment_DebugConfig = exports.Experiment_Rule = exports.Experiment_Override = exports.Experiment_Filter = exports.Experiment_UserPremiumType = exports.Experiment_UnitIdInExperiment = exports.Experiment_ClientSystemLocale = exports.Experiment_Always = exports.Experiment_ClientReleaseChannel = exports.Experiment_UnitIdInRangeByHash = exports.Experiment_UserHasFlag = exports.Experiment_UserIDRange = exports.Experiment_Fixed64Value = exports.Experiment_UserAgeRange = exports.Experiment_UserIsBot = exports.Experiment_UserLocale = exports.Experiment_ClientIP = exports.Experiment_ClientLocation = exports.Experiment_Location = exports.Experiment_Place = exports.Experiment_ISORegion = exports.Experiment_ClientLocale = exports.Experiment_UserIds = exports.Experiment_UserInGuild = exports.Experiment_StaffUsers = exports.Experiment_ClientOperatingSystem = exports.Experiment_SDKVersion = exports.Experiment_SDKVersionRange = exports.Experiment_SDKVersionRangeBound = exports.Experiment_SDKVersionSpecifier = exports.Experiment_ClientPlatform = exports.Experiment_ClientRequiredChanges = exports.Experiment_PlatformVersion = exports.Experiment_PlatformVersionRange = exports.Experiment_PlatformVersionRangeBound = exports.Experiment_PlatformVersionSpecifier = exports.Experiment_Variation = exports.Experiment_Bucket = exports.Experiment = exports.Experiment_AssignmentMode = exports.Experiment_ExposureTracking = exports.Experiment_Surface = exports.Experiment_Phase = exports.Experiment_Type = exports.Experiment_UnitType = void 0;
3
+ exports.Experiment_DebugConfig = exports.Experiment_Rule = exports.Experiment_Override = exports.Experiment_Filter = exports.Experiment_UnitIdMatchesFilterSnapshot = exports.Experiment_UserPremiumType = exports.Experiment_UnitIdInExperiment = exports.Experiment_ClientSystemLocale = exports.Experiment_Always = exports.Experiment_ClientReleaseChannel = exports.Experiment_UnitIdInRangeByHash = exports.Experiment_UserHasFlag = exports.Experiment_UserIDRange = exports.Experiment_Fixed64Value = exports.Experiment_UserAgeRange = exports.Experiment_UserIsBot = exports.Experiment_UserLocale = exports.Experiment_ClientIP = exports.Experiment_ClientLocation = exports.Experiment_Location = exports.Experiment_Place = exports.Experiment_ISORegion = exports.Experiment_ClientLocale = exports.Experiment_UserIds = exports.Experiment_UserInGuild = exports.Experiment_StaffUsers = exports.Experiment_ClientOperatingSystem = exports.Experiment_SDKVersion = exports.Experiment_SDKVersionRange = exports.Experiment_SDKVersionRangeBound = exports.Experiment_SDKVersionSpecifier = exports.Experiment_ClientPlatform = exports.Experiment_ClientRequiredChanges = exports.Experiment_PlatformVersion = exports.Experiment_PlatformVersionRange = exports.Experiment_PlatformVersionRangeBound = exports.Experiment_PlatformVersionSpecifier = exports.Experiment_Variation = exports.Experiment_Bucket = exports.Experiment = exports.Experiment_AssignmentMode = exports.Experiment_ExposureTracking = exports.Experiment_Surface = exports.Experiment_Phase = exports.Experiment_Type = exports.Experiment_UnitType = void 0;
4
4
  const runtime_1 = require("@protobuf-ts/runtime");
5
5
  const runtime_2 = require("@protobuf-ts/runtime");
6
6
  const runtime_3 = require("@protobuf-ts/runtime");
@@ -2355,6 +2355,69 @@ class Experiment_UserPremiumType$Type extends runtime_4.MessageType {
2355
2355
  */
2356
2356
  exports.Experiment_UserPremiumType = new Experiment_UserPremiumType$Type();
2357
2357
  // @generated message type with reflection information, may provide speed optimized methods
2358
+ class Experiment_UnitIdMatchesFilterSnapshot$Type extends runtime_4.MessageType {
2359
+ constructor() {
2360
+ super("discord_protos.discord_experimentation.v1.Experiment.UnitIdMatchesFilterSnapshot", [
2361
+ { no: 1, name: "filter_snapshot_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2362
+ { no: 2, name: "target_filter_values", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }
2363
+ ]);
2364
+ }
2365
+ create(value) {
2366
+ const message = globalThis.Object.create((this.messagePrototype));
2367
+ message.filterSnapshotName = "";
2368
+ message.targetFilterValues = [];
2369
+ if (value !== undefined)
2370
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
2371
+ return message;
2372
+ }
2373
+ internalBinaryRead(reader, length, options, target) {
2374
+ let message = target ?? this.create(), end = reader.pos + length;
2375
+ while (reader.pos < end) {
2376
+ let [fieldNo, wireType] = reader.tag();
2377
+ switch (fieldNo) {
2378
+ case /* string filter_snapshot_name */ 1:
2379
+ message.filterSnapshotName = reader.string();
2380
+ break;
2381
+ case /* repeated fixed64 target_filter_values */ 2:
2382
+ if (wireType === runtime_2.WireType.LengthDelimited)
2383
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
2384
+ message.targetFilterValues.push(reader.fixed64().toBigInt());
2385
+ else
2386
+ message.targetFilterValues.push(reader.fixed64().toBigInt());
2387
+ break;
2388
+ default:
2389
+ let u = options.readUnknownField;
2390
+ if (u === "throw")
2391
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2392
+ let d = reader.skip(wireType);
2393
+ if (u !== false)
2394
+ (u === true ? runtime_1.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2395
+ }
2396
+ }
2397
+ return message;
2398
+ }
2399
+ internalBinaryWrite(message, writer, options) {
2400
+ /* string filter_snapshot_name = 1; */
2401
+ if (message.filterSnapshotName !== "")
2402
+ writer.tag(1, runtime_2.WireType.LengthDelimited).string(message.filterSnapshotName);
2403
+ /* repeated fixed64 target_filter_values = 2; */
2404
+ if (message.targetFilterValues.length) {
2405
+ writer.tag(2, runtime_2.WireType.LengthDelimited).fork();
2406
+ for (let i = 0; i < message.targetFilterValues.length; i++)
2407
+ writer.fixed64(message.targetFilterValues[i]);
2408
+ writer.join();
2409
+ }
2410
+ let u = options.writeUnknownFields;
2411
+ if (u !== false)
2412
+ (u == true ? runtime_1.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2413
+ return writer;
2414
+ }
2415
+ }
2416
+ /**
2417
+ * @generated MessageType for protobuf message discord_protos.discord_experimentation.v1.Experiment.UnitIdMatchesFilterSnapshot
2418
+ */
2419
+ exports.Experiment_UnitIdMatchesFilterSnapshot = new Experiment_UnitIdMatchesFilterSnapshot$Type();
2420
+ // @generated message type with reflection information, may provide speed optimized methods
2358
2421
  class Experiment_Filter$Type extends runtime_4.MessageType {
2359
2422
  constructor() {
2360
2423
  super("discord_protos.discord_experimentation.v1.Experiment.Filter", [
@@ -2376,7 +2439,8 @@ class Experiment_Filter$Type extends runtime_4.MessageType {
2376
2439
  { no: 17, name: "always", kind: "message", oneof: "filter", T: () => exports.Experiment_Always },
2377
2440
  { no: 18, name: "client_system_locale", kind: "message", oneof: "filter", T: () => exports.Experiment_ClientSystemLocale },
2378
2441
  { no: 19, name: "unit_id_in_experiment", kind: "message", oneof: "filter", T: () => exports.Experiment_UnitIdInExperiment },
2379
- { no: 20, name: "user_premium_type", kind: "message", oneof: "filter", T: () => exports.Experiment_UserPremiumType }
2442
+ { no: 20, name: "user_premium_type", kind: "message", oneof: "filter", T: () => exports.Experiment_UserPremiumType },
2443
+ { no: 21, name: "unit_id_matches_filter_snapshot", kind: "message", oneof: "filter", T: () => exports.Experiment_UnitIdMatchesFilterSnapshot }
2380
2444
  ]);
2381
2445
  }
2382
2446
  create(value) {
@@ -2505,6 +2569,12 @@ class Experiment_Filter$Type extends runtime_4.MessageType {
2505
2569
  userPremiumType: exports.Experiment_UserPremiumType.internalBinaryRead(reader, reader.uint32(), options, message.filter.userPremiumType)
2506
2570
  };
2507
2571
  break;
2572
+ case /* discord_protos.discord_experimentation.v1.Experiment.UnitIdMatchesFilterSnapshot unit_id_matches_filter_snapshot */ 21:
2573
+ message.filter = {
2574
+ oneofKind: "unitIdMatchesFilterSnapshot",
2575
+ unitIdMatchesFilterSnapshot: exports.Experiment_UnitIdMatchesFilterSnapshot.internalBinaryRead(reader, reader.uint32(), options, message.filter.unitIdMatchesFilterSnapshot)
2576
+ };
2577
+ break;
2508
2578
  default:
2509
2579
  let u = options.readUnknownField;
2510
2580
  if (u === "throw")
@@ -2574,6 +2644,9 @@ class Experiment_Filter$Type extends runtime_4.MessageType {
2574
2644
  /* discord_protos.discord_experimentation.v1.Experiment.UserPremiumType user_premium_type = 20; */
2575
2645
  if (message.filter.oneofKind === "userPremiumType")
2576
2646
  exports.Experiment_UserPremiumType.internalBinaryWrite(message.filter.userPremiumType, writer.tag(20, runtime_2.WireType.LengthDelimited).fork(), options).join();
2647
+ /* discord_protos.discord_experimentation.v1.Experiment.UnitIdMatchesFilterSnapshot unit_id_matches_filter_snapshot = 21; */
2648
+ if (message.filter.oneofKind === "unitIdMatchesFilterSnapshot")
2649
+ exports.Experiment_UnitIdMatchesFilterSnapshot.internalBinaryWrite(message.filter.unitIdMatchesFilterSnapshot, writer.tag(21, runtime_2.WireType.LengthDelimited).fork(), options).join();
2577
2650
  let u = options.writeUnknownFields;
2578
2651
  if (u !== false)
2579
2652
  (u == true ? runtime_1.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -856,6 +856,10 @@ export interface PreloadedUserSettings_PrivacySettings {
856
856
  * @generated from protobuf field: optional google.protobuf.BoolValue quests_3p_data_opted_out = 30
857
857
  */
858
858
  quests3PDataOptedOut?: BoolValue;
859
+ /**
860
+ * @generated from protobuf field: optional google.protobuf.BoolValue show_local_time = 31
861
+ */
862
+ showLocalTime?: BoolValue;
859
863
  }
860
864
  /**
861
865
  * @generated from protobuf message discord_protos.discord_users.v1.PreloadedUserSettings.DebugSettings
@@ -949,6 +953,10 @@ export interface PreloadedUserSettings_LocalizationSettings {
949
953
  * @generated from protobuf field: optional google.protobuf.Int32Value timezone_offset = 2
950
954
  */
951
955
  timezoneOffset?: Int32Value;
956
+ /**
957
+ * @generated from protobuf field: optional google.protobuf.StringValue timezone_name = 3
958
+ */
959
+ timezoneName?: StringValue;
952
960
  }
953
961
  /**
954
962
  * @generated from protobuf message discord_protos.discord_users.v1.PreloadedUserSettings.CustomUserThemeSettings
@@ -2543,7 +2543,8 @@ class PreloadedUserSettings_PrivacySettings$Type extends runtime_4.MessageType {
2543
2543
  { no: 27, name: "default_guilds_restricted_v2", kind: "message", T: () => wrappers_5.BoolValue },
2544
2544
  { no: 28, name: "slayer_sdk_receive_dms_in_game", kind: "enum", T: () => ["discord_protos.discord_users.v1.PreloadedUserSettings.SlayerSDKReceiveInGameDMs", PreloadedUserSettings_SlayerSDKReceiveInGameDMs] },
2545
2545
  { no: 29, name: "default_guilds_activity_restricted_v2", kind: "enum", T: () => ["discord_protos.discord_users.v1.PreloadedUserSettings.GuildActivityStatusRestrictionDefaultV2", PreloadedUserSettings_GuildActivityStatusRestrictionDefaultV2, "GUILD_ACTIVITY_STATUS_RESTRICTION_DEFAULT_V2_"] },
2546
- { no: 30, name: "quests_3p_data_opted_out", kind: "message", jsonName: "quests3pDataOptedOut", T: () => wrappers_5.BoolValue }
2546
+ { no: 30, name: "quests_3p_data_opted_out", kind: "message", jsonName: "quests3pDataOptedOut", T: () => wrappers_5.BoolValue },
2547
+ { no: 31, name: "show_local_time", kind: "message", T: () => wrappers_5.BoolValue }
2547
2548
  ]);
2548
2549
  }
2549
2550
  create(value) {
@@ -2667,6 +2668,9 @@ class PreloadedUserSettings_PrivacySettings$Type extends runtime_4.MessageType {
2667
2668
  case /* optional google.protobuf.BoolValue quests_3p_data_opted_out */ 30:
2668
2669
  message.quests3PDataOptedOut = wrappers_5.BoolValue.internalBinaryRead(reader, reader.uint32(), options, message.quests3PDataOptedOut);
2669
2670
  break;
2671
+ case /* optional google.protobuf.BoolValue show_local_time */ 31:
2672
+ message.showLocalTime = wrappers_5.BoolValue.internalBinaryRead(reader, reader.uint32(), options, message.showLocalTime);
2673
+ break;
2670
2674
  default:
2671
2675
  let u = options.readUnknownField;
2672
2676
  if (u === "throw")
@@ -2779,6 +2783,9 @@ class PreloadedUserSettings_PrivacySettings$Type extends runtime_4.MessageType {
2779
2783
  /* optional google.protobuf.BoolValue quests_3p_data_opted_out = 30; */
2780
2784
  if (message.quests3PDataOptedOut)
2781
2785
  wrappers_5.BoolValue.internalBinaryWrite(message.quests3PDataOptedOut, writer.tag(30, runtime_1.WireType.LengthDelimited).fork(), options).join();
2786
+ /* optional google.protobuf.BoolValue show_local_time = 31; */
2787
+ if (message.showLocalTime)
2788
+ wrappers_5.BoolValue.internalBinaryWrite(message.showLocalTime, writer.tag(31, runtime_1.WireType.LengthDelimited).fork(), options).join();
2782
2789
  let u = options.writeUnknownFields;
2783
2790
  if (u !== false)
2784
2791
  (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -3061,7 +3068,8 @@ class PreloadedUserSettings_LocalizationSettings$Type extends runtime_4.MessageT
3061
3068
  constructor() {
3062
3069
  super("discord_protos.discord_users.v1.PreloadedUserSettings.LocalizationSettings", [
3063
3070
  { no: 1, name: "locale", kind: "message", T: () => wrappers_6.StringValue },
3064
- { no: 2, name: "timezone_offset", kind: "message", T: () => wrappers_2.Int32Value }
3071
+ { no: 2, name: "timezone_offset", kind: "message", T: () => wrappers_2.Int32Value },
3072
+ { no: 3, name: "timezone_name", kind: "message", T: () => wrappers_6.StringValue }
3065
3073
  ]);
3066
3074
  }
3067
3075
  create(value) {
@@ -3081,6 +3089,9 @@ class PreloadedUserSettings_LocalizationSettings$Type extends runtime_4.MessageT
3081
3089
  case /* optional google.protobuf.Int32Value timezone_offset */ 2:
3082
3090
  message.timezoneOffset = wrappers_2.Int32Value.internalBinaryRead(reader, reader.uint32(), options, message.timezoneOffset);
3083
3091
  break;
3092
+ case /* optional google.protobuf.StringValue timezone_name */ 3:
3093
+ message.timezoneName = wrappers_6.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.timezoneName);
3094
+ break;
3084
3095
  default:
3085
3096
  let u = options.readUnknownField;
3086
3097
  if (u === "throw")
@@ -3099,6 +3110,9 @@ class PreloadedUserSettings_LocalizationSettings$Type extends runtime_4.MessageT
3099
3110
  /* optional google.protobuf.Int32Value timezone_offset = 2; */
3100
3111
  if (message.timezoneOffset)
3101
3112
  wrappers_2.Int32Value.internalBinaryWrite(message.timezoneOffset, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join();
3113
+ /* optional google.protobuf.StringValue timezone_name = 3; */
3114
+ if (message.timezoneName)
3115
+ wrappers_6.StringValue.internalBinaryWrite(message.timezoneName, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join();
3102
3116
  let u = options.writeUnknownFields;
3103
3117
  if (u !== false)
3104
3118
  (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -0,0 +1,26 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ /**
8
+ * @generated from protobuf message discord_protos.users.v1.GuildShardingConfig
9
+ */
10
+ export interface GuildShardingConfig {
11
+ /**
12
+ * @generated from protobuf field: repeated int32 shards = 1
13
+ */
14
+ shards: number[];
15
+ }
16
+ declare class GuildShardingConfig$Type extends MessageType<GuildShardingConfig> {
17
+ constructor();
18
+ create(value?: PartialMessage<GuildShardingConfig>): GuildShardingConfig;
19
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GuildShardingConfig): GuildShardingConfig;
20
+ internalBinaryWrite(message: GuildShardingConfig, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
21
+ }
22
+ /**
23
+ * @generated MessageType for protobuf message discord_protos.users.v1.GuildShardingConfig
24
+ */
25
+ export declare const GuildShardingConfig: GuildShardingConfig$Type;
26
+ export {};
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuildShardingConfig = void 0;
4
+ const runtime_1 = require("@protobuf-ts/runtime");
5
+ const runtime_2 = require("@protobuf-ts/runtime");
6
+ const runtime_3 = require("@protobuf-ts/runtime");
7
+ const runtime_4 = require("@protobuf-ts/runtime");
8
+ // @generated message type with reflection information, may provide speed optimized methods
9
+ class GuildShardingConfig$Type extends runtime_4.MessageType {
10
+ constructor() {
11
+ super("discord_protos.users.v1.GuildShardingConfig", [
12
+ { no: 1, name: "shards", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }
13
+ ]);
14
+ }
15
+ create(value) {
16
+ const message = globalThis.Object.create((this.messagePrototype));
17
+ message.shards = [];
18
+ if (value !== undefined)
19
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
20
+ return message;
21
+ }
22
+ internalBinaryRead(reader, length, options, target) {
23
+ let message = target ?? this.create(), end = reader.pos + length;
24
+ while (reader.pos < end) {
25
+ let [fieldNo, wireType] = reader.tag();
26
+ switch (fieldNo) {
27
+ case /* repeated int32 shards */ 1:
28
+ if (wireType === runtime_2.WireType.LengthDelimited)
29
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
30
+ message.shards.push(reader.int32());
31
+ else
32
+ message.shards.push(reader.int32());
33
+ break;
34
+ default:
35
+ let u = options.readUnknownField;
36
+ if (u === "throw")
37
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
38
+ let d = reader.skip(wireType);
39
+ if (u !== false)
40
+ (u === true ? runtime_1.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
41
+ }
42
+ }
43
+ return message;
44
+ }
45
+ internalBinaryWrite(message, writer, options) {
46
+ /* repeated int32 shards = 1; */
47
+ if (message.shards.length) {
48
+ writer.tag(1, runtime_2.WireType.LengthDelimited).fork();
49
+ for (let i = 0; i < message.shards.length; i++)
50
+ writer.int32(message.shards[i]);
51
+ writer.join();
52
+ }
53
+ let u = options.writeUnknownFields;
54
+ if (u !== false)
55
+ (u == true ? runtime_1.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
56
+ return writer;
57
+ }
58
+ }
59
+ /**
60
+ * @generated MessageType for protobuf message discord_protos.users.v1.GuildShardingConfig
61
+ */
62
+ exports.GuildShardingConfig = new GuildShardingConfig$Type();
@@ -0,0 +1,55 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ import { StringValue } from "../../google/protobuf/wrappers";
8
+ /**
9
+ * @generated from protobuf message discord_protos.users.v1.MediumUser
10
+ */
11
+ export interface MediumUser {
12
+ /**
13
+ * @generated from protobuf field: fixed64 id = 1
14
+ */
15
+ id: bigint;
16
+ /**
17
+ * @generated from protobuf field: string username = 2
18
+ */
19
+ username: string;
20
+ /**
21
+ * @generated from protobuf field: uint32 discriminator = 3
22
+ */
23
+ discriminator: number;
24
+ /**
25
+ * @generated from protobuf field: optional google.protobuf.StringValue avatar_hash = 4
26
+ */
27
+ avatarHash?: StringValue;
28
+ /**
29
+ * @generated from protobuf field: bool bot = 5
30
+ */
31
+ bot: boolean;
32
+ /**
33
+ * @generated from protobuf field: uint64 flags = 6
34
+ */
35
+ flags: bigint;
36
+ /**
37
+ * @generated from protobuf field: optional google.protobuf.StringValue email = 7
38
+ */
39
+ email?: StringValue;
40
+ /**
41
+ * @generated from protobuf field: optional google.protobuf.StringValue phone = 8
42
+ */
43
+ phone?: StringValue;
44
+ }
45
+ declare class MediumUser$Type extends MessageType<MediumUser> {
46
+ constructor();
47
+ create(value?: PartialMessage<MediumUser>): MediumUser;
48
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MediumUser): MediumUser;
49
+ internalBinaryWrite(message: MediumUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
50
+ }
51
+ /**
52
+ * @generated MessageType for protobuf message discord_protos.users.v1.MediumUser
53
+ */
54
+ export declare const MediumUser: MediumUser$Type;
55
+ export {};
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MediumUser = void 0;
4
+ const runtime_1 = require("@protobuf-ts/runtime");
5
+ const runtime_2 = require("@protobuf-ts/runtime");
6
+ const runtime_3 = require("@protobuf-ts/runtime");
7
+ const runtime_4 = require("@protobuf-ts/runtime");
8
+ const wrappers_1 = require("../../google/protobuf/wrappers");
9
+ // @generated message type with reflection information, may provide speed optimized methods
10
+ class MediumUser$Type extends runtime_4.MessageType {
11
+ constructor() {
12
+ super("discord_protos.users.v1.MediumUser", [
13
+ { no: 1, name: "id", kind: "scalar", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ },
14
+ { no: 2, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
15
+ { no: 3, name: "discriminator", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
16
+ { no: 4, name: "avatar_hash", kind: "message", T: () => wrappers_1.StringValue },
17
+ { no: 5, name: "bot", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
18
+ { no: 6, name: "flags", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
19
+ { no: 7, name: "email", kind: "message", T: () => wrappers_1.StringValue },
20
+ { no: 8, name: "phone", kind: "message", T: () => wrappers_1.StringValue }
21
+ ]);
22
+ }
23
+ create(value) {
24
+ const message = globalThis.Object.create((this.messagePrototype));
25
+ message.id = 0n;
26
+ message.username = "";
27
+ message.discriminator = 0;
28
+ message.bot = false;
29
+ message.flags = 0n;
30
+ if (value !== undefined)
31
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
32
+ return message;
33
+ }
34
+ internalBinaryRead(reader, length, options, target) {
35
+ let message = target ?? this.create(), end = reader.pos + length;
36
+ while (reader.pos < end) {
37
+ let [fieldNo, wireType] = reader.tag();
38
+ switch (fieldNo) {
39
+ case /* fixed64 id */ 1:
40
+ message.id = reader.fixed64().toBigInt();
41
+ break;
42
+ case /* string username */ 2:
43
+ message.username = reader.string();
44
+ break;
45
+ case /* uint32 discriminator */ 3:
46
+ message.discriminator = reader.uint32();
47
+ break;
48
+ case /* optional google.protobuf.StringValue avatar_hash */ 4:
49
+ message.avatarHash = wrappers_1.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.avatarHash);
50
+ break;
51
+ case /* bool bot */ 5:
52
+ message.bot = reader.bool();
53
+ break;
54
+ case /* uint64 flags */ 6:
55
+ message.flags = reader.uint64().toBigInt();
56
+ break;
57
+ case /* optional google.protobuf.StringValue email */ 7:
58
+ message.email = wrappers_1.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.email);
59
+ break;
60
+ case /* optional google.protobuf.StringValue phone */ 8:
61
+ message.phone = wrappers_1.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.phone);
62
+ break;
63
+ default:
64
+ let u = options.readUnknownField;
65
+ if (u === "throw")
66
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
67
+ let d = reader.skip(wireType);
68
+ if (u !== false)
69
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
70
+ }
71
+ }
72
+ return message;
73
+ }
74
+ internalBinaryWrite(message, writer, options) {
75
+ /* fixed64 id = 1; */
76
+ if (message.id !== 0n)
77
+ writer.tag(1, runtime_1.WireType.Bit64).fixed64(message.id);
78
+ /* string username = 2; */
79
+ if (message.username !== "")
80
+ writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.username);
81
+ /* uint32 discriminator = 3; */
82
+ if (message.discriminator !== 0)
83
+ writer.tag(3, runtime_1.WireType.Varint).uint32(message.discriminator);
84
+ /* optional google.protobuf.StringValue avatar_hash = 4; */
85
+ if (message.avatarHash)
86
+ wrappers_1.StringValue.internalBinaryWrite(message.avatarHash, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join();
87
+ /* bool bot = 5; */
88
+ if (message.bot !== false)
89
+ writer.tag(5, runtime_1.WireType.Varint).bool(message.bot);
90
+ /* uint64 flags = 6; */
91
+ if (message.flags !== 0n)
92
+ writer.tag(6, runtime_1.WireType.Varint).uint64(message.flags);
93
+ /* optional google.protobuf.StringValue email = 7; */
94
+ if (message.email)
95
+ wrappers_1.StringValue.internalBinaryWrite(message.email, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join();
96
+ /* optional google.protobuf.StringValue phone = 8; */
97
+ if (message.phone)
98
+ wrappers_1.StringValue.internalBinaryWrite(message.phone, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join();
99
+ let u = options.writeUnknownFields;
100
+ if (u !== false)
101
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
102
+ return writer;
103
+ }
104
+ }
105
+ /**
106
+ * @generated MessageType for protobuf message discord_protos.users.v1.MediumUser
107
+ */
108
+ exports.MediumUser = new MediumUser$Type();