@fivenet-app/gen 0.9.3 → 0.9.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/package.json +5 -1
- package/perms.ts +4 -0
- package/resources/accounts/accounts.ts +8 -8
- package/resources/accounts/oauth2.ts +16 -16
- package/resources/calendar/access.ts +32 -32
- package/resources/calendar/calendar.ts +48 -48
- package/resources/centrum/access.ts +40 -40
- package/resources/centrum/dispatches.ts +62 -62
- package/resources/centrum/general.ts +8 -8
- package/resources/centrum/units.ts +40 -40
- package/resources/documents/access.ts +32 -32
- package/resources/documents/activity.ts +16 -16
- package/resources/documents/category.ts +8 -8
- package/resources/documents/comment.ts +16 -16
- package/resources/documents/documents.ts +86 -86
- package/resources/documents/requests.ts +16 -16
- package/resources/documents/templates.ts +32 -32
- package/resources/internet/access.ts +358 -0
- package/resources/internet/ads.ts +8 -8
- package/resources/internet/domain.ts +182 -23
- package/resources/internet/page.ts +22 -20
- package/resources/internet/search.ts +8 -8
- package/resources/jobs/activity.ts +8 -8
- package/resources/jobs/conduct.ts +8 -8
- package/resources/jobs/labels.ts +8 -8
- package/resources/jobs/timeclock.ts +6 -2
- package/resources/laws/laws.ts +24 -24
- package/resources/livemap/livemap.ts +14 -14
- package/resources/mailer/access.ts +56 -56
- package/resources/mailer/email.ts +8 -8
- package/resources/mailer/events.ts +18 -18
- package/resources/mailer/message.ts +24 -24
- package/resources/mailer/settings.ts +8 -8
- package/resources/mailer/template.ts +16 -16
- package/resources/mailer/thread.ts +56 -56
- package/resources/notifications/events.ts +39 -2
- package/resources/notifications/notifications.ts +20 -20
- package/resources/permissions/permissions.ts +64 -64
- package/resources/qualifications/access.ts +16 -16
- package/resources/qualifications/exam.ts +40 -40
- package/resources/qualifications/qualifications.ts +64 -64
- package/resources/rector/audit.ts +16 -16
- package/resources/sync/activity.ts +92 -14
- package/resources/sync/data.ts +142 -10
- package/resources/users/activity.ts +992 -36
- package/resources/users/job_props.ts +3 -708
- package/resources/users/job_settings.ts +721 -0
- package/resources/users/labels.ts +8 -8
- package/resources/users/licenses.ts +148 -0
- package/resources/users/users.ts +1 -136
- package/resources/wiki/access.ts +32 -32
- package/resources/wiki/activity.ts +16 -16
- package/resources/wiki/page.ts +28 -28
- package/services/auth/auth.ts +16 -16
- package/services/calendar/calendar.ts +55 -55
- package/services/centrum/centrum.ts +112 -112
- package/services/citizenstore/citizenstore.ts +24 -1
- package/services/docstore/docstore.ts +280 -280
- package/services/internet/domain.client.ts +126 -0
- package/services/internet/domain.ts +695 -0
- package/services/internet/internet.ts +3 -3
- package/services/jobs/conduct.ts +15 -15
- package/services/jobs/jobs.ts +14 -14
- package/services/jobs/timeclock.ts +1 -1
- package/services/livemapper/livemap.ts +8 -8
- package/services/mailer/mailer.ts +159 -159
- package/services/notificator/notificator.ts +15 -15
- package/services/qualifications/qualifications.ts +108 -108
- package/services/rector/laws.ts +16 -16
- package/services/rector/rector.ts +63 -63
- package/services/sync/sync.client.ts +36 -2
- package/services/sync/sync.ts +259 -44
- package/services/wiki/wiki.ts +24 -24
- package/svcs.ts +13 -0
- package/resources/common/access/dummy.ts +0 -309
- package/resources/internet/internet.ts +0 -344
- package/resources/mailer/user.ts +0 -93
|
@@ -24,9 +24,9 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
24
24
|
*/
|
|
25
25
|
export interface Template {
|
|
26
26
|
/**
|
|
27
|
-
* @generated from protobuf field: uint64 id = 1
|
|
27
|
+
* @generated from protobuf field: uint64 id = 1;
|
|
28
28
|
*/
|
|
29
|
-
id:
|
|
29
|
+
id: number; // @gotags: alias:"id"
|
|
30
30
|
/**
|
|
31
31
|
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
32
32
|
*/
|
|
@@ -109,9 +109,9 @@ export interface Template {
|
|
|
109
109
|
*/
|
|
110
110
|
export interface TemplateShort {
|
|
111
111
|
/**
|
|
112
|
-
* @generated from protobuf field: uint64 id = 1
|
|
112
|
+
* @generated from protobuf field: uint64 id = 1;
|
|
113
113
|
*/
|
|
114
|
-
id:
|
|
114
|
+
id: number; // @gotags: alias:"id"
|
|
115
115
|
/**
|
|
116
116
|
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
117
117
|
*/
|
|
@@ -238,17 +238,17 @@ export interface TemplateData {
|
|
|
238
238
|
*/
|
|
239
239
|
export interface TemplateJobAccess {
|
|
240
240
|
/**
|
|
241
|
-
* @generated from protobuf field: uint64 id = 1
|
|
241
|
+
* @generated from protobuf field: uint64 id = 1;
|
|
242
242
|
*/
|
|
243
|
-
id:
|
|
243
|
+
id: number; // @gotags: alias:"id"
|
|
244
244
|
/**
|
|
245
245
|
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
246
246
|
*/
|
|
247
247
|
createdAt?: Timestamp;
|
|
248
248
|
/**
|
|
249
|
-
* @generated from protobuf field: uint64 target_id = 3
|
|
249
|
+
* @generated from protobuf field: uint64 target_id = 3;
|
|
250
250
|
*/
|
|
251
|
-
targetId:
|
|
251
|
+
targetId: number; // @gotags: alias:"template_id"
|
|
252
252
|
/**
|
|
253
253
|
* @generated from protobuf field: string job = 4;
|
|
254
254
|
*/
|
|
@@ -281,7 +281,7 @@ export interface TemplateUserAccess {
|
|
|
281
281
|
class Template$Type extends MessageType<Template> {
|
|
282
282
|
constructor() {
|
|
283
283
|
super("resources.documents.Template", [
|
|
284
|
-
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
284
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
285
285
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
286
286
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
287
287
|
{ no: 4, name: "category", kind: "message", T: () => Category },
|
|
@@ -303,7 +303,7 @@ class Template$Type extends MessageType<Template> {
|
|
|
303
303
|
}
|
|
304
304
|
create(value?: PartialMessage<Template>): Template {
|
|
305
305
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
306
|
-
message.id =
|
|
306
|
+
message.id = 0;
|
|
307
307
|
message.weight = 0;
|
|
308
308
|
message.title = "";
|
|
309
309
|
message.description = "";
|
|
@@ -321,8 +321,8 @@ class Template$Type extends MessageType<Template> {
|
|
|
321
321
|
while (reader.pos < end) {
|
|
322
322
|
let [fieldNo, wireType] = reader.tag();
|
|
323
323
|
switch (fieldNo) {
|
|
324
|
-
case /* uint64 id
|
|
325
|
-
message.id = reader.uint64().
|
|
324
|
+
case /* uint64 id */ 1:
|
|
325
|
+
message.id = reader.uint64().toNumber();
|
|
326
326
|
break;
|
|
327
327
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
328
328
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -387,8 +387,8 @@ class Template$Type extends MessageType<Template> {
|
|
|
387
387
|
return message;
|
|
388
388
|
}
|
|
389
389
|
internalBinaryWrite(message: Template, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
390
|
-
/* uint64 id = 1
|
|
391
|
-
if (message.id !==
|
|
390
|
+
/* uint64 id = 1; */
|
|
391
|
+
if (message.id !== 0)
|
|
392
392
|
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
393
393
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
394
394
|
if (message.createdAt)
|
|
@@ -455,7 +455,7 @@ export const Template = new Template$Type();
|
|
|
455
455
|
class TemplateShort$Type extends MessageType<TemplateShort> {
|
|
456
456
|
constructor() {
|
|
457
457
|
super("resources.documents.TemplateShort", [
|
|
458
|
-
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
458
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
459
459
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
460
460
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
461
461
|
{ no: 4, name: "category", kind: "message", T: () => Category },
|
|
@@ -472,7 +472,7 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
|
|
|
472
472
|
}
|
|
473
473
|
create(value?: PartialMessage<TemplateShort>): TemplateShort {
|
|
474
474
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
475
|
-
message.id =
|
|
475
|
+
message.id = 0;
|
|
476
476
|
message.weight = 0;
|
|
477
477
|
message.title = "";
|
|
478
478
|
message.description = "";
|
|
@@ -486,8 +486,8 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
|
|
|
486
486
|
while (reader.pos < end) {
|
|
487
487
|
let [fieldNo, wireType] = reader.tag();
|
|
488
488
|
switch (fieldNo) {
|
|
489
|
-
case /* uint64 id
|
|
490
|
-
message.id = reader.uint64().
|
|
489
|
+
case /* uint64 id */ 1:
|
|
490
|
+
message.id = reader.uint64().toNumber();
|
|
491
491
|
break;
|
|
492
492
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
493
493
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -537,8 +537,8 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
|
|
|
537
537
|
return message;
|
|
538
538
|
}
|
|
539
539
|
internalBinaryWrite(message: TemplateShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
540
|
-
/* uint64 id = 1
|
|
541
|
-
if (message.id !==
|
|
540
|
+
/* uint64 id = 1; */
|
|
541
|
+
if (message.id !== 0)
|
|
542
542
|
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
543
543
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
544
544
|
if (message.createdAt)
|
|
@@ -826,9 +826,9 @@ export const TemplateData = new TemplateData$Type();
|
|
|
826
826
|
class TemplateJobAccess$Type extends MessageType<TemplateJobAccess> {
|
|
827
827
|
constructor() {
|
|
828
828
|
super("resources.documents.TemplateJobAccess", [
|
|
829
|
-
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
829
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
830
830
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
831
|
-
{ no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
831
|
+
{ no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
832
832
|
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
|
|
833
833
|
{ no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
|
|
834
834
|
{ no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
|
|
@@ -838,8 +838,8 @@ class TemplateJobAccess$Type extends MessageType<TemplateJobAccess> {
|
|
|
838
838
|
}
|
|
839
839
|
create(value?: PartialMessage<TemplateJobAccess>): TemplateJobAccess {
|
|
840
840
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
841
|
-
message.id =
|
|
842
|
-
message.targetId =
|
|
841
|
+
message.id = 0;
|
|
842
|
+
message.targetId = 0;
|
|
843
843
|
message.job = "";
|
|
844
844
|
message.minimumGrade = 0;
|
|
845
845
|
message.access = 0;
|
|
@@ -852,14 +852,14 @@ class TemplateJobAccess$Type extends MessageType<TemplateJobAccess> {
|
|
|
852
852
|
while (reader.pos < end) {
|
|
853
853
|
let [fieldNo, wireType] = reader.tag();
|
|
854
854
|
switch (fieldNo) {
|
|
855
|
-
case /* uint64 id
|
|
856
|
-
message.id = reader.uint64().
|
|
855
|
+
case /* uint64 id */ 1:
|
|
856
|
+
message.id = reader.uint64().toNumber();
|
|
857
857
|
break;
|
|
858
858
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
859
859
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
860
860
|
break;
|
|
861
|
-
case /* uint64 target_id
|
|
862
|
-
message.targetId = reader.uint64().
|
|
861
|
+
case /* uint64 target_id */ 3:
|
|
862
|
+
message.targetId = reader.uint64().toNumber();
|
|
863
863
|
break;
|
|
864
864
|
case /* string job */ 4:
|
|
865
865
|
message.job = reader.string();
|
|
@@ -888,14 +888,14 @@ class TemplateJobAccess$Type extends MessageType<TemplateJobAccess> {
|
|
|
888
888
|
return message;
|
|
889
889
|
}
|
|
890
890
|
internalBinaryWrite(message: TemplateJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
891
|
-
/* uint64 id = 1
|
|
892
|
-
if (message.id !==
|
|
891
|
+
/* uint64 id = 1; */
|
|
892
|
+
if (message.id !== 0)
|
|
893
893
|
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
894
894
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
895
895
|
if (message.createdAt)
|
|
896
896
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
897
|
-
/* uint64 target_id = 3
|
|
898
|
-
if (message.targetId !==
|
|
897
|
+
/* uint64 target_id = 3; */
|
|
898
|
+
if (message.targetId !== 0)
|
|
899
899
|
writer.tag(3, WireType.Varint).uint64(message.targetId);
|
|
900
900
|
/* string job = 4; */
|
|
901
901
|
if (message.job !== "")
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "resources/internet/access.proto" (package "resources.internet", 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 { UserShort } from "../users/users";
|
|
14
|
+
import { Timestamp } from "../timestamp/timestamp";
|
|
15
|
+
/**
|
|
16
|
+
* @generated from protobuf message resources.internet.DomainAccess
|
|
17
|
+
*/
|
|
18
|
+
export interface DomainAccess {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf field: repeated resources.internet.DomainJobAccess jobs = 1;
|
|
21
|
+
*/
|
|
22
|
+
jobs: DomainJobAccess[]; // @gotags: alias:"job_access"
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: repeated resources.internet.DomainUserAccess users = 2;
|
|
25
|
+
*/
|
|
26
|
+
users: DomainUserAccess[]; // @gotags: alias:"user_access"
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf message resources.internet.DomainJobAccess
|
|
30
|
+
*/
|
|
31
|
+
export interface DomainJobAccess {
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: uint64 id = 1;
|
|
34
|
+
*/
|
|
35
|
+
id: number;
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
38
|
+
*/
|
|
39
|
+
createdAt?: Timestamp;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: uint64 target_id = 3;
|
|
42
|
+
*/
|
|
43
|
+
targetId: number; // @gotags: alias:"page_id"
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: string job = 4;
|
|
46
|
+
*/
|
|
47
|
+
job: string;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: optional string job_label = 5;
|
|
50
|
+
*/
|
|
51
|
+
jobLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: int32 minimum_grade = 6;
|
|
54
|
+
*/
|
|
55
|
+
minimumGrade: number;
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf field: optional string job_grade_label = 7;
|
|
58
|
+
*/
|
|
59
|
+
jobGradeLabel?: string;
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf field: resources.internet.AccessLevel access = 8;
|
|
62
|
+
*/
|
|
63
|
+
access: AccessLevel;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf message resources.internet.DomainUserAccess
|
|
67
|
+
*/
|
|
68
|
+
export interface DomainUserAccess {
|
|
69
|
+
/**
|
|
70
|
+
* @generated from protobuf field: uint64 id = 1;
|
|
71
|
+
*/
|
|
72
|
+
id: number;
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
75
|
+
*/
|
|
76
|
+
createdAt?: Timestamp;
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf field: uint64 target_id = 3;
|
|
79
|
+
*/
|
|
80
|
+
targetId: number; // @gotags: alias:"page_id"
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf field: int32 user_id = 4;
|
|
83
|
+
*/
|
|
84
|
+
userId: number;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from protobuf field: optional resources.users.UserShort user = 5;
|
|
87
|
+
*/
|
|
88
|
+
user?: UserShort;
|
|
89
|
+
/**
|
|
90
|
+
* @generated from protobuf field: resources.internet.AccessLevel access = 6;
|
|
91
|
+
*/
|
|
92
|
+
access: AccessLevel;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf enum resources.internet.AccessLevel
|
|
96
|
+
*/
|
|
97
|
+
export enum AccessLevel {
|
|
98
|
+
/**
|
|
99
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_UNSPECIFIED = 0;
|
|
100
|
+
*/
|
|
101
|
+
UNSPECIFIED = 0,
|
|
102
|
+
/**
|
|
103
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_BLOCKED = 1;
|
|
104
|
+
*/
|
|
105
|
+
BLOCKED = 1,
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 2;
|
|
108
|
+
*/
|
|
109
|
+
VIEW = 2,
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_EDIT = 3;
|
|
112
|
+
*/
|
|
113
|
+
EDIT = 3,
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_OWNER = 4;
|
|
116
|
+
*/
|
|
117
|
+
OWNER = 4
|
|
118
|
+
}
|
|
119
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
120
|
+
class DomainAccess$Type extends MessageType<DomainAccess> {
|
|
121
|
+
constructor() {
|
|
122
|
+
super("resources.internet.DomainAccess", [
|
|
123
|
+
{ no: 1, name: "jobs", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DomainJobAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } },
|
|
124
|
+
{ no: 2, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DomainUserAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } }
|
|
125
|
+
]);
|
|
126
|
+
}
|
|
127
|
+
create(value?: PartialMessage<DomainAccess>): DomainAccess {
|
|
128
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
129
|
+
message.jobs = [];
|
|
130
|
+
message.users = [];
|
|
131
|
+
if (value !== undefined)
|
|
132
|
+
reflectionMergePartial<DomainAccess>(this, message, value);
|
|
133
|
+
return message;
|
|
134
|
+
}
|
|
135
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DomainAccess): DomainAccess {
|
|
136
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
137
|
+
while (reader.pos < end) {
|
|
138
|
+
let [fieldNo, wireType] = reader.tag();
|
|
139
|
+
switch (fieldNo) {
|
|
140
|
+
case /* repeated resources.internet.DomainJobAccess jobs */ 1:
|
|
141
|
+
message.jobs.push(DomainJobAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
142
|
+
break;
|
|
143
|
+
case /* repeated resources.internet.DomainUserAccess users */ 2:
|
|
144
|
+
message.users.push(DomainUserAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
145
|
+
break;
|
|
146
|
+
default:
|
|
147
|
+
let u = options.readUnknownField;
|
|
148
|
+
if (u === "throw")
|
|
149
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
150
|
+
let d = reader.skip(wireType);
|
|
151
|
+
if (u !== false)
|
|
152
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return message;
|
|
156
|
+
}
|
|
157
|
+
internalBinaryWrite(message: DomainAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
158
|
+
/* repeated resources.internet.DomainJobAccess jobs = 1; */
|
|
159
|
+
for (let i = 0; i < message.jobs.length; i++)
|
|
160
|
+
DomainJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
161
|
+
/* repeated resources.internet.DomainUserAccess users = 2; */
|
|
162
|
+
for (let i = 0; i < message.users.length; i++)
|
|
163
|
+
DomainUserAccess.internalBinaryWrite(message.users[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
164
|
+
let u = options.writeUnknownFields;
|
|
165
|
+
if (u !== false)
|
|
166
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
167
|
+
return writer;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @generated MessageType for protobuf message resources.internet.DomainAccess
|
|
172
|
+
*/
|
|
173
|
+
export const DomainAccess = new DomainAccess$Type();
|
|
174
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
175
|
+
class DomainJobAccess$Type extends MessageType<DomainJobAccess> {
|
|
176
|
+
constructor() {
|
|
177
|
+
super("resources.internet.DomainJobAccess", [
|
|
178
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
179
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
180
|
+
{ no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
181
|
+
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
|
|
182
|
+
{ no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
|
|
183
|
+
{ no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
|
|
184
|
+
{ no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
|
|
185
|
+
{ no: 8, name: "access", kind: "enum", T: () => ["resources.internet.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } }
|
|
186
|
+
]);
|
|
187
|
+
}
|
|
188
|
+
create(value?: PartialMessage<DomainJobAccess>): DomainJobAccess {
|
|
189
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
190
|
+
message.id = 0;
|
|
191
|
+
message.targetId = 0;
|
|
192
|
+
message.job = "";
|
|
193
|
+
message.minimumGrade = 0;
|
|
194
|
+
message.access = 0;
|
|
195
|
+
if (value !== undefined)
|
|
196
|
+
reflectionMergePartial<DomainJobAccess>(this, message, value);
|
|
197
|
+
return message;
|
|
198
|
+
}
|
|
199
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DomainJobAccess): DomainJobAccess {
|
|
200
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
201
|
+
while (reader.pos < end) {
|
|
202
|
+
let [fieldNo, wireType] = reader.tag();
|
|
203
|
+
switch (fieldNo) {
|
|
204
|
+
case /* uint64 id */ 1:
|
|
205
|
+
message.id = reader.uint64().toNumber();
|
|
206
|
+
break;
|
|
207
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
208
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
209
|
+
break;
|
|
210
|
+
case /* uint64 target_id */ 3:
|
|
211
|
+
message.targetId = reader.uint64().toNumber();
|
|
212
|
+
break;
|
|
213
|
+
case /* string job */ 4:
|
|
214
|
+
message.job = reader.string();
|
|
215
|
+
break;
|
|
216
|
+
case /* optional string job_label */ 5:
|
|
217
|
+
message.jobLabel = reader.string();
|
|
218
|
+
break;
|
|
219
|
+
case /* int32 minimum_grade */ 6:
|
|
220
|
+
message.minimumGrade = reader.int32();
|
|
221
|
+
break;
|
|
222
|
+
case /* optional string job_grade_label */ 7:
|
|
223
|
+
message.jobGradeLabel = reader.string();
|
|
224
|
+
break;
|
|
225
|
+
case /* resources.internet.AccessLevel access */ 8:
|
|
226
|
+
message.access = reader.int32();
|
|
227
|
+
break;
|
|
228
|
+
default:
|
|
229
|
+
let u = options.readUnknownField;
|
|
230
|
+
if (u === "throw")
|
|
231
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
232
|
+
let d = reader.skip(wireType);
|
|
233
|
+
if (u !== false)
|
|
234
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return message;
|
|
238
|
+
}
|
|
239
|
+
internalBinaryWrite(message: DomainJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
240
|
+
/* uint64 id = 1; */
|
|
241
|
+
if (message.id !== 0)
|
|
242
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
243
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
244
|
+
if (message.createdAt)
|
|
245
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
246
|
+
/* uint64 target_id = 3; */
|
|
247
|
+
if (message.targetId !== 0)
|
|
248
|
+
writer.tag(3, WireType.Varint).uint64(message.targetId);
|
|
249
|
+
/* string job = 4; */
|
|
250
|
+
if (message.job !== "")
|
|
251
|
+
writer.tag(4, WireType.LengthDelimited).string(message.job);
|
|
252
|
+
/* optional string job_label = 5; */
|
|
253
|
+
if (message.jobLabel !== undefined)
|
|
254
|
+
writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
|
|
255
|
+
/* int32 minimum_grade = 6; */
|
|
256
|
+
if (message.minimumGrade !== 0)
|
|
257
|
+
writer.tag(6, WireType.Varint).int32(message.minimumGrade);
|
|
258
|
+
/* optional string job_grade_label = 7; */
|
|
259
|
+
if (message.jobGradeLabel !== undefined)
|
|
260
|
+
writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
|
|
261
|
+
/* resources.internet.AccessLevel access = 8; */
|
|
262
|
+
if (message.access !== 0)
|
|
263
|
+
writer.tag(8, WireType.Varint).int32(message.access);
|
|
264
|
+
let u = options.writeUnknownFields;
|
|
265
|
+
if (u !== false)
|
|
266
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
267
|
+
return writer;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* @generated MessageType for protobuf message resources.internet.DomainJobAccess
|
|
272
|
+
*/
|
|
273
|
+
export const DomainJobAccess = new DomainJobAccess$Type();
|
|
274
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
275
|
+
class DomainUserAccess$Type extends MessageType<DomainUserAccess> {
|
|
276
|
+
constructor() {
|
|
277
|
+
super("resources.internet.DomainUserAccess", [
|
|
278
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
279
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
280
|
+
{ no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
281
|
+
{ no: 4, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
282
|
+
{ no: 5, name: "user", kind: "message", T: () => UserShort },
|
|
283
|
+
{ no: 6, name: "access", kind: "enum", T: () => ["resources.internet.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } }
|
|
284
|
+
]);
|
|
285
|
+
}
|
|
286
|
+
create(value?: PartialMessage<DomainUserAccess>): DomainUserAccess {
|
|
287
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
288
|
+
message.id = 0;
|
|
289
|
+
message.targetId = 0;
|
|
290
|
+
message.userId = 0;
|
|
291
|
+
message.access = 0;
|
|
292
|
+
if (value !== undefined)
|
|
293
|
+
reflectionMergePartial<DomainUserAccess>(this, message, value);
|
|
294
|
+
return message;
|
|
295
|
+
}
|
|
296
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DomainUserAccess): DomainUserAccess {
|
|
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 /* uint64 id */ 1:
|
|
302
|
+
message.id = reader.uint64().toNumber();
|
|
303
|
+
break;
|
|
304
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
305
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
306
|
+
break;
|
|
307
|
+
case /* uint64 target_id */ 3:
|
|
308
|
+
message.targetId = reader.uint64().toNumber();
|
|
309
|
+
break;
|
|
310
|
+
case /* int32 user_id */ 4:
|
|
311
|
+
message.userId = reader.int32();
|
|
312
|
+
break;
|
|
313
|
+
case /* optional resources.users.UserShort user */ 5:
|
|
314
|
+
message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
315
|
+
break;
|
|
316
|
+
case /* resources.internet.AccessLevel access */ 6:
|
|
317
|
+
message.access = reader.int32();
|
|
318
|
+
break;
|
|
319
|
+
default:
|
|
320
|
+
let u = options.readUnknownField;
|
|
321
|
+
if (u === "throw")
|
|
322
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
323
|
+
let d = reader.skip(wireType);
|
|
324
|
+
if (u !== false)
|
|
325
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return message;
|
|
329
|
+
}
|
|
330
|
+
internalBinaryWrite(message: DomainUserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
331
|
+
/* uint64 id = 1; */
|
|
332
|
+
if (message.id !== 0)
|
|
333
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
334
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
335
|
+
if (message.createdAt)
|
|
336
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
337
|
+
/* uint64 target_id = 3; */
|
|
338
|
+
if (message.targetId !== 0)
|
|
339
|
+
writer.tag(3, WireType.Varint).uint64(message.targetId);
|
|
340
|
+
/* int32 user_id = 4; */
|
|
341
|
+
if (message.userId !== 0)
|
|
342
|
+
writer.tag(4, WireType.Varint).int32(message.userId);
|
|
343
|
+
/* optional resources.users.UserShort user = 5; */
|
|
344
|
+
if (message.user)
|
|
345
|
+
UserShort.internalBinaryWrite(message.user, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
346
|
+
/* resources.internet.AccessLevel access = 6; */
|
|
347
|
+
if (message.access !== 0)
|
|
348
|
+
writer.tag(6, WireType.Varint).int32(message.access);
|
|
349
|
+
let u = options.writeUnknownFields;
|
|
350
|
+
if (u !== false)
|
|
351
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
352
|
+
return writer;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @generated MessageType for protobuf message resources.internet.DomainUserAccess
|
|
357
|
+
*/
|
|
358
|
+
export const DomainUserAccess = new DomainUserAccess$Type();
|
|
@@ -17,9 +17,9 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
17
17
|
*/
|
|
18
18
|
export interface Ad {
|
|
19
19
|
/**
|
|
20
|
-
* @generated from protobuf field: uint64 id = 1
|
|
20
|
+
* @generated from protobuf field: uint64 id = 1;
|
|
21
21
|
*/
|
|
22
|
-
id:
|
|
22
|
+
id: number; // @gotags: sql:"primary_key" alias:"id"
|
|
23
23
|
/**
|
|
24
24
|
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
|
|
25
25
|
*/
|
|
@@ -110,7 +110,7 @@ export enum AdType {
|
|
|
110
110
|
class Ad$Type extends MessageType<Ad> {
|
|
111
111
|
constructor() {
|
|
112
112
|
super("resources.internet.Ad", [
|
|
113
|
-
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
113
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
114
114
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
115
115
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
116
116
|
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
@@ -129,7 +129,7 @@ class Ad$Type extends MessageType<Ad> {
|
|
|
129
129
|
}
|
|
130
130
|
create(value?: PartialMessage<Ad>): Ad {
|
|
131
131
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
132
|
-
message.id =
|
|
132
|
+
message.id = 0;
|
|
133
133
|
message.disabled = false;
|
|
134
134
|
message.adType = 0;
|
|
135
135
|
message.title = "";
|
|
@@ -143,8 +143,8 @@ class Ad$Type extends MessageType<Ad> {
|
|
|
143
143
|
while (reader.pos < end) {
|
|
144
144
|
let [fieldNo, wireType] = reader.tag();
|
|
145
145
|
switch (fieldNo) {
|
|
146
|
-
case /* uint64 id
|
|
147
|
-
message.id = reader.uint64().
|
|
146
|
+
case /* uint64 id */ 1:
|
|
147
|
+
message.id = reader.uint64().toNumber();
|
|
148
148
|
break;
|
|
149
149
|
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
150
150
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -200,8 +200,8 @@ class Ad$Type extends MessageType<Ad> {
|
|
|
200
200
|
return message;
|
|
201
201
|
}
|
|
202
202
|
internalBinaryWrite(message: Ad, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
203
|
-
/* uint64 id = 1
|
|
204
|
-
if (message.id !==
|
|
203
|
+
/* uint64 id = 1; */
|
|
204
|
+
if (message.id !== 0)
|
|
205
205
|
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
206
206
|
/* resources.timestamp.Timestamp created_at = 2; */
|
|
207
207
|
if (message.createdAt)
|