@fivenet-app/gen 2025.5.3 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +193 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +287 -0
- package/codegen/sanitizer/sanitizer.ts +113 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +217 -160
- package/resources/accounts/accounts.ts +115 -47
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
- package/resources/audit/audit.ts +172 -53
- package/resources/calendar/{access.ts → access/access.ts} +72 -71
- package/resources/calendar/calendar.ts +79 -543
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/access/access.ts +345 -0
- package/resources/centrum/dispatchers/dispatchers.ts +149 -0
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/settings/settings.ts +657 -0
- package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
- package/resources/centrum/{units.ts → units/units.ts} +230 -130
- package/resources/clientconfig/clientconfig.ts +1015 -0
- package/resources/collab/collab.ts +805 -0
- package/resources/common/content/content.ts +169 -63
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/{common/cron → cron}/cron.ts +77 -65
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/{access.ts → access/access.ts} +75 -76
- package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +25 -32
- package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +374 -686
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
- package/resources/documents/pins/pins.ts +127 -0
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
- package/resources/documents/workflow/workflow.ts +600 -0
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/{common/grpcws → grpcws}/grpcws.ts +66 -65
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
- package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
- package/resources/livemap/markers/user_marker.ts +377 -0
- package/resources/mailer/{access.ts → access/access.ts} +119 -118
- package/resources/mailer/{email.ts → emails/email.ts} +38 -41
- package/resources/mailer/{events.ts → events/events.ts} +44 -43
- package/resources/mailer/{message.ts → messages/message.ts} +69 -74
- package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
- package/resources/mailer/{template.ts → templates/template.ts} +37 -40
- package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
- package/resources/notifications/clientview/clientview.ts +239 -0
- package/resources/notifications/{events.ts → events/events.ts} +67 -130
- package/resources/notifications/notifications.ts +55 -60
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
- package/resources/permissions/events/events.ts +149 -0
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
- package/resources/qualifications/{access.ts → access/access.ts} +43 -42
- package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
- package/resources/qualifications/qualifications.ts +327 -388
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +663 -79
- package/resources/settings/data.ts +90 -0
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +382 -2
- package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
- package/resources/sync/data/data.ts +1001 -0
- package/resources/sync/data/v2/data.ts +220 -0
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/userinfo.ts +442 -0
- package/resources/users/{activity.ts → activity/activity.ts} +182 -166
- package/resources/users/{labels.ts → labels/labels.ts} +27 -30
- package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
- package/resources/users/{props.ts → props/props.ts} +109 -77
- package/resources/users/short/user.ts +184 -0
- package/resources/users/user.ts +528 -0
- package/resources/vehicles/activity/activity.ts +231 -0
- package/resources/vehicles/props/props.ts +125 -0
- package/resources/vehicles/vehicles.ts +43 -18
- package/resources/wiki/{access.ts → access/access.ts} +72 -71
- package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
- package/resources/wiki/page.ts +164 -93
- package/services/auth/auth.client.ts +45 -35
- package/services/auth/auth.ts +498 -288
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +157 -134
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +755 -352
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +226 -112
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +95 -54
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +579 -619
- package/services/documents/forms.client.ts +51 -0
- package/services/documents/forms.ts +232 -0
- package/services/documents/stamps.client.ts +77 -0
- package/services/documents/stamps.ts +481 -0
- package/services/documents/stats.client.ts +38 -0
- package/services/documents/stats.ts +245 -0
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +40 -28
- package/services/jobs/conduct.ts +183 -56
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +138 -121
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +76 -75
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +297 -126
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +266 -269
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +250 -209
- package/services/settings/accounts.client.ts +31 -33
- package/services/settings/accounts.ts +251 -67
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +7 -6
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +30 -29
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +237 -633
- package/services/settings/system.client.ts +103 -0
- package/services/settings/system.ts +718 -0
- package/services/stats/stats.client.ts +9 -8
- package/services/stats/stats.ts +27 -26
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +174 -97
- package/services/sync/v2/sync.client.ts +331 -0
- package/services/sync/v2/sync.ts +1766 -0
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +170 -25
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +97 -67
- package/svcs.ts +174 -106
- package/resources/centrum/attributes.ts +0 -186
- package/resources/centrum/disponents.ts +0 -81
- package/resources/centrum/settings.ts +0 -307
- package/resources/documents/workflow.ts +0 -351
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/resources/sync/data.ts +0 -587
- package/resources/users/users.ts +0 -435
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
|
+
// @generated from protobuf file "resources/users/user.proto" (package "resources.users", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { Timestamp } from "../timestamp/timestamp";
|
|
15
|
+
import { License } from "./licenses/licenses";
|
|
16
|
+
import { UserProps } from "./props/props";
|
|
17
|
+
/**
|
|
18
|
+
* @generated from protobuf message resources.users.User
|
|
19
|
+
*/
|
|
20
|
+
export interface User {
|
|
21
|
+
/**
|
|
22
|
+
* @generated from protobuf field: int32 user_id = 1
|
|
23
|
+
*/
|
|
24
|
+
userId: number;
|
|
25
|
+
/**
|
|
26
|
+
* @generated from protobuf field: string identifier = 2
|
|
27
|
+
*/
|
|
28
|
+
identifier: string;
|
|
29
|
+
/**
|
|
30
|
+
* @generated from protobuf field: string job = 3
|
|
31
|
+
*/
|
|
32
|
+
job: string;
|
|
33
|
+
/**
|
|
34
|
+
* @generated from protobuf field: optional string job_label = 4
|
|
35
|
+
*/
|
|
36
|
+
jobLabel?: string;
|
|
37
|
+
/**
|
|
38
|
+
* @generated from protobuf field: int32 job_grade = 5
|
|
39
|
+
*/
|
|
40
|
+
jobGrade: number;
|
|
41
|
+
/**
|
|
42
|
+
* @generated from protobuf field: optional string job_grade_label = 6
|
|
43
|
+
*/
|
|
44
|
+
jobGradeLabel?: string;
|
|
45
|
+
/**
|
|
46
|
+
* @generated from protobuf field: repeated resources.users.UserJob jobs = 20
|
|
47
|
+
*/
|
|
48
|
+
jobs: UserJob[];
|
|
49
|
+
/**
|
|
50
|
+
* @generated from protobuf field: string firstname = 7
|
|
51
|
+
*/
|
|
52
|
+
firstname: string;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from protobuf field: string lastname = 8
|
|
55
|
+
*/
|
|
56
|
+
lastname: string;
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf field: string dateofbirth = 9
|
|
59
|
+
*/
|
|
60
|
+
dateofbirth: string;
|
|
61
|
+
/**
|
|
62
|
+
* @generated from protobuf field: optional string sex = 10
|
|
63
|
+
*/
|
|
64
|
+
sex?: string;
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf field: optional float height = 11
|
|
67
|
+
*/
|
|
68
|
+
height?: number;
|
|
69
|
+
/**
|
|
70
|
+
* @generated from protobuf field: optional string phone_number = 12
|
|
71
|
+
*/
|
|
72
|
+
phoneNumber?: string;
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf field: repeated resources.users.PhoneNumber phone_numbers = 19
|
|
75
|
+
*/
|
|
76
|
+
phoneNumbers: PhoneNumber[];
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf field: optional int32 visum = 13
|
|
79
|
+
*/
|
|
80
|
+
visum?: number;
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf field: optional int32 playtime = 14
|
|
83
|
+
*/
|
|
84
|
+
playtime?: number;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from protobuf field: resources.users.props.UserProps props = 15
|
|
87
|
+
*/
|
|
88
|
+
props?: UserProps;
|
|
89
|
+
/**
|
|
90
|
+
* @generated from protobuf field: repeated resources.users.licenses.License licenses = 16
|
|
91
|
+
*/
|
|
92
|
+
licenses: License[];
|
|
93
|
+
/**
|
|
94
|
+
* @generated from protobuf field: optional int64 profile_picture_file_id = 17
|
|
95
|
+
*/
|
|
96
|
+
profilePictureFileId?: number;
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf field: optional string profile_picture = 18
|
|
99
|
+
*/
|
|
100
|
+
profilePicture?: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @generated from protobuf message resources.users.PhoneNumber
|
|
104
|
+
*/
|
|
105
|
+
export interface PhoneNumber {
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf field: int32 user_id = 1
|
|
108
|
+
*/
|
|
109
|
+
userId: number;
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf field: string number = 2
|
|
112
|
+
*/
|
|
113
|
+
number: string;
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: bool is_primary = 3
|
|
116
|
+
*/
|
|
117
|
+
isPrimary: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 4
|
|
120
|
+
*/
|
|
121
|
+
createdAt?: Timestamp;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 5
|
|
124
|
+
*/
|
|
125
|
+
updatedAt?: Timestamp;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @generated from protobuf message resources.users.UserJob
|
|
129
|
+
*/
|
|
130
|
+
export interface UserJob {
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf field: int32 user_id = 1
|
|
133
|
+
*/
|
|
134
|
+
userId: number;
|
|
135
|
+
/**
|
|
136
|
+
* @generated from protobuf field: string job = 2
|
|
137
|
+
*/
|
|
138
|
+
job: string;
|
|
139
|
+
/**
|
|
140
|
+
* @generated from protobuf field: optional string job_label = 3
|
|
141
|
+
*/
|
|
142
|
+
jobLabel?: string;
|
|
143
|
+
/**
|
|
144
|
+
* @generated from protobuf field: int32 grade = 4
|
|
145
|
+
*/
|
|
146
|
+
grade: number;
|
|
147
|
+
/**
|
|
148
|
+
* @generated from protobuf field: optional string grade_label = 5
|
|
149
|
+
*/
|
|
150
|
+
gradeLabel?: string;
|
|
151
|
+
/**
|
|
152
|
+
* @generated from protobuf field: bool is_primary = 6
|
|
153
|
+
*/
|
|
154
|
+
isPrimary: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 7
|
|
157
|
+
*/
|
|
158
|
+
createdAt?: Timestamp;
|
|
159
|
+
/**
|
|
160
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 8
|
|
161
|
+
*/
|
|
162
|
+
updatedAt?: Timestamp;
|
|
163
|
+
}
|
|
164
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
165
|
+
class User$Type extends MessageType<User> {
|
|
166
|
+
constructor() {
|
|
167
|
+
super("resources.users.User", [
|
|
168
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"id\"" } },
|
|
169
|
+
{ no: 2, name: "identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
|
|
170
|
+
{ no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "20" } } } },
|
|
171
|
+
{ no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
172
|
+
{ no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", int32: { gte: 0 } } } },
|
|
173
|
+
{ no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
174
|
+
{ no: 20, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserJob, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", repeated: { maxItems: "3" } } } },
|
|
175
|
+
{ no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "50" } } } },
|
|
176
|
+
{ no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "1", maxLen: "50" } } } },
|
|
177
|
+
{ no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "10" } } } },
|
|
178
|
+
{ no: 10, name: "sex", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "2" } } } },
|
|
179
|
+
{ no: 11, name: "height", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ },
|
|
180
|
+
{ no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
181
|
+
{ no: 19, name: "phone_numbers", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PhoneNumber, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", repeated: { maxItems: "5" } } } },
|
|
182
|
+
{ no: 13, name: "visum", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
183
|
+
{ no: 14, name: "playtime", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
184
|
+
{ no: 15, name: "props", kind: "message", T: () => UserProps, options: { "tagger.tags": "alias:\"fivenet_user_props\"" } },
|
|
185
|
+
{ no: 16, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License, options: { "tagger.tags": "alias:\"user_licenses\"" } },
|
|
186
|
+
{ no: 17, name: "profile_picture_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
187
|
+
{ no: 18, name: "profile_picture", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
188
|
+
]);
|
|
189
|
+
}
|
|
190
|
+
create(value?: PartialMessage<User>): User {
|
|
191
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
192
|
+
message.userId = 0;
|
|
193
|
+
message.identifier = "";
|
|
194
|
+
message.job = "";
|
|
195
|
+
message.jobGrade = 0;
|
|
196
|
+
message.jobs = [];
|
|
197
|
+
message.firstname = "";
|
|
198
|
+
message.lastname = "";
|
|
199
|
+
message.dateofbirth = "";
|
|
200
|
+
message.phoneNumbers = [];
|
|
201
|
+
message.licenses = [];
|
|
202
|
+
if (value !== undefined)
|
|
203
|
+
reflectionMergePartial<User>(this, message, value);
|
|
204
|
+
return message;
|
|
205
|
+
}
|
|
206
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: User): User {
|
|
207
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
208
|
+
while (reader.pos < end) {
|
|
209
|
+
let [fieldNo, wireType] = reader.tag();
|
|
210
|
+
switch (fieldNo) {
|
|
211
|
+
case /* int32 user_id */ 1:
|
|
212
|
+
message.userId = reader.int32();
|
|
213
|
+
break;
|
|
214
|
+
case /* string identifier */ 2:
|
|
215
|
+
message.identifier = reader.string();
|
|
216
|
+
break;
|
|
217
|
+
case /* string job */ 3:
|
|
218
|
+
message.job = reader.string();
|
|
219
|
+
break;
|
|
220
|
+
case /* optional string job_label */ 4:
|
|
221
|
+
message.jobLabel = reader.string();
|
|
222
|
+
break;
|
|
223
|
+
case /* int32 job_grade */ 5:
|
|
224
|
+
message.jobGrade = reader.int32();
|
|
225
|
+
break;
|
|
226
|
+
case /* optional string job_grade_label */ 6:
|
|
227
|
+
message.jobGradeLabel = reader.string();
|
|
228
|
+
break;
|
|
229
|
+
case /* repeated resources.users.UserJob jobs */ 20:
|
|
230
|
+
message.jobs.push(UserJob.internalBinaryRead(reader, reader.uint32(), options));
|
|
231
|
+
break;
|
|
232
|
+
case /* string firstname */ 7:
|
|
233
|
+
message.firstname = reader.string();
|
|
234
|
+
break;
|
|
235
|
+
case /* string lastname */ 8:
|
|
236
|
+
message.lastname = reader.string();
|
|
237
|
+
break;
|
|
238
|
+
case /* string dateofbirth */ 9:
|
|
239
|
+
message.dateofbirth = reader.string();
|
|
240
|
+
break;
|
|
241
|
+
case /* optional string sex */ 10:
|
|
242
|
+
message.sex = reader.string();
|
|
243
|
+
break;
|
|
244
|
+
case /* optional float height */ 11:
|
|
245
|
+
message.height = reader.float();
|
|
246
|
+
break;
|
|
247
|
+
case /* optional string phone_number */ 12:
|
|
248
|
+
message.phoneNumber = reader.string();
|
|
249
|
+
break;
|
|
250
|
+
case /* repeated resources.users.PhoneNumber phone_numbers */ 19:
|
|
251
|
+
message.phoneNumbers.push(PhoneNumber.internalBinaryRead(reader, reader.uint32(), options));
|
|
252
|
+
break;
|
|
253
|
+
case /* optional int32 visum */ 13:
|
|
254
|
+
message.visum = reader.int32();
|
|
255
|
+
break;
|
|
256
|
+
case /* optional int32 playtime */ 14:
|
|
257
|
+
message.playtime = reader.int32();
|
|
258
|
+
break;
|
|
259
|
+
case /* resources.users.props.UserProps props */ 15:
|
|
260
|
+
message.props = UserProps.internalBinaryRead(reader, reader.uint32(), options, message.props);
|
|
261
|
+
break;
|
|
262
|
+
case /* repeated resources.users.licenses.License licenses */ 16:
|
|
263
|
+
message.licenses.push(License.internalBinaryRead(reader, reader.uint32(), options));
|
|
264
|
+
break;
|
|
265
|
+
case /* optional int64 profile_picture_file_id */ 17:
|
|
266
|
+
message.profilePictureFileId = reader.int64().toNumber();
|
|
267
|
+
break;
|
|
268
|
+
case /* optional string profile_picture */ 18:
|
|
269
|
+
message.profilePicture = reader.string();
|
|
270
|
+
break;
|
|
271
|
+
default:
|
|
272
|
+
let u = options.readUnknownField;
|
|
273
|
+
if (u === "throw")
|
|
274
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
275
|
+
let d = reader.skip(wireType);
|
|
276
|
+
if (u !== false)
|
|
277
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return message;
|
|
281
|
+
}
|
|
282
|
+
internalBinaryWrite(message: User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
283
|
+
/* int32 user_id = 1; */
|
|
284
|
+
if (message.userId !== 0)
|
|
285
|
+
writer.tag(1, WireType.Varint).int32(message.userId);
|
|
286
|
+
/* string identifier = 2; */
|
|
287
|
+
if (message.identifier !== "")
|
|
288
|
+
writer.tag(2, WireType.LengthDelimited).string(message.identifier);
|
|
289
|
+
/* string job = 3; */
|
|
290
|
+
if (message.job !== "")
|
|
291
|
+
writer.tag(3, WireType.LengthDelimited).string(message.job);
|
|
292
|
+
/* optional string job_label = 4; */
|
|
293
|
+
if (message.jobLabel !== undefined)
|
|
294
|
+
writer.tag(4, WireType.LengthDelimited).string(message.jobLabel);
|
|
295
|
+
/* int32 job_grade = 5; */
|
|
296
|
+
if (message.jobGrade !== 0)
|
|
297
|
+
writer.tag(5, WireType.Varint).int32(message.jobGrade);
|
|
298
|
+
/* optional string job_grade_label = 6; */
|
|
299
|
+
if (message.jobGradeLabel !== undefined)
|
|
300
|
+
writer.tag(6, WireType.LengthDelimited).string(message.jobGradeLabel);
|
|
301
|
+
/* string firstname = 7; */
|
|
302
|
+
if (message.firstname !== "")
|
|
303
|
+
writer.tag(7, WireType.LengthDelimited).string(message.firstname);
|
|
304
|
+
/* string lastname = 8; */
|
|
305
|
+
if (message.lastname !== "")
|
|
306
|
+
writer.tag(8, WireType.LengthDelimited).string(message.lastname);
|
|
307
|
+
/* string dateofbirth = 9; */
|
|
308
|
+
if (message.dateofbirth !== "")
|
|
309
|
+
writer.tag(9, WireType.LengthDelimited).string(message.dateofbirth);
|
|
310
|
+
/* optional string sex = 10; */
|
|
311
|
+
if (message.sex !== undefined)
|
|
312
|
+
writer.tag(10, WireType.LengthDelimited).string(message.sex);
|
|
313
|
+
/* optional float height = 11; */
|
|
314
|
+
if (message.height !== undefined)
|
|
315
|
+
writer.tag(11, WireType.Bit32).float(message.height);
|
|
316
|
+
/* optional string phone_number = 12; */
|
|
317
|
+
if (message.phoneNumber !== undefined)
|
|
318
|
+
writer.tag(12, WireType.LengthDelimited).string(message.phoneNumber);
|
|
319
|
+
/* optional int32 visum = 13; */
|
|
320
|
+
if (message.visum !== undefined)
|
|
321
|
+
writer.tag(13, WireType.Varint).int32(message.visum);
|
|
322
|
+
/* optional int32 playtime = 14; */
|
|
323
|
+
if (message.playtime !== undefined)
|
|
324
|
+
writer.tag(14, WireType.Varint).int32(message.playtime);
|
|
325
|
+
/* resources.users.props.UserProps props = 15; */
|
|
326
|
+
if (message.props)
|
|
327
|
+
UserProps.internalBinaryWrite(message.props, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
328
|
+
/* repeated resources.users.licenses.License licenses = 16; */
|
|
329
|
+
for (let i = 0; i < message.licenses.length; i++)
|
|
330
|
+
License.internalBinaryWrite(message.licenses[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
|
|
331
|
+
/* optional int64 profile_picture_file_id = 17; */
|
|
332
|
+
if (message.profilePictureFileId !== undefined)
|
|
333
|
+
writer.tag(17, WireType.Varint).int64(message.profilePictureFileId);
|
|
334
|
+
/* optional string profile_picture = 18; */
|
|
335
|
+
if (message.profilePicture !== undefined)
|
|
336
|
+
writer.tag(18, WireType.LengthDelimited).string(message.profilePicture);
|
|
337
|
+
/* repeated resources.users.PhoneNumber phone_numbers = 19; */
|
|
338
|
+
for (let i = 0; i < message.phoneNumbers.length; i++)
|
|
339
|
+
PhoneNumber.internalBinaryWrite(message.phoneNumbers[i], writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
340
|
+
/* repeated resources.users.UserJob jobs = 20; */
|
|
341
|
+
for (let i = 0; i < message.jobs.length; i++)
|
|
342
|
+
UserJob.internalBinaryWrite(message.jobs[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
343
|
+
let u = options.writeUnknownFields;
|
|
344
|
+
if (u !== false)
|
|
345
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
346
|
+
return writer;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* @generated MessageType for protobuf message resources.users.User
|
|
351
|
+
*/
|
|
352
|
+
export const User = new User$Type();
|
|
353
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
354
|
+
class PhoneNumber$Type extends MessageType<PhoneNumber> {
|
|
355
|
+
constructor() {
|
|
356
|
+
super("resources.users.PhoneNumber", [
|
|
357
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
358
|
+
{ no: 2, name: "number", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "tagger.tags": "alias:\"phone_number\"" } },
|
|
359
|
+
{ no: 3, name: "is_primary", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
360
|
+
{ no: 4, name: "created_at", kind: "message", T: () => Timestamp },
|
|
361
|
+
{ no: 5, name: "updated_at", kind: "message", T: () => Timestamp }
|
|
362
|
+
]);
|
|
363
|
+
}
|
|
364
|
+
create(value?: PartialMessage<PhoneNumber>): PhoneNumber {
|
|
365
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
366
|
+
message.userId = 0;
|
|
367
|
+
message.number = "";
|
|
368
|
+
message.isPrimary = false;
|
|
369
|
+
if (value !== undefined)
|
|
370
|
+
reflectionMergePartial<PhoneNumber>(this, message, value);
|
|
371
|
+
return message;
|
|
372
|
+
}
|
|
373
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PhoneNumber): PhoneNumber {
|
|
374
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
375
|
+
while (reader.pos < end) {
|
|
376
|
+
let [fieldNo, wireType] = reader.tag();
|
|
377
|
+
switch (fieldNo) {
|
|
378
|
+
case /* int32 user_id */ 1:
|
|
379
|
+
message.userId = reader.int32();
|
|
380
|
+
break;
|
|
381
|
+
case /* string number */ 2:
|
|
382
|
+
message.number = reader.string();
|
|
383
|
+
break;
|
|
384
|
+
case /* bool is_primary */ 3:
|
|
385
|
+
message.isPrimary = reader.bool();
|
|
386
|
+
break;
|
|
387
|
+
case /* resources.timestamp.Timestamp created_at */ 4:
|
|
388
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
389
|
+
break;
|
|
390
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 5:
|
|
391
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
392
|
+
break;
|
|
393
|
+
default:
|
|
394
|
+
let u = options.readUnknownField;
|
|
395
|
+
if (u === "throw")
|
|
396
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
397
|
+
let d = reader.skip(wireType);
|
|
398
|
+
if (u !== false)
|
|
399
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return message;
|
|
403
|
+
}
|
|
404
|
+
internalBinaryWrite(message: PhoneNumber, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
405
|
+
/* int32 user_id = 1; */
|
|
406
|
+
if (message.userId !== 0)
|
|
407
|
+
writer.tag(1, WireType.Varint).int32(message.userId);
|
|
408
|
+
/* string number = 2; */
|
|
409
|
+
if (message.number !== "")
|
|
410
|
+
writer.tag(2, WireType.LengthDelimited).string(message.number);
|
|
411
|
+
/* bool is_primary = 3; */
|
|
412
|
+
if (message.isPrimary !== false)
|
|
413
|
+
writer.tag(3, WireType.Varint).bool(message.isPrimary);
|
|
414
|
+
/* resources.timestamp.Timestamp created_at = 4; */
|
|
415
|
+
if (message.createdAt)
|
|
416
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
417
|
+
/* optional resources.timestamp.Timestamp updated_at = 5; */
|
|
418
|
+
if (message.updatedAt)
|
|
419
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
420
|
+
let u = options.writeUnknownFields;
|
|
421
|
+
if (u !== false)
|
|
422
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
423
|
+
return writer;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* @generated MessageType for protobuf message resources.users.PhoneNumber
|
|
428
|
+
*/
|
|
429
|
+
export const PhoneNumber = new PhoneNumber$Type();
|
|
430
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
431
|
+
class UserJob$Type extends MessageType<UserJob> {
|
|
432
|
+
constructor() {
|
|
433
|
+
super("resources.users.UserJob", [
|
|
434
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
435
|
+
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
436
|
+
{ no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
437
|
+
{ no: 4, name: "grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
438
|
+
{ no: 5, name: "grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
439
|
+
{ no: 6, name: "is_primary", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
440
|
+
{ no: 7, name: "created_at", kind: "message", T: () => Timestamp },
|
|
441
|
+
{ no: 8, name: "updated_at", kind: "message", T: () => Timestamp }
|
|
442
|
+
]);
|
|
443
|
+
}
|
|
444
|
+
create(value?: PartialMessage<UserJob>): UserJob {
|
|
445
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
446
|
+
message.userId = 0;
|
|
447
|
+
message.job = "";
|
|
448
|
+
message.grade = 0;
|
|
449
|
+
message.isPrimary = false;
|
|
450
|
+
if (value !== undefined)
|
|
451
|
+
reflectionMergePartial<UserJob>(this, message, value);
|
|
452
|
+
return message;
|
|
453
|
+
}
|
|
454
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserJob): UserJob {
|
|
455
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
456
|
+
while (reader.pos < end) {
|
|
457
|
+
let [fieldNo, wireType] = reader.tag();
|
|
458
|
+
switch (fieldNo) {
|
|
459
|
+
case /* int32 user_id */ 1:
|
|
460
|
+
message.userId = reader.int32();
|
|
461
|
+
break;
|
|
462
|
+
case /* string job */ 2:
|
|
463
|
+
message.job = reader.string();
|
|
464
|
+
break;
|
|
465
|
+
case /* optional string job_label */ 3:
|
|
466
|
+
message.jobLabel = reader.string();
|
|
467
|
+
break;
|
|
468
|
+
case /* int32 grade */ 4:
|
|
469
|
+
message.grade = reader.int32();
|
|
470
|
+
break;
|
|
471
|
+
case /* optional string grade_label */ 5:
|
|
472
|
+
message.gradeLabel = reader.string();
|
|
473
|
+
break;
|
|
474
|
+
case /* bool is_primary */ 6:
|
|
475
|
+
message.isPrimary = reader.bool();
|
|
476
|
+
break;
|
|
477
|
+
case /* resources.timestamp.Timestamp created_at */ 7:
|
|
478
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
479
|
+
break;
|
|
480
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 8:
|
|
481
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
482
|
+
break;
|
|
483
|
+
default:
|
|
484
|
+
let u = options.readUnknownField;
|
|
485
|
+
if (u === "throw")
|
|
486
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
487
|
+
let d = reader.skip(wireType);
|
|
488
|
+
if (u !== false)
|
|
489
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return message;
|
|
493
|
+
}
|
|
494
|
+
internalBinaryWrite(message: UserJob, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
495
|
+
/* int32 user_id = 1; */
|
|
496
|
+
if (message.userId !== 0)
|
|
497
|
+
writer.tag(1, WireType.Varint).int32(message.userId);
|
|
498
|
+
/* string job = 2; */
|
|
499
|
+
if (message.job !== "")
|
|
500
|
+
writer.tag(2, WireType.LengthDelimited).string(message.job);
|
|
501
|
+
/* optional string job_label = 3; */
|
|
502
|
+
if (message.jobLabel !== undefined)
|
|
503
|
+
writer.tag(3, WireType.LengthDelimited).string(message.jobLabel);
|
|
504
|
+
/* int32 grade = 4; */
|
|
505
|
+
if (message.grade !== 0)
|
|
506
|
+
writer.tag(4, WireType.Varint).int32(message.grade);
|
|
507
|
+
/* optional string grade_label = 5; */
|
|
508
|
+
if (message.gradeLabel !== undefined)
|
|
509
|
+
writer.tag(5, WireType.LengthDelimited).string(message.gradeLabel);
|
|
510
|
+
/* bool is_primary = 6; */
|
|
511
|
+
if (message.isPrimary !== false)
|
|
512
|
+
writer.tag(6, WireType.Varint).bool(message.isPrimary);
|
|
513
|
+
/* resources.timestamp.Timestamp created_at = 7; */
|
|
514
|
+
if (message.createdAt)
|
|
515
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
516
|
+
/* optional resources.timestamp.Timestamp updated_at = 8; */
|
|
517
|
+
if (message.updatedAt)
|
|
518
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
519
|
+
let u = options.writeUnknownFields;
|
|
520
|
+
if (u !== false)
|
|
521
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
522
|
+
return writer;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* @generated MessageType for protobuf message resources.users.UserJob
|
|
527
|
+
*/
|
|
528
|
+
export const UserJob = new UserJob$Type();
|