@fivenet-app/gen 0.9.3-1

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.
Files changed (123) hide show
  1. package/README.md +1 -0
  2. package/google/protobuf/any.ts +322 -0
  3. package/google/protobuf/descriptor.ts +3475 -0
  4. package/google/protobuf/duration.ts +231 -0
  5. package/google/protobuf/timestamp.ts +290 -0
  6. package/package.json +15 -0
  7. package/perms.ts +178 -0
  8. package/resources/accounts/accounts.ts +195 -0
  9. package/resources/accounts/oauth2.ts +230 -0
  10. package/resources/calendar/access.ts +362 -0
  11. package/resources/calendar/calendar.ts +955 -0
  12. package/resources/centrum/access.ts +380 -0
  13. package/resources/centrum/dispatches.ts +854 -0
  14. package/resources/centrum/general.ts +231 -0
  15. package/resources/centrum/settings.ts +303 -0
  16. package/resources/centrum/units.ts +620 -0
  17. package/resources/common/access/dummy.ts +309 -0
  18. package/resources/common/content/content.ts +252 -0
  19. package/resources/common/cron/cron.ts +536 -0
  20. package/resources/common/database/database.ts +306 -0
  21. package/resources/common/error.ts +79 -0
  22. package/resources/common/grpcws/grpcws.ts +615 -0
  23. package/resources/common/i18n.ts +102 -0
  24. package/resources/common/uuid.ts +68 -0
  25. package/resources/documents/access.ts +388 -0
  26. package/resources/documents/activity.ts +803 -0
  27. package/resources/documents/category.ts +132 -0
  28. package/resources/documents/comment.ts +161 -0
  29. package/resources/documents/documents.ts +1124 -0
  30. package/resources/documents/requests.ts +196 -0
  31. package/resources/documents/templates.ts +949 -0
  32. package/resources/documents/workflow.ts +349 -0
  33. package/resources/filestore/file.ts +204 -0
  34. package/resources/internet/ads.ts +257 -0
  35. package/resources/internet/domain.ts +136 -0
  36. package/resources/internet/internet.ts +344 -0
  37. package/resources/internet/page.ts +236 -0
  38. package/resources/internet/search.ts +104 -0
  39. package/resources/jobs/activity.ts +600 -0
  40. package/resources/jobs/colleagues.ts +346 -0
  41. package/resources/jobs/conduct.ts +220 -0
  42. package/resources/jobs/labels.ts +240 -0
  43. package/resources/jobs/timeclock.ts +372 -0
  44. package/resources/laws/laws.ts +293 -0
  45. package/resources/livemap/livemap.ts +728 -0
  46. package/resources/livemap/tracker.ts +81 -0
  47. package/resources/mailer/access.ts +485 -0
  48. package/resources/mailer/email.ts +222 -0
  49. package/resources/mailer/events.ts +196 -0
  50. package/resources/mailer/message.ts +285 -0
  51. package/resources/mailer/settings.ts +95 -0
  52. package/resources/mailer/template.ts +164 -0
  53. package/resources/mailer/thread.ts +422 -0
  54. package/resources/mailer/user.ts +93 -0
  55. package/resources/notifications/events.ts +287 -0
  56. package/resources/notifications/notifications.ts +444 -0
  57. package/resources/permissions/permissions.ts +829 -0
  58. package/resources/qualifications/access.ts +275 -0
  59. package/resources/qualifications/exam.ts +1421 -0
  60. package/resources/qualifications/qualifications.ts +1289 -0
  61. package/resources/rector/audit.ts +226 -0
  62. package/resources/rector/config.ts +922 -0
  63. package/resources/stats/stats.ts +67 -0
  64. package/resources/sync/activity.ts +356 -0
  65. package/resources/sync/data.ts +455 -0
  66. package/resources/timestamp/timestamp.ts +78 -0
  67. package/resources/users/activity.ts +211 -0
  68. package/resources/users/job_props.ts +992 -0
  69. package/resources/users/jobs.ts +171 -0
  70. package/resources/users/labels.ts +161 -0
  71. package/resources/users/props.ts +207 -0
  72. package/resources/users/users.ts +570 -0
  73. package/resources/vehicles/vehicles.ts +114 -0
  74. package/resources/wiki/access.ts +362 -0
  75. package/resources/wiki/activity.ts +591 -0
  76. package/resources/wiki/page.ts +548 -0
  77. package/services/auth/auth.client.ts +171 -0
  78. package/services/auth/auth.ts +1331 -0
  79. package/services/calendar/calendar.client.ts +262 -0
  80. package/services/calendar/calendar.ts +1733 -0
  81. package/services/centrum/centrum.client.ts +365 -0
  82. package/services/centrum/centrum.ts +2619 -0
  83. package/services/citizenstore/citizenstore.client.ts +126 -0
  84. package/services/citizenstore/citizenstore.ts +847 -0
  85. package/services/completor/completor.client.ts +109 -0
  86. package/services/completor/completor.ts +616 -0
  87. package/services/dmv/vehicles.client.ts +41 -0
  88. package/services/dmv/vehicles.ts +191 -0
  89. package/services/docstore/docstore.client.ts +653 -0
  90. package/services/docstore/docstore.ts +4571 -0
  91. package/services/internet/ads.client.ts +41 -0
  92. package/services/internet/ads.ts +145 -0
  93. package/services/internet/internet.client.ts +58 -0
  94. package/services/internet/internet.ts +257 -0
  95. package/services/jobs/conduct.client.ts +92 -0
  96. package/services/jobs/conduct.ts +541 -0
  97. package/services/jobs/jobs.client.ts +194 -0
  98. package/services/jobs/jobs.ts +1301 -0
  99. package/services/jobs/timeclock.client.ts +75 -0
  100. package/services/jobs/timeclock.ts +808 -0
  101. package/services/livemapper/livemap.client.ts +76 -0
  102. package/services/livemapper/livemap.ts +552 -0
  103. package/services/mailer/mailer.client.ts +381 -0
  104. package/services/mailer/mailer.ts +2590 -0
  105. package/services/notificator/notificator.client.ts +76 -0
  106. package/services/notificator/notificator.ts +510 -0
  107. package/services/qualifications/qualifications.client.ts +279 -0
  108. package/services/qualifications/qualifications.ts +2142 -0
  109. package/services/rector/config.client.ts +58 -0
  110. package/services/rector/config.ts +216 -0
  111. package/services/rector/filestore.client.ts +75 -0
  112. package/services/rector/filestore.ts +378 -0
  113. package/services/rector/laws.client.ts +92 -0
  114. package/services/rector/laws.ts +416 -0
  115. package/services/rector/rector.client.ts +211 -0
  116. package/services/rector/rector.ts +1540 -0
  117. package/services/stats/stats.client.ts +37 -0
  118. package/services/stats/stats.ts +128 -0
  119. package/services/sync/sync.client.ts +110 -0
  120. package/services/sync/sync.ts +831 -0
  121. package/services/wiki/wiki.client.ts +126 -0
  122. package/services/wiki/wiki.ts +749 -0
  123. package/svcs.ts +307 -0
@@ -0,0 +1,67 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/stats/stats.proto" (package "resources.stats", syntax proto3)
3
+ // @ts-nocheck
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MessageType } from "@protobuf-ts/runtime";
13
+ /**
14
+ * @generated from protobuf message resources.stats.Stat
15
+ */
16
+ export interface Stat {
17
+ /**
18
+ * @generated from protobuf field: optional int32 value = 1;
19
+ */
20
+ value?: number;
21
+ }
22
+ // @generated message type with reflection information, may provide speed optimized methods
23
+ class Stat$Type extends MessageType<Stat> {
24
+ constructor() {
25
+ super("resources.stats.Stat", [
26
+ { no: 1, name: "value", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
27
+ ]);
28
+ }
29
+ create(value?: PartialMessage<Stat>): Stat {
30
+ const message = globalThis.Object.create((this.messagePrototype!));
31
+ if (value !== undefined)
32
+ reflectionMergePartial<Stat>(this, message, value);
33
+ return message;
34
+ }
35
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Stat): Stat {
36
+ let message = target ?? this.create(), end = reader.pos + length;
37
+ while (reader.pos < end) {
38
+ let [fieldNo, wireType] = reader.tag();
39
+ switch (fieldNo) {
40
+ case /* optional int32 value */ 1:
41
+ message.value = reader.int32();
42
+ break;
43
+ default:
44
+ let u = options.readUnknownField;
45
+ if (u === "throw")
46
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
47
+ let d = reader.skip(wireType);
48
+ if (u !== false)
49
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
50
+ }
51
+ }
52
+ return message;
53
+ }
54
+ internalBinaryWrite(message: Stat, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
55
+ /* optional int32 value = 1; */
56
+ if (message.value !== undefined)
57
+ writer.tag(1, WireType.Varint).int32(message.value);
58
+ let u = options.writeUnknownFields;
59
+ if (u !== false)
60
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
61
+ return writer;
62
+ }
63
+ }
64
+ /**
65
+ * @generated MessageType for protobuf message resources.stats.Stat
66
+ */
67
+ export const Stat = new Stat$Type();
@@ -0,0 +1,356 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/sync/activity.proto" (package "resources.sync", syntax proto3)
3
+ // @ts-nocheck
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MessageType } from "@protobuf-ts/runtime";
13
+ import { JobsUserProps as JobsUserProps$ } from "../jobs/colleagues";
14
+ import { UserProps as UserProps$ } from "../users/props";
15
+ /**
16
+ * Connect an identifier/license to the provider with the specified external id
17
+ * (e.g., auto discord social connect on server join)
18
+ *
19
+ * @generated from protobuf message resources.sync.UserOAuth2Conn
20
+ */
21
+ export interface UserOAuth2Conn {
22
+ /**
23
+ * @generated from protobuf field: string provider_name = 1;
24
+ */
25
+ providerName: string;
26
+ /**
27
+ * @generated from protobuf field: string identifier = 2;
28
+ */
29
+ identifier: string;
30
+ /**
31
+ * @generated from protobuf field: string external_id = 3;
32
+ */
33
+ externalId: string;
34
+ /**
35
+ * @generated from protobuf field: string username = 4;
36
+ */
37
+ username: string;
38
+ }
39
+ /**
40
+ * @generated from protobuf message resources.sync.UserProps
41
+ */
42
+ export interface UserProps {
43
+ /**
44
+ * @generated from protobuf field: string reason = 1;
45
+ */
46
+ reason: string;
47
+ /**
48
+ * @generated from protobuf field: resources.users.UserProps props = 2;
49
+ */
50
+ props?: UserProps$;
51
+ }
52
+ /**
53
+ * @generated from protobuf message resources.sync.JobsUserProps
54
+ */
55
+ export interface JobsUserProps {
56
+ /**
57
+ * @generated from protobuf field: string reason = 1;
58
+ */
59
+ reason: string;
60
+ /**
61
+ * @generated from protobuf field: resources.jobs.JobsUserProps props = 2;
62
+ */
63
+ props?: JobsUserProps$;
64
+ }
65
+ /**
66
+ * @generated from protobuf message resources.sync.UserUpdate
67
+ */
68
+ export interface UserUpdate {
69
+ /**
70
+ * @generated from protobuf field: int32 user_id = 1;
71
+ */
72
+ userId: number;
73
+ /**
74
+ * @generated from protobuf field: optional string group = 2;
75
+ */
76
+ group?: string;
77
+ /**
78
+ * Char details
79
+ *
80
+ * @generated from protobuf field: optional string job = 3;
81
+ */
82
+ job?: string;
83
+ /**
84
+ * @generated from protobuf field: optional int32 job_grade = 4;
85
+ */
86
+ jobGrade?: number;
87
+ /**
88
+ * @generated from protobuf field: optional string firstname = 5;
89
+ */
90
+ firstname?: string;
91
+ /**
92
+ * @generated from protobuf field: optional string lastname = 6;
93
+ */
94
+ lastname?: string;
95
+ }
96
+ // @generated message type with reflection information, may provide speed optimized methods
97
+ class UserOAuth2Conn$Type extends MessageType<UserOAuth2Conn> {
98
+ constructor() {
99
+ super("resources.sync.UserOAuth2Conn", [
100
+ { no: 1, name: "provider_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
101
+ { no: 2, name: "identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
102
+ { no: 3, name: "external_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
103
+ { no: 4, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
104
+ ]);
105
+ }
106
+ create(value?: PartialMessage<UserOAuth2Conn>): UserOAuth2Conn {
107
+ const message = globalThis.Object.create((this.messagePrototype!));
108
+ message.providerName = "";
109
+ message.identifier = "";
110
+ message.externalId = "";
111
+ message.username = "";
112
+ if (value !== undefined)
113
+ reflectionMergePartial<UserOAuth2Conn>(this, message, value);
114
+ return message;
115
+ }
116
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserOAuth2Conn): UserOAuth2Conn {
117
+ let message = target ?? this.create(), end = reader.pos + length;
118
+ while (reader.pos < end) {
119
+ let [fieldNo, wireType] = reader.tag();
120
+ switch (fieldNo) {
121
+ case /* string provider_name */ 1:
122
+ message.providerName = reader.string();
123
+ break;
124
+ case /* string identifier */ 2:
125
+ message.identifier = reader.string();
126
+ break;
127
+ case /* string external_id */ 3:
128
+ message.externalId = reader.string();
129
+ break;
130
+ case /* string username */ 4:
131
+ message.username = reader.string();
132
+ break;
133
+ default:
134
+ let u = options.readUnknownField;
135
+ if (u === "throw")
136
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
137
+ let d = reader.skip(wireType);
138
+ if (u !== false)
139
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
140
+ }
141
+ }
142
+ return message;
143
+ }
144
+ internalBinaryWrite(message: UserOAuth2Conn, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
145
+ /* string provider_name = 1; */
146
+ if (message.providerName !== "")
147
+ writer.tag(1, WireType.LengthDelimited).string(message.providerName);
148
+ /* string identifier = 2; */
149
+ if (message.identifier !== "")
150
+ writer.tag(2, WireType.LengthDelimited).string(message.identifier);
151
+ /* string external_id = 3; */
152
+ if (message.externalId !== "")
153
+ writer.tag(3, WireType.LengthDelimited).string(message.externalId);
154
+ /* string username = 4; */
155
+ if (message.username !== "")
156
+ writer.tag(4, WireType.LengthDelimited).string(message.username);
157
+ let u = options.writeUnknownFields;
158
+ if (u !== false)
159
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
160
+ return writer;
161
+ }
162
+ }
163
+ /**
164
+ * @generated MessageType for protobuf message resources.sync.UserOAuth2Conn
165
+ */
166
+ export const UserOAuth2Conn = new UserOAuth2Conn$Type();
167
+ // @generated message type with reflection information, may provide speed optimized methods
168
+ class UserProps$Type extends MessageType<UserProps> {
169
+ constructor() {
170
+ super("resources.sync.UserProps", [
171
+ { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
172
+ { no: 2, name: "props", kind: "message", T: () => UserProps$, options: { "validate.rules": { message: { required: true } } } }
173
+ ]);
174
+ }
175
+ create(value?: PartialMessage<UserProps>): UserProps {
176
+ const message = globalThis.Object.create((this.messagePrototype!));
177
+ message.reason = "";
178
+ if (value !== undefined)
179
+ reflectionMergePartial<UserProps>(this, message, value);
180
+ return message;
181
+ }
182
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserProps): UserProps {
183
+ let message = target ?? this.create(), end = reader.pos + length;
184
+ while (reader.pos < end) {
185
+ let [fieldNo, wireType] = reader.tag();
186
+ switch (fieldNo) {
187
+ case /* string reason */ 1:
188
+ message.reason = reader.string();
189
+ break;
190
+ case /* resources.users.UserProps props */ 2:
191
+ message.props = UserProps$.internalBinaryRead(reader, reader.uint32(), options, message.props);
192
+ break;
193
+ default:
194
+ let u = options.readUnknownField;
195
+ if (u === "throw")
196
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
197
+ let d = reader.skip(wireType);
198
+ if (u !== false)
199
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
200
+ }
201
+ }
202
+ return message;
203
+ }
204
+ internalBinaryWrite(message: UserProps, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
205
+ /* string reason = 1; */
206
+ if (message.reason !== "")
207
+ writer.tag(1, WireType.LengthDelimited).string(message.reason);
208
+ /* resources.users.UserProps props = 2; */
209
+ if (message.props)
210
+ UserProps$.internalBinaryWrite(message.props, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
211
+ let u = options.writeUnknownFields;
212
+ if (u !== false)
213
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
214
+ return writer;
215
+ }
216
+ }
217
+ /**
218
+ * @generated MessageType for protobuf message resources.sync.UserProps
219
+ */
220
+ export const UserProps = new UserProps$Type();
221
+ // @generated message type with reflection information, may provide speed optimized methods
222
+ class JobsUserProps$Type extends MessageType<JobsUserProps> {
223
+ constructor() {
224
+ super("resources.sync.JobsUserProps", [
225
+ { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
226
+ { no: 2, name: "props", kind: "message", T: () => JobsUserProps$, options: { "validate.rules": { message: { required: true } } } }
227
+ ]);
228
+ }
229
+ create(value?: PartialMessage<JobsUserProps>): JobsUserProps {
230
+ const message = globalThis.Object.create((this.messagePrototype!));
231
+ message.reason = "";
232
+ if (value !== undefined)
233
+ reflectionMergePartial<JobsUserProps>(this, message, value);
234
+ return message;
235
+ }
236
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JobsUserProps): JobsUserProps {
237
+ let message = target ?? this.create(), end = reader.pos + length;
238
+ while (reader.pos < end) {
239
+ let [fieldNo, wireType] = reader.tag();
240
+ switch (fieldNo) {
241
+ case /* string reason */ 1:
242
+ message.reason = reader.string();
243
+ break;
244
+ case /* resources.jobs.JobsUserProps props */ 2:
245
+ message.props = JobsUserProps$.internalBinaryRead(reader, reader.uint32(), options, message.props);
246
+ break;
247
+ default:
248
+ let u = options.readUnknownField;
249
+ if (u === "throw")
250
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
251
+ let d = reader.skip(wireType);
252
+ if (u !== false)
253
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
254
+ }
255
+ }
256
+ return message;
257
+ }
258
+ internalBinaryWrite(message: JobsUserProps, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
259
+ /* string reason = 1; */
260
+ if (message.reason !== "")
261
+ writer.tag(1, WireType.LengthDelimited).string(message.reason);
262
+ /* resources.jobs.JobsUserProps props = 2; */
263
+ if (message.props)
264
+ JobsUserProps$.internalBinaryWrite(message.props, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
265
+ let u = options.writeUnknownFields;
266
+ if (u !== false)
267
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
268
+ return writer;
269
+ }
270
+ }
271
+ /**
272
+ * @generated MessageType for protobuf message resources.sync.JobsUserProps
273
+ */
274
+ export const JobsUserProps = new JobsUserProps$Type();
275
+ // @generated message type with reflection information, may provide speed optimized methods
276
+ class UserUpdate$Type extends MessageType<UserUpdate> {
277
+ constructor() {
278
+ super("resources.sync.UserUpdate", [
279
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
280
+ { no: 2, name: "group", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
281
+ { no: 3, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
282
+ { no: 4, name: "job_grade", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
283
+ { no: 5, name: "firstname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
284
+ { no: 6, name: "lastname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
285
+ ]);
286
+ }
287
+ create(value?: PartialMessage<UserUpdate>): UserUpdate {
288
+ const message = globalThis.Object.create((this.messagePrototype!));
289
+ message.userId = 0;
290
+ if (value !== undefined)
291
+ reflectionMergePartial<UserUpdate>(this, message, value);
292
+ return message;
293
+ }
294
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserUpdate): UserUpdate {
295
+ let message = target ?? this.create(), end = reader.pos + length;
296
+ while (reader.pos < end) {
297
+ let [fieldNo, wireType] = reader.tag();
298
+ switch (fieldNo) {
299
+ case /* int32 user_id */ 1:
300
+ message.userId = reader.int32();
301
+ break;
302
+ case /* optional string group */ 2:
303
+ message.group = reader.string();
304
+ break;
305
+ case /* optional string job */ 3:
306
+ message.job = reader.string();
307
+ break;
308
+ case /* optional int32 job_grade */ 4:
309
+ message.jobGrade = reader.int32();
310
+ break;
311
+ case /* optional string firstname */ 5:
312
+ message.firstname = reader.string();
313
+ break;
314
+ case /* optional string lastname */ 6:
315
+ message.lastname = reader.string();
316
+ break;
317
+ default:
318
+ let u = options.readUnknownField;
319
+ if (u === "throw")
320
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
321
+ let d = reader.skip(wireType);
322
+ if (u !== false)
323
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
324
+ }
325
+ }
326
+ return message;
327
+ }
328
+ internalBinaryWrite(message: UserUpdate, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
329
+ /* int32 user_id = 1; */
330
+ if (message.userId !== 0)
331
+ writer.tag(1, WireType.Varint).int32(message.userId);
332
+ /* optional string group = 2; */
333
+ if (message.group !== undefined)
334
+ writer.tag(2, WireType.LengthDelimited).string(message.group);
335
+ /* optional string job = 3; */
336
+ if (message.job !== undefined)
337
+ writer.tag(3, WireType.LengthDelimited).string(message.job);
338
+ /* optional int32 job_grade = 4; */
339
+ if (message.jobGrade !== undefined)
340
+ writer.tag(4, WireType.Varint).int32(message.jobGrade);
341
+ /* optional string firstname = 5; */
342
+ if (message.firstname !== undefined)
343
+ writer.tag(5, WireType.LengthDelimited).string(message.firstname);
344
+ /* optional string lastname = 6; */
345
+ if (message.lastname !== undefined)
346
+ writer.tag(6, WireType.LengthDelimited).string(message.lastname);
347
+ let u = options.writeUnknownFields;
348
+ if (u !== false)
349
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
350
+ return writer;
351
+ }
352
+ }
353
+ /**
354
+ * @generated MessageType for protobuf message resources.sync.UserUpdate
355
+ */
356
+ export const UserUpdate = new UserUpdate$Type();