@fivenet-app/gen 0.9.3-1 → 0.9.3-3

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": "0.9.3-1",
4
+ "version": "0.9.3-3",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "repository": {
package/perms.ts CHANGED
@@ -57,8 +57,10 @@
57
57
  // source: resources/timestamp/timestamp.proto
58
58
  // source: resources/users/activity.proto
59
59
  // source: resources/users/job_props.proto
60
+ // source: resources/users/job_settings.proto
60
61
  // source: resources/users/jobs.proto
61
62
  // source: resources/users/labels.proto
63
+ // source: resources/users/licenses.proto
62
64
  // source: resources/users/props.proto
63
65
  // source: resources/users/users.proto
64
66
  // source: resources/vehicles/vehicles.proto
@@ -32,15 +32,19 @@ export interface Domain {
32
32
  */
33
33
  deletedAt?: Timestamp;
34
34
  /**
35
- * @generated from protobuf field: string name = 5;
35
+ * @generated from protobuf field: bool online = 5;
36
+ */
37
+ online: boolean;
38
+ /**
39
+ * @generated from protobuf field: string name = 6;
36
40
  */
37
41
  name: string;
38
42
  /**
39
- * @generated from protobuf field: optional string creator_job = 6;
43
+ * @generated from protobuf field: optional string creator_job = 7;
40
44
  */
41
45
  creatorJob?: string;
42
46
  /**
43
- * @generated from protobuf field: optional int32 creator_id = 7;
47
+ * @generated from protobuf field: optional int32 creator_id = 8;
44
48
  */
45
49
  creatorId?: number;
46
50
  }
@@ -52,14 +56,16 @@ class Domain$Type extends MessageType<Domain> {
52
56
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
53
57
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
54
58
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
55
- { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
56
- { no: 6, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
57
- { no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
59
+ { no: 5, name: "online", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
60
+ { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
61
+ { no: 7, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
62
+ { no: 8, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
58
63
  ]);
59
64
  }
60
65
  create(value?: PartialMessage<Domain>): Domain {
61
66
  const message = globalThis.Object.create((this.messagePrototype!));
62
67
  message.id = "0";
68
+ message.online = false;
63
69
  message.name = "";
64
70
  if (value !== undefined)
65
71
  reflectionMergePartial<Domain>(this, message, value);
@@ -82,13 +88,16 @@ class Domain$Type extends MessageType<Domain> {
82
88
  case /* optional resources.timestamp.Timestamp deleted_at */ 4:
83
89
  message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
84
90
  break;
85
- case /* string name */ 5:
91
+ case /* bool online */ 5:
92
+ message.online = reader.bool();
93
+ break;
94
+ case /* string name */ 6:
86
95
  message.name = reader.string();
87
96
  break;
88
- case /* optional string creator_job */ 6:
97
+ case /* optional string creator_job */ 7:
89
98
  message.creatorJob = reader.string();
90
99
  break;
91
- case /* optional int32 creator_id */ 7:
100
+ case /* optional int32 creator_id */ 8:
92
101
  message.creatorId = reader.int32();
93
102
  break;
94
103
  default:
@@ -115,15 +124,18 @@ class Domain$Type extends MessageType<Domain> {
115
124
  /* optional resources.timestamp.Timestamp deleted_at = 4; */
116
125
  if (message.deletedAt)
117
126
  Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
118
- /* string name = 5; */
127
+ /* bool online = 5; */
128
+ if (message.online !== false)
129
+ writer.tag(5, WireType.Varint).bool(message.online);
130
+ /* string name = 6; */
119
131
  if (message.name !== "")
120
- writer.tag(5, WireType.LengthDelimited).string(message.name);
121
- /* optional string creator_job = 6; */
132
+ writer.tag(6, WireType.LengthDelimited).string(message.name);
133
+ /* optional string creator_job = 7; */
122
134
  if (message.creatorJob !== undefined)
123
- writer.tag(6, WireType.LengthDelimited).string(message.creatorJob);
124
- /* optional int32 creator_id = 7; */
135
+ writer.tag(7, WireType.LengthDelimited).string(message.creatorJob);
136
+ /* optional int32 creator_id = 8; */
125
137
  if (message.creatorId !== undefined)
126
- writer.tag(7, WireType.Varint).int32(message.creatorId);
138
+ writer.tag(8, WireType.Varint).int32(message.creatorId);
127
139
  let u = options.writeUnknownFields;
128
140
  if (u !== false)
129
141
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -67,6 +67,8 @@ export interface Page {
67
67
  creatorId?: number;
68
68
  }
69
69
  /**
70
+ * TODO
71
+ *
70
72
  * @generated from protobuf message resources.internet.PageData
71
73
  */
72
74
  export interface PageData {
@@ -84,6 +86,8 @@ export enum PageLayoutType {
84
86
  */
85
87
  LANDING = 1,
86
88
  /**
89
+ * TODO
90
+ *
87
91
  * @generated from protobuf enum value: PAGE_LAYOUT_TYPE_BASIC_PAGE = 2;
88
92
  */
89
93
  BASIC_PAGE = 2
@@ -41,9 +41,9 @@ export interface UserOAuth2Conn {
41
41
  */
42
42
  export interface UserProps {
43
43
  /**
44
- * @generated from protobuf field: string reason = 1;
44
+ * @generated from protobuf field: optional string reason = 1;
45
45
  */
46
- reason: string;
46
+ reason?: string;
47
47
  /**
48
48
  * @generated from protobuf field: resources.users.UserProps props = 2;
49
49
  */
@@ -54,9 +54,9 @@ export interface UserProps {
54
54
  */
55
55
  export interface JobsUserProps {
56
56
  /**
57
- * @generated from protobuf field: string reason = 1;
57
+ * @generated from protobuf field: optional string reason = 1;
58
58
  */
59
- reason: string;
59
+ reason?: string;
60
60
  /**
61
61
  * @generated from protobuf field: resources.jobs.JobsUserProps props = 2;
62
62
  */
@@ -168,13 +168,12 @@ export const UserOAuth2Conn = new UserOAuth2Conn$Type();
168
168
  class UserProps$Type extends MessageType<UserProps> {
169
169
  constructor() {
170
170
  super("resources.sync.UserProps", [
171
- { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
171
+ { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
172
172
  { no: 2, name: "props", kind: "message", T: () => UserProps$, options: { "validate.rules": { message: { required: true } } } }
173
173
  ]);
174
174
  }
175
175
  create(value?: PartialMessage<UserProps>): UserProps {
176
176
  const message = globalThis.Object.create((this.messagePrototype!));
177
- message.reason = "";
178
177
  if (value !== undefined)
179
178
  reflectionMergePartial<UserProps>(this, message, value);
180
179
  return message;
@@ -184,7 +183,7 @@ class UserProps$Type extends MessageType<UserProps> {
184
183
  while (reader.pos < end) {
185
184
  let [fieldNo, wireType] = reader.tag();
186
185
  switch (fieldNo) {
187
- case /* string reason */ 1:
186
+ case /* optional string reason */ 1:
188
187
  message.reason = reader.string();
189
188
  break;
190
189
  case /* resources.users.UserProps props */ 2:
@@ -202,8 +201,8 @@ class UserProps$Type extends MessageType<UserProps> {
202
201
  return message;
203
202
  }
204
203
  internalBinaryWrite(message: UserProps, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
205
- /* string reason = 1; */
206
- if (message.reason !== "")
204
+ /* optional string reason = 1; */
205
+ if (message.reason !== undefined)
207
206
  writer.tag(1, WireType.LengthDelimited).string(message.reason);
208
207
  /* resources.users.UserProps props = 2; */
209
208
  if (message.props)
@@ -222,13 +221,12 @@ export const UserProps = new UserProps$Type();
222
221
  class JobsUserProps$Type extends MessageType<JobsUserProps> {
223
222
  constructor() {
224
223
  super("resources.sync.JobsUserProps", [
225
- { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
224
+ { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
226
225
  { no: 2, name: "props", kind: "message", T: () => JobsUserProps$, options: { "validate.rules": { message: { required: true } } } }
227
226
  ]);
228
227
  }
229
228
  create(value?: PartialMessage<JobsUserProps>): JobsUserProps {
230
229
  const message = globalThis.Object.create((this.messagePrototype!));
231
- message.reason = "";
232
230
  if (value !== undefined)
233
231
  reflectionMergePartial<JobsUserProps>(this, message, value);
234
232
  return message;
@@ -238,7 +236,7 @@ class JobsUserProps$Type extends MessageType<JobsUserProps> {
238
236
  while (reader.pos < end) {
239
237
  let [fieldNo, wireType] = reader.tag();
240
238
  switch (fieldNo) {
241
- case /* string reason */ 1:
239
+ case /* optional string reason */ 1:
242
240
  message.reason = reader.string();
243
241
  break;
244
242
  case /* resources.jobs.JobsUserProps props */ 2:
@@ -256,8 +254,8 @@ class JobsUserProps$Type extends MessageType<JobsUserProps> {
256
254
  return message;
257
255
  }
258
256
  internalBinaryWrite(message: JobsUserProps, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
259
- /* string reason = 1; */
260
- if (message.reason !== "")
257
+ /* optional string reason = 1; */
258
+ if (message.reason !== undefined)
261
259
  writer.tag(1, WireType.LengthDelimited).string(message.reason);
262
260
  /* resources.jobs.JobsUserProps props = 2; */
263
261
  if (message.props)
@@ -11,7 +11,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
11
11
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
12
  import { MessageType } from "@protobuf-ts/runtime";
13
13
  import { Coords } from "../livemap/livemap";
14
- import { License } from "../users/users";
14
+ import { License } from "../users/licenses";
15
15
  import { Vehicle } from "../vehicles/vehicles";
16
16
  import { User } from "../users/users";
17
17
  import { Job } from "../users/jobs";