@fatehan/tsrp 1.0.45 → 1.1.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.
Files changed (49) hide show
  1. package/dist/api.d.ts +10 -0
  2. package/dist/api.d.ts.map +1 -0
  3. package/dist/api.js +51 -0
  4. package/dist/api.test.d.ts +2 -0
  5. package/dist/api.test.d.ts.map +1 -0
  6. package/dist/api.test.js +20 -0
  7. package/dist/fatehan/apis/client.d.ts +213 -266
  8. package/dist/fatehan/apis/client.d.ts.map +1 -1
  9. package/dist/fatehan/apis/client.js +2277 -3223
  10. package/dist/fatehan/areas/area.d.ts +14 -0
  11. package/dist/fatehan/areas/area.d.ts.map +1 -1
  12. package/dist/fatehan/areas/area.js +212 -1
  13. package/dist/fatehan/devices/devices.d.ts +278 -0
  14. package/dist/fatehan/devices/devices.d.ts.map +1 -0
  15. package/dist/fatehan/devices/devices.js +3564 -0
  16. package/dist/fatehan/financial/financial.d.ts +45 -0
  17. package/dist/fatehan/financial/financial.d.ts.map +1 -0
  18. package/dist/fatehan/financial/financial.js +385 -0
  19. package/dist/fatehan/identities/identities.d.ts +154 -0
  20. package/dist/fatehan/identities/identities.d.ts.map +1 -0
  21. package/dist/fatehan/identities/identities.js +2068 -0
  22. package/dist/fatehan/models/models.d.ts +14 -80
  23. package/dist/fatehan/models/models.d.ts.map +1 -1
  24. package/dist/fatehan/models/models.js +478 -1401
  25. package/dist/fatehan/notifies/notify.d.ts +27 -0
  26. package/dist/fatehan/notifies/notify.d.ts.map +1 -1
  27. package/dist/fatehan/notifies/notify.js +419 -7
  28. package/dist/fatehan/reports/report.d.ts +1 -1
  29. package/dist/fatehan/reports/report.d.ts.map +1 -1
  30. package/dist/fatehan/reports/report.js +6 -6
  31. package/dist/fatehan/services/api.d.ts +60 -0
  32. package/dist/fatehan/services/api.d.ts.map +1 -0
  33. package/dist/fatehan/services/api.js +529 -0
  34. package/dist/fatehan/services/repositories.d.ts +49 -0
  35. package/dist/fatehan/services/repositories.d.ts.map +1 -0
  36. package/dist/fatehan/services/repositories.js +358 -0
  37. package/dist/index.test.js +3 -4
  38. package/dist/report.d.ts +24 -0
  39. package/dist/report.d.ts.map +1 -0
  40. package/dist/report.js +248 -0
  41. package/dist/report.test.d.ts +2 -0
  42. package/dist/report.test.d.ts.map +1 -0
  43. package/dist/report.test.js +382 -0
  44. package/dist/store/system.io.d.ts +1 -1
  45. package/dist/store/system.io.d.ts.map +1 -1
  46. package/dist/system.io.d.ts +1 -1
  47. package/dist/system.io.d.ts.map +1 -1
  48. package/dist/system.io.js +10 -14
  49. package/package.json +4 -4
@@ -0,0 +1,529 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.5
5
+ // protoc v6.31.1
6
+ // source: services/api.proto
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.AreaIndexResponse = exports.AreaIndexRequest = exports.MeResponse = exports.MeRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const wire_1 = require("@bufbuild/protobuf/wire");
14
+ const long_1 = __importDefault(require("long"));
15
+ const area_1 = require("../areas/area");
16
+ const financial_1 = require("../financial/financial");
17
+ const identities_1 = require("../identities/identities");
18
+ const repositories_1 = require("./repositories");
19
+ exports.protobufPackage = "com.fatehan.services";
20
+ function createBaseMeRequest() {
21
+ return { deviceId: undefined };
22
+ }
23
+ exports.MeRequest = {
24
+ encode(message, writer = new wire_1.BinaryWriter()) {
25
+ if (message.deviceId !== undefined) {
26
+ writer.uint32(8).uint64(message.deviceId.toString());
27
+ }
28
+ return writer;
29
+ },
30
+ decode(input, length) {
31
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
32
+ const end = length === undefined ? reader.len : reader.pos + length;
33
+ const message = createBaseMeRequest();
34
+ while (reader.pos < end) {
35
+ const tag = reader.uint32();
36
+ switch (tag >>> 3) {
37
+ case 1: {
38
+ if (tag !== 8) {
39
+ break;
40
+ }
41
+ message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
42
+ continue;
43
+ }
44
+ }
45
+ if ((tag & 7) === 4 || tag === 0) {
46
+ break;
47
+ }
48
+ reader.skip(tag & 7);
49
+ }
50
+ return message;
51
+ },
52
+ fromJSON(object) {
53
+ return { deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : undefined };
54
+ },
55
+ toJSON(message) {
56
+ const obj = {};
57
+ if (message.deviceId !== undefined) {
58
+ obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
59
+ }
60
+ return obj;
61
+ },
62
+ create(base) {
63
+ return exports.MeRequest.fromPartial(base !== null && base !== void 0 ? base : {});
64
+ },
65
+ fromPartial(object) {
66
+ const message = createBaseMeRequest();
67
+ message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
68
+ ? long_1.default.fromValue(object.deviceId)
69
+ : undefined;
70
+ return message;
71
+ },
72
+ };
73
+ function createBaseMeResponse() {
74
+ return {
75
+ user: undefined,
76
+ person: [],
77
+ currencies: [],
78
+ permissions: [],
79
+ device: undefined,
80
+ deviceCount: undefined,
81
+ cost: long_1.default.ZERO,
82
+ };
83
+ }
84
+ exports.MeResponse = {
85
+ encode(message, writer = new wire_1.BinaryWriter()) {
86
+ if (message.user !== undefined) {
87
+ identities_1.User.encode(message.user, writer.uint32(10).fork()).join();
88
+ }
89
+ for (const v of message.person) {
90
+ repositories_1.PersonRepo.encode(v, writer.uint32(18).fork()).join();
91
+ }
92
+ for (const v of message.currencies) {
93
+ financial_1.Currency.encode(v, writer.uint32(26).fork()).join();
94
+ }
95
+ for (const v of message.permissions) {
96
+ identities_1.Permission.encode(v, writer.uint32(34).fork()).join();
97
+ }
98
+ if (message.device !== undefined) {
99
+ repositories_1.DeviceRepo.encode(message.device, writer.uint32(42).fork()).join();
100
+ }
101
+ if (message.deviceCount !== undefined) {
102
+ writer.uint32(48).uint32(message.deviceCount);
103
+ }
104
+ if (!message.cost.equals(long_1.default.ZERO)) {
105
+ writer.uint32(56).sint64(message.cost.toString());
106
+ }
107
+ return writer;
108
+ },
109
+ decode(input, length) {
110
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
111
+ const end = length === undefined ? reader.len : reader.pos + length;
112
+ const message = createBaseMeResponse();
113
+ while (reader.pos < end) {
114
+ const tag = reader.uint32();
115
+ switch (tag >>> 3) {
116
+ case 1: {
117
+ if (tag !== 10) {
118
+ break;
119
+ }
120
+ message.user = identities_1.User.decode(reader, reader.uint32());
121
+ continue;
122
+ }
123
+ case 2: {
124
+ if (tag !== 18) {
125
+ break;
126
+ }
127
+ message.person.push(repositories_1.PersonRepo.decode(reader, reader.uint32()));
128
+ continue;
129
+ }
130
+ case 3: {
131
+ if (tag !== 26) {
132
+ break;
133
+ }
134
+ message.currencies.push(financial_1.Currency.decode(reader, reader.uint32()));
135
+ continue;
136
+ }
137
+ case 4: {
138
+ if (tag !== 34) {
139
+ break;
140
+ }
141
+ message.permissions.push(identities_1.Permission.decode(reader, reader.uint32()));
142
+ continue;
143
+ }
144
+ case 5: {
145
+ if (tag !== 42) {
146
+ break;
147
+ }
148
+ message.device = repositories_1.DeviceRepo.decode(reader, reader.uint32());
149
+ continue;
150
+ }
151
+ case 6: {
152
+ if (tag !== 48) {
153
+ break;
154
+ }
155
+ message.deviceCount = reader.uint32();
156
+ continue;
157
+ }
158
+ case 7: {
159
+ if (tag !== 56) {
160
+ break;
161
+ }
162
+ message.cost = long_1.default.fromString(reader.sint64().toString());
163
+ continue;
164
+ }
165
+ }
166
+ if ((tag & 7) === 4 || tag === 0) {
167
+ break;
168
+ }
169
+ reader.skip(tag & 7);
170
+ }
171
+ return message;
172
+ },
173
+ fromJSON(object) {
174
+ return {
175
+ user: isSet(object.user) ? identities_1.User.fromJSON(object.user) : undefined,
176
+ person: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.persons) ? object.persons.map((e) => repositories_1.PersonRepo.fromJSON(e)) : [],
177
+ currencies: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.currencies)
178
+ ? object.currencies.map((e) => financial_1.Currency.fromJSON(e))
179
+ : [],
180
+ permissions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.permissions)
181
+ ? object.permissions.map((e) => identities_1.Permission.fromJSON(e))
182
+ : [],
183
+ device: isSet(object.device) ? repositories_1.DeviceRepo.fromJSON(object.device) : undefined,
184
+ deviceCount: isSet(object.device_count) ? globalThis.Number(object.device_count) : undefined,
185
+ cost: isSet(object.cost) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO,
186
+ };
187
+ },
188
+ toJSON(message) {
189
+ var _a, _b, _c;
190
+ const obj = {};
191
+ if (message.user !== undefined) {
192
+ obj.user = identities_1.User.toJSON(message.user);
193
+ }
194
+ if ((_a = message.person) === null || _a === void 0 ? void 0 : _a.length) {
195
+ obj.persons = message.person.map((e) => repositories_1.PersonRepo.toJSON(e));
196
+ }
197
+ if ((_b = message.currencies) === null || _b === void 0 ? void 0 : _b.length) {
198
+ obj.currencies = message.currencies.map((e) => financial_1.Currency.toJSON(e));
199
+ }
200
+ if ((_c = message.permissions) === null || _c === void 0 ? void 0 : _c.length) {
201
+ obj.permissions = message.permissions.map((e) => identities_1.Permission.toJSON(e));
202
+ }
203
+ if (message.device !== undefined) {
204
+ obj.device = repositories_1.DeviceRepo.toJSON(message.device);
205
+ }
206
+ if (message.deviceCount !== undefined) {
207
+ obj.device_count = Math.round(message.deviceCount);
208
+ }
209
+ if (!message.cost.equals(long_1.default.ZERO)) {
210
+ obj.cost = (message.cost || long_1.default.ZERO).toString();
211
+ }
212
+ return obj;
213
+ },
214
+ create(base) {
215
+ return exports.MeResponse.fromPartial(base !== null && base !== void 0 ? base : {});
216
+ },
217
+ fromPartial(object) {
218
+ var _a, _b, _c, _d;
219
+ const message = createBaseMeResponse();
220
+ message.user = (object.user !== undefined && object.user !== null) ? identities_1.User.fromPartial(object.user) : undefined;
221
+ message.person = ((_a = object.person) === null || _a === void 0 ? void 0 : _a.map((e) => repositories_1.PersonRepo.fromPartial(e))) || [];
222
+ message.currencies = ((_b = object.currencies) === null || _b === void 0 ? void 0 : _b.map((e) => financial_1.Currency.fromPartial(e))) || [];
223
+ message.permissions = ((_c = object.permissions) === null || _c === void 0 ? void 0 : _c.map((e) => identities_1.Permission.fromPartial(e))) || [];
224
+ message.device = (object.device !== undefined && object.device !== null)
225
+ ? repositories_1.DeviceRepo.fromPartial(object.device)
226
+ : undefined;
227
+ message.deviceCount = (_d = object.deviceCount) !== null && _d !== void 0 ? _d : undefined;
228
+ message.cost = (object.cost !== undefined && object.cost !== null) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO;
229
+ return message;
230
+ },
231
+ };
232
+ function createBaseAreaIndexRequest() {
233
+ return { disablePagination: false, page: undefined, pageSize: undefined, organizationIds: [], areaIds: [] };
234
+ }
235
+ exports.AreaIndexRequest = {
236
+ encode(message, writer = new wire_1.BinaryWriter()) {
237
+ if (message.disablePagination !== false) {
238
+ writer.uint32(8).bool(message.disablePagination);
239
+ }
240
+ if (message.page !== undefined) {
241
+ writer.uint32(16).uint32(message.page);
242
+ }
243
+ if (message.pageSize !== undefined) {
244
+ writer.uint32(24).uint32(message.pageSize);
245
+ }
246
+ writer.uint32(34).fork();
247
+ for (const v of message.organizationIds) {
248
+ writer.uint64(v.toString());
249
+ }
250
+ writer.join();
251
+ writer.uint32(42).fork();
252
+ for (const v of message.areaIds) {
253
+ writer.uint64(v.toString());
254
+ }
255
+ writer.join();
256
+ return writer;
257
+ },
258
+ decode(input, length) {
259
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
260
+ const end = length === undefined ? reader.len : reader.pos + length;
261
+ const message = createBaseAreaIndexRequest();
262
+ while (reader.pos < end) {
263
+ const tag = reader.uint32();
264
+ switch (tag >>> 3) {
265
+ case 1: {
266
+ if (tag !== 8) {
267
+ break;
268
+ }
269
+ message.disablePagination = reader.bool();
270
+ continue;
271
+ }
272
+ case 2: {
273
+ if (tag !== 16) {
274
+ break;
275
+ }
276
+ message.page = reader.uint32();
277
+ continue;
278
+ }
279
+ case 3: {
280
+ if (tag !== 24) {
281
+ break;
282
+ }
283
+ message.pageSize = reader.uint32();
284
+ continue;
285
+ }
286
+ case 4: {
287
+ if (tag === 32) {
288
+ message.organizationIds.push(long_1.default.fromString(reader.uint64().toString(), true));
289
+ continue;
290
+ }
291
+ if (tag === 34) {
292
+ const end2 = reader.uint32() + reader.pos;
293
+ while (reader.pos < end2) {
294
+ message.organizationIds.push(long_1.default.fromString(reader.uint64().toString(), true));
295
+ }
296
+ continue;
297
+ }
298
+ break;
299
+ }
300
+ case 5: {
301
+ if (tag === 40) {
302
+ message.areaIds.push(long_1.default.fromString(reader.uint64().toString(), true));
303
+ continue;
304
+ }
305
+ if (tag === 42) {
306
+ const end2 = reader.uint32() + reader.pos;
307
+ while (reader.pos < end2) {
308
+ message.areaIds.push(long_1.default.fromString(reader.uint64().toString(), true));
309
+ }
310
+ continue;
311
+ }
312
+ break;
313
+ }
314
+ }
315
+ if ((tag & 7) === 4 || tag === 0) {
316
+ break;
317
+ }
318
+ reader.skip(tag & 7);
319
+ }
320
+ return message;
321
+ },
322
+ fromJSON(object) {
323
+ return {
324
+ disablePagination: isSet(object.id) ? globalThis.Boolean(object.id) : false,
325
+ page: isSet(object.page) ? globalThis.Number(object.page) : undefined,
326
+ pageSize: isSet(object.page_size) ? globalThis.Number(object.page_size) : undefined,
327
+ organizationIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.organization_ids)
328
+ ? object.organization_ids.map((e) => long_1.default.fromValue(e))
329
+ : [],
330
+ areaIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.ares_ids) ? object.ares_ids.map((e) => long_1.default.fromValue(e)) : [],
331
+ };
332
+ },
333
+ toJSON(message) {
334
+ var _a, _b;
335
+ const obj = {};
336
+ if (message.disablePagination !== false) {
337
+ obj.id = message.disablePagination;
338
+ }
339
+ if (message.page !== undefined) {
340
+ obj.page = Math.round(message.page);
341
+ }
342
+ if (message.pageSize !== undefined) {
343
+ obj.page_size = Math.round(message.pageSize);
344
+ }
345
+ if ((_a = message.organizationIds) === null || _a === void 0 ? void 0 : _a.length) {
346
+ obj.organization_ids = message.organizationIds.map((e) => (e || long_1.default.UZERO).toString());
347
+ }
348
+ if ((_b = message.areaIds) === null || _b === void 0 ? void 0 : _b.length) {
349
+ obj.ares_ids = message.areaIds.map((e) => (e || long_1.default.UZERO).toString());
350
+ }
351
+ return obj;
352
+ },
353
+ create(base) {
354
+ return exports.AreaIndexRequest.fromPartial(base !== null && base !== void 0 ? base : {});
355
+ },
356
+ fromPartial(object) {
357
+ var _a, _b, _c, _d, _e;
358
+ const message = createBaseAreaIndexRequest();
359
+ message.disablePagination = (_a = object.disablePagination) !== null && _a !== void 0 ? _a : false;
360
+ message.page = (_b = object.page) !== null && _b !== void 0 ? _b : undefined;
361
+ message.pageSize = (_c = object.pageSize) !== null && _c !== void 0 ? _c : undefined;
362
+ message.organizationIds = ((_d = object.organizationIds) === null || _d === void 0 ? void 0 : _d.map((e) => long_1.default.fromValue(e))) || [];
363
+ message.areaIds = ((_e = object.areaIds) === null || _e === void 0 ? void 0 : _e.map((e) => long_1.default.fromValue(e))) || [];
364
+ return message;
365
+ },
366
+ };
367
+ function createBaseAreaIndexResponse() {
368
+ return { currentPage: 0, from: 0, to: 0, lastPage: 0, perPage: 0, cost: long_1.default.ZERO, total: 0, data: [] };
369
+ }
370
+ exports.AreaIndexResponse = {
371
+ encode(message, writer = new wire_1.BinaryWriter()) {
372
+ if (message.currentPage !== 0) {
373
+ writer.uint32(8).uint32(message.currentPage);
374
+ }
375
+ if (message.from !== 0) {
376
+ writer.uint32(16).uint32(message.from);
377
+ }
378
+ if (message.to !== 0) {
379
+ writer.uint32(24).uint32(message.to);
380
+ }
381
+ if (message.lastPage !== 0) {
382
+ writer.uint32(32).uint32(message.lastPage);
383
+ }
384
+ if (message.perPage !== 0) {
385
+ writer.uint32(40).uint32(message.perPage);
386
+ }
387
+ if (!message.cost.equals(long_1.default.ZERO)) {
388
+ writer.uint32(48).sint64(message.cost.toString());
389
+ }
390
+ if (message.total !== 0) {
391
+ writer.uint32(56).uint32(message.total);
392
+ }
393
+ for (const v of message.data) {
394
+ area_1.Area.encode(v, writer.uint32(66).fork()).join();
395
+ }
396
+ return writer;
397
+ },
398
+ decode(input, length) {
399
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
400
+ const end = length === undefined ? reader.len : reader.pos + length;
401
+ const message = createBaseAreaIndexResponse();
402
+ while (reader.pos < end) {
403
+ const tag = reader.uint32();
404
+ switch (tag >>> 3) {
405
+ case 1: {
406
+ if (tag !== 8) {
407
+ break;
408
+ }
409
+ message.currentPage = reader.uint32();
410
+ continue;
411
+ }
412
+ case 2: {
413
+ if (tag !== 16) {
414
+ break;
415
+ }
416
+ message.from = reader.uint32();
417
+ continue;
418
+ }
419
+ case 3: {
420
+ if (tag !== 24) {
421
+ break;
422
+ }
423
+ message.to = reader.uint32();
424
+ continue;
425
+ }
426
+ case 4: {
427
+ if (tag !== 32) {
428
+ break;
429
+ }
430
+ message.lastPage = reader.uint32();
431
+ continue;
432
+ }
433
+ case 5: {
434
+ if (tag !== 40) {
435
+ break;
436
+ }
437
+ message.perPage = reader.uint32();
438
+ continue;
439
+ }
440
+ case 6: {
441
+ if (tag !== 48) {
442
+ break;
443
+ }
444
+ message.cost = long_1.default.fromString(reader.sint64().toString());
445
+ continue;
446
+ }
447
+ case 7: {
448
+ if (tag !== 56) {
449
+ break;
450
+ }
451
+ message.total = reader.uint32();
452
+ continue;
453
+ }
454
+ case 8: {
455
+ if (tag !== 66) {
456
+ break;
457
+ }
458
+ message.data.push(area_1.Area.decode(reader, reader.uint32()));
459
+ continue;
460
+ }
461
+ }
462
+ if ((tag & 7) === 4 || tag === 0) {
463
+ break;
464
+ }
465
+ reader.skip(tag & 7);
466
+ }
467
+ return message;
468
+ },
469
+ fromJSON(object) {
470
+ return {
471
+ currentPage: isSet(object.current_page) ? globalThis.Number(object.current_page) : 0,
472
+ from: isSet(object.from) ? globalThis.Number(object.from) : 0,
473
+ to: isSet(object.to) ? globalThis.Number(object.to) : 0,
474
+ lastPage: isSet(object.last_page) ? globalThis.Number(object.last_page) : 0,
475
+ perPage: isSet(object.per_page) ? globalThis.Number(object.per_page) : 0,
476
+ cost: isSet(object.cost) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO,
477
+ total: isSet(object.total) ? globalThis.Number(object.total) : 0,
478
+ data: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.data) ? object.data.map((e) => area_1.Area.fromJSON(e)) : [],
479
+ };
480
+ },
481
+ toJSON(message) {
482
+ var _a;
483
+ const obj = {};
484
+ if (message.currentPage !== 0) {
485
+ obj.current_page = Math.round(message.currentPage);
486
+ }
487
+ if (message.from !== 0) {
488
+ obj.from = Math.round(message.from);
489
+ }
490
+ if (message.to !== 0) {
491
+ obj.to = Math.round(message.to);
492
+ }
493
+ if (message.lastPage !== 0) {
494
+ obj.last_page = Math.round(message.lastPage);
495
+ }
496
+ if (message.perPage !== 0) {
497
+ obj.per_page = Math.round(message.perPage);
498
+ }
499
+ if (!message.cost.equals(long_1.default.ZERO)) {
500
+ obj.cost = (message.cost || long_1.default.ZERO).toString();
501
+ }
502
+ if (message.total !== 0) {
503
+ obj.total = Math.round(message.total);
504
+ }
505
+ if ((_a = message.data) === null || _a === void 0 ? void 0 : _a.length) {
506
+ obj.data = message.data.map((e) => area_1.Area.toJSON(e));
507
+ }
508
+ return obj;
509
+ },
510
+ create(base) {
511
+ return exports.AreaIndexResponse.fromPartial(base !== null && base !== void 0 ? base : {});
512
+ },
513
+ fromPartial(object) {
514
+ var _a, _b, _c, _d, _e, _f, _g;
515
+ const message = createBaseAreaIndexResponse();
516
+ message.currentPage = (_a = object.currentPage) !== null && _a !== void 0 ? _a : 0;
517
+ message.from = (_b = object.from) !== null && _b !== void 0 ? _b : 0;
518
+ message.to = (_c = object.to) !== null && _c !== void 0 ? _c : 0;
519
+ message.lastPage = (_d = object.lastPage) !== null && _d !== void 0 ? _d : 0;
520
+ message.perPage = (_e = object.perPage) !== null && _e !== void 0 ? _e : 0;
521
+ message.cost = (object.cost !== undefined && object.cost !== null) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO;
522
+ message.total = (_f = object.total) !== null && _f !== void 0 ? _f : 0;
523
+ message.data = ((_g = object.data) === null || _g === void 0 ? void 0 : _g.map((e) => area_1.Area.fromPartial(e))) || [];
524
+ return message;
525
+ },
526
+ };
527
+ function isSet(value) {
528
+ return value !== null && value !== undefined;
529
+ }
@@ -0,0 +1,49 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import Long from "long";
3
+ import { Car, Device, DeviceIcon, SystemIo, Tracker } from "../devices/devices";
4
+ import { Wallet } from "../financial/financial";
5
+ import { Organization, Person, User } from "../identities/identities";
6
+ import { DeviceStatus } from "../packets/dataModel";
7
+ export declare const protobufPackage = "com.fatehan.services";
8
+ export interface DeviceRepo {
9
+ device?: Device | undefined;
10
+ icon?: DeviceIcon | undefined;
11
+ tracker?: Tracker | undefined;
12
+ car?: Car | undefined;
13
+ deviceStatus?: DeviceStatus | undefined;
14
+ userDeviceIo: SystemIo[];
15
+ owner?: User | undefined;
16
+ organization?: Organization | undefined;
17
+ }
18
+ export interface PersonRepo {
19
+ person?: Person | undefined;
20
+ wallet?: Wallet | undefined;
21
+ organization?: Organization | undefined;
22
+ }
23
+ export interface UserRepo {
24
+ user?: User | undefined;
25
+ persons: Person[];
26
+ }
27
+ export declare const DeviceRepo: MessageFns<DeviceRepo>;
28
+ export declare const PersonRepo: MessageFns<PersonRepo>;
29
+ export declare const UserRepo: MessageFns<UserRepo>;
30
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
31
+ export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
32
+ [K in keyof T]?: DeepPartial<T[K]>;
33
+ } : Partial<T>;
34
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
35
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
36
+ [K in keyof P]: Exact<P[K], I[K]>;
37
+ } & {
38
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
39
+ };
40
+ export interface MessageFns<T> {
41
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
42
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
43
+ fromJSON(object: any): T;
44
+ toJSON(message: T): unknown;
45
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
46
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
47
+ }
48
+ export {};
49
+ //# sourceMappingURL=repositories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../../../src/fatehan/services/repositories.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IA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