@fatehan/tsrp 1.4.38 → 1.4.44
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/dist/api.js +32 -73
- package/dist/fatehan/activities/camera.js +110 -116
- package/dist/fatehan/activities/workflow.js +376 -390
- package/dist/fatehan/apis/client.js +388 -394
- package/dist/fatehan/areas/area.js +171 -179
- package/dist/fatehan/devices/devices.js +419 -427
- package/dist/fatehan/devices/maintenance.js +136 -144
- package/dist/fatehan/financial/financial.js +288 -294
- package/dist/fatehan/google/error_details.js +114 -120
- package/dist/fatehan/google/protobuf/any.js +6 -9
- package/dist/fatehan/google/protobuf/descriptor.js +535 -582
- package/dist/fatehan/google/protobuf/duration.js +17 -23
- package/dist/fatehan/google/protobuf/field_mask.js +8 -11
- package/dist/fatehan/google/protobuf/timestamp.js +17 -23
- package/dist/fatehan/google/status.js +12 -15
- package/dist/fatehan/identities/authentication.js +206 -212
- package/dist/fatehan/identities/identities.js +337 -347
- package/dist/fatehan/models/fusion.js +153 -159
- package/dist/fatehan/models/models.js +275 -283
- package/dist/fatehan/notifies/notify.js +568 -586
- package/dist/fatehan/packets/dataModel.js +873 -908
- package/dist/fatehan/packets/dataModule.js +58 -66
- package/dist/fatehan/packets/messages.js +194 -202
- package/dist/fatehan/reports/report.js +1559 -1592
- package/dist/fatehan/services/api.d.ts +0 -2
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +709 -747
- package/dist/fatehan/services/repositories.js +186 -192
- package/dist/fatehan/trips/trip.js +279 -295
- package/dist/fatehan/utils/buf/validate/validate.js +716 -726
- package/dist/index.js +1 -2
- package/dist/report.js +15 -53
- package/dist/store/system.io.js +4 -10
- package/dist/system.io.js +4 -7
- package/package.json +2 -2
package/dist/api.js
CHANGED
|
@@ -1,53 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ApiService = exports.ApiError = void 0;
|
|
40
|
-
const system_io_1 = require("./store/system.io");
|
|
41
|
-
const system_io_2 = __importDefault(require("./system.io"));
|
|
42
|
-
class ApiError extends Error {
|
|
1
|
+
import { getDeviceIoCache, getSystemIoCache, setDeviceIoCache, setSystemIoCache, } from "./store/system.io";
|
|
2
|
+
import SystemIoCast from "./system.io";
|
|
3
|
+
export class ApiError extends Error {
|
|
43
4
|
status;
|
|
44
5
|
constructor(status, message) {
|
|
45
6
|
super(message);
|
|
46
7
|
this.status = status;
|
|
47
8
|
}
|
|
48
9
|
}
|
|
49
|
-
|
|
50
|
-
class ApiService {
|
|
10
|
+
export class ApiService {
|
|
51
11
|
url;
|
|
52
12
|
namespace = "com.fatehan.services.ApiService";
|
|
53
13
|
getDynamicHeaders;
|
|
@@ -77,111 +37,110 @@ class ApiService {
|
|
|
77
37
|
}
|
|
78
38
|
}
|
|
79
39
|
async MeIndex(request) {
|
|
80
|
-
const { MeRequest, MeResponse } = await
|
|
40
|
+
const { MeRequest, MeResponse } = await import("./fatehan/services/api");
|
|
81
41
|
return this._call("MeIndex", request, MeRequest, MeResponse);
|
|
82
42
|
}
|
|
83
43
|
async DeviceIndex(request) {
|
|
84
|
-
const { DeviceRequest, DeviceResponse } = await
|
|
44
|
+
const { DeviceRequest, DeviceResponse } = await import("./fatehan/services/api");
|
|
85
45
|
return this._call("DeviceIndex", request, DeviceRequest, DeviceResponse);
|
|
86
46
|
}
|
|
87
47
|
async DeviceShow(request) {
|
|
88
|
-
const { DeviceShowRequest, DeviceShowResponse } = await
|
|
48
|
+
const { DeviceShowRequest, DeviceShowResponse } = await import("./fatehan/services/api");
|
|
89
49
|
return this._call("DeviceShow", request, DeviceShowRequest, DeviceShowResponse);
|
|
90
50
|
}
|
|
91
51
|
async AreaIndex(request) {
|
|
92
|
-
const { AreaIndexRequest, AreaIndexResponse } = await
|
|
52
|
+
const { AreaIndexRequest, AreaIndexResponse } = await import("./fatehan/services/api");
|
|
93
53
|
return this._call("AreaIndex", request, AreaIndexRequest, AreaIndexResponse);
|
|
94
54
|
}
|
|
95
55
|
async ConfigIndex(request) {
|
|
96
|
-
const { ConfigRequest, ConfigResponse } = await
|
|
56
|
+
const { ConfigRequest, ConfigResponse } = await import("./fatehan/services/api");
|
|
97
57
|
return this._call("ConfigIndex", request, ConfigRequest, ConfigResponse);
|
|
98
58
|
}
|
|
99
59
|
async UserIndex(request) {
|
|
100
|
-
const { UserRequest, UserResponse } = await
|
|
60
|
+
const { UserRequest, UserResponse } = await import("./fatehan/services/api");
|
|
101
61
|
return this._call("UserIndex", request, UserRequest, UserResponse);
|
|
102
62
|
}
|
|
103
63
|
async EventTemplateIndex(request) {
|
|
104
|
-
const { EventTemplateIndexRequest, EventTemplateIndexResponse } = await
|
|
64
|
+
const { EventTemplateIndexRequest, EventTemplateIndexResponse } = await import("./fatehan/services/api");
|
|
105
65
|
return this._call("EventTemplateIndex", request, EventTemplateIndexRequest, EventTemplateIndexResponse);
|
|
106
66
|
}
|
|
107
67
|
async EventTemplateShow(request) {
|
|
108
|
-
const { EventTemplateShowRequest } = await
|
|
109
|
-
const { EventTemplate } = await
|
|
68
|
+
const { EventTemplateShowRequest } = await import("./fatehan/services/api");
|
|
69
|
+
const { EventTemplate } = await import("./fatehan/notifies/notify");
|
|
110
70
|
return this._call("EventTemplateShow", request, EventTemplateShowRequest, EventTemplate);
|
|
111
71
|
}
|
|
112
72
|
async EventTemplateStore(request) {
|
|
113
|
-
const { EventTemplate } = await
|
|
73
|
+
const { EventTemplate } = await import("./fatehan/notifies/notify");
|
|
114
74
|
return this._call("EventTemplateStore", request, EventTemplate, EventTemplate);
|
|
115
75
|
}
|
|
116
76
|
async EventTemplateUpdate(request) {
|
|
117
|
-
const { EventTemplate } = await
|
|
77
|
+
const { EventTemplate } = await import("./fatehan/notifies/notify");
|
|
118
78
|
return this._call("EventTemplateUpdate", request, EventTemplate, EventTemplate);
|
|
119
79
|
}
|
|
120
80
|
async EventTemplateDestroy(request) {
|
|
121
|
-
const { EventTemplateDestroyRequest, EventTemplateDestroyResponse } = await
|
|
81
|
+
const { EventTemplateDestroyRequest, EventTemplateDestroyResponse } = await import("./fatehan/services/api");
|
|
122
82
|
return this._call("EventTemplateDestroy", request, EventTemplateDestroyRequest, EventTemplateDestroyResponse);
|
|
123
83
|
}
|
|
124
84
|
async EventIndex(request) {
|
|
125
|
-
const { EventIndexRequest, EventIndexResponse } = await
|
|
85
|
+
const { EventIndexRequest, EventIndexResponse } = await import("./fatehan/services/api");
|
|
126
86
|
return this._call("EventIndex", request, EventIndexRequest, EventIndexResponse);
|
|
127
87
|
}
|
|
128
88
|
async EventShow(request) {
|
|
129
|
-
const { EventShowRequest } = await
|
|
130
|
-
const { Event } = await
|
|
89
|
+
const { EventShowRequest } = await import("./fatehan/services/api");
|
|
90
|
+
const { Event } = await import("./fatehan/notifies/notify");
|
|
131
91
|
return this._call("EventShow", request, EventShowRequest, Event);
|
|
132
92
|
}
|
|
133
93
|
async EventStore(request) {
|
|
134
|
-
const { Event } = await
|
|
94
|
+
const { Event } = await import("./fatehan/notifies/notify");
|
|
135
95
|
return this._call("EventStore", request, Event, Event);
|
|
136
96
|
}
|
|
137
97
|
async EventUpdate(request) {
|
|
138
|
-
const { Event } = await
|
|
98
|
+
const { Event } = await import("./fatehan/notifies/notify");
|
|
139
99
|
return this._call("EventUpdate", request, Event, Event);
|
|
140
100
|
}
|
|
141
101
|
async EventDestroy(request) {
|
|
142
|
-
const { EventDestroyRequest, EventDestroyResponse } = await
|
|
102
|
+
const { EventDestroyRequest, EventDestroyResponse } = await import("./fatehan/services/api");
|
|
143
103
|
return this._call("EventDestroy", request, EventDestroyRequest, EventDestroyResponse);
|
|
144
104
|
}
|
|
145
105
|
async IoIndex(request) {
|
|
146
106
|
if (request.deviceId != null) {
|
|
147
|
-
const cachedIo =
|
|
107
|
+
const cachedIo = getDeviceIoCache(request.deviceId.toString());
|
|
148
108
|
if (cachedIo != null) {
|
|
149
109
|
return { cost: 0, ios: cachedIo, records: cachedIo.length };
|
|
150
110
|
}
|
|
151
111
|
}
|
|
152
112
|
else {
|
|
153
|
-
const cachedIo =
|
|
113
|
+
const cachedIo = getSystemIoCache();
|
|
154
114
|
if (cachedIo != null) {
|
|
155
115
|
return { cost: 0, ios: cachedIo, records: cachedIo.length };
|
|
156
116
|
}
|
|
157
117
|
}
|
|
158
|
-
const { IoRequest, IoResponse } = await
|
|
118
|
+
const { IoRequest, IoResponse } = await import("./fatehan/services/api");
|
|
159
119
|
const response = await this._call("IoIndex", request, IoRequest, IoResponse);
|
|
160
120
|
if (request.deviceId != null) {
|
|
161
|
-
|
|
121
|
+
setDeviceIoCache(request.deviceId.toString(), response.ios);
|
|
162
122
|
}
|
|
163
123
|
else {
|
|
164
|
-
|
|
124
|
+
setSystemIoCache(response.ios);
|
|
165
125
|
}
|
|
166
126
|
return response;
|
|
167
127
|
}
|
|
168
128
|
async IoCast(data) {
|
|
169
129
|
const ioData = await this.IoIndex({});
|
|
170
130
|
const deviceIo = await this.IoIndex({ deviceId: data.deviceId });
|
|
171
|
-
return (
|
|
131
|
+
return SystemIoCast(ioData.ios, deviceIo.ios, data);
|
|
172
132
|
}
|
|
173
133
|
async CommandActionIndex(request) {
|
|
174
|
-
const { CommandActionIndexRequest, CommandActionIndexResponse } = await
|
|
134
|
+
const { CommandActionIndexRequest, CommandActionIndexResponse } = await import("./fatehan/services/api");
|
|
175
135
|
return this._call("CommandActionIndex", request, CommandActionIndexRequest, CommandActionIndexResponse);
|
|
176
136
|
}
|
|
177
137
|
async CommandActionShow(request) {
|
|
178
|
-
const { CommandActionShowRequest } = await
|
|
179
|
-
const { CommandAction } = await
|
|
138
|
+
const { CommandActionShowRequest } = await import("./fatehan/services/api");
|
|
139
|
+
const { CommandAction } = await import("./fatehan/devices/devices");
|
|
180
140
|
return this._call("CommandActionShow", request, CommandActionShowRequest, CommandAction);
|
|
181
141
|
}
|
|
182
142
|
async CommandActionList(request) {
|
|
183
|
-
const { CommandActionListRequest, CommandActionListResponse } = await
|
|
143
|
+
const { CommandActionListRequest, CommandActionListResponse } = await import("./fatehan/services/api");
|
|
184
144
|
return this._call("CommandActionList", request, CommandActionListRequest, CommandActionListResponse);
|
|
185
145
|
}
|
|
186
146
|
}
|
|
187
|
-
exports.ApiService = ApiService;
|