discord-protos 1.2.304 → 1.2.306

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.
@@ -357,6 +357,7 @@ message Experiment {
357
357
  PHASE_ROLLING_OUT = 4;
358
358
  PHASE_ARCHIVED = 6;
359
359
  PHASE_AA_MODE = 7;
360
+ PHASE_PAUSED = 8;
360
361
  }
361
362
 
362
363
  enum Surface {
@@ -0,0 +1,66 @@
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/wrappers.proto";
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+
7
+ package discord_protos.discord_notifications.v1;
8
+
9
+ message UserNotificationSettings {
10
+ message EmailNotificationSettings {
11
+ map<string, bool> categories = 1;
12
+ }
13
+
14
+ message MuteNotificationSettings {
15
+ optional google.protobuf.Timestamp end_time = 1;
16
+ optional google.protobuf.Int32Value selected_time_window = 2;
17
+ }
18
+
19
+ message ChannelNotificationSettings {
20
+ fixed64 channel_id = 1;
21
+ uint32 message_notifications = 7;
22
+ optional MuteNotificationSettings mute = 3;
23
+ bool collapsed = 4;
24
+ }
25
+
26
+ message GuildNotificationSettings {
27
+ bool suppress_everyone = 1;
28
+ uint32 message_notifications = 2;
29
+ bool mobile_push = 3;
30
+ optional MuteNotificationSettings mute = 4;
31
+ repeated ChannelNotificationSettings channel_overrides = 5;
32
+ bool suppress_roles = 6;
33
+ uint32 version = 7;
34
+ bool hide_muted_channels = 8;
35
+ bool mute_scheduled_events = 9;
36
+ uint32 notify_highlights = 10;
37
+ }
38
+
39
+ message Versions {
40
+ uint32 client_version = 1;
41
+ uint32 server_version = 2;
42
+ uint32 data_version = 3;
43
+ }
44
+
45
+ message DeclarativeNotifSetting {
46
+ bool toggle = 1;
47
+ uint32 radio = 2;
48
+ }
49
+
50
+ message DeclarativeSettings {
51
+ optional Versions versions = 1;
52
+ map<uint32, DeclarativeNotifSetting> values = 2;
53
+ }
54
+
55
+ message UserNotificationSettingsData {
56
+ map<fixed64, bool> muted_games = 1;
57
+ optional DeclarativeSettings declarative_settings = 2;
58
+ }
59
+
60
+ fixed64 user_id = 1;
61
+ optional EmailNotificationSettings email_settings = 2;
62
+ optional google.protobuf.UInt64Value flags = 6;
63
+ map<fixed64, GuildNotificationSettings> guilds = 4;
64
+ uint32 version = 5;
65
+ optional UserNotificationSettingsData data = 7;
66
+ }
@@ -856,6 +856,7 @@ message UserData {
856
856
  AgeAssuranceGroup estimated_age_group = 6;
857
857
  bool is_regional_adult = 7;
858
858
  optional google.protobuf.Timestamp cooldown_reset_at = 8;
859
+ optional google.protobuf.Timestamp excluded_from_prediction_since = 9;
859
860
  }
860
861
 
861
862
  enum PerkSource {
@@ -1118,7 +1118,11 @@ export declare enum Experiment_Phase {
1118
1118
  /**
1119
1119
  * @generated from protobuf enum value: PHASE_AA_MODE = 7;
1120
1120
  */
1121
- AA_MODE = 7
1121
+ AA_MODE = 7,
1122
+ /**
1123
+ * @generated from protobuf enum value: PHASE_PAUSED = 8;
1124
+ */
1125
+ PAUSED = 8
1122
1126
  }
1123
1127
  /**
1124
1128
  * @generated from protobuf enum discord_protos.discord_experimentation.v1.Experiment.Surface
@@ -106,6 +106,10 @@ var Experiment_Phase;
106
106
  * @generated from protobuf enum value: PHASE_AA_MODE = 7;
107
107
  */
108
108
  Experiment_Phase[Experiment_Phase["AA_MODE"] = 7] = "AA_MODE";
109
+ /**
110
+ * @generated from protobuf enum value: PHASE_PAUSED = 8;
111
+ */
112
+ Experiment_Phase[Experiment_Phase["PAUSED"] = 8] = "PAUSED";
109
113
  })(Experiment_Phase || (exports.Experiment_Phase = Experiment_Phase = {}));
110
114
  /**
111
115
  * @generated from protobuf enum discord_protos.discord_experimentation.v1.Experiment.Surface
@@ -0,0 +1,285 @@
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 { Int32Value } from "../../google/protobuf/wrappers";
8
+ import { Timestamp } from "../../google/protobuf/timestamp";
9
+ import { UInt64Value } from "../../google/protobuf/wrappers";
10
+ /**
11
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings
12
+ */
13
+ export interface UserNotificationSettings {
14
+ /**
15
+ * @generated from protobuf field: fixed64 user_id = 1
16
+ */
17
+ userId: bigint;
18
+ /**
19
+ * @generated from protobuf field: optional discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings email_settings = 2
20
+ */
21
+ emailSettings?: UserNotificationSettings_EmailNotificationSettings;
22
+ /**
23
+ * @generated from protobuf field: optional google.protobuf.UInt64Value flags = 6
24
+ */
25
+ flags?: UInt64Value;
26
+ /**
27
+ * @generated from protobuf field: map<fixed64, discord_protos.discord_notifications.v1.UserNotificationSettings.GuildNotificationSettings> guilds = 4
28
+ */
29
+ guilds: {
30
+ [key: string]: UserNotificationSettings_GuildNotificationSettings;
31
+ };
32
+ /**
33
+ * @generated from protobuf field: uint32 version = 5
34
+ */
35
+ version: number;
36
+ /**
37
+ * @generated from protobuf field: optional discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData data = 7
38
+ */
39
+ data?: UserNotificationSettings_UserNotificationSettingsData;
40
+ }
41
+ /**
42
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings
43
+ */
44
+ export interface UserNotificationSettings_EmailNotificationSettings {
45
+ /**
46
+ * @generated from protobuf field: map<string, bool> categories = 1
47
+ */
48
+ categories: {
49
+ [key: string]: boolean;
50
+ };
51
+ }
52
+ /**
53
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings
54
+ */
55
+ export interface UserNotificationSettings_MuteNotificationSettings {
56
+ /**
57
+ * @generated from protobuf field: optional google.protobuf.Timestamp end_time = 1
58
+ */
59
+ endTime?: Timestamp;
60
+ /**
61
+ * @generated from protobuf field: optional google.protobuf.Int32Value selected_time_window = 2
62
+ */
63
+ selectedTimeWindow?: Int32Value;
64
+ }
65
+ /**
66
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.ChannelNotificationSettings
67
+ */
68
+ export interface UserNotificationSettings_ChannelNotificationSettings {
69
+ /**
70
+ * @generated from protobuf field: fixed64 channel_id = 1
71
+ */
72
+ channelId: bigint;
73
+ /**
74
+ * @generated from protobuf field: uint32 message_notifications = 7
75
+ */
76
+ messageNotifications: number;
77
+ /**
78
+ * @generated from protobuf field: optional discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings mute = 3
79
+ */
80
+ mute?: UserNotificationSettings_MuteNotificationSettings;
81
+ /**
82
+ * @generated from protobuf field: bool collapsed = 4
83
+ */
84
+ collapsed: boolean;
85
+ }
86
+ /**
87
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.GuildNotificationSettings
88
+ */
89
+ export interface UserNotificationSettings_GuildNotificationSettings {
90
+ /**
91
+ * @generated from protobuf field: bool suppress_everyone = 1
92
+ */
93
+ suppressEveryone: boolean;
94
+ /**
95
+ * @generated from protobuf field: uint32 message_notifications = 2
96
+ */
97
+ messageNotifications: number;
98
+ /**
99
+ * @generated from protobuf field: bool mobile_push = 3
100
+ */
101
+ mobilePush: boolean;
102
+ /**
103
+ * @generated from protobuf field: optional discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings mute = 4
104
+ */
105
+ mute?: UserNotificationSettings_MuteNotificationSettings;
106
+ /**
107
+ * @generated from protobuf field: repeated discord_protos.discord_notifications.v1.UserNotificationSettings.ChannelNotificationSettings channel_overrides = 5
108
+ */
109
+ channelOverrides: UserNotificationSettings_ChannelNotificationSettings[];
110
+ /**
111
+ * @generated from protobuf field: bool suppress_roles = 6
112
+ */
113
+ suppressRoles: boolean;
114
+ /**
115
+ * @generated from protobuf field: uint32 version = 7
116
+ */
117
+ version: number;
118
+ /**
119
+ * @generated from protobuf field: bool hide_muted_channels = 8
120
+ */
121
+ hideMutedChannels: boolean;
122
+ /**
123
+ * @generated from protobuf field: bool mute_scheduled_events = 9
124
+ */
125
+ muteScheduledEvents: boolean;
126
+ /**
127
+ * @generated from protobuf field: uint32 notify_highlights = 10
128
+ */
129
+ notifyHighlights: number;
130
+ }
131
+ /**
132
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.Versions
133
+ */
134
+ export interface UserNotificationSettings_Versions {
135
+ /**
136
+ * @generated from protobuf field: uint32 client_version = 1
137
+ */
138
+ clientVersion: number;
139
+ /**
140
+ * @generated from protobuf field: uint32 server_version = 2
141
+ */
142
+ serverVersion: number;
143
+ /**
144
+ * @generated from protobuf field: uint32 data_version = 3
145
+ */
146
+ dataVersion: number;
147
+ }
148
+ /**
149
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeNotifSetting
150
+ */
151
+ export interface UserNotificationSettings_DeclarativeNotifSetting {
152
+ /**
153
+ * @generated from protobuf field: bool toggle = 1
154
+ */
155
+ toggle: boolean;
156
+ /**
157
+ * @generated from protobuf field: uint32 radio = 2
158
+ */
159
+ radio: number;
160
+ }
161
+ /**
162
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings
163
+ */
164
+ export interface UserNotificationSettings_DeclarativeSettings {
165
+ /**
166
+ * @generated from protobuf field: optional discord_protos.discord_notifications.v1.UserNotificationSettings.Versions versions = 1
167
+ */
168
+ versions?: UserNotificationSettings_Versions;
169
+ /**
170
+ * @generated from protobuf field: map<uint32, discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeNotifSetting> values = 2
171
+ */
172
+ values: {
173
+ [key: number]: UserNotificationSettings_DeclarativeNotifSetting;
174
+ };
175
+ }
176
+ /**
177
+ * @generated from protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData
178
+ */
179
+ export interface UserNotificationSettings_UserNotificationSettingsData {
180
+ /**
181
+ * @generated from protobuf field: map<fixed64, bool> muted_games = 1
182
+ */
183
+ mutedGames: {
184
+ [key: string]: boolean;
185
+ };
186
+ /**
187
+ * @generated from protobuf field: optional discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings declarative_settings = 2
188
+ */
189
+ declarativeSettings?: UserNotificationSettings_DeclarativeSettings;
190
+ }
191
+ declare class UserNotificationSettings$Type extends MessageType<UserNotificationSettings> {
192
+ constructor();
193
+ create(value?: PartialMessage<UserNotificationSettings>): UserNotificationSettings;
194
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings): UserNotificationSettings;
195
+ private binaryReadMap4;
196
+ internalBinaryWrite(message: UserNotificationSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
197
+ }
198
+ /**
199
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings
200
+ */
201
+ export declare const UserNotificationSettings: UserNotificationSettings$Type;
202
+ declare class UserNotificationSettings_EmailNotificationSettings$Type extends MessageType<UserNotificationSettings_EmailNotificationSettings> {
203
+ constructor();
204
+ create(value?: PartialMessage<UserNotificationSettings_EmailNotificationSettings>): UserNotificationSettings_EmailNotificationSettings;
205
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_EmailNotificationSettings): UserNotificationSettings_EmailNotificationSettings;
206
+ private binaryReadMap1;
207
+ internalBinaryWrite(message: UserNotificationSettings_EmailNotificationSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
208
+ }
209
+ /**
210
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings
211
+ */
212
+ export declare const UserNotificationSettings_EmailNotificationSettings: UserNotificationSettings_EmailNotificationSettings$Type;
213
+ declare class UserNotificationSettings_MuteNotificationSettings$Type extends MessageType<UserNotificationSettings_MuteNotificationSettings> {
214
+ constructor();
215
+ create(value?: PartialMessage<UserNotificationSettings_MuteNotificationSettings>): UserNotificationSettings_MuteNotificationSettings;
216
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_MuteNotificationSettings): UserNotificationSettings_MuteNotificationSettings;
217
+ internalBinaryWrite(message: UserNotificationSettings_MuteNotificationSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
218
+ }
219
+ /**
220
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings
221
+ */
222
+ export declare const UserNotificationSettings_MuteNotificationSettings: UserNotificationSettings_MuteNotificationSettings$Type;
223
+ declare class UserNotificationSettings_ChannelNotificationSettings$Type extends MessageType<UserNotificationSettings_ChannelNotificationSettings> {
224
+ constructor();
225
+ create(value?: PartialMessage<UserNotificationSettings_ChannelNotificationSettings>): UserNotificationSettings_ChannelNotificationSettings;
226
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_ChannelNotificationSettings): UserNotificationSettings_ChannelNotificationSettings;
227
+ internalBinaryWrite(message: UserNotificationSettings_ChannelNotificationSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
228
+ }
229
+ /**
230
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.ChannelNotificationSettings
231
+ */
232
+ export declare const UserNotificationSettings_ChannelNotificationSettings: UserNotificationSettings_ChannelNotificationSettings$Type;
233
+ declare class UserNotificationSettings_GuildNotificationSettings$Type extends MessageType<UserNotificationSettings_GuildNotificationSettings> {
234
+ constructor();
235
+ create(value?: PartialMessage<UserNotificationSettings_GuildNotificationSettings>): UserNotificationSettings_GuildNotificationSettings;
236
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_GuildNotificationSettings): UserNotificationSettings_GuildNotificationSettings;
237
+ internalBinaryWrite(message: UserNotificationSettings_GuildNotificationSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
238
+ }
239
+ /**
240
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.GuildNotificationSettings
241
+ */
242
+ export declare const UserNotificationSettings_GuildNotificationSettings: UserNotificationSettings_GuildNotificationSettings$Type;
243
+ declare class UserNotificationSettings_Versions$Type extends MessageType<UserNotificationSettings_Versions> {
244
+ constructor();
245
+ create(value?: PartialMessage<UserNotificationSettings_Versions>): UserNotificationSettings_Versions;
246
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_Versions): UserNotificationSettings_Versions;
247
+ internalBinaryWrite(message: UserNotificationSettings_Versions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
248
+ }
249
+ /**
250
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.Versions
251
+ */
252
+ export declare const UserNotificationSettings_Versions: UserNotificationSettings_Versions$Type;
253
+ declare class UserNotificationSettings_DeclarativeNotifSetting$Type extends MessageType<UserNotificationSettings_DeclarativeNotifSetting> {
254
+ constructor();
255
+ create(value?: PartialMessage<UserNotificationSettings_DeclarativeNotifSetting>): UserNotificationSettings_DeclarativeNotifSetting;
256
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_DeclarativeNotifSetting): UserNotificationSettings_DeclarativeNotifSetting;
257
+ internalBinaryWrite(message: UserNotificationSettings_DeclarativeNotifSetting, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
258
+ }
259
+ /**
260
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeNotifSetting
261
+ */
262
+ export declare const UserNotificationSettings_DeclarativeNotifSetting: UserNotificationSettings_DeclarativeNotifSetting$Type;
263
+ declare class UserNotificationSettings_DeclarativeSettings$Type extends MessageType<UserNotificationSettings_DeclarativeSettings> {
264
+ constructor();
265
+ create(value?: PartialMessage<UserNotificationSettings_DeclarativeSettings>): UserNotificationSettings_DeclarativeSettings;
266
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_DeclarativeSettings): UserNotificationSettings_DeclarativeSettings;
267
+ private binaryReadMap2;
268
+ internalBinaryWrite(message: UserNotificationSettings_DeclarativeSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
269
+ }
270
+ /**
271
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings
272
+ */
273
+ export declare const UserNotificationSettings_DeclarativeSettings: UserNotificationSettings_DeclarativeSettings$Type;
274
+ declare class UserNotificationSettings_UserNotificationSettingsData$Type extends MessageType<UserNotificationSettings_UserNotificationSettingsData> {
275
+ constructor();
276
+ create(value?: PartialMessage<UserNotificationSettings_UserNotificationSettingsData>): UserNotificationSettings_UserNotificationSettingsData;
277
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserNotificationSettings_UserNotificationSettingsData): UserNotificationSettings_UserNotificationSettingsData;
278
+ private binaryReadMap1;
279
+ internalBinaryWrite(message: UserNotificationSettings_UserNotificationSettingsData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
280
+ }
281
+ /**
282
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData
283
+ */
284
+ export declare const UserNotificationSettings_UserNotificationSettingsData: UserNotificationSettings_UserNotificationSettingsData$Type;
285
+ export {};
@@ -0,0 +1,680 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserNotificationSettings_UserNotificationSettingsData = exports.UserNotificationSettings_DeclarativeSettings = exports.UserNotificationSettings_DeclarativeNotifSetting = exports.UserNotificationSettings_Versions = exports.UserNotificationSettings_GuildNotificationSettings = exports.UserNotificationSettings_ChannelNotificationSettings = exports.UserNotificationSettings_MuteNotificationSettings = exports.UserNotificationSettings_EmailNotificationSettings = exports.UserNotificationSettings = 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
+ const timestamp_1 = require("../../google/protobuf/timestamp");
10
+ const wrappers_2 = require("../../google/protobuf/wrappers");
11
+ // @generated message type with reflection information, may provide speed optimized methods
12
+ class UserNotificationSettings$Type extends runtime_4.MessageType {
13
+ constructor() {
14
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings", [
15
+ { no: 1, name: "user_id", kind: "scalar", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ },
16
+ { no: 2, name: "email_settings", kind: "message", T: () => exports.UserNotificationSettings_EmailNotificationSettings },
17
+ { no: 6, name: "flags", kind: "message", T: () => wrappers_2.UInt64Value },
18
+ { no: 4, name: "guilds", kind: "map", K: 6 /*ScalarType.FIXED64*/, V: { kind: "message", T: () => exports.UserNotificationSettings_GuildNotificationSettings } },
19
+ { no: 5, name: "version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
20
+ { no: 7, name: "data", kind: "message", T: () => exports.UserNotificationSettings_UserNotificationSettingsData }
21
+ ]);
22
+ }
23
+ create(value) {
24
+ const message = globalThis.Object.create((this.messagePrototype));
25
+ message.userId = 0n;
26
+ message.guilds = {};
27
+ message.version = 0;
28
+ if (value !== undefined)
29
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
30
+ return message;
31
+ }
32
+ internalBinaryRead(reader, length, options, target) {
33
+ let message = target ?? this.create(), end = reader.pos + length;
34
+ while (reader.pos < end) {
35
+ let [fieldNo, wireType] = reader.tag();
36
+ switch (fieldNo) {
37
+ case /* fixed64 user_id */ 1:
38
+ message.userId = reader.fixed64().toBigInt();
39
+ break;
40
+ case /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings email_settings */ 2:
41
+ message.emailSettings = exports.UserNotificationSettings_EmailNotificationSettings.internalBinaryRead(reader, reader.uint32(), options, message.emailSettings);
42
+ break;
43
+ case /* optional google.protobuf.UInt64Value flags */ 6:
44
+ message.flags = wrappers_2.UInt64Value.internalBinaryRead(reader, reader.uint32(), options, message.flags);
45
+ break;
46
+ case /* map<fixed64, discord_protos.discord_notifications.v1.UserNotificationSettings.GuildNotificationSettings> guilds */ 4:
47
+ this.binaryReadMap4(message.guilds, reader, options);
48
+ break;
49
+ case /* uint32 version */ 5:
50
+ message.version = reader.uint32();
51
+ break;
52
+ case /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData data */ 7:
53
+ message.data = exports.UserNotificationSettings_UserNotificationSettingsData.internalBinaryRead(reader, reader.uint32(), options, message.data);
54
+ break;
55
+ default:
56
+ let u = options.readUnknownField;
57
+ if (u === "throw")
58
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
59
+ let d = reader.skip(wireType);
60
+ if (u !== false)
61
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
62
+ }
63
+ }
64
+ return message;
65
+ }
66
+ binaryReadMap4(map, reader, options) {
67
+ let len = reader.uint32(), end = reader.pos + len, key, val;
68
+ while (reader.pos < end) {
69
+ let [fieldNo, wireType] = reader.tag();
70
+ switch (fieldNo) {
71
+ case 1:
72
+ key = reader.fixed64().toString();
73
+ break;
74
+ case 2:
75
+ val = exports.UserNotificationSettings_GuildNotificationSettings.internalBinaryRead(reader, reader.uint32(), options);
76
+ break;
77
+ default: throw new globalThis.Error("unknown map entry field for discord_protos.discord_notifications.v1.UserNotificationSettings.guilds");
78
+ }
79
+ }
80
+ map[key ?? "0"] = val ?? exports.UserNotificationSettings_GuildNotificationSettings.create();
81
+ }
82
+ internalBinaryWrite(message, writer, options) {
83
+ /* fixed64 user_id = 1; */
84
+ if (message.userId !== 0n)
85
+ writer.tag(1, runtime_1.WireType.Bit64).fixed64(message.userId);
86
+ /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings email_settings = 2; */
87
+ if (message.emailSettings)
88
+ exports.UserNotificationSettings_EmailNotificationSettings.internalBinaryWrite(message.emailSettings, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join();
89
+ /* map<fixed64, discord_protos.discord_notifications.v1.UserNotificationSettings.GuildNotificationSettings> guilds = 4; */
90
+ for (let k of globalThis.Object.keys(message.guilds)) {
91
+ writer.tag(4, runtime_1.WireType.LengthDelimited).fork().tag(1, runtime_1.WireType.Bit64).fixed64(k);
92
+ writer.tag(2, runtime_1.WireType.LengthDelimited).fork();
93
+ exports.UserNotificationSettings_GuildNotificationSettings.internalBinaryWrite(message.guilds[k], writer, options);
94
+ writer.join().join();
95
+ }
96
+ /* uint32 version = 5; */
97
+ if (message.version !== 0)
98
+ writer.tag(5, runtime_1.WireType.Varint).uint32(message.version);
99
+ /* optional google.protobuf.UInt64Value flags = 6; */
100
+ if (message.flags)
101
+ wrappers_2.UInt64Value.internalBinaryWrite(message.flags, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join();
102
+ /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData data = 7; */
103
+ if (message.data)
104
+ exports.UserNotificationSettings_UserNotificationSettingsData.internalBinaryWrite(message.data, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join();
105
+ let u = options.writeUnknownFields;
106
+ if (u !== false)
107
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
108
+ return writer;
109
+ }
110
+ }
111
+ /**
112
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings
113
+ */
114
+ exports.UserNotificationSettings = new UserNotificationSettings$Type();
115
+ // @generated message type with reflection information, may provide speed optimized methods
116
+ class UserNotificationSettings_EmailNotificationSettings$Type extends runtime_4.MessageType {
117
+ constructor() {
118
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings", [
119
+ { no: 1, name: "categories", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } }
120
+ ]);
121
+ }
122
+ create(value) {
123
+ const message = globalThis.Object.create((this.messagePrototype));
124
+ message.categories = {};
125
+ if (value !== undefined)
126
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
127
+ return message;
128
+ }
129
+ internalBinaryRead(reader, length, options, target) {
130
+ let message = target ?? this.create(), end = reader.pos + length;
131
+ while (reader.pos < end) {
132
+ let [fieldNo, wireType] = reader.tag();
133
+ switch (fieldNo) {
134
+ case /* map<string, bool> categories */ 1:
135
+ this.binaryReadMap1(message.categories, reader, options);
136
+ break;
137
+ default:
138
+ let u = options.readUnknownField;
139
+ if (u === "throw")
140
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
141
+ let d = reader.skip(wireType);
142
+ if (u !== false)
143
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
144
+ }
145
+ }
146
+ return message;
147
+ }
148
+ binaryReadMap1(map, reader, options) {
149
+ let len = reader.uint32(), end = reader.pos + len, key, val;
150
+ while (reader.pos < end) {
151
+ let [fieldNo, wireType] = reader.tag();
152
+ switch (fieldNo) {
153
+ case 1:
154
+ key = reader.string();
155
+ break;
156
+ case 2:
157
+ val = reader.bool();
158
+ break;
159
+ default: throw new globalThis.Error("unknown map entry field for discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings.categories");
160
+ }
161
+ }
162
+ map[key ?? ""] = val ?? false;
163
+ }
164
+ internalBinaryWrite(message, writer, options) {
165
+ /* map<string, bool> categories = 1; */
166
+ for (let k of globalThis.Object.keys(message.categories))
167
+ writer.tag(1, runtime_1.WireType.LengthDelimited).fork().tag(1, runtime_1.WireType.LengthDelimited).string(k).tag(2, runtime_1.WireType.Varint).bool(message.categories[k]).join();
168
+ let u = options.writeUnknownFields;
169
+ if (u !== false)
170
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
171
+ return writer;
172
+ }
173
+ }
174
+ /**
175
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.EmailNotificationSettings
176
+ */
177
+ exports.UserNotificationSettings_EmailNotificationSettings = new UserNotificationSettings_EmailNotificationSettings$Type();
178
+ // @generated message type with reflection information, may provide speed optimized methods
179
+ class UserNotificationSettings_MuteNotificationSettings$Type extends runtime_4.MessageType {
180
+ constructor() {
181
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings", [
182
+ { no: 1, name: "end_time", kind: "message", T: () => timestamp_1.Timestamp },
183
+ { no: 2, name: "selected_time_window", kind: "message", T: () => wrappers_1.Int32Value }
184
+ ]);
185
+ }
186
+ create(value) {
187
+ const message = globalThis.Object.create((this.messagePrototype));
188
+ if (value !== undefined)
189
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
190
+ return message;
191
+ }
192
+ internalBinaryRead(reader, length, options, target) {
193
+ let message = target ?? this.create(), end = reader.pos + length;
194
+ while (reader.pos < end) {
195
+ let [fieldNo, wireType] = reader.tag();
196
+ switch (fieldNo) {
197
+ case /* optional google.protobuf.Timestamp end_time */ 1:
198
+ message.endTime = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endTime);
199
+ break;
200
+ case /* optional google.protobuf.Int32Value selected_time_window */ 2:
201
+ message.selectedTimeWindow = wrappers_1.Int32Value.internalBinaryRead(reader, reader.uint32(), options, message.selectedTimeWindow);
202
+ break;
203
+ default:
204
+ let u = options.readUnknownField;
205
+ if (u === "throw")
206
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
207
+ let d = reader.skip(wireType);
208
+ if (u !== false)
209
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
210
+ }
211
+ }
212
+ return message;
213
+ }
214
+ internalBinaryWrite(message, writer, options) {
215
+ /* optional google.protobuf.Timestamp end_time = 1; */
216
+ if (message.endTime)
217
+ timestamp_1.Timestamp.internalBinaryWrite(message.endTime, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
218
+ /* optional google.protobuf.Int32Value selected_time_window = 2; */
219
+ if (message.selectedTimeWindow)
220
+ wrappers_1.Int32Value.internalBinaryWrite(message.selectedTimeWindow, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join();
221
+ let u = options.writeUnknownFields;
222
+ if (u !== false)
223
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
224
+ return writer;
225
+ }
226
+ }
227
+ /**
228
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings
229
+ */
230
+ exports.UserNotificationSettings_MuteNotificationSettings = new UserNotificationSettings_MuteNotificationSettings$Type();
231
+ // @generated message type with reflection information, may provide speed optimized methods
232
+ class UserNotificationSettings_ChannelNotificationSettings$Type extends runtime_4.MessageType {
233
+ constructor() {
234
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.ChannelNotificationSettings", [
235
+ { no: 1, name: "channel_id", kind: "scalar", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ },
236
+ { no: 7, name: "message_notifications", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
237
+ { no: 3, name: "mute", kind: "message", T: () => exports.UserNotificationSettings_MuteNotificationSettings },
238
+ { no: 4, name: "collapsed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
239
+ ]);
240
+ }
241
+ create(value) {
242
+ const message = globalThis.Object.create((this.messagePrototype));
243
+ message.channelId = 0n;
244
+ message.messageNotifications = 0;
245
+ message.collapsed = false;
246
+ if (value !== undefined)
247
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
248
+ return message;
249
+ }
250
+ internalBinaryRead(reader, length, options, target) {
251
+ let message = target ?? this.create(), end = reader.pos + length;
252
+ while (reader.pos < end) {
253
+ let [fieldNo, wireType] = reader.tag();
254
+ switch (fieldNo) {
255
+ case /* fixed64 channel_id */ 1:
256
+ message.channelId = reader.fixed64().toBigInt();
257
+ break;
258
+ case /* uint32 message_notifications */ 7:
259
+ message.messageNotifications = reader.uint32();
260
+ break;
261
+ case /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings mute */ 3:
262
+ message.mute = exports.UserNotificationSettings_MuteNotificationSettings.internalBinaryRead(reader, reader.uint32(), options, message.mute);
263
+ break;
264
+ case /* bool collapsed */ 4:
265
+ message.collapsed = reader.bool();
266
+ break;
267
+ default:
268
+ let u = options.readUnknownField;
269
+ if (u === "throw")
270
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
271
+ let d = reader.skip(wireType);
272
+ if (u !== false)
273
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
274
+ }
275
+ }
276
+ return message;
277
+ }
278
+ internalBinaryWrite(message, writer, options) {
279
+ /* fixed64 channel_id = 1; */
280
+ if (message.channelId !== 0n)
281
+ writer.tag(1, runtime_1.WireType.Bit64).fixed64(message.channelId);
282
+ /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings mute = 3; */
283
+ if (message.mute)
284
+ exports.UserNotificationSettings_MuteNotificationSettings.internalBinaryWrite(message.mute, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join();
285
+ /* bool collapsed = 4; */
286
+ if (message.collapsed !== false)
287
+ writer.tag(4, runtime_1.WireType.Varint).bool(message.collapsed);
288
+ /* uint32 message_notifications = 7; */
289
+ if (message.messageNotifications !== 0)
290
+ writer.tag(7, runtime_1.WireType.Varint).uint32(message.messageNotifications);
291
+ let u = options.writeUnknownFields;
292
+ if (u !== false)
293
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
294
+ return writer;
295
+ }
296
+ }
297
+ /**
298
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.ChannelNotificationSettings
299
+ */
300
+ exports.UserNotificationSettings_ChannelNotificationSettings = new UserNotificationSettings_ChannelNotificationSettings$Type();
301
+ // @generated message type with reflection information, may provide speed optimized methods
302
+ class UserNotificationSettings_GuildNotificationSettings$Type extends runtime_4.MessageType {
303
+ constructor() {
304
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.GuildNotificationSettings", [
305
+ { no: 1, name: "suppress_everyone", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
306
+ { no: 2, name: "message_notifications", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
307
+ { no: 3, name: "mobile_push", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
308
+ { no: 4, name: "mute", kind: "message", T: () => exports.UserNotificationSettings_MuteNotificationSettings },
309
+ { no: 5, name: "channel_overrides", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UserNotificationSettings_ChannelNotificationSettings },
310
+ { no: 6, name: "suppress_roles", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
311
+ { no: 7, name: "version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
312
+ { no: 8, name: "hide_muted_channels", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
313
+ { no: 9, name: "mute_scheduled_events", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
314
+ { no: 10, name: "notify_highlights", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
315
+ ]);
316
+ }
317
+ create(value) {
318
+ const message = globalThis.Object.create((this.messagePrototype));
319
+ message.suppressEveryone = false;
320
+ message.messageNotifications = 0;
321
+ message.mobilePush = false;
322
+ message.channelOverrides = [];
323
+ message.suppressRoles = false;
324
+ message.version = 0;
325
+ message.hideMutedChannels = false;
326
+ message.muteScheduledEvents = false;
327
+ message.notifyHighlights = 0;
328
+ if (value !== undefined)
329
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
330
+ return message;
331
+ }
332
+ internalBinaryRead(reader, length, options, target) {
333
+ let message = target ?? this.create(), end = reader.pos + length;
334
+ while (reader.pos < end) {
335
+ let [fieldNo, wireType] = reader.tag();
336
+ switch (fieldNo) {
337
+ case /* bool suppress_everyone */ 1:
338
+ message.suppressEveryone = reader.bool();
339
+ break;
340
+ case /* uint32 message_notifications */ 2:
341
+ message.messageNotifications = reader.uint32();
342
+ break;
343
+ case /* bool mobile_push */ 3:
344
+ message.mobilePush = reader.bool();
345
+ break;
346
+ case /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings mute */ 4:
347
+ message.mute = exports.UserNotificationSettings_MuteNotificationSettings.internalBinaryRead(reader, reader.uint32(), options, message.mute);
348
+ break;
349
+ case /* repeated discord_protos.discord_notifications.v1.UserNotificationSettings.ChannelNotificationSettings channel_overrides */ 5:
350
+ message.channelOverrides.push(exports.UserNotificationSettings_ChannelNotificationSettings.internalBinaryRead(reader, reader.uint32(), options));
351
+ break;
352
+ case /* bool suppress_roles */ 6:
353
+ message.suppressRoles = reader.bool();
354
+ break;
355
+ case /* uint32 version */ 7:
356
+ message.version = reader.uint32();
357
+ break;
358
+ case /* bool hide_muted_channels */ 8:
359
+ message.hideMutedChannels = reader.bool();
360
+ break;
361
+ case /* bool mute_scheduled_events */ 9:
362
+ message.muteScheduledEvents = reader.bool();
363
+ break;
364
+ case /* uint32 notify_highlights */ 10:
365
+ message.notifyHighlights = reader.uint32();
366
+ break;
367
+ default:
368
+ let u = options.readUnknownField;
369
+ if (u === "throw")
370
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
371
+ let d = reader.skip(wireType);
372
+ if (u !== false)
373
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
374
+ }
375
+ }
376
+ return message;
377
+ }
378
+ internalBinaryWrite(message, writer, options) {
379
+ /* bool suppress_everyone = 1; */
380
+ if (message.suppressEveryone !== false)
381
+ writer.tag(1, runtime_1.WireType.Varint).bool(message.suppressEveryone);
382
+ /* uint32 message_notifications = 2; */
383
+ if (message.messageNotifications !== 0)
384
+ writer.tag(2, runtime_1.WireType.Varint).uint32(message.messageNotifications);
385
+ /* bool mobile_push = 3; */
386
+ if (message.mobilePush !== false)
387
+ writer.tag(3, runtime_1.WireType.Varint).bool(message.mobilePush);
388
+ /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.MuteNotificationSettings mute = 4; */
389
+ if (message.mute)
390
+ exports.UserNotificationSettings_MuteNotificationSettings.internalBinaryWrite(message.mute, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join();
391
+ /* repeated discord_protos.discord_notifications.v1.UserNotificationSettings.ChannelNotificationSettings channel_overrides = 5; */
392
+ for (let i = 0; i < message.channelOverrides.length; i++)
393
+ exports.UserNotificationSettings_ChannelNotificationSettings.internalBinaryWrite(message.channelOverrides[i], writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join();
394
+ /* bool suppress_roles = 6; */
395
+ if (message.suppressRoles !== false)
396
+ writer.tag(6, runtime_1.WireType.Varint).bool(message.suppressRoles);
397
+ /* uint32 version = 7; */
398
+ if (message.version !== 0)
399
+ writer.tag(7, runtime_1.WireType.Varint).uint32(message.version);
400
+ /* bool hide_muted_channels = 8; */
401
+ if (message.hideMutedChannels !== false)
402
+ writer.tag(8, runtime_1.WireType.Varint).bool(message.hideMutedChannels);
403
+ /* bool mute_scheduled_events = 9; */
404
+ if (message.muteScheduledEvents !== false)
405
+ writer.tag(9, runtime_1.WireType.Varint).bool(message.muteScheduledEvents);
406
+ /* uint32 notify_highlights = 10; */
407
+ if (message.notifyHighlights !== 0)
408
+ writer.tag(10, runtime_1.WireType.Varint).uint32(message.notifyHighlights);
409
+ let u = options.writeUnknownFields;
410
+ if (u !== false)
411
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
412
+ return writer;
413
+ }
414
+ }
415
+ /**
416
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.GuildNotificationSettings
417
+ */
418
+ exports.UserNotificationSettings_GuildNotificationSettings = new UserNotificationSettings_GuildNotificationSettings$Type();
419
+ // @generated message type with reflection information, may provide speed optimized methods
420
+ class UserNotificationSettings_Versions$Type extends runtime_4.MessageType {
421
+ constructor() {
422
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.Versions", [
423
+ { no: 1, name: "client_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
424
+ { no: 2, name: "server_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
425
+ { no: 3, name: "data_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
426
+ ]);
427
+ }
428
+ create(value) {
429
+ const message = globalThis.Object.create((this.messagePrototype));
430
+ message.clientVersion = 0;
431
+ message.serverVersion = 0;
432
+ message.dataVersion = 0;
433
+ if (value !== undefined)
434
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
435
+ return message;
436
+ }
437
+ internalBinaryRead(reader, length, options, target) {
438
+ let message = target ?? this.create(), end = reader.pos + length;
439
+ while (reader.pos < end) {
440
+ let [fieldNo, wireType] = reader.tag();
441
+ switch (fieldNo) {
442
+ case /* uint32 client_version */ 1:
443
+ message.clientVersion = reader.uint32();
444
+ break;
445
+ case /* uint32 server_version */ 2:
446
+ message.serverVersion = reader.uint32();
447
+ break;
448
+ case /* uint32 data_version */ 3:
449
+ message.dataVersion = reader.uint32();
450
+ break;
451
+ default:
452
+ let u = options.readUnknownField;
453
+ if (u === "throw")
454
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
455
+ let d = reader.skip(wireType);
456
+ if (u !== false)
457
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
458
+ }
459
+ }
460
+ return message;
461
+ }
462
+ internalBinaryWrite(message, writer, options) {
463
+ /* uint32 client_version = 1; */
464
+ if (message.clientVersion !== 0)
465
+ writer.tag(1, runtime_1.WireType.Varint).uint32(message.clientVersion);
466
+ /* uint32 server_version = 2; */
467
+ if (message.serverVersion !== 0)
468
+ writer.tag(2, runtime_1.WireType.Varint).uint32(message.serverVersion);
469
+ /* uint32 data_version = 3; */
470
+ if (message.dataVersion !== 0)
471
+ writer.tag(3, runtime_1.WireType.Varint).uint32(message.dataVersion);
472
+ let u = options.writeUnknownFields;
473
+ if (u !== false)
474
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
475
+ return writer;
476
+ }
477
+ }
478
+ /**
479
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.Versions
480
+ */
481
+ exports.UserNotificationSettings_Versions = new UserNotificationSettings_Versions$Type();
482
+ // @generated message type with reflection information, may provide speed optimized methods
483
+ class UserNotificationSettings_DeclarativeNotifSetting$Type extends runtime_4.MessageType {
484
+ constructor() {
485
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeNotifSetting", [
486
+ { no: 1, name: "toggle", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
487
+ { no: 2, name: "radio", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
488
+ ]);
489
+ }
490
+ create(value) {
491
+ const message = globalThis.Object.create((this.messagePrototype));
492
+ message.toggle = false;
493
+ message.radio = 0;
494
+ if (value !== undefined)
495
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
496
+ return message;
497
+ }
498
+ internalBinaryRead(reader, length, options, target) {
499
+ let message = target ?? this.create(), end = reader.pos + length;
500
+ while (reader.pos < end) {
501
+ let [fieldNo, wireType] = reader.tag();
502
+ switch (fieldNo) {
503
+ case /* bool toggle */ 1:
504
+ message.toggle = reader.bool();
505
+ break;
506
+ case /* uint32 radio */ 2:
507
+ message.radio = reader.uint32();
508
+ break;
509
+ default:
510
+ let u = options.readUnknownField;
511
+ if (u === "throw")
512
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
513
+ let d = reader.skip(wireType);
514
+ if (u !== false)
515
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
516
+ }
517
+ }
518
+ return message;
519
+ }
520
+ internalBinaryWrite(message, writer, options) {
521
+ /* bool toggle = 1; */
522
+ if (message.toggle !== false)
523
+ writer.tag(1, runtime_1.WireType.Varint).bool(message.toggle);
524
+ /* uint32 radio = 2; */
525
+ if (message.radio !== 0)
526
+ writer.tag(2, runtime_1.WireType.Varint).uint32(message.radio);
527
+ let u = options.writeUnknownFields;
528
+ if (u !== false)
529
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
530
+ return writer;
531
+ }
532
+ }
533
+ /**
534
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeNotifSetting
535
+ */
536
+ exports.UserNotificationSettings_DeclarativeNotifSetting = new UserNotificationSettings_DeclarativeNotifSetting$Type();
537
+ // @generated message type with reflection information, may provide speed optimized methods
538
+ class UserNotificationSettings_DeclarativeSettings$Type extends runtime_4.MessageType {
539
+ constructor() {
540
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings", [
541
+ { no: 1, name: "versions", kind: "message", T: () => exports.UserNotificationSettings_Versions },
542
+ { no: 2, name: "values", kind: "map", K: 13 /*ScalarType.UINT32*/, V: { kind: "message", T: () => exports.UserNotificationSettings_DeclarativeNotifSetting } }
543
+ ]);
544
+ }
545
+ create(value) {
546
+ const message = globalThis.Object.create((this.messagePrototype));
547
+ message.values = {};
548
+ if (value !== undefined)
549
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
550
+ return message;
551
+ }
552
+ internalBinaryRead(reader, length, options, target) {
553
+ let message = target ?? this.create(), end = reader.pos + length;
554
+ while (reader.pos < end) {
555
+ let [fieldNo, wireType] = reader.tag();
556
+ switch (fieldNo) {
557
+ case /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.Versions versions */ 1:
558
+ message.versions = exports.UserNotificationSettings_Versions.internalBinaryRead(reader, reader.uint32(), options, message.versions);
559
+ break;
560
+ case /* map<uint32, discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeNotifSetting> values */ 2:
561
+ this.binaryReadMap2(message.values, reader, options);
562
+ break;
563
+ default:
564
+ let u = options.readUnknownField;
565
+ if (u === "throw")
566
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
567
+ let d = reader.skip(wireType);
568
+ if (u !== false)
569
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
570
+ }
571
+ }
572
+ return message;
573
+ }
574
+ binaryReadMap2(map, reader, options) {
575
+ let len = reader.uint32(), end = reader.pos + len, key, val;
576
+ while (reader.pos < end) {
577
+ let [fieldNo, wireType] = reader.tag();
578
+ switch (fieldNo) {
579
+ case 1:
580
+ key = reader.uint32();
581
+ break;
582
+ case 2:
583
+ val = exports.UserNotificationSettings_DeclarativeNotifSetting.internalBinaryRead(reader, reader.uint32(), options);
584
+ break;
585
+ default: throw new globalThis.Error("unknown map entry field for discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings.values");
586
+ }
587
+ }
588
+ map[key ?? 0] = val ?? exports.UserNotificationSettings_DeclarativeNotifSetting.create();
589
+ }
590
+ internalBinaryWrite(message, writer, options) {
591
+ /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.Versions versions = 1; */
592
+ if (message.versions)
593
+ exports.UserNotificationSettings_Versions.internalBinaryWrite(message.versions, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
594
+ /* map<uint32, discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeNotifSetting> values = 2; */
595
+ for (let k of globalThis.Object.keys(message.values)) {
596
+ writer.tag(2, runtime_1.WireType.LengthDelimited).fork().tag(1, runtime_1.WireType.Varint).uint32(parseInt(k));
597
+ writer.tag(2, runtime_1.WireType.LengthDelimited).fork();
598
+ exports.UserNotificationSettings_DeclarativeNotifSetting.internalBinaryWrite(message.values[k], writer, options);
599
+ writer.join().join();
600
+ }
601
+ let u = options.writeUnknownFields;
602
+ if (u !== false)
603
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
604
+ return writer;
605
+ }
606
+ }
607
+ /**
608
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings
609
+ */
610
+ exports.UserNotificationSettings_DeclarativeSettings = new UserNotificationSettings_DeclarativeSettings$Type();
611
+ // @generated message type with reflection information, may provide speed optimized methods
612
+ class UserNotificationSettings_UserNotificationSettingsData$Type extends runtime_4.MessageType {
613
+ constructor() {
614
+ super("discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData", [
615
+ { no: 1, name: "muted_games", kind: "map", K: 6 /*ScalarType.FIXED64*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } },
616
+ { no: 2, name: "declarative_settings", kind: "message", T: () => exports.UserNotificationSettings_DeclarativeSettings }
617
+ ]);
618
+ }
619
+ create(value) {
620
+ const message = globalThis.Object.create((this.messagePrototype));
621
+ message.mutedGames = {};
622
+ if (value !== undefined)
623
+ (0, runtime_3.reflectionMergePartial)(this, message, value);
624
+ return message;
625
+ }
626
+ internalBinaryRead(reader, length, options, target) {
627
+ let message = target ?? this.create(), end = reader.pos + length;
628
+ while (reader.pos < end) {
629
+ let [fieldNo, wireType] = reader.tag();
630
+ switch (fieldNo) {
631
+ case /* map<fixed64, bool> muted_games */ 1:
632
+ this.binaryReadMap1(message.mutedGames, reader, options);
633
+ break;
634
+ case /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings declarative_settings */ 2:
635
+ message.declarativeSettings = exports.UserNotificationSettings_DeclarativeSettings.internalBinaryRead(reader, reader.uint32(), options, message.declarativeSettings);
636
+ break;
637
+ default:
638
+ let u = options.readUnknownField;
639
+ if (u === "throw")
640
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
641
+ let d = reader.skip(wireType);
642
+ if (u !== false)
643
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
644
+ }
645
+ }
646
+ return message;
647
+ }
648
+ binaryReadMap1(map, reader, options) {
649
+ let len = reader.uint32(), end = reader.pos + len, key, val;
650
+ while (reader.pos < end) {
651
+ let [fieldNo, wireType] = reader.tag();
652
+ switch (fieldNo) {
653
+ case 1:
654
+ key = reader.fixed64().toString();
655
+ break;
656
+ case 2:
657
+ val = reader.bool();
658
+ break;
659
+ default: throw new globalThis.Error("unknown map entry field for discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData.muted_games");
660
+ }
661
+ }
662
+ map[key ?? "0"] = val ?? false;
663
+ }
664
+ internalBinaryWrite(message, writer, options) {
665
+ /* map<fixed64, bool> muted_games = 1; */
666
+ for (let k of globalThis.Object.keys(message.mutedGames))
667
+ writer.tag(1, runtime_1.WireType.LengthDelimited).fork().tag(1, runtime_1.WireType.Bit64).fixed64(k).tag(2, runtime_1.WireType.Varint).bool(message.mutedGames[k]).join();
668
+ /* optional discord_protos.discord_notifications.v1.UserNotificationSettings.DeclarativeSettings declarative_settings = 2; */
669
+ if (message.declarativeSettings)
670
+ exports.UserNotificationSettings_DeclarativeSettings.internalBinaryWrite(message.declarativeSettings, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join();
671
+ let u = options.writeUnknownFields;
672
+ if (u !== false)
673
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
674
+ return writer;
675
+ }
676
+ }
677
+ /**
678
+ * @generated MessageType for protobuf message discord_protos.discord_notifications.v1.UserNotificationSettings.UserNotificationSettingsData
679
+ */
680
+ exports.UserNotificationSettings_UserNotificationSettingsData = new UserNotificationSettings_UserNotificationSettingsData$Type();
@@ -482,6 +482,10 @@ export interface UserData_AgeAssuranceData {
482
482
  * @generated from protobuf field: optional google.protobuf.Timestamp cooldown_reset_at = 8
483
483
  */
484
484
  cooldownResetAt?: Timestamp;
485
+ /**
486
+ * @generated from protobuf field: optional google.protobuf.Timestamp excluded_from_prediction_since = 9
487
+ */
488
+ excludedFromPredictionSince?: Timestamp;
485
489
  }
486
490
  /**
487
491
  * @generated from protobuf message discord_protos.users.v1.UserData.PerkConfigIncreasedFileUploadSize
@@ -4472,7 +4472,8 @@ class UserData_AgeAssuranceData$Type extends runtime_4.MessageType {
4472
4472
  { no: 5, name: "verified_at", kind: "message", T: () => timestamp_1.Timestamp },
4473
4473
  { no: 6, name: "estimated_age_group", kind: "enum", T: () => ["discord_protos.users.v1.UserData.AgeAssuranceGroup", UserData_AgeAssuranceGroup] },
4474
4474
  { no: 7, name: "is_regional_adult", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
4475
- { no: 8, name: "cooldown_reset_at", kind: "message", T: () => timestamp_1.Timestamp }
4475
+ { no: 8, name: "cooldown_reset_at", kind: "message", T: () => timestamp_1.Timestamp },
4476
+ { no: 9, name: "excluded_from_prediction_since", kind: "message", T: () => timestamp_1.Timestamp }
4476
4477
  ]);
4477
4478
  }
4478
4479
  create(value) {
@@ -4515,6 +4516,9 @@ class UserData_AgeAssuranceData$Type extends runtime_4.MessageType {
4515
4516
  case /* optional google.protobuf.Timestamp cooldown_reset_at */ 8:
4516
4517
  message.cooldownResetAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.cooldownResetAt);
4517
4518
  break;
4519
+ case /* optional google.protobuf.Timestamp excluded_from_prediction_since */ 9:
4520
+ message.excludedFromPredictionSince = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.excludedFromPredictionSince);
4521
+ break;
4518
4522
  default:
4519
4523
  let u = options.readUnknownField;
4520
4524
  if (u === "throw")
@@ -4551,6 +4555,9 @@ class UserData_AgeAssuranceData$Type extends runtime_4.MessageType {
4551
4555
  /* optional google.protobuf.Timestamp cooldown_reset_at = 8; */
4552
4556
  if (message.cooldownResetAt)
4553
4557
  timestamp_1.Timestamp.internalBinaryWrite(message.cooldownResetAt, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join();
4558
+ /* optional google.protobuf.Timestamp excluded_from_prediction_since = 9; */
4559
+ if (message.excludedFromPredictionSince)
4560
+ timestamp_1.Timestamp.internalBinaryWrite(message.excludedFromPredictionSince, writer.tag(9, runtime_1.WireType.LengthDelimited).fork(), options).join();
4554
4561
  let u = options.writeUnknownFields;
4555
4562
  if (u !== false)
4556
4563
  (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
package/dist/index.d.ts CHANGED
@@ -13,5 +13,6 @@ export * from "./discord_protos/discord_experimentation/v1/Experiment";
13
13
  export * from "./discord_protos/discord_users/v1/FrecencyUserSettings";
14
14
  export * from "./discord_protos/discord_kkv_store_value_models/v1/ApplicationUserRoleConnection";
15
15
  export * from "./discord_protos/discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures";
16
+ export * from "./discord_protos/discord_notifications/v1/UserNotificationSettings";
16
17
  export * from "./discord_protos/common/v1/LocalizedSnowflake";
17
18
  export * from "./discord_protos/premium_marketing/v1/PremiumMarketingComponentProperties";
package/dist/index.js CHANGED
@@ -60,5 +60,6 @@ __exportStar(require("./discord_protos/discord_experimentation/v1/Experiment"),
60
60
  __exportStar(require("./discord_protos/discord_users/v1/FrecencyUserSettings"), exports);
61
61
  __exportStar(require("./discord_protos/discord_kkv_store_value_models/v1/ApplicationUserRoleConnection"), exports);
62
62
  __exportStar(require("./discord_protos/discord_kkv_store_value_models/v1/AcknowledgedApplicationDisclosures"), exports);
63
+ __exportStar(require("./discord_protos/discord_notifications/v1/UserNotificationSettings"), exports);
63
64
  __exportStar(require("./discord_protos/common/v1/LocalizedSnowflake"), exports);
64
65
  __exportStar(require("./discord_protos/premium_marketing/v1/PremiumMarketingComponentProperties"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "discord-protos",
3
- "version": "1.2.304",
3
+ "version": "1.2.306",
4
4
  "description": "A parser for Discord's protobufs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",