@fatehan/tsrp 1.3.4 → 1.3.5
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.d.ts +5 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +52 -0
- package/dist/report.d.ts +0 -4
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +0 -32
- package/dist/store/system.io.d.ts +2 -0
- package/dist/store/system.io.d.ts.map +1 -1
- package/dist/store/system.io.js +9 -0
- package/dist/tests/report.test.js +0 -46
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import Long from "long";
|
|
1
2
|
import { HeaderProvider } from ".";
|
|
3
|
+
import { ShownIo } from "./fatehan/devices/devices";
|
|
4
|
+
import { Data } from "./fatehan/packets/dataModel";
|
|
2
5
|
export declare class ApiService {
|
|
3
6
|
private readonly url;
|
|
4
7
|
private readonly namespace;
|
|
@@ -10,5 +13,7 @@ export declare class ApiService {
|
|
|
10
13
|
AreaIndex(request: import("./fatehan/services/api").AreaIndexRequest): Promise<import("./fatehan/services/api").AreaIndexResponse>;
|
|
11
14
|
ConfigIndex(request: import("./fatehan/services/api").ConfigRequest): Promise<import("./fatehan/services/api").ConfigResponse>;
|
|
12
15
|
UserIndex(request: import("./fatehan/services/api").UserRequest): Promise<import("./fatehan/services/api").UserResponse>;
|
|
16
|
+
IoIndex(request: import("./fatehan/services/api").IoRequest): Promise<import("./fatehan/services/api").IoResponse>;
|
|
17
|
+
SystemIoCast(deviceId: Long, data: Data): Promise<ShownIo[]>;
|
|
13
18
|
}
|
|
14
19
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AASnD,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6C;IACvE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAiB;gBAEvC,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc;YAKzC,KAAK;IAgCN,OAAO,CAClB,OAAO,EAAE,OAAO,wBAAwB,EAAE,SAAS,GAClD,OAAO,CAAC,OAAO,wBAAwB,EAAE,UAAU,CAAC;IAK1C,WAAW,CACtB,OAAO,EAAE,OAAO,wBAAwB,EAAE,aAAa,GACtD,OAAO,CAAC,OAAO,wBAAwB,EAAE,cAAc,CAAC;IAO9C,SAAS,CACpB,OAAO,EAAE,OAAO,wBAAwB,EAAE,gBAAgB,GACzD,OAAO,CAAC,OAAO,wBAAwB,EAAE,iBAAiB,CAAC;IAYjD,WAAW,CACtB,OAAO,EAAE,OAAO,wBAAwB,EAAE,aAAa,GACtD,OAAO,CAAC,OAAO,wBAAwB,EAAE,cAAc,CAAC;IAO9C,SAAS,CACpB,OAAO,EAAE,OAAO,wBAAwB,EAAE,WAAW,GACpD,OAAO,CAAC,OAAO,wBAAwB,EAAE,YAAY,CAAC;IAO5C,OAAO,CAClB,OAAO,EAAE,OAAO,wBAAwB,EAAE,SAAS,GAClD,OAAO,CAAC,OAAO,wBAAwB,EAAE,UAAU,CAAC;IAgC1C,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAuB1E"}
|
package/dist/api.js
CHANGED
|
@@ -32,8 +32,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
39
|
exports.ApiService = void 0;
|
|
40
|
+
const system_io_1 = require("./store/system.io");
|
|
41
|
+
const system_io_2 = __importDefault(require("./system.io"));
|
|
37
42
|
class ApiService {
|
|
38
43
|
constructor(url, headerProvider) {
|
|
39
44
|
this.namespace = "com.fatehan.services.ApiService";
|
|
@@ -81,5 +86,52 @@ class ApiService {
|
|
|
81
86
|
const { UserRequest, UserResponse } = await Promise.resolve().then(() => __importStar(require("./fatehan/services/api")));
|
|
82
87
|
return this._call("UserIndex", request, UserRequest, UserResponse);
|
|
83
88
|
}
|
|
89
|
+
async IoIndex(request) {
|
|
90
|
+
if (request.deviceId != null) {
|
|
91
|
+
const cachedIo = (0, system_io_1.getDeviceIoCache)(request.deviceId.toString());
|
|
92
|
+
if (cachedIo != null) {
|
|
93
|
+
return { cost: 0, ios: cachedIo, records: cachedIo.length };
|
|
94
|
+
}
|
|
95
|
+
const { IoRequest, IoResponse } = await Promise.resolve().then(() => __importStar(require("./fatehan/services/api")));
|
|
96
|
+
const response = await this._call("IoIndex", request, IoRequest, IoResponse);
|
|
97
|
+
(0, system_io_1.setDeviceIoCache)(request.deviceId.toString(), response.ios);
|
|
98
|
+
return response;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
const cachedIo = (0, system_io_1.getSystemIoCache)();
|
|
102
|
+
if (cachedIo != null) {
|
|
103
|
+
return { cost: 0, ios: cachedIo, records: cachedIo.length };
|
|
104
|
+
}
|
|
105
|
+
const { IoRequest, IoResponse } = await Promise.resolve().then(() => __importStar(require("./fatehan/services/api")));
|
|
106
|
+
const response = await this._call("IoIndex", request, IoRequest, IoResponse);
|
|
107
|
+
(0, system_io_1.setSystemIoCache)(response.ios);
|
|
108
|
+
return response;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async SystemIoCast(deviceId, data) {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
var ioData, deviceIo;
|
|
114
|
+
try {
|
|
115
|
+
const result = await this.IoIndex({});
|
|
116
|
+
if (!((_a = result === null || result === void 0 ? void 0 : result.ios) === null || _a === void 0 ? void 0 : _a.length))
|
|
117
|
+
return [];
|
|
118
|
+
ioData = result.ios;
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
console.error("Failed to fetch SystemIoReport in SystemIoCast:", error);
|
|
122
|
+
return [];
|
|
123
|
+
}
|
|
124
|
+
try {
|
|
125
|
+
const result = await this.IoIndex({ deviceId: deviceId });
|
|
126
|
+
if (!((_b = result === null || result === void 0 ? void 0 : result.ios) === null || _b === void 0 ? void 0 : _b.length))
|
|
127
|
+
return [];
|
|
128
|
+
deviceIo = result.ios;
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
console.error("Failed to fetch DeviceIoReport in SystemIoCast:", error);
|
|
132
|
+
return [];
|
|
133
|
+
}
|
|
134
|
+
return (0, system_io_2.default)(ioData, deviceIo, data);
|
|
135
|
+
}
|
|
84
136
|
}
|
|
85
137
|
exports.ApiService = ApiService;
|
package/dist/report.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ShownIo, SystemIo } from "./fatehan/devices/devices";
|
|
2
|
-
import type { Data } from "./fatehan/packets/dataModel";
|
|
3
1
|
import { HeaderProvider } from ".";
|
|
4
2
|
export declare class ReportService {
|
|
5
3
|
private readonly url;
|
|
@@ -19,7 +17,5 @@ export declare class ReportService {
|
|
|
19
17
|
CommandHistoryReport(request: import("./fatehan/reports/report").CommandHistoryRequest): Promise<import("./fatehan/reports/report").CommandHistoryResponse>;
|
|
20
18
|
WorkflowReport(request: import("./fatehan/reports/report").WorkflowRequest): Promise<import("./fatehan/reports/report").WorkflowResponse>;
|
|
21
19
|
ChartReport(request: import("./fatehan/reports/report").ChartRequest, responses: (chunk: import("./fatehan/reports/report").ChartResponse) => void): Promise<void>;
|
|
22
|
-
SystemIoReport(request: import("./fatehan/reports/report").SystemIoRequest): Promise<import("./fatehan/reports/report").SystemIoResponse>;
|
|
23
|
-
SystemIoCast(systemIo: SystemIo[] | null, deviceIo: SystemIo[], data: Data): Promise<ShownIo[]>;
|
|
24
20
|
}
|
|
25
21
|
//# sourceMappingURL=report.d.ts.map
|
package/dist/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAEnC,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+C;IACzE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAiB;gBAEvC,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc;YAKzC,KAAK;IA+BN,eAAe,CAC1B,OAAO,EAAE,OAAO,0BAA0B,EAAE,gBAAgB,GAC3D,OAAO,CAAC,OAAO,0BAA0B,EAAE,iBAAiB,CAAC;IAYnD,qBAAqB,CAChC,OAAO,EAAE,OAAO,0BAA0B,EAAE,sBAAsB,GACjE,OAAO,CAAC,OAAO,0BAA0B,EAAE,uBAAuB,CAAC;IAYzD,UAAU,CACrB,OAAO,EAAE,OAAO,0BAA0B,EAAE,iBAAiB,GAC5D,OAAO,CAAC,OAAO,0BAA0B,EAAE,kBAAkB,CAAC;IAYpD,iBAAiB,CAC5B,OAAO,EAAE,OAAO,0BAA0B,EAAE,kBAAkB,GAC7D,OAAO,CAAC,OAAO,0BAA0B,EAAE,mBAAmB,CAAC;IAYrD,mBAAmB,CAC9B,OAAO,EAAE,OAAO,0BAA0B,EAAE,0BAA0B,GACrE,OAAO,CAAC,OAAO,0BAA0B,EAAE,2BAA2B,CAAC;IAW7D,SAAS,CACpB,OAAO,EAAE,OAAO,0BAA0B,EAAE,UAAU,GACrD,OAAO,CAAC,OAAO,0BAA0B,EAAE,WAAW,CAAC;IAO7C,UAAU,CACrB,OAAO,EAAE,OAAO,0BAA0B,EAAE,iBAAiB,GAC5D,OAAO,CAAC,OAAO,0BAA0B,EAAE,kBAAkB,CAAC;IAYpD,uBAAuB,CAClC,OAAO,EAAE,OAAO,0BAA0B,EAAE,wBAAwB,GACnE,OAAO,CAAC,OAAO,0BAA0B,EAAE,yBAAyB,CAAC;IAW3D,eAAe,CAC1B,OAAO,EAAE,OAAO,0BAA0B,EAAE,gBAAgB,GAC3D,OAAO,CAAC,OAAO,0BAA0B,EAAE,iBAAiB,CAAC;IAYnD,oBAAoB,CAC/B,OAAO,EAAE,OAAO,0BAA0B,EAAE,qBAAqB,GAChE,OAAO,CAAC,OAAO,0BAA0B,EAAE,sBAAsB,CAAC;IAYxD,cAAc,CACzB,OAAO,EAAE,OAAO,0BAA0B,EAAE,eAAe,GAC1D,OAAO,CAAC,OAAO,0BAA0B,EAAE,gBAAgB,CAAC;IAYlD,WAAW,CACtB,OAAO,EAAE,OAAO,0BAA0B,EAAE,YAAY,EACxD,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,0BAA0B,EAAE,aAAa,KAAK,IAAI;CA6C/E"}
|
package/dist/report.js
CHANGED
|
@@ -32,13 +32,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
36
|
exports.ReportService = void 0;
|
|
40
|
-
const system_io_1 = require("./store/system.io");
|
|
41
|
-
const system_io_2 = __importDefault(require("./system.io"));
|
|
42
37
|
class ReportService {
|
|
43
38
|
constructor(url, headerProvider) {
|
|
44
39
|
this.namespace = "com.fatehan.reports.ReportService";
|
|
@@ -147,32 +142,5 @@ class ReportService {
|
|
|
147
142
|
}
|
|
148
143
|
}
|
|
149
144
|
}
|
|
150
|
-
async SystemIoReport(request) {
|
|
151
|
-
const cachedIo = (0, system_io_1.getSystemIoCache)();
|
|
152
|
-
if (cachedIo != null) {
|
|
153
|
-
return { cost: 0, ios: cachedIo, records: cachedIo.length };
|
|
154
|
-
}
|
|
155
|
-
const { SystemIoRequest, SystemIoResponse } = await Promise.resolve().then(() => __importStar(require("./fatehan/reports/report")));
|
|
156
|
-
const response = await this._call("SystemIoReport", request, SystemIoRequest, SystemIoResponse);
|
|
157
|
-
(0, system_io_1.setSystemIoCache)(response.ios);
|
|
158
|
-
return response;
|
|
159
|
-
}
|
|
160
|
-
async SystemIoCast(systemIo, deviceIo, data) {
|
|
161
|
-
var _a;
|
|
162
|
-
let ioData = systemIo;
|
|
163
|
-
if (ioData == null) {
|
|
164
|
-
try {
|
|
165
|
-
const result = await this.SystemIoReport({});
|
|
166
|
-
if (!((_a = result === null || result === void 0 ? void 0 : result.ios) === null || _a === void 0 ? void 0 : _a.length))
|
|
167
|
-
return [];
|
|
168
|
-
ioData = result.ios;
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
console.error("Failed to fetch SystemIoReport in SystemIoCast:", error);
|
|
172
|
-
return [];
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return (0, system_io_2.default)(ioData, deviceIo, data);
|
|
176
|
-
}
|
|
177
145
|
}
|
|
178
146
|
exports.ReportService = ReportService;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SystemIo } from "../fatehan/devices/devices";
|
|
2
2
|
export declare function setSystemIoCache(data: SystemIo[]): void;
|
|
3
3
|
export declare function getSystemIoCache(): SystemIo[];
|
|
4
|
+
export declare function getDeviceIoCache(deviceId: string): SystemIo[] | null;
|
|
5
|
+
export declare function setDeviceIoCache(deviceId: string, ios: SystemIo[]): void;
|
|
4
6
|
//# sourceMappingURL=system.io.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.io.d.ts","sourceRoot":"","sources":["../../src/store/system.io.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"system.io.d.ts","sourceRoot":"","sources":["../../src/store/system.io.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAKtD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAEhD;AAED,wBAAgB,gBAAgB,IAAI,QAAQ,EAAE,CAE7C;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,GAAG,IAAI,CAEpE;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,QAEjE"}
|
package/dist/store/system.io.js
CHANGED
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setSystemIoCache = setSystemIoCache;
|
|
4
4
|
exports.getSystemIoCache = getSystemIoCache;
|
|
5
|
+
exports.getDeviceIoCache = getDeviceIoCache;
|
|
6
|
+
exports.setDeviceIoCache = setDeviceIoCache;
|
|
5
7
|
let ios;
|
|
8
|
+
let deviceIos = {};
|
|
6
9
|
function setSystemIoCache(data) {
|
|
7
10
|
ios = data;
|
|
8
11
|
}
|
|
9
12
|
function getSystemIoCache() {
|
|
10
13
|
return ios;
|
|
11
14
|
}
|
|
15
|
+
function getDeviceIoCache(deviceId) {
|
|
16
|
+
return deviceIos[deviceId] || null;
|
|
17
|
+
}
|
|
18
|
+
function setDeviceIoCache(deviceId, ios) {
|
|
19
|
+
deviceIos[deviceId] = ios;
|
|
20
|
+
}
|
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
4
|
};
|
|
@@ -39,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
6
|
const vitest_1 = require("vitest");
|
|
40
7
|
const report_1 = require("../report");
|
|
41
8
|
const long_1 = __importDefault(require("long"));
|
|
42
|
-
const system_io_1 = __importDefault(require("../system.io"));
|
|
43
9
|
const report_2 = require("../fatehan/reports/report");
|
|
44
10
|
global.fetch = vitest_1.vi.fn();
|
|
45
11
|
vitest_1.vi.mock("./system.io", () => ({
|
|
@@ -92,12 +58,6 @@ vitest_1.vi.mock("./store/system.io", () => ({
|
|
|
92
58
|
await service.TripReport({ deviceIds: [long_1.default.fromInt(124251414)] });
|
|
93
59
|
(0, vitest_1.expect)(global.fetch).toHaveBeenCalledWith(`${url}/com.fatehan.reports.ReportService/TripReport`, vitest_1.expect.any(Object));
|
|
94
60
|
});
|
|
95
|
-
(0, vitest_1.it)("should call SystemIoReport and then set the cache on success", async () => {
|
|
96
|
-
const { setSystemIoCache } = await Promise.resolve().then(() => __importStar(require("../store/system.io")));
|
|
97
|
-
setupMockSuccessResponse({ ios: [{ id: 1, name: "TestIO" }] });
|
|
98
|
-
await service.SystemIoReport({});
|
|
99
|
-
(0, vitest_1.expect)(global.fetch).toHaveBeenCalledWith(`${url}/com.fatehan.reports.ReportService/SystemIoReport`, vitest_1.expect.any(Object));
|
|
100
|
-
});
|
|
101
61
|
(0, vitest_1.it)("should handle streaming ChartReport fetch call", async () => {
|
|
102
62
|
const mockStreamReader = {
|
|
103
63
|
read: vitest_1.vi
|
|
@@ -123,10 +83,4 @@ vitest_1.vi.mock("./store/system.io", () => ({
|
|
|
123
83
|
}, onChunkCallback);
|
|
124
84
|
(0, vitest_1.expect)(global.fetch).toHaveBeenCalledWith(`${url}/com.fatehan.reports.ReportService/ChartReport`, vitest_1.expect.any(Object));
|
|
125
85
|
});
|
|
126
|
-
(0, vitest_1.it)("SystemIoCast should trigger SystemIoReport when cache is empty", async () => {
|
|
127
|
-
setupMockSuccessResponse();
|
|
128
|
-
await service.SystemIoCast(null, [], { deviceId: long_1.default.ZERO });
|
|
129
|
-
(0, vitest_1.expect)(global.fetch).toHaveBeenCalledWith(`${url}/com.fatehan.reports.ReportService/SystemIoReport`, vitest_1.expect.any(Object));
|
|
130
|
-
(0, vitest_1.expect)(system_io_1.default).toHaveBeenCalled();
|
|
131
|
-
});
|
|
132
86
|
});
|