@fivenet-app/gen 2026.7.2 → 2026.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fivenet-app/gen",
3
3
  "private": false,
4
- "version": "2026.7.2",
4
+ "version": "2026.8.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "homepage": "https://fivenet.app",
package/perms.ts CHANGED
@@ -95,6 +95,7 @@ export type GRPCServicePerms =
95
95
  | 'documents.TemplatesService/CreateTemplate'
96
96
  | 'documents.TemplatesService/DeleteTemplate'
97
97
  | 'documents.TemplatesService/ListTemplates'
98
+ | 'documents.TemplatesService/MoveTemplate'
98
99
  | 'jobs.ColleaguesService/GetColleague'
99
100
  | 'jobs.ColleaguesService/ListColleagueActivity'
100
101
  | 'jobs.ColleaguesService/ListColleagues'
@@ -214,6 +215,7 @@ export const GRPCServiceMethods = [
214
215
  'documents.TemplatesService/CreateTemplate',
215
216
  'documents.TemplatesService/DeleteTemplate',
216
217
  'documents.TemplatesService/ListTemplates',
218
+ 'documents.TemplatesService/MoveTemplate',
217
219
  'jobs.ColleaguesService/GetColleague',
218
220
  'jobs.ColleaguesService/ListColleagueActivity',
219
221
  'jobs.ColleaguesService/ListColleagues',
@@ -413,6 +415,8 @@ export const PermAttributes = {
413
415
  },
414
416
  'documents.TemplatesService/ListTemplates': {
415
417
  },
418
+ 'documents.TemplatesService/MoveTemplate': {
419
+ },
416
420
  'jobs.ColleaguesService/GetColleague': {
417
421
  'Access': {
418
422
  type: 'stringList',
@@ -26,9 +26,9 @@ export interface AuditEntry {
26
26
  */
27
27
  createdAt?: Timestamp;
28
28
  /**
29
- * @generated from protobuf field: int32 user_id = 3
29
+ * @generated from protobuf field: optional int32 user_id = 3
30
30
  */
31
- userId: number;
31
+ userId?: number;
32
32
  /**
33
33
  * @generated from protobuf field: optional resources.users.short.UserShort user = 4
34
34
  */
@@ -77,6 +77,10 @@ export interface AuditEntry {
77
77
  * @generated from protobuf field: optional string data = 14
78
78
  */
79
79
  data?: string;
80
+ /**
81
+ * @generated from protobuf field: optional int64 account_id = 15
82
+ */
83
+ accountId?: number;
80
84
  }
81
85
  /**
82
86
  * @generated from protobuf message resources.audit.AuditEntryMeta
@@ -143,9 +147,9 @@ export enum EventResult {
143
147
  class AuditEntry$Type extends MessageType<AuditEntry> {
144
148
  constructor() {
145
149
  super("resources.audit.AuditEntry", [
146
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
150
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\"" } },
147
151
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
148
- { no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
152
+ { no: 3, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
149
153
  { no: 4, name: "user", kind: "message", T: () => UserShort },
150
154
  { no: 5, name: "user_job", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
151
155
  { no: 6, name: "target_user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
@@ -156,13 +160,13 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
156
160
  { no: 11, name: "action", kind: "enum", T: () => ["resources.audit.EventAction", EventAction, "EVENT_ACTION_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
157
161
  { no: 12, name: "result", kind: "enum", T: () => ["resources.audit.EventResult", EventResult, "EVENT_RESULT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
158
162
  { no: 13, name: "meta", kind: "message", T: () => AuditEntryMeta },
159
- { no: 14, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
163
+ { no: 14, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
164
+ { no: 15, name: "account_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
160
165
  ]);
161
166
  }
162
167
  create(value?: PartialMessage<AuditEntry>): AuditEntry {
163
168
  const message = globalThis.Object.create((this.messagePrototype!));
164
169
  message.id = 0;
165
- message.userId = 0;
166
170
  message.userJob = "";
167
171
  message.service = "";
168
172
  message.method = "";
@@ -183,7 +187,7 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
183
187
  case /* resources.timestamp.Timestamp created_at */ 2:
184
188
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
185
189
  break;
186
- case /* int32 user_id */ 3:
190
+ case /* optional int32 user_id */ 3:
187
191
  message.userId = reader.int32();
188
192
  break;
189
193
  case /* optional resources.users.short.UserShort user */ 4:
@@ -219,6 +223,9 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
219
223
  case /* optional string data */ 14:
220
224
  message.data = reader.string();
221
225
  break;
226
+ case /* optional int64 account_id */ 15:
227
+ message.accountId = reader.int64().toNumber();
228
+ break;
222
229
  default:
223
230
  let u = options.readUnknownField;
224
231
  if (u === "throw")
@@ -237,8 +244,8 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
237
244
  /* resources.timestamp.Timestamp created_at = 2; */
238
245
  if (message.createdAt)
239
246
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
240
- /* int32 user_id = 3; */
241
- if (message.userId !== 0)
247
+ /* optional int32 user_id = 3; */
248
+ if (message.userId !== undefined)
242
249
  writer.tag(3, WireType.Varint).int32(message.userId);
243
250
  /* optional resources.users.short.UserShort user = 4; */
244
251
  if (message.user)
@@ -273,6 +280,9 @@ class AuditEntry$Type extends MessageType<AuditEntry> {
273
280
  /* optional string data = 14; */
274
281
  if (message.data !== undefined)
275
282
  writer.tag(14, WireType.LengthDelimited).string(message.data);
283
+ /* optional int64 account_id = 15; */
284
+ if (message.accountId !== undefined)
285
+ writer.tag(15, WireType.Varint).int64(message.accountId);
276
286
  let u = options.writeUnknownFields;
277
287
  if (u !== false)
278
288
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -81,7 +81,7 @@ class DocRequest$Type extends MessageType<DocRequest> {
81
81
  { no: 7, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
82
82
  { no: 8, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
83
83
  { no: 9, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
84
- { no: 10, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
84
+ { no: 10, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
85
85
  { no: 11, name: "data", kind: "message", T: () => DocActivityData },
86
86
  { no: 12, name: "accepted", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
87
87
  ]);
@@ -46,10 +46,6 @@ export interface Template {
46
46
  * @generated from protobuf field: resources.documents.category.Category category = 5
47
47
  */
48
48
  category?: Category;
49
- /**
50
- * @generated from protobuf field: uint32 weight = 6
51
- */
52
- weight: number;
53
49
  /**
54
50
  * @generated from protobuf field: string title = 7
55
51
  */
@@ -131,10 +127,6 @@ export interface TemplateShort {
131
127
  * @generated from protobuf field: resources.documents.category.Category category = 5
132
128
  */
133
129
  category?: Category;
134
- /**
135
- * @generated from protobuf field: uint32 weight = 6
136
- */
137
- weight: number;
138
130
  /**
139
131
  * @generated from protobuf field: string title = 7
140
132
  */
@@ -330,7 +322,6 @@ class Template$Type extends MessageType<Template> {
330
322
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
331
323
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
332
324
  { no: 5, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
333
- { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
334
325
  { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
335
326
  { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
336
327
  { no: 9, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "7" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
@@ -350,7 +341,6 @@ class Template$Type extends MessageType<Template> {
350
341
  create(value?: PartialMessage<Template>): Template {
351
342
  const message = globalThis.Object.create((this.messagePrototype!));
352
343
  message.id = 0;
353
- message.weight = 0;
354
344
  message.title = "";
355
345
  message.description = "";
356
346
  message.contentTitle = "";
@@ -382,9 +372,6 @@ class Template$Type extends MessageType<Template> {
382
372
  case /* resources.documents.category.Category category */ 5:
383
373
  message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
384
374
  break;
385
- case /* uint32 weight */ 6:
386
- message.weight = reader.uint32();
387
- break;
388
375
  case /* string title */ 7:
389
376
  message.title = reader.string();
390
377
  break;
@@ -454,9 +441,6 @@ class Template$Type extends MessageType<Template> {
454
441
  /* resources.documents.category.Category category = 5; */
455
442
  if (message.category)
456
443
  Category.internalBinaryWrite(message.category, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
457
- /* uint32 weight = 6; */
458
- if (message.weight !== 0)
459
- writer.tag(6, WireType.Varint).uint32(message.weight);
460
444
  /* string title = 7; */
461
445
  if (message.title !== "")
462
446
  writer.tag(7, WireType.LengthDelimited).string(message.title);
@@ -518,7 +502,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
518
502
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
519
503
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
520
504
  { no: 5, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
521
- { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
522
505
  { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
523
506
  { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
524
507
  { no: 9, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "7" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
@@ -532,7 +515,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
532
515
  create(value?: PartialMessage<TemplateShort>): TemplateShort {
533
516
  const message = globalThis.Object.create((this.messagePrototype!));
534
517
  message.id = 0;
535
- message.weight = 0;
536
518
  message.title = "";
537
519
  message.description = "";
538
520
  message.creatorJob = "";
@@ -560,9 +542,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
560
542
  case /* resources.documents.category.Category category */ 5:
561
543
  message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
562
544
  break;
563
- case /* uint32 weight */ 6:
564
- message.weight = reader.uint32();
565
- break;
566
545
  case /* string title */ 7:
567
546
  message.title = reader.string();
568
547
  break;
@@ -614,9 +593,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
614
593
  /* resources.documents.category.Category category = 5; */
615
594
  if (message.category)
616
595
  Category.internalBinaryWrite(message.category, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
617
- /* uint32 weight = 6; */
618
- if (message.weight !== 0)
619
- writer.tag(6, WireType.Varint).uint32(message.weight);
620
596
  /* string title = 7; */
621
597
  if (message.title !== "")
622
598
  writer.tag(7, WireType.LengthDelimited).string(message.title);
@@ -204,7 +204,7 @@ export const UserOAuth2Conn = new UserOAuth2Conn$Type();
204
204
  class UserProps$Type extends MessageType<UserProps> {
205
205
  constructor() {
206
206
  super("resources.sync.activity.UserProps", [
207
- { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
207
+ { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
208
208
  { no: 2, name: "props", kind: "message", T: () => UserProps$, options: { "buf.validate.field": { required: true } } }
209
209
  ]);
210
210
  }
@@ -257,7 +257,7 @@ export const UserProps = new UserProps$Type();
257
257
  class ColleagueProps$Type extends MessageType<ColleagueProps> {
258
258
  constructor() {
259
259
  super("resources.sync.activity.ColleagueProps", [
260
- { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
260
+ { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
261
261
  { no: 2, name: "props", kind: "message", T: () => ColleagueProps$, options: { "buf.validate.field": { required: true } } }
262
262
  ]);
263
263
  }
@@ -224,7 +224,7 @@ class PageActivity$Type extends MessageType<PageActivity> {
224
224
  { no: 6, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
225
225
  { no: 7, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
226
226
  { no: 8, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
227
- { no: 9, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
227
+ { no: 9, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
228
228
  { no: 10, name: "data", kind: "message", T: () => PageActivityData }
229
229
  ]);
230
230
  }
@@ -5,6 +5,8 @@
5
5
  import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
6
  import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
7
7
  import { TemplatesService } from "./templates";
8
+ import type { MoveTemplateResponse } from "./templates";
9
+ import type { MoveTemplateRequest } from "./templates";
8
10
  import type { DeleteTemplateResponse } from "./templates";
9
11
  import type { DeleteTemplateRequest } from "./templates";
10
12
  import type { UpdateTemplateResponse } from "./templates";
@@ -42,6 +44,10 @@ export interface ITemplatesServiceClient {
42
44
  * @generated from protobuf rpc: DeleteTemplate
43
45
  */
44
46
  deleteTemplate(input: DeleteTemplateRequest, options?: RpcOptions): UnaryCall<DeleteTemplateRequest, DeleteTemplateResponse>;
47
+ /**
48
+ * @generated from protobuf rpc: MoveTemplate
49
+ */
50
+ moveTemplate(input: MoveTemplateRequest, options?: RpcOptions): UnaryCall<MoveTemplateRequest, MoveTemplateResponse>;
45
51
  }
46
52
  /**
47
53
  * @generated from protobuf service services.documents.TemplatesService
@@ -87,4 +93,11 @@ export class TemplatesServiceClient implements ITemplatesServiceClient, ServiceI
87
93
  const method = this.methods[4], opt = this._transport.mergeOptions(options);
88
94
  return stackIntercept<DeleteTemplateRequest, DeleteTemplateResponse>("unary", this._transport, method, opt, input);
89
95
  }
96
+ /**
97
+ * @generated from protobuf rpc: MoveTemplate
98
+ */
99
+ moveTemplate(input: MoveTemplateRequest, options?: RpcOptions): UnaryCall<MoveTemplateRequest, MoveTemplateResponse> {
100
+ const method = this.methods[5], opt = this._transport.mergeOptions(options);
101
+ return stackIntercept<MoveTemplateRequest, MoveTemplateResponse>("unary", this._transport, method, opt, input);
102
+ }
90
103
  }
@@ -109,6 +109,28 @@ export interface DeleteTemplateRequest {
109
109
  */
110
110
  export interface DeleteTemplateResponse {
111
111
  }
112
+ /**
113
+ * @generated from protobuf message services.documents.MoveTemplateRequest
114
+ */
115
+ export interface MoveTemplateRequest {
116
+ /**
117
+ * @generated from protobuf field: int64 template_id = 1
118
+ */
119
+ templateId: number;
120
+ /**
121
+ * @generated from protobuf field: optional int64 before_id = 2
122
+ */
123
+ beforeId?: number;
124
+ /**
125
+ * @generated from protobuf field: optional int64 after_id = 3
126
+ */
127
+ afterId?: number;
128
+ }
129
+ /**
130
+ * @generated from protobuf message services.documents.MoveTemplateResponse
131
+ */
132
+ export interface MoveTemplateResponse {
133
+ }
112
134
  // @generated message type with reflection information, may provide speed optimized methods
113
135
  class ListTemplatesRequest$Type extends MessageType<ListTemplatesRequest> {
114
136
  constructor() {
@@ -579,6 +601,105 @@ class DeleteTemplateResponse$Type extends MessageType<DeleteTemplateResponse> {
579
601
  * @generated MessageType for protobuf message services.documents.DeleteTemplateResponse
580
602
  */
581
603
  export const DeleteTemplateResponse = new DeleteTemplateResponse$Type();
604
+ // @generated message type with reflection information, may provide speed optimized methods
605
+ class MoveTemplateRequest$Type extends MessageType<MoveTemplateRequest> {
606
+ constructor() {
607
+ super("services.documents.MoveTemplateRequest", [
608
+ { no: 1, name: "template_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
609
+ { no: 2, name: "before_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
610
+ { no: 3, name: "after_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } }
611
+ ]);
612
+ }
613
+ create(value?: PartialMessage<MoveTemplateRequest>): MoveTemplateRequest {
614
+ const message = globalThis.Object.create((this.messagePrototype!));
615
+ message.templateId = 0;
616
+ if (value !== undefined)
617
+ reflectionMergePartial<MoveTemplateRequest>(this, message, value);
618
+ return message;
619
+ }
620
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MoveTemplateRequest): MoveTemplateRequest {
621
+ let message = target ?? this.create(), end = reader.pos + length;
622
+ while (reader.pos < end) {
623
+ let [fieldNo, wireType] = reader.tag();
624
+ switch (fieldNo) {
625
+ case /* int64 template_id */ 1:
626
+ message.templateId = reader.int64().toNumber();
627
+ break;
628
+ case /* optional int64 before_id */ 2:
629
+ message.beforeId = reader.int64().toNumber();
630
+ break;
631
+ case /* optional int64 after_id */ 3:
632
+ message.afterId = reader.int64().toNumber();
633
+ break;
634
+ default:
635
+ let u = options.readUnknownField;
636
+ if (u === "throw")
637
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
638
+ let d = reader.skip(wireType);
639
+ if (u !== false)
640
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
641
+ }
642
+ }
643
+ return message;
644
+ }
645
+ internalBinaryWrite(message: MoveTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
646
+ /* int64 template_id = 1; */
647
+ if (message.templateId !== 0)
648
+ writer.tag(1, WireType.Varint).int64(message.templateId);
649
+ /* optional int64 before_id = 2; */
650
+ if (message.beforeId !== undefined)
651
+ writer.tag(2, WireType.Varint).int64(message.beforeId);
652
+ /* optional int64 after_id = 3; */
653
+ if (message.afterId !== undefined)
654
+ writer.tag(3, WireType.Varint).int64(message.afterId);
655
+ let u = options.writeUnknownFields;
656
+ if (u !== false)
657
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
658
+ return writer;
659
+ }
660
+ }
661
+ /**
662
+ * @generated MessageType for protobuf message services.documents.MoveTemplateRequest
663
+ */
664
+ export const MoveTemplateRequest = new MoveTemplateRequest$Type();
665
+ // @generated message type with reflection information, may provide speed optimized methods
666
+ class MoveTemplateResponse$Type extends MessageType<MoveTemplateResponse> {
667
+ constructor() {
668
+ super("services.documents.MoveTemplateResponse", []);
669
+ }
670
+ create(value?: PartialMessage<MoveTemplateResponse>): MoveTemplateResponse {
671
+ const message = globalThis.Object.create((this.messagePrototype!));
672
+ if (value !== undefined)
673
+ reflectionMergePartial<MoveTemplateResponse>(this, message, value);
674
+ return message;
675
+ }
676
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MoveTemplateResponse): MoveTemplateResponse {
677
+ let message = target ?? this.create(), end = reader.pos + length;
678
+ while (reader.pos < end) {
679
+ let [fieldNo, wireType] = reader.tag();
680
+ switch (fieldNo) {
681
+ default:
682
+ let u = options.readUnknownField;
683
+ if (u === "throw")
684
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
685
+ let d = reader.skip(wireType);
686
+ if (u !== false)
687
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
688
+ }
689
+ }
690
+ return message;
691
+ }
692
+ internalBinaryWrite(message: MoveTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
693
+ let u = options.writeUnknownFields;
694
+ if (u !== false)
695
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
696
+ return writer;
697
+ }
698
+ }
699
+ /**
700
+ * @generated MessageType for protobuf message services.documents.MoveTemplateResponse
701
+ */
702
+ export const MoveTemplateResponse = new MoveTemplateResponse$Type();
582
703
  /**
583
704
  * @generated ServiceType for protobuf service services.documents.TemplatesService
584
705
  */
@@ -587,5 +708,6 @@ export const TemplatesService = new ServiceType("services.documents.TemplatesSer
587
708
  { name: "GetTemplate", options: { "codegen.perms.perms": { enabled: true, name: "ListTemplates" } }, I: GetTemplateRequest, O: GetTemplateResponse },
588
709
  { name: "CreateTemplate", options: { "codegen.perms.perms": { enabled: true } }, I: CreateTemplateRequest, O: CreateTemplateResponse },
589
710
  { name: "UpdateTemplate", options: { "codegen.perms.perms": { enabled: true, name: "CreateTemplate" } }, I: UpdateTemplateRequest, O: UpdateTemplateResponse },
590
- { name: "DeleteTemplate", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteTemplateRequest, O: DeleteTemplateResponse }
711
+ { name: "DeleteTemplate", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteTemplateRequest, O: DeleteTemplateResponse },
712
+ { name: "MoveTemplate", options: { "codegen.perms.perms": { enabled: true } }, I: MoveTemplateRequest, O: MoveTemplateResponse }
591
713
  ], { "codegen.perms.perms_svc": { order: 55, icon: "i-mdi-file-code" } });
@@ -28,6 +28,16 @@ export interface ILivemapServiceClient {
28
28
  */
29
29
  createOrUpdateMarker(input: CreateOrUpdateMarkerRequest, options?: RpcOptions): UnaryCall<CreateOrUpdateMarkerRequest, CreateOrUpdateMarkerResponse>;
30
30
  /**
31
+ * Deletes or restores a marker.
32
+ *
33
+ * Private markers use the DeleteMarker Access attribute in the usual creator job/rank scope:
34
+ * Own allows the creator, Lower_Rank allows higher ranks, Same_Rank allows same-or-higher ranks,
35
+ * and Any allows any member in the creator's job.
36
+ *
37
+ * Public markers have stricter delete access because they can be visible across jobs:
38
+ * job admins can delete them; the marker creator can delete them only when Access includes Own;
39
+ * otherwise, only members of the marker's owning job with Access=Any can delete them.
40
+ *
31
41
  * @generated from protobuf rpc: DeleteMarker
32
42
  */
33
43
  deleteMarker(input: DeleteMarkerRequest, options?: RpcOptions): UnaryCall<DeleteMarkerRequest, DeleteMarkerResponse>;
@@ -56,6 +66,16 @@ export class LivemapServiceClient implements ILivemapServiceClient, ServiceInfo
56
66
  return stackIntercept<CreateOrUpdateMarkerRequest, CreateOrUpdateMarkerResponse>("unary", this._transport, method, opt, input);
57
67
  }
58
68
  /**
69
+ * Deletes or restores a marker.
70
+ *
71
+ * Private markers use the DeleteMarker Access attribute in the usual creator job/rank scope:
72
+ * Own allows the creator, Lower_Rank allows higher ranks, Same_Rank allows same-or-higher ranks,
73
+ * and Any allows any member in the creator's job.
74
+ *
75
+ * Public markers have stricter delete access because they can be visible across jobs:
76
+ * job admins can delete them; the marker creator can delete them only when Access includes Own;
77
+ * otherwise, only members of the marker's owning job with Access=Any can delete them.
78
+ *
59
79
  * @generated from protobuf rpc: DeleteMarker
60
80
  */
61
81
  deleteMarker(input: DeleteMarkerRequest, options?: RpcOptions): UnaryCall<DeleteMarkerRequest, DeleteMarkerResponse> {
@@ -21,6 +21,8 @@ import type { SendAccountsRequest } from "./sync";
21
21
  import type { SendLicensesRequest } from "./sync";
22
22
  import type { SendDataResponse } from "./sync";
23
23
  import type { SendJobsRequest } from "./sync";
24
+ import type { CloseUserDispatchesResponse } from "./sync";
25
+ import type { CloseUserDispatchesRequest } from "./sync";
24
26
  import type { EndActiveJobTimeclocksResponse } from "./sync";
25
27
  import type { EndActiveJobTimeclocksRequest } from "./sync";
26
28
  import type { DeleteDataResponse } from "./sync";
@@ -30,6 +32,8 @@ import type { AddDispatchRequest } from "./sync";
30
32
  import type { AddJobTimeclockRequest } from "./sync";
31
33
  import type { AddColleaguePropsRequest } from "./sync";
32
34
  import type { AddColleagueActivityRequest } from "./sync";
35
+ import type { GetUserPropsResponse } from "./sync";
36
+ import type { GetUserPropsRequest } from "./sync";
33
37
  import type { AddUserPropsRequest } from "./sync";
34
38
  import type { AddUserActivityRequest } from "./sync";
35
39
  import type { AddUserUpdateRequest } from "./sync";
@@ -95,11 +99,17 @@ export interface ISyncServiceClient {
95
99
  */
96
100
  addUserActivity(input: AddUserActivityRequest, options?: RpcOptions): UnaryCall<AddUserActivityRequest, AddActivityResponse>;
97
101
  /**
98
- * Record user property changes.
102
+ * Record user props changes.
99
103
  *
100
104
  * @generated from protobuf rpc: AddUserProps
101
105
  */
102
106
  addUserProps(input: AddUserPropsRequest, options?: RpcOptions): UnaryCall<AddUserPropsRequest, AddActivityResponse>;
107
+ /**
108
+ * Retrieve user props.
109
+ *
110
+ * @generated from protobuf rpc: GetUserProps
111
+ */
112
+ getUserProps(input: GetUserPropsRequest, options?: RpcOptions): UnaryCall<GetUserPropsRequest, GetUserPropsResponse>;
103
113
  /**
104
114
  * Record a colleague activity entry.
105
115
  *
@@ -107,7 +117,7 @@ export interface ISyncServiceClient {
107
117
  */
108
118
  addColleagueActivity(input: AddColleagueActivityRequest, options?: RpcOptions): UnaryCall<AddColleagueActivityRequest, AddActivityResponse>;
109
119
  /**
110
- * Record colleague property changes.
120
+ * Record colleague props changes.
111
121
  *
112
122
  * @generated from protobuf rpc: AddColleagueProps
113
123
  */
@@ -142,6 +152,12 @@ export interface ISyncServiceClient {
142
152
  * @generated from protobuf rpc: EndActiveJobTimeclocks
143
153
  */
144
154
  endActiveJobTimeclocks(input: EndActiveJobTimeclocksRequest, options?: RpcOptions): UnaryCall<EndActiveJobTimeclocksRequest, EndActiveJobTimeclocksResponse>;
155
+ /**
156
+ * Close dispatch(es) that match a certain user, optionally limited to the given jobs.
157
+ *
158
+ * @generated from protobuf rpc: CloseUserDispatches
159
+ */
160
+ closeUserDispatches(input: CloseUserDispatchesRequest, options?: RpcOptions): UnaryCall<CloseUserDispatchesRequest, CloseUserDispatchesResponse>;
145
161
  /**
146
162
  * Sync job data to the server.
147
163
  *
@@ -300,7 +316,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
300
316
  return stackIntercept<AddUserActivityRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
301
317
  }
302
318
  /**
303
- * Record user property changes.
319
+ * Record user props changes.
304
320
  *
305
321
  * @generated from protobuf rpc: AddUserProps
306
322
  */
@@ -308,22 +324,31 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
308
324
  const method = this.methods[7], opt = this._transport.mergeOptions(options);
309
325
  return stackIntercept<AddUserPropsRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
310
326
  }
327
+ /**
328
+ * Retrieve user props.
329
+ *
330
+ * @generated from protobuf rpc: GetUserProps
331
+ */
332
+ getUserProps(input: GetUserPropsRequest, options?: RpcOptions): UnaryCall<GetUserPropsRequest, GetUserPropsResponse> {
333
+ const method = this.methods[8], opt = this._transport.mergeOptions(options);
334
+ return stackIntercept<GetUserPropsRequest, GetUserPropsResponse>("unary", this._transport, method, opt, input);
335
+ }
311
336
  /**
312
337
  * Record a colleague activity entry.
313
338
  *
314
339
  * @generated from protobuf rpc: AddColleagueActivity
315
340
  */
316
341
  addColleagueActivity(input: AddColleagueActivityRequest, options?: RpcOptions): UnaryCall<AddColleagueActivityRequest, AddActivityResponse> {
317
- const method = this.methods[8], opt = this._transport.mergeOptions(options);
342
+ const method = this.methods[9], opt = this._transport.mergeOptions(options);
318
343
  return stackIntercept<AddColleagueActivityRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
319
344
  }
320
345
  /**
321
- * Record colleague property changes.
346
+ * Record colleague props changes.
322
347
  *
323
348
  * @generated from protobuf rpc: AddColleagueProps
324
349
  */
325
350
  addColleagueProps(input: AddColleaguePropsRequest, options?: RpcOptions): UnaryCall<AddColleaguePropsRequest, AddActivityResponse> {
326
- const method = this.methods[9], opt = this._transport.mergeOptions(options);
351
+ const method = this.methods[10], opt = this._transport.mergeOptions(options);
327
352
  return stackIntercept<AddColleaguePropsRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
328
353
  }
329
354
  /**
@@ -332,7 +357,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
332
357
  * @generated from protobuf rpc: AddJobTimeclock
333
358
  */
334
359
  addJobTimeclock(input: AddJobTimeclockRequest, options?: RpcOptions): UnaryCall<AddJobTimeclockRequest, AddActivityResponse> {
335
- const method = this.methods[10], opt = this._transport.mergeOptions(options);
360
+ const method = this.methods[11], opt = this._transport.mergeOptions(options);
336
361
  return stackIntercept<AddJobTimeclockRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
337
362
  }
338
363
  /**
@@ -341,7 +366,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
341
366
  * @generated from protobuf rpc: AddDispatch
342
367
  */
343
368
  addDispatch(input: AddDispatchRequest, options?: RpcOptions): UnaryCall<AddDispatchRequest, AddActivityResponse> {
344
- const method = this.methods[11], opt = this._transport.mergeOptions(options);
369
+ const method = this.methods[12], opt = this._transport.mergeOptions(options);
345
370
  return stackIntercept<AddDispatchRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
346
371
  }
347
372
  /**
@@ -350,7 +375,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
350
375
  * @generated from protobuf rpc: AddMarker
351
376
  */
352
377
  addMarker(input: AddMarkerRequest, options?: RpcOptions): UnaryCall<AddMarkerRequest, AddActivityResponse> {
353
- const method = this.methods[12], opt = this._transport.mergeOptions(options);
378
+ const method = this.methods[13], opt = this._transport.mergeOptions(options);
354
379
  return stackIntercept<AddMarkerRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
355
380
  }
356
381
  /**
@@ -359,7 +384,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
359
384
  * @generated from protobuf rpc: DeleteMarker
360
385
  */
361
386
  deleteMarker(input: DeleteMarkerRequest, options?: RpcOptions): UnaryCall<DeleteMarkerRequest, DeleteDataResponse> {
362
- const method = this.methods[13], opt = this._transport.mergeOptions(options);
387
+ const method = this.methods[14], opt = this._transport.mergeOptions(options);
363
388
  return stackIntercept<DeleteMarkerRequest, DeleteDataResponse>("unary", this._transport, method, opt, input);
364
389
  }
365
390
  /**
@@ -368,16 +393,25 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
368
393
  * @generated from protobuf rpc: EndActiveJobTimeclocks
369
394
  */
370
395
  endActiveJobTimeclocks(input: EndActiveJobTimeclocksRequest, options?: RpcOptions): UnaryCall<EndActiveJobTimeclocksRequest, EndActiveJobTimeclocksResponse> {
371
- const method = this.methods[14], opt = this._transport.mergeOptions(options);
396
+ const method = this.methods[15], opt = this._transport.mergeOptions(options);
372
397
  return stackIntercept<EndActiveJobTimeclocksRequest, EndActiveJobTimeclocksResponse>("unary", this._transport, method, opt, input);
373
398
  }
399
+ /**
400
+ * Close dispatch(es) that match a certain user, optionally limited to the given jobs.
401
+ *
402
+ * @generated from protobuf rpc: CloseUserDispatches
403
+ */
404
+ closeUserDispatches(input: CloseUserDispatchesRequest, options?: RpcOptions): UnaryCall<CloseUserDispatchesRequest, CloseUserDispatchesResponse> {
405
+ const method = this.methods[16], opt = this._transport.mergeOptions(options);
406
+ return stackIntercept<CloseUserDispatchesRequest, CloseUserDispatchesResponse>("unary", this._transport, method, opt, input);
407
+ }
374
408
  /**
375
409
  * Sync job data to the server.
376
410
  *
377
411
  * @generated from protobuf rpc: SendJobs
378
412
  */
379
413
  sendJobs(input: SendJobsRequest, options?: RpcOptions): UnaryCall<SendJobsRequest, SendDataResponse> {
380
- const method = this.methods[15], opt = this._transport.mergeOptions(options);
414
+ const method = this.methods[17], opt = this._transport.mergeOptions(options);
381
415
  return stackIntercept<SendJobsRequest, SendDataResponse>("unary", this._transport, method, opt, input);
382
416
  }
383
417
  /**
@@ -386,7 +420,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
386
420
  * @generated from protobuf rpc: SendLicenses
387
421
  */
388
422
  sendLicenses(input: SendLicensesRequest, options?: RpcOptions): UnaryCall<SendLicensesRequest, SendDataResponse> {
389
- const method = this.methods[16], opt = this._transport.mergeOptions(options);
423
+ const method = this.methods[18], opt = this._transport.mergeOptions(options);
390
424
  return stackIntercept<SendLicensesRequest, SendDataResponse>("unary", this._transport, method, opt, input);
391
425
  }
392
426
  /**
@@ -395,7 +429,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
395
429
  * @generated from protobuf rpc: SendAccounts
396
430
  */
397
431
  sendAccounts(input: SendAccountsRequest, options?: RpcOptions): UnaryCall<SendAccountsRequest, SendDataResponse> {
398
- const method = this.methods[17], opt = this._transport.mergeOptions(options);
432
+ const method = this.methods[19], opt = this._transport.mergeOptions(options);
399
433
  return stackIntercept<SendAccountsRequest, SendDataResponse>("unary", this._transport, method, opt, input);
400
434
  }
401
435
  /**
@@ -404,7 +438,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
404
438
  * @generated from protobuf rpc: SendUsers
405
439
  */
406
440
  sendUsers(input: SendUsersRequest, options?: RpcOptions): UnaryCall<SendUsersRequest, SendDataResponse> {
407
- const method = this.methods[18], opt = this._transport.mergeOptions(options);
441
+ const method = this.methods[20], opt = this._transport.mergeOptions(options);
408
442
  return stackIntercept<SendUsersRequest, SendDataResponse>("unary", this._transport, method, opt, input);
409
443
  }
410
444
  /**
@@ -413,7 +447,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
413
447
  * @generated from protobuf rpc: SendVehicles
414
448
  */
415
449
  sendVehicles(input: SendVehiclesRequest, options?: RpcOptions): UnaryCall<SendVehiclesRequest, SendDataResponse> {
416
- const method = this.methods[19], opt = this._transport.mergeOptions(options);
450
+ const method = this.methods[21], opt = this._transport.mergeOptions(options);
417
451
  return stackIntercept<SendVehiclesRequest, SendDataResponse>("unary", this._transport, method, opt, input);
418
452
  }
419
453
  /**
@@ -422,7 +456,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
422
456
  * @generated from protobuf rpc: SendUserLocations
423
457
  */
424
458
  sendUserLocations(input: SendUserLocationsRequest, options?: RpcOptions): UnaryCall<SendUserLocationsRequest, SendDataResponse> {
425
- const method = this.methods[20], opt = this._transport.mergeOptions(options);
459
+ const method = this.methods[22], opt = this._transport.mergeOptions(options);
426
460
  return stackIntercept<SendUserLocationsRequest, SendDataResponse>("unary", this._transport, method, opt, input);
427
461
  }
428
462
  /**
@@ -431,7 +465,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
431
465
  * @generated from protobuf rpc: SetLastCharID
432
466
  */
433
467
  setLastCharID(input: SetLastCharIDRequest, options?: RpcOptions): UnaryCall<SetLastCharIDRequest, SendDataResponse> {
434
- const method = this.methods[21], opt = this._transport.mergeOptions(options);
468
+ const method = this.methods[23], opt = this._transport.mergeOptions(options);
435
469
  return stackIntercept<SetLastCharIDRequest, SendDataResponse>("unary", this._transport, method, opt, input);
436
470
  }
437
471
  /**
@@ -440,7 +474,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
440
474
  * @generated from protobuf rpc: DeleteUsers
441
475
  */
442
476
  deleteUsers(input: DeleteUsersRequest, options?: RpcOptions): UnaryCall<DeleteUsersRequest, DeleteDataResponse> {
443
- const method = this.methods[22], opt = this._transport.mergeOptions(options);
477
+ const method = this.methods[24], opt = this._transport.mergeOptions(options);
444
478
  return stackIntercept<DeleteUsersRequest, DeleteDataResponse>("unary", this._transport, method, opt, input);
445
479
  }
446
480
  /**
@@ -449,7 +483,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
449
483
  * @generated from protobuf rpc: DeleteVehicles
450
484
  */
451
485
  deleteVehicles(input: DeleteVehiclesRequest, options?: RpcOptions): UnaryCall<DeleteVehiclesRequest, DeleteDataResponse> {
452
- const method = this.methods[23], opt = this._transport.mergeOptions(options);
486
+ const method = this.methods[25], opt = this._transport.mergeOptions(options);
453
487
  return stackIntercept<DeleteVehiclesRequest, DeleteDataResponse>("unary", this._transport, method, opt, input);
454
488
  }
455
489
  /**
@@ -458,7 +492,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
458
492
  * @generated from protobuf rpc: Stream
459
493
  */
460
494
  stream(input: StreamRequest, options?: RpcOptions): ServerStreamingCall<StreamRequest, StreamResponse> {
461
- const method = this.methods[24], opt = this._transport.mergeOptions(options);
495
+ const method = this.methods[26], opt = this._transport.mergeOptions(options);
462
496
  return stackIntercept<StreamRequest, StreamResponse>("serverStreaming", this._transport, method, opt, input);
463
497
  }
464
498
  /**
@@ -468,7 +502,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
468
502
  * @generated from protobuf rpc: AddActivity
469
503
  */
470
504
  addActivity(input: AddActivityRequest, options?: RpcOptions): UnaryCall<AddActivityRequest, AddActivityResponse> {
471
- const method = this.methods[25], opt = this._transport.mergeOptions(options);
505
+ const method = this.methods[27], opt = this._transport.mergeOptions(options);
472
506
  return stackIntercept<AddActivityRequest, AddActivityResponse>("unary", this._transport, method, opt, input);
473
507
  }
474
508
  /**
@@ -478,7 +512,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
478
512
  * @generated from protobuf rpc: SendData
479
513
  */
480
514
  sendData(input: SendDataRequest, options?: RpcOptions): UnaryCall<SendDataRequest, SendDataResponse> {
481
- const method = this.methods[26], opt = this._transport.mergeOptions(options);
515
+ const method = this.methods[28], opt = this._transport.mergeOptions(options);
482
516
  return stackIntercept<SendDataRequest, SendDataResponse>("unary", this._transport, method, opt, input);
483
517
  }
484
518
  /**
@@ -488,7 +522,7 @@ export class SyncServiceClient implements ISyncServiceClient, ServiceInfo {
488
522
  * @generated from protobuf rpc: DeleteData
489
523
  */
490
524
  deleteData(input: DeleteDataRequest, options?: RpcOptions): UnaryCall<DeleteDataRequest, DeleteDataResponse> {
491
- const method = this.methods[27], opt = this._transport.mergeOptions(options);
525
+ const method = this.methods[29], opt = this._transport.mergeOptions(options);
492
526
  return stackIntercept<DeleteDataRequest, DeleteDataResponse>("unary", this._transport, method, opt, input);
493
527
  }
494
528
  }
@@ -31,8 +31,10 @@ import { AccountUpdate } from "../../resources/sync/activity/activity";
31
31
  import { TimeclockUpdate } from "../../resources/sync/activity/activity";
32
32
  import { ColleagueProps } from "../../resources/sync/activity/activity";
33
33
  import { ColleagueActivity } from "../../resources/jobs/colleagues/activity/activity";
34
+ import { UserProps as UserProps$ } from "../../resources/users/props/props";
34
35
  import { UserProps } from "../../resources/sync/activity/activity";
35
36
  import { UserActivity } from "../../resources/users/activity/activity";
37
+ import { Coords } from "../../resources/livemap/coords";
36
38
  import { MarkerMarker } from "../../resources/livemap/markers/marker_marker";
37
39
  import { Dispatch } from "../../resources/centrum/dispatches/dispatches";
38
40
  import { UserOAuth2Conn } from "../../resources/sync/activity/activity";
@@ -178,6 +180,50 @@ export interface EndActiveJobTimeclocksResponse {
178
180
  */
179
181
  rowsAffected: number;
180
182
  }
183
+ /**
184
+ * Request to close active dispatches created for a specific user.
185
+ *
186
+ * @generated from protobuf message services.sync.CloseUserDispatchesRequest
187
+ */
188
+ export interface CloseUserDispatchesRequest {
189
+ /**
190
+ * User ID whose active dispatches should be closed.
191
+ *
192
+ * @generated from protobuf field: int32 target_user_id = 1
193
+ */
194
+ targetUserId: number;
195
+ /**
196
+ * Optional job list limiting which dispatch jobs are considered.
197
+ *
198
+ * @generated from protobuf field: repeated string limit_jobs = 2
199
+ */
200
+ limitJobs: string[];
201
+ /**
202
+ * Optional coordinates to attach to the closing dispatch status.
203
+ *
204
+ * @generated from protobuf field: optional resources.livemap.Coords coords = 3
205
+ */
206
+ coords?: Coords;
207
+ /**
208
+ * Optional reason to attach to the closing dispatch status.
209
+ *
210
+ * @generated from protobuf field: optional string reason = 4
211
+ */
212
+ reason?: string;
213
+ }
214
+ /**
215
+ * Response containing the number of dispatches closed for the user.
216
+ *
217
+ * @generated from protobuf message services.sync.CloseUserDispatchesResponse
218
+ */
219
+ export interface CloseUserDispatchesResponse {
220
+ /**
221
+ * Number of dispatches whose status was updated to completed.
222
+ *
223
+ * @generated from protobuf field: int64 rows_affected = 1
224
+ */
225
+ rowsAffected: number;
226
+ }
181
227
  /**
182
228
  * @generated from protobuf message services.sync.AddUserActivityRequest
183
229
  */
@@ -196,6 +242,24 @@ export interface AddUserPropsRequest {
196
242
  */
197
243
  userProps?: UserProps;
198
244
  }
245
+ /**
246
+ * @generated from protobuf message services.sync.GetUserPropsRequest
247
+ */
248
+ export interface GetUserPropsRequest {
249
+ /**
250
+ * @generated from protobuf field: int32 user_id = 1
251
+ */
252
+ userId: number;
253
+ }
254
+ /**
255
+ * @generated from protobuf message services.sync.GetUserPropsResponse
256
+ */
257
+ export interface GetUserPropsResponse {
258
+ /**
259
+ * @generated from protobuf field: resources.users.props.UserProps user_props = 1
260
+ */
261
+ userProps?: UserProps$;
262
+ }
199
263
  /**
200
264
  * @generated from protobuf message services.sync.AddColleagueActivityRequest
201
265
  */
@@ -1154,6 +1218,122 @@ class EndActiveJobTimeclocksResponse$Type extends MessageType<EndActiveJobTimecl
1154
1218
  */
1155
1219
  export const EndActiveJobTimeclocksResponse = new EndActiveJobTimeclocksResponse$Type();
1156
1220
  // @generated message type with reflection information, may provide speed optimized methods
1221
+ class CloseUserDispatchesRequest$Type extends MessageType<CloseUserDispatchesRequest> {
1222
+ constructor() {
1223
+ super("services.sync.CloseUserDispatchesRequest", [
1224
+ { no: 1, name: "target_user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
1225
+ { no: 2, name: "limit_jobs", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "10", items: { string: { maxLen: "20" } } } } } },
1226
+ { no: 3, name: "coords", kind: "message", T: () => Coords },
1227
+ { no: 4, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
1228
+ ]);
1229
+ }
1230
+ create(value?: PartialMessage<CloseUserDispatchesRequest>): CloseUserDispatchesRequest {
1231
+ const message = globalThis.Object.create((this.messagePrototype!));
1232
+ message.targetUserId = 0;
1233
+ message.limitJobs = [];
1234
+ if (value !== undefined)
1235
+ reflectionMergePartial<CloseUserDispatchesRequest>(this, message, value);
1236
+ return message;
1237
+ }
1238
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CloseUserDispatchesRequest): CloseUserDispatchesRequest {
1239
+ let message = target ?? this.create(), end = reader.pos + length;
1240
+ while (reader.pos < end) {
1241
+ let [fieldNo, wireType] = reader.tag();
1242
+ switch (fieldNo) {
1243
+ case /* int32 target_user_id */ 1:
1244
+ message.targetUserId = reader.int32();
1245
+ break;
1246
+ case /* repeated string limit_jobs */ 2:
1247
+ message.limitJobs.push(reader.string());
1248
+ break;
1249
+ case /* optional resources.livemap.Coords coords */ 3:
1250
+ message.coords = Coords.internalBinaryRead(reader, reader.uint32(), options, message.coords);
1251
+ break;
1252
+ case /* optional string reason */ 4:
1253
+ message.reason = reader.string();
1254
+ break;
1255
+ default:
1256
+ let u = options.readUnknownField;
1257
+ if (u === "throw")
1258
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1259
+ let d = reader.skip(wireType);
1260
+ if (u !== false)
1261
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1262
+ }
1263
+ }
1264
+ return message;
1265
+ }
1266
+ internalBinaryWrite(message: CloseUserDispatchesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1267
+ /* int32 target_user_id = 1; */
1268
+ if (message.targetUserId !== 0)
1269
+ writer.tag(1, WireType.Varint).int32(message.targetUserId);
1270
+ /* repeated string limit_jobs = 2; */
1271
+ for (let i = 0; i < message.limitJobs.length; i++)
1272
+ writer.tag(2, WireType.LengthDelimited).string(message.limitJobs[i]);
1273
+ /* optional resources.livemap.Coords coords = 3; */
1274
+ if (message.coords)
1275
+ Coords.internalBinaryWrite(message.coords, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1276
+ /* optional string reason = 4; */
1277
+ if (message.reason !== undefined)
1278
+ writer.tag(4, WireType.LengthDelimited).string(message.reason);
1279
+ let u = options.writeUnknownFields;
1280
+ if (u !== false)
1281
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1282
+ return writer;
1283
+ }
1284
+ }
1285
+ /**
1286
+ * @generated MessageType for protobuf message services.sync.CloseUserDispatchesRequest
1287
+ */
1288
+ export const CloseUserDispatchesRequest = new CloseUserDispatchesRequest$Type();
1289
+ // @generated message type with reflection information, may provide speed optimized methods
1290
+ class CloseUserDispatchesResponse$Type extends MessageType<CloseUserDispatchesResponse> {
1291
+ constructor() {
1292
+ super("services.sync.CloseUserDispatchesResponse", [
1293
+ { no: 1, name: "rows_affected", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
1294
+ ]);
1295
+ }
1296
+ create(value?: PartialMessage<CloseUserDispatchesResponse>): CloseUserDispatchesResponse {
1297
+ const message = globalThis.Object.create((this.messagePrototype!));
1298
+ message.rowsAffected = 0;
1299
+ if (value !== undefined)
1300
+ reflectionMergePartial<CloseUserDispatchesResponse>(this, message, value);
1301
+ return message;
1302
+ }
1303
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CloseUserDispatchesResponse): CloseUserDispatchesResponse {
1304
+ let message = target ?? this.create(), end = reader.pos + length;
1305
+ while (reader.pos < end) {
1306
+ let [fieldNo, wireType] = reader.tag();
1307
+ switch (fieldNo) {
1308
+ case /* int64 rows_affected */ 1:
1309
+ message.rowsAffected = reader.int64().toNumber();
1310
+ break;
1311
+ default:
1312
+ let u = options.readUnknownField;
1313
+ if (u === "throw")
1314
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1315
+ let d = reader.skip(wireType);
1316
+ if (u !== false)
1317
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1318
+ }
1319
+ }
1320
+ return message;
1321
+ }
1322
+ internalBinaryWrite(message: CloseUserDispatchesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1323
+ /* int64 rows_affected = 1; */
1324
+ if (message.rowsAffected !== 0)
1325
+ writer.tag(1, WireType.Varint).int64(message.rowsAffected);
1326
+ let u = options.writeUnknownFields;
1327
+ if (u !== false)
1328
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1329
+ return writer;
1330
+ }
1331
+ }
1332
+ /**
1333
+ * @generated MessageType for protobuf message services.sync.CloseUserDispatchesResponse
1334
+ */
1335
+ export const CloseUserDispatchesResponse = new CloseUserDispatchesResponse$Type();
1336
+ // @generated message type with reflection information, may provide speed optimized methods
1157
1337
  class AddUserActivityRequest$Type extends MessageType<AddUserActivityRequest> {
1158
1338
  constructor() {
1159
1339
  super("services.sync.AddUserActivityRequest", [
@@ -1246,6 +1426,99 @@ class AddUserPropsRequest$Type extends MessageType<AddUserPropsRequest> {
1246
1426
  */
1247
1427
  export const AddUserPropsRequest = new AddUserPropsRequest$Type();
1248
1428
  // @generated message type with reflection information, may provide speed optimized methods
1429
+ class GetUserPropsRequest$Type extends MessageType<GetUserPropsRequest> {
1430
+ constructor() {
1431
+ super("services.sync.GetUserPropsRequest", [
1432
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } }
1433
+ ]);
1434
+ }
1435
+ create(value?: PartialMessage<GetUserPropsRequest>): GetUserPropsRequest {
1436
+ const message = globalThis.Object.create((this.messagePrototype!));
1437
+ message.userId = 0;
1438
+ if (value !== undefined)
1439
+ reflectionMergePartial<GetUserPropsRequest>(this, message, value);
1440
+ return message;
1441
+ }
1442
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserPropsRequest): GetUserPropsRequest {
1443
+ let message = target ?? this.create(), end = reader.pos + length;
1444
+ while (reader.pos < end) {
1445
+ let [fieldNo, wireType] = reader.tag();
1446
+ switch (fieldNo) {
1447
+ case /* int32 user_id */ 1:
1448
+ message.userId = reader.int32();
1449
+ break;
1450
+ default:
1451
+ let u = options.readUnknownField;
1452
+ if (u === "throw")
1453
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1454
+ let d = reader.skip(wireType);
1455
+ if (u !== false)
1456
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1457
+ }
1458
+ }
1459
+ return message;
1460
+ }
1461
+ internalBinaryWrite(message: GetUserPropsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1462
+ /* int32 user_id = 1; */
1463
+ if (message.userId !== 0)
1464
+ writer.tag(1, WireType.Varint).int32(message.userId);
1465
+ let u = options.writeUnknownFields;
1466
+ if (u !== false)
1467
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1468
+ return writer;
1469
+ }
1470
+ }
1471
+ /**
1472
+ * @generated MessageType for protobuf message services.sync.GetUserPropsRequest
1473
+ */
1474
+ export const GetUserPropsRequest = new GetUserPropsRequest$Type();
1475
+ // @generated message type with reflection information, may provide speed optimized methods
1476
+ class GetUserPropsResponse$Type extends MessageType<GetUserPropsResponse> {
1477
+ constructor() {
1478
+ super("services.sync.GetUserPropsResponse", [
1479
+ { no: 1, name: "user_props", kind: "message", T: () => UserProps$ }
1480
+ ]);
1481
+ }
1482
+ create(value?: PartialMessage<GetUserPropsResponse>): GetUserPropsResponse {
1483
+ const message = globalThis.Object.create((this.messagePrototype!));
1484
+ if (value !== undefined)
1485
+ reflectionMergePartial<GetUserPropsResponse>(this, message, value);
1486
+ return message;
1487
+ }
1488
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserPropsResponse): GetUserPropsResponse {
1489
+ let message = target ?? this.create(), end = reader.pos + length;
1490
+ while (reader.pos < end) {
1491
+ let [fieldNo, wireType] = reader.tag();
1492
+ switch (fieldNo) {
1493
+ case /* resources.users.props.UserProps user_props */ 1:
1494
+ message.userProps = UserProps$.internalBinaryRead(reader, reader.uint32(), options, message.userProps);
1495
+ break;
1496
+ default:
1497
+ let u = options.readUnknownField;
1498
+ if (u === "throw")
1499
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1500
+ let d = reader.skip(wireType);
1501
+ if (u !== false)
1502
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1503
+ }
1504
+ }
1505
+ return message;
1506
+ }
1507
+ internalBinaryWrite(message: GetUserPropsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1508
+ /* resources.users.props.UserProps user_props = 1; */
1509
+ if (message.userProps)
1510
+ UserProps$.internalBinaryWrite(message.userProps, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1511
+ let u = options.writeUnknownFields;
1512
+ if (u !== false)
1513
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1514
+ return writer;
1515
+ }
1516
+ }
1517
+ /**
1518
+ * @generated MessageType for protobuf message services.sync.GetUserPropsResponse
1519
+ */
1520
+ export const GetUserPropsResponse = new GetUserPropsResponse$Type();
1521
+ // @generated message type with reflection information, may provide speed optimized methods
1249
1522
  class AddColleagueActivityRequest$Type extends MessageType<AddColleagueActivityRequest> {
1250
1523
  constructor() {
1251
1524
  super("services.sync.AddColleagueActivityRequest", [
@@ -2475,6 +2748,7 @@ export const SyncService = new ServiceType("services.sync.SyncService", [
2475
2748
  { name: "AddUserUpdate", options: {}, I: AddUserUpdateRequest, O: AddActivityResponse },
2476
2749
  { name: "AddUserActivity", options: {}, I: AddUserActivityRequest, O: AddActivityResponse },
2477
2750
  { name: "AddUserProps", options: {}, I: AddUserPropsRequest, O: AddActivityResponse },
2751
+ { name: "GetUserProps", options: {}, I: GetUserPropsRequest, O: GetUserPropsResponse },
2478
2752
  { name: "AddColleagueActivity", options: {}, I: AddColleagueActivityRequest, O: AddActivityResponse },
2479
2753
  { name: "AddColleagueProps", options: {}, I: AddColleaguePropsRequest, O: AddActivityResponse },
2480
2754
  { name: "AddJobTimeclock", options: {}, I: AddJobTimeclockRequest, O: AddActivityResponse },
@@ -2482,6 +2756,7 @@ export const SyncService = new ServiceType("services.sync.SyncService", [
2482
2756
  { name: "AddMarker", options: {}, I: AddMarkerRequest, O: AddActivityResponse },
2483
2757
  { name: "DeleteMarker", options: {}, I: DeleteMarkerRequest, O: DeleteDataResponse },
2484
2758
  { name: "EndActiveJobTimeclocks", options: {}, I: EndActiveJobTimeclocksRequest, O: EndActiveJobTimeclocksResponse },
2759
+ { name: "CloseUserDispatches", options: {}, I: CloseUserDispatchesRequest, O: CloseUserDispatchesResponse },
2485
2760
  { name: "SendJobs", options: {}, I: SendJobsRequest, O: SendDataResponse },
2486
2761
  { name: "SendLicenses", options: {}, I: SendLicensesRequest, O: SendDataResponse },
2487
2762
  { name: "SendAccounts", options: {}, I: SendAccountsRequest, O: SendDataResponse },
package/svcs.ts CHANGED
@@ -366,6 +366,7 @@ export const grpcMethods = [
366
366
  'documents.TemplatesService/CreateTemplate',
367
367
  'documents.TemplatesService/UpdateTemplate',
368
368
  'documents.TemplatesService/DeleteTemplate',
369
+ 'documents.TemplatesService/MoveTemplate',
369
370
  'filestore.FilestoreService/Upload',
370
371
  'filestore.FilestoreService/ListFiles',
371
372
  'filestore.FilestoreService/DeleteFile',
@@ -478,6 +479,7 @@ export const grpcMethods = [
478
479
  'sync.SyncService/AddUserUpdate',
479
480
  'sync.SyncService/AddUserActivity',
480
481
  'sync.SyncService/AddUserProps',
482
+ 'sync.SyncService/GetUserProps',
481
483
  'sync.SyncService/AddColleagueActivity',
482
484
  'sync.SyncService/AddColleagueProps',
483
485
  'sync.SyncService/AddJobTimeclock',
@@ -485,6 +487,7 @@ export const grpcMethods = [
485
487
  'sync.SyncService/AddMarker',
486
488
  'sync.SyncService/DeleteMarker',
487
489
  'sync.SyncService/EndActiveJobTimeclocks',
490
+ 'sync.SyncService/CloseUserDispatches',
488
491
  'sync.SyncService/SendJobs',
489
492
  'sync.SyncService/SendLicenses',
490
493
  'sync.SyncService/SendAccounts',