@fivenet-app/gen 0.9.3-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +1 -0
  2. package/google/protobuf/any.ts +322 -0
  3. package/google/protobuf/descriptor.ts +3475 -0
  4. package/google/protobuf/duration.ts +231 -0
  5. package/google/protobuf/timestamp.ts +290 -0
  6. package/package.json +15 -0
  7. package/perms.ts +178 -0
  8. package/resources/accounts/accounts.ts +195 -0
  9. package/resources/accounts/oauth2.ts +230 -0
  10. package/resources/calendar/access.ts +362 -0
  11. package/resources/calendar/calendar.ts +955 -0
  12. package/resources/centrum/access.ts +380 -0
  13. package/resources/centrum/dispatches.ts +854 -0
  14. package/resources/centrum/general.ts +231 -0
  15. package/resources/centrum/settings.ts +303 -0
  16. package/resources/centrum/units.ts +620 -0
  17. package/resources/common/access/dummy.ts +309 -0
  18. package/resources/common/content/content.ts +252 -0
  19. package/resources/common/cron/cron.ts +536 -0
  20. package/resources/common/database/database.ts +306 -0
  21. package/resources/common/error.ts +79 -0
  22. package/resources/common/grpcws/grpcws.ts +615 -0
  23. package/resources/common/i18n.ts +102 -0
  24. package/resources/common/uuid.ts +68 -0
  25. package/resources/documents/access.ts +388 -0
  26. package/resources/documents/activity.ts +803 -0
  27. package/resources/documents/category.ts +132 -0
  28. package/resources/documents/comment.ts +161 -0
  29. package/resources/documents/documents.ts +1124 -0
  30. package/resources/documents/requests.ts +196 -0
  31. package/resources/documents/templates.ts +949 -0
  32. package/resources/documents/workflow.ts +349 -0
  33. package/resources/filestore/file.ts +204 -0
  34. package/resources/internet/ads.ts +257 -0
  35. package/resources/internet/domain.ts +136 -0
  36. package/resources/internet/internet.ts +344 -0
  37. package/resources/internet/page.ts +236 -0
  38. package/resources/internet/search.ts +104 -0
  39. package/resources/jobs/activity.ts +600 -0
  40. package/resources/jobs/colleagues.ts +346 -0
  41. package/resources/jobs/conduct.ts +220 -0
  42. package/resources/jobs/labels.ts +240 -0
  43. package/resources/jobs/timeclock.ts +372 -0
  44. package/resources/laws/laws.ts +293 -0
  45. package/resources/livemap/livemap.ts +728 -0
  46. package/resources/livemap/tracker.ts +81 -0
  47. package/resources/mailer/access.ts +485 -0
  48. package/resources/mailer/email.ts +222 -0
  49. package/resources/mailer/events.ts +196 -0
  50. package/resources/mailer/message.ts +285 -0
  51. package/resources/mailer/settings.ts +95 -0
  52. package/resources/mailer/template.ts +164 -0
  53. package/resources/mailer/thread.ts +422 -0
  54. package/resources/mailer/user.ts +93 -0
  55. package/resources/notifications/events.ts +287 -0
  56. package/resources/notifications/notifications.ts +444 -0
  57. package/resources/permissions/permissions.ts +829 -0
  58. package/resources/qualifications/access.ts +275 -0
  59. package/resources/qualifications/exam.ts +1421 -0
  60. package/resources/qualifications/qualifications.ts +1289 -0
  61. package/resources/rector/audit.ts +226 -0
  62. package/resources/rector/config.ts +922 -0
  63. package/resources/stats/stats.ts +67 -0
  64. package/resources/sync/activity.ts +356 -0
  65. package/resources/sync/data.ts +455 -0
  66. package/resources/timestamp/timestamp.ts +78 -0
  67. package/resources/users/activity.ts +211 -0
  68. package/resources/users/job_props.ts +992 -0
  69. package/resources/users/jobs.ts +171 -0
  70. package/resources/users/labels.ts +161 -0
  71. package/resources/users/props.ts +207 -0
  72. package/resources/users/users.ts +570 -0
  73. package/resources/vehicles/vehicles.ts +114 -0
  74. package/resources/wiki/access.ts +362 -0
  75. package/resources/wiki/activity.ts +591 -0
  76. package/resources/wiki/page.ts +548 -0
  77. package/services/auth/auth.client.ts +171 -0
  78. package/services/auth/auth.ts +1331 -0
  79. package/services/calendar/calendar.client.ts +262 -0
  80. package/services/calendar/calendar.ts +1733 -0
  81. package/services/centrum/centrum.client.ts +365 -0
  82. package/services/centrum/centrum.ts +2619 -0
  83. package/services/citizenstore/citizenstore.client.ts +126 -0
  84. package/services/citizenstore/citizenstore.ts +847 -0
  85. package/services/completor/completor.client.ts +109 -0
  86. package/services/completor/completor.ts +616 -0
  87. package/services/dmv/vehicles.client.ts +41 -0
  88. package/services/dmv/vehicles.ts +191 -0
  89. package/services/docstore/docstore.client.ts +653 -0
  90. package/services/docstore/docstore.ts +4571 -0
  91. package/services/internet/ads.client.ts +41 -0
  92. package/services/internet/ads.ts +145 -0
  93. package/services/internet/internet.client.ts +58 -0
  94. package/services/internet/internet.ts +257 -0
  95. package/services/jobs/conduct.client.ts +92 -0
  96. package/services/jobs/conduct.ts +541 -0
  97. package/services/jobs/jobs.client.ts +194 -0
  98. package/services/jobs/jobs.ts +1301 -0
  99. package/services/jobs/timeclock.client.ts +75 -0
  100. package/services/jobs/timeclock.ts +808 -0
  101. package/services/livemapper/livemap.client.ts +76 -0
  102. package/services/livemapper/livemap.ts +552 -0
  103. package/services/mailer/mailer.client.ts +381 -0
  104. package/services/mailer/mailer.ts +2590 -0
  105. package/services/notificator/notificator.client.ts +76 -0
  106. package/services/notificator/notificator.ts +510 -0
  107. package/services/qualifications/qualifications.client.ts +279 -0
  108. package/services/qualifications/qualifications.ts +2142 -0
  109. package/services/rector/config.client.ts +58 -0
  110. package/services/rector/config.ts +216 -0
  111. package/services/rector/filestore.client.ts +75 -0
  112. package/services/rector/filestore.ts +378 -0
  113. package/services/rector/laws.client.ts +92 -0
  114. package/services/rector/laws.ts +416 -0
  115. package/services/rector/rector.client.ts +211 -0
  116. package/services/rector/rector.ts +1540 -0
  117. package/services/stats/stats.client.ts +37 -0
  118. package/services/stats/stats.ts +128 -0
  119. package/services/sync/sync.client.ts +110 -0
  120. package/services/sync/sync.ts +831 -0
  121. package/services/wiki/wiki.client.ts +126 -0
  122. package/services/wiki/wiki.ts +749 -0
  123. package/svcs.ts +307 -0
@@ -0,0 +1,102 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/common/i18n.proto" (package "resources.common", syntax proto3)
3
+ // @ts-nocheck
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MessageType } from "@protobuf-ts/runtime";
13
+ /**
14
+ * @generated from protobuf message resources.common.TranslateItem
15
+ */
16
+ export interface TranslateItem {
17
+ /**
18
+ * @sanitize: method=StripTags
19
+ *
20
+ * @generated from protobuf field: string key = 1;
21
+ */
22
+ key: string;
23
+ /**
24
+ * @sanitize: method=StripTags
25
+ *
26
+ * @generated from protobuf field: map<string, string> parameters = 2;
27
+ */
28
+ parameters: {
29
+ [key: string]: string;
30
+ };
31
+ }
32
+ // @generated message type with reflection information, may provide speed optimized methods
33
+ class TranslateItem$Type extends MessageType<TranslateItem> {
34
+ constructor() {
35
+ super("resources.common.TranslateItem", [
36
+ { no: 1, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
37
+ { no: 2, name: "parameters", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
38
+ ]);
39
+ }
40
+ create(value?: PartialMessage<TranslateItem>): TranslateItem {
41
+ const message = globalThis.Object.create((this.messagePrototype!));
42
+ message.key = "";
43
+ message.parameters = {};
44
+ if (value !== undefined)
45
+ reflectionMergePartial<TranslateItem>(this, message, value);
46
+ return message;
47
+ }
48
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TranslateItem): TranslateItem {
49
+ let message = target ?? this.create(), end = reader.pos + length;
50
+ while (reader.pos < end) {
51
+ let [fieldNo, wireType] = reader.tag();
52
+ switch (fieldNo) {
53
+ case /* string key */ 1:
54
+ message.key = reader.string();
55
+ break;
56
+ case /* map<string, string> parameters */ 2:
57
+ this.binaryReadMap2(message.parameters, reader, options);
58
+ break;
59
+ default:
60
+ let u = options.readUnknownField;
61
+ if (u === "throw")
62
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
63
+ let d = reader.skip(wireType);
64
+ if (u !== false)
65
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
66
+ }
67
+ }
68
+ return message;
69
+ }
70
+ private binaryReadMap2(map: TranslateItem["parameters"], reader: IBinaryReader, options: BinaryReadOptions): void {
71
+ let len = reader.uint32(), end = reader.pos + len, key: keyof TranslateItem["parameters"] | undefined, val: TranslateItem["parameters"][any] | undefined;
72
+ while (reader.pos < end) {
73
+ let [fieldNo, wireType] = reader.tag();
74
+ switch (fieldNo) {
75
+ case 1:
76
+ key = reader.string();
77
+ break;
78
+ case 2:
79
+ val = reader.string();
80
+ break;
81
+ default: throw new globalThis.Error("unknown map entry field for field resources.common.TranslateItem.parameters");
82
+ }
83
+ }
84
+ map[key ?? ""] = val ?? "";
85
+ }
86
+ internalBinaryWrite(message: TranslateItem, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
87
+ /* string key = 1; */
88
+ if (message.key !== "")
89
+ writer.tag(1, WireType.LengthDelimited).string(message.key);
90
+ /* map<string, string> parameters = 2; */
91
+ for (let k of globalThis.Object.keys(message.parameters))
92
+ writer.tag(2, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.parameters[k]).join();
93
+ let u = options.writeUnknownFields;
94
+ if (u !== false)
95
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
96
+ return writer;
97
+ }
98
+ }
99
+ /**
100
+ * @generated MessageType for protobuf message resources.common.TranslateItem
101
+ */
102
+ export const TranslateItem = new TranslateItem$Type();
@@ -0,0 +1,68 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/common/uuid.proto" (package "resources.common", syntax proto3)
3
+ // @ts-nocheck
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MessageType } from "@protobuf-ts/runtime";
13
+ /**
14
+ * @generated from protobuf message resources.common.UUID
15
+ */
16
+ export interface UUID {
17
+ /**
18
+ * @generated from protobuf field: string uuid = 1;
19
+ */
20
+ uuid: string;
21
+ }
22
+ // @generated message type with reflection information, may provide speed optimized methods
23
+ class UUID$Type extends MessageType<UUID> {
24
+ constructor() {
25
+ super("resources.common.UUID", [
26
+ { no: 1, name: "uuid", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { uuid: true } } } }
27
+ ]);
28
+ }
29
+ create(value?: PartialMessage<UUID>): UUID {
30
+ const message = globalThis.Object.create((this.messagePrototype!));
31
+ message.uuid = "";
32
+ if (value !== undefined)
33
+ reflectionMergePartial<UUID>(this, message, value);
34
+ return message;
35
+ }
36
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UUID): UUID {
37
+ let message = target ?? this.create(), end = reader.pos + length;
38
+ while (reader.pos < end) {
39
+ let [fieldNo, wireType] = reader.tag();
40
+ switch (fieldNo) {
41
+ case /* string uuid */ 1:
42
+ message.uuid = reader.string();
43
+ break;
44
+ default:
45
+ let u = options.readUnknownField;
46
+ if (u === "throw")
47
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
48
+ let d = reader.skip(wireType);
49
+ if (u !== false)
50
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
51
+ }
52
+ }
53
+ return message;
54
+ }
55
+ internalBinaryWrite(message: UUID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
56
+ /* string uuid = 1; */
57
+ if (message.uuid !== "")
58
+ writer.tag(1, WireType.LengthDelimited).string(message.uuid);
59
+ let u = options.writeUnknownFields;
60
+ if (u !== false)
61
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
62
+ return writer;
63
+ }
64
+ }
65
+ /**
66
+ * @generated MessageType for protobuf message resources.common.UUID
67
+ */
68
+ export const UUID = new UUID$Type();
@@ -0,0 +1,388 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/documents/access.proto" (package "resources.documents", 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.documents.DocumentAccess
17
+ */
18
+ export interface DocumentAccess {
19
+ /**
20
+ * @generated from protobuf field: repeated resources.documents.DocumentJobAccess jobs = 1;
21
+ */
22
+ jobs: DocumentJobAccess[]; // @gotags: alias:"job_access"
23
+ /**
24
+ * @generated from protobuf field: repeated resources.documents.DocumentUserAccess users = 2;
25
+ */
26
+ users: DocumentUserAccess[]; // @gotags: alias:"user_access"
27
+ }
28
+ /**
29
+ * @generated from protobuf message resources.documents.DocumentJobAccess
30
+ */
31
+ export interface DocumentJobAccess {
32
+ /**
33
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
34
+ */
35
+ id: string;
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 [jstype = JS_STRING];
42
+ */
43
+ targetId: string; // @gotags: alias:"document_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.documents.AccessLevel access = 8;
62
+ */
63
+ access: AccessLevel;
64
+ /**
65
+ * @generated from protobuf field: optional bool required = 9;
66
+ */
67
+ required?: boolean; // @gotags: alias:"required"
68
+ }
69
+ /**
70
+ * @generated from protobuf message resources.documents.DocumentUserAccess
71
+ */
72
+ export interface DocumentUserAccess {
73
+ /**
74
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
75
+ */
76
+ id: string;
77
+ /**
78
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
79
+ */
80
+ createdAt?: Timestamp;
81
+ /**
82
+ * @generated from protobuf field: uint64 target_id = 3 [jstype = JS_STRING];
83
+ */
84
+ targetId: string; // @gotags: alias:"document_id"
85
+ /**
86
+ * @generated from protobuf field: int32 user_id = 4;
87
+ */
88
+ userId: number;
89
+ /**
90
+ * @generated from protobuf field: optional resources.users.UserShort user = 5;
91
+ */
92
+ user?: UserShort;
93
+ /**
94
+ * @generated from protobuf field: resources.documents.AccessLevel access = 6;
95
+ */
96
+ access: AccessLevel;
97
+ /**
98
+ * @generated from protobuf field: optional bool required = 7;
99
+ */
100
+ required?: boolean; // @gotags: alias:"required"
101
+ }
102
+ /**
103
+ * @generated from protobuf enum resources.documents.AccessLevel
104
+ */
105
+ export enum AccessLevel {
106
+ /**
107
+ * @generated from protobuf enum value: ACCESS_LEVEL_UNSPECIFIED = 0;
108
+ */
109
+ UNSPECIFIED = 0,
110
+ /**
111
+ * @generated from protobuf enum value: ACCESS_LEVEL_BLOCKED = 1;
112
+ */
113
+ BLOCKED = 1,
114
+ /**
115
+ * @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 2;
116
+ */
117
+ VIEW = 2,
118
+ /**
119
+ * @generated from protobuf enum value: ACCESS_LEVEL_COMMENT = 3;
120
+ */
121
+ COMMENT = 3,
122
+ /**
123
+ * @generated from protobuf enum value: ACCESS_LEVEL_STATUS = 4;
124
+ */
125
+ STATUS = 4,
126
+ /**
127
+ * @generated from protobuf enum value: ACCESS_LEVEL_ACCESS = 5;
128
+ */
129
+ ACCESS = 5,
130
+ /**
131
+ * @generated from protobuf enum value: ACCESS_LEVEL_EDIT = 6;
132
+ */
133
+ EDIT = 6
134
+ }
135
+ // @generated message type with reflection information, may provide speed optimized methods
136
+ class DocumentAccess$Type extends MessageType<DocumentAccess> {
137
+ constructor() {
138
+ super("resources.documents.DocumentAccess", [
139
+ { no: 1, name: "jobs", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentJobAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } },
140
+ { no: 2, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentUserAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } }
141
+ ]);
142
+ }
143
+ create(value?: PartialMessage<DocumentAccess>): DocumentAccess {
144
+ const message = globalThis.Object.create((this.messagePrototype!));
145
+ message.jobs = [];
146
+ message.users = [];
147
+ if (value !== undefined)
148
+ reflectionMergePartial<DocumentAccess>(this, message, value);
149
+ return message;
150
+ }
151
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentAccess): DocumentAccess {
152
+ let message = target ?? this.create(), end = reader.pos + length;
153
+ while (reader.pos < end) {
154
+ let [fieldNo, wireType] = reader.tag();
155
+ switch (fieldNo) {
156
+ case /* repeated resources.documents.DocumentJobAccess jobs */ 1:
157
+ message.jobs.push(DocumentJobAccess.internalBinaryRead(reader, reader.uint32(), options));
158
+ break;
159
+ case /* repeated resources.documents.DocumentUserAccess users */ 2:
160
+ message.users.push(DocumentUserAccess.internalBinaryRead(reader, reader.uint32(), options));
161
+ break;
162
+ default:
163
+ let u = options.readUnknownField;
164
+ if (u === "throw")
165
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
166
+ let d = reader.skip(wireType);
167
+ if (u !== false)
168
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
169
+ }
170
+ }
171
+ return message;
172
+ }
173
+ internalBinaryWrite(message: DocumentAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
174
+ /* repeated resources.documents.DocumentJobAccess jobs = 1; */
175
+ for (let i = 0; i < message.jobs.length; i++)
176
+ DocumentJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
177
+ /* repeated resources.documents.DocumentUserAccess users = 2; */
178
+ for (let i = 0; i < message.users.length; i++)
179
+ DocumentUserAccess.internalBinaryWrite(message.users[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
180
+ let u = options.writeUnknownFields;
181
+ if (u !== false)
182
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
183
+ return writer;
184
+ }
185
+ }
186
+ /**
187
+ * @generated MessageType for protobuf message resources.documents.DocumentAccess
188
+ */
189
+ export const DocumentAccess = new DocumentAccess$Type();
190
+ // @generated message type with reflection information, may provide speed optimized methods
191
+ class DocumentJobAccess$Type extends MessageType<DocumentJobAccess> {
192
+ constructor() {
193
+ super("resources.documents.DocumentJobAccess", [
194
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
195
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
196
+ { no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
197
+ { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
198
+ { no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
199
+ { no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
200
+ { no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
201
+ { no: 8, name: "access", kind: "enum", T: () => ["resources.documents.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
202
+ { no: 9, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
203
+ ]);
204
+ }
205
+ create(value?: PartialMessage<DocumentJobAccess>): DocumentJobAccess {
206
+ const message = globalThis.Object.create((this.messagePrototype!));
207
+ message.id = "0";
208
+ message.targetId = "0";
209
+ message.job = "";
210
+ message.minimumGrade = 0;
211
+ message.access = 0;
212
+ if (value !== undefined)
213
+ reflectionMergePartial<DocumentJobAccess>(this, message, value);
214
+ return message;
215
+ }
216
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentJobAccess): DocumentJobAccess {
217
+ let message = target ?? this.create(), end = reader.pos + length;
218
+ while (reader.pos < end) {
219
+ let [fieldNo, wireType] = reader.tag();
220
+ switch (fieldNo) {
221
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
222
+ message.id = reader.uint64().toString();
223
+ break;
224
+ case /* optional resources.timestamp.Timestamp created_at */ 2:
225
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
226
+ break;
227
+ case /* uint64 target_id = 3 [jstype = JS_STRING];*/ 3:
228
+ message.targetId = reader.uint64().toString();
229
+ break;
230
+ case /* string job */ 4:
231
+ message.job = reader.string();
232
+ break;
233
+ case /* optional string job_label */ 5:
234
+ message.jobLabel = reader.string();
235
+ break;
236
+ case /* int32 minimum_grade */ 6:
237
+ message.minimumGrade = reader.int32();
238
+ break;
239
+ case /* optional string job_grade_label */ 7:
240
+ message.jobGradeLabel = reader.string();
241
+ break;
242
+ case /* resources.documents.AccessLevel access */ 8:
243
+ message.access = reader.int32();
244
+ break;
245
+ case /* optional bool required */ 9:
246
+ message.required = reader.bool();
247
+ break;
248
+ default:
249
+ let u = options.readUnknownField;
250
+ if (u === "throw")
251
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
252
+ let d = reader.skip(wireType);
253
+ if (u !== false)
254
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
255
+ }
256
+ }
257
+ return message;
258
+ }
259
+ internalBinaryWrite(message: DocumentJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
260
+ /* uint64 id = 1 [jstype = JS_STRING]; */
261
+ if (message.id !== "0")
262
+ writer.tag(1, WireType.Varint).uint64(message.id);
263
+ /* optional resources.timestamp.Timestamp created_at = 2; */
264
+ if (message.createdAt)
265
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
266
+ /* uint64 target_id = 3 [jstype = JS_STRING]; */
267
+ if (message.targetId !== "0")
268
+ writer.tag(3, WireType.Varint).uint64(message.targetId);
269
+ /* string job = 4; */
270
+ if (message.job !== "")
271
+ writer.tag(4, WireType.LengthDelimited).string(message.job);
272
+ /* optional string job_label = 5; */
273
+ if (message.jobLabel !== undefined)
274
+ writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
275
+ /* int32 minimum_grade = 6; */
276
+ if (message.minimumGrade !== 0)
277
+ writer.tag(6, WireType.Varint).int32(message.minimumGrade);
278
+ /* optional string job_grade_label = 7; */
279
+ if (message.jobGradeLabel !== undefined)
280
+ writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
281
+ /* resources.documents.AccessLevel access = 8; */
282
+ if (message.access !== 0)
283
+ writer.tag(8, WireType.Varint).int32(message.access);
284
+ /* optional bool required = 9; */
285
+ if (message.required !== undefined)
286
+ writer.tag(9, WireType.Varint).bool(message.required);
287
+ let u = options.writeUnknownFields;
288
+ if (u !== false)
289
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
290
+ return writer;
291
+ }
292
+ }
293
+ /**
294
+ * @generated MessageType for protobuf message resources.documents.DocumentJobAccess
295
+ */
296
+ export const DocumentJobAccess = new DocumentJobAccess$Type();
297
+ // @generated message type with reflection information, may provide speed optimized methods
298
+ class DocumentUserAccess$Type extends MessageType<DocumentUserAccess> {
299
+ constructor() {
300
+ super("resources.documents.DocumentUserAccess", [
301
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
302
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
303
+ { no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
304
+ { no: 4, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
305
+ { no: 5, name: "user", kind: "message", T: () => UserShort },
306
+ { no: 6, name: "access", kind: "enum", T: () => ["resources.documents.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
307
+ { no: 7, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
308
+ ]);
309
+ }
310
+ create(value?: PartialMessage<DocumentUserAccess>): DocumentUserAccess {
311
+ const message = globalThis.Object.create((this.messagePrototype!));
312
+ message.id = "0";
313
+ message.targetId = "0";
314
+ message.userId = 0;
315
+ message.access = 0;
316
+ if (value !== undefined)
317
+ reflectionMergePartial<DocumentUserAccess>(this, message, value);
318
+ return message;
319
+ }
320
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentUserAccess): DocumentUserAccess {
321
+ let message = target ?? this.create(), end = reader.pos + length;
322
+ while (reader.pos < end) {
323
+ let [fieldNo, wireType] = reader.tag();
324
+ switch (fieldNo) {
325
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
326
+ message.id = reader.uint64().toString();
327
+ break;
328
+ case /* optional resources.timestamp.Timestamp created_at */ 2:
329
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
330
+ break;
331
+ case /* uint64 target_id = 3 [jstype = JS_STRING];*/ 3:
332
+ message.targetId = reader.uint64().toString();
333
+ break;
334
+ case /* int32 user_id */ 4:
335
+ message.userId = reader.int32();
336
+ break;
337
+ case /* optional resources.users.UserShort user */ 5:
338
+ message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
339
+ break;
340
+ case /* resources.documents.AccessLevel access */ 6:
341
+ message.access = reader.int32();
342
+ break;
343
+ case /* optional bool required */ 7:
344
+ message.required = reader.bool();
345
+ break;
346
+ default:
347
+ let u = options.readUnknownField;
348
+ if (u === "throw")
349
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
350
+ let d = reader.skip(wireType);
351
+ if (u !== false)
352
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
353
+ }
354
+ }
355
+ return message;
356
+ }
357
+ internalBinaryWrite(message: DocumentUserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
358
+ /* uint64 id = 1 [jstype = JS_STRING]; */
359
+ if (message.id !== "0")
360
+ writer.tag(1, WireType.Varint).uint64(message.id);
361
+ /* optional resources.timestamp.Timestamp created_at = 2; */
362
+ if (message.createdAt)
363
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
364
+ /* uint64 target_id = 3 [jstype = JS_STRING]; */
365
+ if (message.targetId !== "0")
366
+ writer.tag(3, WireType.Varint).uint64(message.targetId);
367
+ /* int32 user_id = 4; */
368
+ if (message.userId !== 0)
369
+ writer.tag(4, WireType.Varint).int32(message.userId);
370
+ /* optional resources.users.UserShort user = 5; */
371
+ if (message.user)
372
+ UserShort.internalBinaryWrite(message.user, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
373
+ /* resources.documents.AccessLevel access = 6; */
374
+ if (message.access !== 0)
375
+ writer.tag(6, WireType.Varint).int32(message.access);
376
+ /* optional bool required = 7; */
377
+ if (message.required !== undefined)
378
+ writer.tag(7, WireType.Varint).bool(message.required);
379
+ let u = options.writeUnknownFields;
380
+ if (u !== false)
381
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
382
+ return writer;
383
+ }
384
+ }
385
+ /**
386
+ * @generated MessageType for protobuf message resources.documents.DocumentUserAccess
387
+ */
388
+ export const DocumentUserAccess = new DocumentUserAccess$Type();