@fivenet-app/gen 2025.9.1 → 2026.4.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/clients.ts +36 -0
- package/codegen/perms/perms.ts +186 -15
- package/codegen/sanitizer/sanitizer.ts +34 -1
- package/package.json +2 -2
- package/perms.ts +140 -8
- package/resources/accounts/accounts.ts +98 -31
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
- package/resources/audit/audit.ts +156 -38
- package/resources/calendar/{access.ts → access/access.ts} +30 -30
- package/resources/calendar/calendar.ts +17 -477
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/{access.ts → access/access.ts} +22 -22
- package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/{settings.ts → settings/settings.ts} +70 -70
- package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
- package/resources/centrum/{units.ts → units/units.ts} +131 -51
- package/resources/citizens/labels/labels.ts +526 -0
- package/resources/{users → citizens/licenses}/licenses.ts +17 -17
- package/resources/clientconfig/clientconfig.ts +126 -258
- package/resources/collab/collab.ts +4 -16
- package/resources/common/content/content.ts +108 -85
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/i18n.ts +2 -2
- package/resources/{common/cron → cron}/cron.ts +43 -43
- package/resources/documents/{access.ts → access/access.ts} +29 -52
- package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +7 -7
- package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +282 -667
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
- package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
- package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
- package/resources/file/filestore.ts +1 -1
- package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
- package/resources/jobs/{labels.ts → labels/labels.ts} +34 -23
- package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
- package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
- package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
- package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
- package/resources/mailer/{access.ts → access/access.ts} +67 -67
- package/resources/mailer/{email.ts → emails/email.ts} +19 -19
- package/resources/mailer/{events.ts → events/events.ts} +24 -24
- package/resources/mailer/{message.ts → messages/message.ts} +29 -29
- package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
- package/resources/mailer/{template.ts → templates/template.ts} +15 -15
- package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
- package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
- package/resources/notifications/{events.ts → events/events.ts} +20 -20
- package/resources/notifications/notifications.ts +4 -4
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
- package/resources/permissions/{events.ts → events/events.ts} +7 -7
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
- package/resources/qualifications/{access.ts → access/access.ts} +19 -19
- package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
- package/resources/qualifications/qualifications.ts +51 -179
- package/resources/settings/banner.ts +3 -3
- package/resources/settings/config.ts +527 -25
- package/resources/{documents/state.ts → settings/data.ts} +41 -20
- package/resources/settings/perms.ts +14 -14
- package/resources/stats/stats.ts +379 -0
- package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
- package/resources/sync/{data.ts → data/data.ts} +405 -59
- package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
- package/resources/users/{activity.ts → activity/activity.ts} +242 -101
- package/resources/users/{props.ts → props/props.ts} +91 -69
- package/resources/users/short/user.ts +184 -0
- package/resources/users/{users.ts → user.ts} +266 -195
- package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
- package/resources/vehicles/{props.ts → props/props.ts} +28 -6
- package/resources/vehicles/vehicles.ts +20 -8
- package/resources/wiki/{access.ts → access/access.ts} +30 -30
- package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
- package/resources/wiki/page.ts +39 -15
- package/services/auth/auth.client.ts +23 -10
- package/services/auth/auth.ts +445 -262
- package/services/calendar/calendar.ts +56 -34
- package/services/centrum/centrum.ts +127 -127
- package/services/citizens/citizens.client.ts +0 -13
- package/services/citizens/citizens.ts +44 -134
- package/services/citizens/labels.client.ts +77 -0
- package/services/citizens/labels.ts +455 -0
- package/services/completor/completor.ts +36 -16
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- package/services/documents/documents.ts +164 -186
- 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/jobs/conduct.client.ts +30 -3
- package/services/jobs/conduct.ts +159 -33
- package/services/jobs/jobs.ts +43 -43
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.ts +39 -39
- package/services/livemap/livemap.ts +18 -18
- package/services/mailer/mailer.ts +78 -78
- package/services/notifications/notifications.ts +35 -35
- package/services/qualifications/qualifications.ts +81 -46
- package/services/settings/accounts.client.ts +23 -10
- package/services/settings/accounts.ts +191 -30
- package/services/settings/cron.client.ts +13 -0
- package/services/settings/cron.ts +118 -5
- package/services/settings/laws.ts +1 -1
- package/services/settings/settings.ts +73 -52
- package/services/settings/system.client.ts +13 -0
- package/services/settings/system.ts +115 -15
- package/services/stats/stats.client.ts +7 -7
- package/services/stats/stats.ts +24 -24
- package/services/sync/sync.client.ts +271 -37
- package/services/sync/sync.ts +1525 -421
- package/services/vehicles/vehicles.ts +8 -8
- package/services/wiki/wiki.ts +8 -8
- package/svcs.ts +100 -6
- package/resources/centrum/attributes.ts +0 -183
- package/resources/documents/signoff.ts +0 -55
- package/resources/users/labels.ts +0 -160
|
@@ -11,8 +11,8 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
11
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
-
import { User } from "../users/
|
|
15
|
-
import { OAuth2Account } from "./oauth2";
|
|
14
|
+
import { User } from "../users/user";
|
|
15
|
+
import { OAuth2Account } from "./oauth2/oauth2";
|
|
16
16
|
import { Timestamp } from "../timestamp/timestamp";
|
|
17
17
|
/**
|
|
18
18
|
* @generated from protobuf message resources.accounts.Account
|
|
@@ -31,26 +31,39 @@ export interface Account {
|
|
|
31
31
|
*/
|
|
32
32
|
updatedAt?: Timestamp;
|
|
33
33
|
/**
|
|
34
|
-
* @generated from protobuf field:
|
|
34
|
+
* @generated from protobuf field: bool enabled = 4
|
|
35
|
+
*/
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* @generated from protobuf field: string username = 5
|
|
35
39
|
*/
|
|
36
40
|
username: string;
|
|
37
41
|
/**
|
|
38
|
-
* @generated from protobuf field: string license =
|
|
42
|
+
* @generated from protobuf field: string license = 6
|
|
39
43
|
*/
|
|
40
44
|
license: string;
|
|
41
45
|
/**
|
|
42
|
-
* @generated from protobuf field:
|
|
46
|
+
* @generated from protobuf field: optional resources.accounts.AccountGroups groups = 7
|
|
43
47
|
*/
|
|
44
|
-
|
|
48
|
+
groups?: AccountGroups;
|
|
45
49
|
/**
|
|
46
|
-
* @generated from protobuf field: optional int32 last_char =
|
|
50
|
+
* @generated from protobuf field: optional int32 last_char = 8
|
|
47
51
|
*/
|
|
48
52
|
lastChar?: number;
|
|
49
53
|
/**
|
|
50
|
-
* @generated from protobuf field: repeated resources.accounts.OAuth2Account oauth2_accounts =
|
|
54
|
+
* @generated from protobuf field: repeated resources.accounts.oauth2.OAuth2Account oauth2_accounts = 9
|
|
51
55
|
*/
|
|
52
56
|
oauth2Accounts: OAuth2Account[];
|
|
53
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf message resources.accounts.AccountGroups
|
|
60
|
+
*/
|
|
61
|
+
export interface AccountGroups {
|
|
62
|
+
/**
|
|
63
|
+
* @generated from protobuf field: repeated string groups = 1
|
|
64
|
+
*/
|
|
65
|
+
groups: string[];
|
|
66
|
+
}
|
|
54
67
|
/**
|
|
55
68
|
* @generated from protobuf message resources.accounts.Character
|
|
56
69
|
*/
|
|
@@ -75,19 +88,20 @@ class Account$Type extends MessageType<Account> {
|
|
|
75
88
|
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\"" } },
|
|
76
89
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
77
90
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
78
|
-
{ no: 4, name: "
|
|
79
|
-
{ no: 5, name: "
|
|
80
|
-
{ no: 6, name: "
|
|
81
|
-
{ no: 7, name: "
|
|
82
|
-
{ no: 8, name: "
|
|
91
|
+
{ no: 4, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
92
|
+
{ no: 5, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "24" } } } },
|
|
93
|
+
{ no: 6, name: "license", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
|
|
94
|
+
{ no: 7, name: "groups", kind: "message", T: () => AccountGroups },
|
|
95
|
+
{ no: 8, name: "last_char", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
96
|
+
{ no: 9, name: "oauth2_accounts", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OAuth2Account, options: { "buf.validate.field": { repeated: { maxItems: "10" } }, "tagger.tags": "alias:\"oauth2_account\"" } }
|
|
83
97
|
]);
|
|
84
98
|
}
|
|
85
99
|
create(value?: PartialMessage<Account>): Account {
|
|
86
100
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
87
101
|
message.id = 0;
|
|
102
|
+
message.enabled = false;
|
|
88
103
|
message.username = "";
|
|
89
104
|
message.license = "";
|
|
90
|
-
message.enabled = false;
|
|
91
105
|
message.oauth2Accounts = [];
|
|
92
106
|
if (value !== undefined)
|
|
93
107
|
reflectionMergePartial<Account>(this, message, value);
|
|
@@ -107,19 +121,22 @@ class Account$Type extends MessageType<Account> {
|
|
|
107
121
|
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
108
122
|
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
109
123
|
break;
|
|
110
|
-
case /*
|
|
124
|
+
case /* bool enabled */ 4:
|
|
125
|
+
message.enabled = reader.bool();
|
|
126
|
+
break;
|
|
127
|
+
case /* string username */ 5:
|
|
111
128
|
message.username = reader.string();
|
|
112
129
|
break;
|
|
113
|
-
case /* string license */
|
|
130
|
+
case /* string license */ 6:
|
|
114
131
|
message.license = reader.string();
|
|
115
132
|
break;
|
|
116
|
-
case /*
|
|
117
|
-
message.
|
|
133
|
+
case /* optional resources.accounts.AccountGroups groups */ 7:
|
|
134
|
+
message.groups = AccountGroups.internalBinaryRead(reader, reader.uint32(), options, message.groups);
|
|
118
135
|
break;
|
|
119
|
-
case /* optional int32 last_char */
|
|
136
|
+
case /* optional int32 last_char */ 8:
|
|
120
137
|
message.lastChar = reader.int32();
|
|
121
138
|
break;
|
|
122
|
-
case /* repeated resources.accounts.OAuth2Account oauth2_accounts */
|
|
139
|
+
case /* repeated resources.accounts.oauth2.OAuth2Account oauth2_accounts */ 9:
|
|
123
140
|
message.oauth2Accounts.push(OAuth2Account.internalBinaryRead(reader, reader.uint32(), options));
|
|
124
141
|
break;
|
|
125
142
|
default:
|
|
@@ -143,21 +160,24 @@ class Account$Type extends MessageType<Account> {
|
|
|
143
160
|
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
144
161
|
if (message.updatedAt)
|
|
145
162
|
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
146
|
-
/*
|
|
163
|
+
/* bool enabled = 4; */
|
|
164
|
+
if (message.enabled !== false)
|
|
165
|
+
writer.tag(4, WireType.Varint).bool(message.enabled);
|
|
166
|
+
/* string username = 5; */
|
|
147
167
|
if (message.username !== "")
|
|
148
|
-
writer.tag(
|
|
149
|
-
/* string license =
|
|
168
|
+
writer.tag(5, WireType.LengthDelimited).string(message.username);
|
|
169
|
+
/* string license = 6; */
|
|
150
170
|
if (message.license !== "")
|
|
151
|
-
writer.tag(
|
|
152
|
-
/*
|
|
153
|
-
if (message.
|
|
154
|
-
writer.tag(
|
|
155
|
-
/* optional int32 last_char =
|
|
171
|
+
writer.tag(6, WireType.LengthDelimited).string(message.license);
|
|
172
|
+
/* optional resources.accounts.AccountGroups groups = 7; */
|
|
173
|
+
if (message.groups)
|
|
174
|
+
AccountGroups.internalBinaryWrite(message.groups, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
175
|
+
/* optional int32 last_char = 8; */
|
|
156
176
|
if (message.lastChar !== undefined)
|
|
157
|
-
writer.tag(
|
|
158
|
-
/* repeated resources.accounts.OAuth2Account oauth2_accounts =
|
|
177
|
+
writer.tag(8, WireType.Varint).int32(message.lastChar);
|
|
178
|
+
/* repeated resources.accounts.oauth2.OAuth2Account oauth2_accounts = 9; */
|
|
159
179
|
for (let i = 0; i < message.oauth2Accounts.length; i++)
|
|
160
|
-
OAuth2Account.internalBinaryWrite(message.oauth2Accounts[i], writer.tag(
|
|
180
|
+
OAuth2Account.internalBinaryWrite(message.oauth2Accounts[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
161
181
|
let u = options.writeUnknownFields;
|
|
162
182
|
if (u !== false)
|
|
163
183
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -169,6 +189,53 @@ class Account$Type extends MessageType<Account> {
|
|
|
169
189
|
*/
|
|
170
190
|
export const Account = new Account$Type();
|
|
171
191
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
192
|
+
class AccountGroups$Type extends MessageType<AccountGroups> {
|
|
193
|
+
constructor() {
|
|
194
|
+
super("resources.accounts.AccountGroups", [
|
|
195
|
+
{ no: 1, name: "groups", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
|
|
196
|
+
]);
|
|
197
|
+
}
|
|
198
|
+
create(value?: PartialMessage<AccountGroups>): AccountGroups {
|
|
199
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
200
|
+
message.groups = [];
|
|
201
|
+
if (value !== undefined)
|
|
202
|
+
reflectionMergePartial<AccountGroups>(this, message, value);
|
|
203
|
+
return message;
|
|
204
|
+
}
|
|
205
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccountGroups): AccountGroups {
|
|
206
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
207
|
+
while (reader.pos < end) {
|
|
208
|
+
let [fieldNo, wireType] = reader.tag();
|
|
209
|
+
switch (fieldNo) {
|
|
210
|
+
case /* repeated string groups */ 1:
|
|
211
|
+
message.groups.push(reader.string());
|
|
212
|
+
break;
|
|
213
|
+
default:
|
|
214
|
+
let u = options.readUnknownField;
|
|
215
|
+
if (u === "throw")
|
|
216
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
217
|
+
let d = reader.skip(wireType);
|
|
218
|
+
if (u !== false)
|
|
219
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return message;
|
|
223
|
+
}
|
|
224
|
+
internalBinaryWrite(message: AccountGroups, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
225
|
+
/* repeated string groups = 1; */
|
|
226
|
+
for (let i = 0; i < message.groups.length; i++)
|
|
227
|
+
writer.tag(1, WireType.LengthDelimited).string(message.groups[i]);
|
|
228
|
+
let u = options.writeUnknownFields;
|
|
229
|
+
if (u !== false)
|
|
230
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
231
|
+
return writer;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* @generated MessageType for protobuf message resources.accounts.AccountGroups
|
|
236
|
+
*/
|
|
237
|
+
export const AccountGroups = new AccountGroups$Type();
|
|
238
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
172
239
|
class Character$Type extends MessageType<Character> {
|
|
173
240
|
constructor() {
|
|
174
241
|
super("resources.accounts.Character", [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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/accounts/oauth2.proto" (package "resources.accounts", syntax proto3)
|
|
2
|
+
// @generated from protobuf file "resources/accounts/oauth2/oauth2.proto" (package "resources.accounts.oauth2", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
@@ -11,9 +11,9 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
11
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
-
import { Timestamp } from "
|
|
14
|
+
import { Timestamp } from "../../timestamp/timestamp";
|
|
15
15
|
/**
|
|
16
|
-
* @generated from protobuf message resources.accounts.OAuth2Account
|
|
16
|
+
* @generated from protobuf message resources.accounts.oauth2.OAuth2Account
|
|
17
17
|
*/
|
|
18
18
|
export interface OAuth2Account {
|
|
19
19
|
/**
|
|
@@ -29,7 +29,7 @@ export interface OAuth2Account {
|
|
|
29
29
|
*/
|
|
30
30
|
providerName: string;
|
|
31
31
|
/**
|
|
32
|
-
* @generated from protobuf field: resources.accounts.OAuth2Provider provider = 4
|
|
32
|
+
* @generated from protobuf field: resources.accounts.oauth2.OAuth2Provider provider = 4
|
|
33
33
|
*/
|
|
34
34
|
provider?: OAuth2Provider;
|
|
35
35
|
/**
|
|
@@ -41,12 +41,12 @@ export interface OAuth2Account {
|
|
|
41
41
|
*/
|
|
42
42
|
username: string;
|
|
43
43
|
/**
|
|
44
|
-
* @generated from protobuf field: string
|
|
44
|
+
* @generated from protobuf field: string avatar = 7
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
avatar: string;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* @generated from protobuf message resources.accounts.OAuth2Provider
|
|
49
|
+
* @generated from protobuf message resources.accounts.oauth2.OAuth2Provider
|
|
50
50
|
*/
|
|
51
51
|
export interface OAuth2Provider {
|
|
52
52
|
/**
|
|
@@ -69,14 +69,14 @@ export interface OAuth2Provider {
|
|
|
69
69
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
70
70
|
class OAuth2Account$Type extends MessageType<OAuth2Account> {
|
|
71
71
|
constructor() {
|
|
72
|
-
super("resources.accounts.OAuth2Account", [
|
|
72
|
+
super("resources.accounts.oauth2.OAuth2Account", [
|
|
73
73
|
{ no: 1, name: "account_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
74
74
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
75
75
|
{ no: 3, name: "provider_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "tagger.tags": "sql:\"primary_key\" alias:\"provider_name\"" } },
|
|
76
76
|
{ no: 4, name: "provider", kind: "message", T: () => OAuth2Provider },
|
|
77
77
|
{ no: 5, name: "external_id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } },
|
|
78
78
|
{ no: 6, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
|
|
79
|
-
{ no: 7, name: "
|
|
79
|
+
{ no: 7, name: "avatar", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } }
|
|
80
80
|
]);
|
|
81
81
|
}
|
|
82
82
|
create(value?: PartialMessage<OAuth2Account>): OAuth2Account {
|
|
@@ -85,7 +85,7 @@ class OAuth2Account$Type extends MessageType<OAuth2Account> {
|
|
|
85
85
|
message.providerName = "";
|
|
86
86
|
message.externalId = "";
|
|
87
87
|
message.username = "";
|
|
88
|
-
message.
|
|
88
|
+
message.avatar = "";
|
|
89
89
|
if (value !== undefined)
|
|
90
90
|
reflectionMergePartial<OAuth2Account>(this, message, value);
|
|
91
91
|
return message;
|
|
@@ -104,7 +104,7 @@ class OAuth2Account$Type extends MessageType<OAuth2Account> {
|
|
|
104
104
|
case /* string provider_name */ 3:
|
|
105
105
|
message.providerName = reader.string();
|
|
106
106
|
break;
|
|
107
|
-
case /* resources.accounts.OAuth2Provider provider */ 4:
|
|
107
|
+
case /* resources.accounts.oauth2.OAuth2Provider provider */ 4:
|
|
108
108
|
message.provider = OAuth2Provider.internalBinaryRead(reader, reader.uint32(), options, message.provider);
|
|
109
109
|
break;
|
|
110
110
|
case /* string external_id */ 5:
|
|
@@ -113,8 +113,8 @@ class OAuth2Account$Type extends MessageType<OAuth2Account> {
|
|
|
113
113
|
case /* string username */ 6:
|
|
114
114
|
message.username = reader.string();
|
|
115
115
|
break;
|
|
116
|
-
case /* string
|
|
117
|
-
message.
|
|
116
|
+
case /* string avatar */ 7:
|
|
117
|
+
message.avatar = reader.string();
|
|
118
118
|
break;
|
|
119
119
|
default:
|
|
120
120
|
let u = options.readUnknownField;
|
|
@@ -137,7 +137,7 @@ class OAuth2Account$Type extends MessageType<OAuth2Account> {
|
|
|
137
137
|
/* string provider_name = 3; */
|
|
138
138
|
if (message.providerName !== "")
|
|
139
139
|
writer.tag(3, WireType.LengthDelimited).string(message.providerName);
|
|
140
|
-
/* resources.accounts.OAuth2Provider provider = 4; */
|
|
140
|
+
/* resources.accounts.oauth2.OAuth2Provider provider = 4; */
|
|
141
141
|
if (message.provider)
|
|
142
142
|
OAuth2Provider.internalBinaryWrite(message.provider, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
143
143
|
/* string external_id = 5; */
|
|
@@ -146,9 +146,9 @@ class OAuth2Account$Type extends MessageType<OAuth2Account> {
|
|
|
146
146
|
/* string username = 6; */
|
|
147
147
|
if (message.username !== "")
|
|
148
148
|
writer.tag(6, WireType.LengthDelimited).string(message.username);
|
|
149
|
-
/* string
|
|
150
|
-
if (message.
|
|
151
|
-
writer.tag(7, WireType.LengthDelimited).string(message.
|
|
149
|
+
/* string avatar = 7; */
|
|
150
|
+
if (message.avatar !== "")
|
|
151
|
+
writer.tag(7, WireType.LengthDelimited).string(message.avatar);
|
|
152
152
|
let u = options.writeUnknownFields;
|
|
153
153
|
if (u !== false)
|
|
154
154
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -156,13 +156,13 @@ class OAuth2Account$Type extends MessageType<OAuth2Account> {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
|
-
* @generated MessageType for protobuf message resources.accounts.OAuth2Account
|
|
159
|
+
* @generated MessageType for protobuf message resources.accounts.oauth2.OAuth2Account
|
|
160
160
|
*/
|
|
161
161
|
export const OAuth2Account = new OAuth2Account$Type();
|
|
162
162
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
163
163
|
class OAuth2Provider$Type extends MessageType<OAuth2Provider> {
|
|
164
164
|
constructor() {
|
|
165
|
-
super("resources.accounts.OAuth2Provider", [
|
|
165
|
+
super("resources.accounts.oauth2.OAuth2Provider", [
|
|
166
166
|
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
167
167
|
{ no: 2, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
168
168
|
{ no: 3, name: "homepage", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
@@ -226,6 +226,6 @@ class OAuth2Provider$Type extends MessageType<OAuth2Provider> {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
|
-
* @generated MessageType for protobuf message resources.accounts.OAuth2Provider
|
|
229
|
+
* @generated MessageType for protobuf message resources.accounts.oauth2.OAuth2Provider
|
|
230
230
|
*/
|
|
231
231
|
export const OAuth2Provider = new OAuth2Provider$Type();
|
package/resources/audit/audit.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
11
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
-
import { UserShort } from "../users/
|
|
14
|
+
import { UserShort } from "../users/short/user";
|
|
15
15
|
import { Timestamp } from "../timestamp/timestamp";
|
|
16
16
|
/**
|
|
17
17
|
* @generated from protobuf message resources.audit.AuditEntry
|
|
@@ -30,7 +30,7 @@ export interface AuditEntry {
|
|
|
30
30
|
*/
|
|
31
31
|
userId: number;
|
|
32
32
|
/**
|
|
33
|
-
* @generated from protobuf field: optional resources.users.UserShort user = 4
|
|
33
|
+
* @generated from protobuf field: optional resources.users.short.UserShort user = 4
|
|
34
34
|
*/
|
|
35
35
|
user?: UserShort;
|
|
36
36
|
/**
|
|
@@ -42,7 +42,7 @@ export interface AuditEntry {
|
|
|
42
42
|
*/
|
|
43
43
|
targetUserId?: number;
|
|
44
44
|
/**
|
|
45
|
-
* @generated from protobuf field: optional resources.users.UserShort target_user = 7
|
|
45
|
+
* @generated from protobuf field: optional resources.users.short.UserShort target_user = 7
|
|
46
46
|
*/
|
|
47
47
|
targetUser?: UserShort;
|
|
48
48
|
/**
|
|
@@ -50,67 +50,109 @@ export interface AuditEntry {
|
|
|
50
50
|
*/
|
|
51
51
|
targetUserJob?: string;
|
|
52
52
|
/**
|
|
53
|
+
* GRPC Service name
|
|
54
|
+
*
|
|
53
55
|
* @generated from protobuf field: string service = 9
|
|
54
56
|
*/
|
|
55
57
|
service: string;
|
|
56
58
|
/**
|
|
59
|
+
* GRPC Method name
|
|
60
|
+
*
|
|
57
61
|
* @generated from protobuf field: string method = 10
|
|
58
62
|
*/
|
|
59
63
|
method: string;
|
|
60
64
|
/**
|
|
61
|
-
* @generated from protobuf field: resources.audit.
|
|
65
|
+
* @generated from protobuf field: resources.audit.EventAction action = 11
|
|
62
66
|
*/
|
|
63
|
-
|
|
67
|
+
action: EventAction;
|
|
64
68
|
/**
|
|
65
|
-
* @generated from protobuf field:
|
|
69
|
+
* @generated from protobuf field: resources.audit.EventResult result = 12
|
|
70
|
+
*/
|
|
71
|
+
result: EventResult;
|
|
72
|
+
/**
|
|
73
|
+
* @generated from protobuf field: optional resources.audit.AuditEntryMeta meta = 13
|
|
74
|
+
*/
|
|
75
|
+
meta?: AuditEntryMeta;
|
|
76
|
+
/**
|
|
77
|
+
* @generated from protobuf field: optional string data = 14
|
|
66
78
|
*/
|
|
67
79
|
data?: string;
|
|
68
80
|
}
|
|
69
81
|
/**
|
|
70
|
-
* @generated from protobuf
|
|
82
|
+
* @generated from protobuf message resources.audit.AuditEntryMeta
|
|
71
83
|
*/
|
|
72
|
-
export
|
|
84
|
+
export interface AuditEntryMeta {
|
|
73
85
|
/**
|
|
74
|
-
* @generated from protobuf
|
|
86
|
+
* @generated from protobuf field: map<string, string> meta = 1
|
|
75
87
|
*/
|
|
76
|
-
|
|
88
|
+
meta: {
|
|
89
|
+
[key: string]: string;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf enum resources.audit.EventAction
|
|
94
|
+
*/
|
|
95
|
+
export enum EventAction {
|
|
77
96
|
/**
|
|
78
|
-
* @generated from protobuf enum value:
|
|
97
|
+
* @generated from protobuf enum value: EVENT_ACTION_UNSPECIFIED = 0;
|
|
79
98
|
*/
|
|
80
|
-
|
|
99
|
+
UNSPECIFIED = 0,
|
|
81
100
|
/**
|
|
82
|
-
* @generated from protobuf enum value:
|
|
101
|
+
* @generated from protobuf enum value: EVENT_ACTION_VIEWED = 2;
|
|
83
102
|
*/
|
|
84
103
|
VIEWED = 2,
|
|
85
104
|
/**
|
|
86
|
-
* @generated from protobuf enum value:
|
|
105
|
+
* @generated from protobuf enum value: EVENT_ACTION_CREATED = 3;
|
|
87
106
|
*/
|
|
88
107
|
CREATED = 3,
|
|
89
108
|
/**
|
|
90
|
-
* @generated from protobuf enum value:
|
|
109
|
+
* @generated from protobuf enum value: EVENT_ACTION_UPDATED = 4;
|
|
91
110
|
*/
|
|
92
111
|
UPDATED = 4,
|
|
93
112
|
/**
|
|
94
|
-
* @generated from protobuf enum value:
|
|
113
|
+
* @generated from protobuf enum value: EVENT_ACTION_DELETED = 5;
|
|
95
114
|
*/
|
|
96
115
|
DELETED = 5
|
|
97
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* @generated from protobuf enum resources.audit.EventResult
|
|
119
|
+
*/
|
|
120
|
+
export enum EventResult {
|
|
121
|
+
/**
|
|
122
|
+
* @generated from protobuf enum value: EVENT_RESULT_UNSPECIFIED = 0;
|
|
123
|
+
*/
|
|
124
|
+
UNSPECIFIED = 0,
|
|
125
|
+
/**
|
|
126
|
+
* @generated from protobuf enum value: EVENT_RESULT_SUCCEEDED = 1;
|
|
127
|
+
*/
|
|
128
|
+
SUCCEEDED = 1,
|
|
129
|
+
/**
|
|
130
|
+
* @generated from protobuf enum value: EVENT_RESULT_FAILED = 2;
|
|
131
|
+
*/
|
|
132
|
+
FAILED = 2,
|
|
133
|
+
/**
|
|
134
|
+
* @generated from protobuf enum value: EVENT_RESULT_ERRORED = 3;
|
|
135
|
+
*/
|
|
136
|
+
ERRORED = 3
|
|
137
|
+
}
|
|
98
138
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
99
139
|
class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
100
140
|
constructor() {
|
|
101
141
|
super("resources.audit.AuditEntry", [
|
|
102
|
-
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER
|
|
142
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
103
143
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
104
|
-
{ no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32
|
|
144
|
+
{ no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
105
145
|
{ no: 4, name: "user", kind: "message", T: () => UserShort },
|
|
106
|
-
{ no: 5, name: "user_job", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
107
|
-
{ no: 6, name: "target_user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32
|
|
146
|
+
{ no: 5, name: "user_job", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
147
|
+
{ no: 6, name: "target_user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
108
148
|
{ no: 7, name: "target_user", kind: "message", T: () => UserShort },
|
|
109
|
-
{ no: 8, name: "target_user_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING
|
|
110
|
-
{ no: 9, name: "service", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
111
|
-
{ no: 10, name: "method", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
112
|
-
{ no: 11, name: "
|
|
113
|
-
{ no: 12, name: "
|
|
149
|
+
{ no: 8, name: "target_user_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
150
|
+
{ no: 9, name: "service", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
151
|
+
{ no: 10, name: "method", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
152
|
+
{ no: 11, name: "action", kind: "enum", T: () => ["resources.audit.EventAction", EventAction, "EVENT_ACTION_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
153
|
+
{ no: 12, name: "result", kind: "enum", T: () => ["resources.audit.EventResult", EventResult, "EVENT_RESULT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
154
|
+
{ no: 13, name: "meta", kind: "message", T: () => AuditEntryMeta },
|
|
155
|
+
{ no: 14, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
114
156
|
]);
|
|
115
157
|
}
|
|
116
158
|
create(value?: PartialMessage<AuditEntry>): AuditEntry {
|
|
@@ -120,7 +162,8 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
120
162
|
message.userJob = "";
|
|
121
163
|
message.service = "";
|
|
122
164
|
message.method = "";
|
|
123
|
-
message.
|
|
165
|
+
message.action = 0;
|
|
166
|
+
message.result = 0;
|
|
124
167
|
if (value !== undefined)
|
|
125
168
|
reflectionMergePartial<AuditEntry>(this, message, value);
|
|
126
169
|
return message;
|
|
@@ -139,7 +182,7 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
139
182
|
case /* int32 user_id */ 3:
|
|
140
183
|
message.userId = reader.int32();
|
|
141
184
|
break;
|
|
142
|
-
case /* optional resources.users.UserShort user */ 4:
|
|
185
|
+
case /* optional resources.users.short.UserShort user */ 4:
|
|
143
186
|
message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
144
187
|
break;
|
|
145
188
|
case /* string user_job */ 5:
|
|
@@ -148,7 +191,7 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
148
191
|
case /* optional int32 target_user_id */ 6:
|
|
149
192
|
message.targetUserId = reader.int32();
|
|
150
193
|
break;
|
|
151
|
-
case /* optional resources.users.UserShort target_user */ 7:
|
|
194
|
+
case /* optional resources.users.short.UserShort target_user */ 7:
|
|
152
195
|
message.targetUser = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.targetUser);
|
|
153
196
|
break;
|
|
154
197
|
case /* optional string target_user_job */ 8:
|
|
@@ -160,10 +203,16 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
160
203
|
case /* string method */ 10:
|
|
161
204
|
message.method = reader.string();
|
|
162
205
|
break;
|
|
163
|
-
case /* resources.audit.
|
|
164
|
-
message.
|
|
206
|
+
case /* resources.audit.EventAction action */ 11:
|
|
207
|
+
message.action = reader.int32();
|
|
208
|
+
break;
|
|
209
|
+
case /* resources.audit.EventResult result */ 12:
|
|
210
|
+
message.result = reader.int32();
|
|
165
211
|
break;
|
|
166
|
-
case /* optional
|
|
212
|
+
case /* optional resources.audit.AuditEntryMeta meta */ 13:
|
|
213
|
+
message.meta = AuditEntryMeta.internalBinaryRead(reader, reader.uint32(), options, message.meta);
|
|
214
|
+
break;
|
|
215
|
+
case /* optional string data */ 14:
|
|
167
216
|
message.data = reader.string();
|
|
168
217
|
break;
|
|
169
218
|
default:
|
|
@@ -187,7 +236,7 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
187
236
|
/* int32 user_id = 3; */
|
|
188
237
|
if (message.userId !== 0)
|
|
189
238
|
writer.tag(3, WireType.Varint).int32(message.userId);
|
|
190
|
-
/* optional resources.users.UserShort user = 4; */
|
|
239
|
+
/* optional resources.users.short.UserShort user = 4; */
|
|
191
240
|
if (message.user)
|
|
192
241
|
UserShort.internalBinaryWrite(message.user, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
193
242
|
/* string user_job = 5; */
|
|
@@ -196,7 +245,7 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
196
245
|
/* optional int32 target_user_id = 6; */
|
|
197
246
|
if (message.targetUserId !== undefined)
|
|
198
247
|
writer.tag(6, WireType.Varint).int32(message.targetUserId);
|
|
199
|
-
/* optional resources.users.UserShort target_user = 7; */
|
|
248
|
+
/* optional resources.users.short.UserShort target_user = 7; */
|
|
200
249
|
if (message.targetUser)
|
|
201
250
|
UserShort.internalBinaryWrite(message.targetUser, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
202
251
|
/* optional string target_user_job = 8; */
|
|
@@ -208,12 +257,18 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
208
257
|
/* string method = 10; */
|
|
209
258
|
if (message.method !== "")
|
|
210
259
|
writer.tag(10, WireType.LengthDelimited).string(message.method);
|
|
211
|
-
/* resources.audit.
|
|
212
|
-
if (message.
|
|
213
|
-
writer.tag(11, WireType.Varint).int32(message.
|
|
214
|
-
/*
|
|
260
|
+
/* resources.audit.EventAction action = 11; */
|
|
261
|
+
if (message.action !== 0)
|
|
262
|
+
writer.tag(11, WireType.Varint).int32(message.action);
|
|
263
|
+
/* resources.audit.EventResult result = 12; */
|
|
264
|
+
if (message.result !== 0)
|
|
265
|
+
writer.tag(12, WireType.Varint).int32(message.result);
|
|
266
|
+
/* optional resources.audit.AuditEntryMeta meta = 13; */
|
|
267
|
+
if (message.meta)
|
|
268
|
+
AuditEntryMeta.internalBinaryWrite(message.meta, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
269
|
+
/* optional string data = 14; */
|
|
215
270
|
if (message.data !== undefined)
|
|
216
|
-
writer.tag(
|
|
271
|
+
writer.tag(14, WireType.LengthDelimited).string(message.data);
|
|
217
272
|
let u = options.writeUnknownFields;
|
|
218
273
|
if (u !== false)
|
|
219
274
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -224,3 +279,66 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
|
|
|
224
279
|
* @generated MessageType for protobuf message resources.audit.AuditEntry
|
|
225
280
|
*/
|
|
226
281
|
export const AuditEntry = new AuditEntry$Type();
|
|
282
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
283
|
+
class AuditEntryMeta$Type extends MessageType<AuditEntryMeta> {
|
|
284
|
+
constructor() {
|
|
285
|
+
super("resources.audit.AuditEntryMeta", [
|
|
286
|
+
{ no: 1, name: "meta", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
|
|
287
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
288
|
+
}
|
|
289
|
+
create(value?: PartialMessage<AuditEntryMeta>): AuditEntryMeta {
|
|
290
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
291
|
+
message.meta = {};
|
|
292
|
+
if (value !== undefined)
|
|
293
|
+
reflectionMergePartial<AuditEntryMeta>(this, message, value);
|
|
294
|
+
return message;
|
|
295
|
+
}
|
|
296
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuditEntryMeta): AuditEntryMeta {
|
|
297
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
298
|
+
while (reader.pos < end) {
|
|
299
|
+
let [fieldNo, wireType] = reader.tag();
|
|
300
|
+
switch (fieldNo) {
|
|
301
|
+
case /* map<string, string> meta */ 1:
|
|
302
|
+
this.binaryReadMap1(message.meta, reader, options);
|
|
303
|
+
break;
|
|
304
|
+
default:
|
|
305
|
+
let u = options.readUnknownField;
|
|
306
|
+
if (u === "throw")
|
|
307
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
308
|
+
let d = reader.skip(wireType);
|
|
309
|
+
if (u !== false)
|
|
310
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return message;
|
|
314
|
+
}
|
|
315
|
+
private binaryReadMap1(map: AuditEntryMeta["meta"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
316
|
+
let len = reader.uint32(), end = reader.pos + len, key: keyof AuditEntryMeta["meta"] | undefined, val: AuditEntryMeta["meta"][any] | undefined;
|
|
317
|
+
while (reader.pos < end) {
|
|
318
|
+
let [fieldNo, wireType] = reader.tag();
|
|
319
|
+
switch (fieldNo) {
|
|
320
|
+
case 1:
|
|
321
|
+
key = reader.string();
|
|
322
|
+
break;
|
|
323
|
+
case 2:
|
|
324
|
+
val = reader.string();
|
|
325
|
+
break;
|
|
326
|
+
default: throw new globalThis.Error("unknown map entry field for resources.audit.AuditEntryMeta.meta");
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
map[key ?? ""] = val ?? "";
|
|
330
|
+
}
|
|
331
|
+
internalBinaryWrite(message: AuditEntryMeta, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
332
|
+
/* map<string, string> meta = 1; */
|
|
333
|
+
for (let k of globalThis.Object.keys(message.meta))
|
|
334
|
+
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.meta[k]).join();
|
|
335
|
+
let u = options.writeUnknownFields;
|
|
336
|
+
if (u !== false)
|
|
337
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
338
|
+
return writer;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* @generated MessageType for protobuf message resources.audit.AuditEntryMeta
|
|
343
|
+
*/
|
|
344
|
+
export const AuditEntryMeta = new AuditEntryMeta$Type();
|