@fatehan/tsrp 1.1.2 → 1.1.4
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 +2 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +15 -0
- package/dist/api.test.js +9 -1
- package/dist/fatehan/models/models.d.ts +11 -0
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +203 -29
- package/dist/fatehan/services/api.d.ts +23 -14
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +340 -187
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AreaIndexRequest, AreaIndexResponse, DeviceRequest, DeviceResponse, MeRequest, MeResponse } from "./fatehan/services/api";
|
|
1
|
+
import { AreaIndexRequest, AreaIndexResponse, ConfigRequest, ConfigResponse, DeviceRequest, DeviceResponse, MeRequest, MeResponse } from "./fatehan/services/api";
|
|
2
2
|
export declare class ApiService {
|
|
3
3
|
private readonly url;
|
|
4
4
|
private readonly namespace;
|
|
@@ -7,5 +7,6 @@ export declare class ApiService {
|
|
|
7
7
|
MeIndex(request: MeRequest): Promise<MeResponse>;
|
|
8
8
|
DeviceIndex(request: DeviceRequest): Promise<DeviceResponse>;
|
|
9
9
|
AreaIndex(request: AreaIndexRequest): Promise<AreaIndexResponse>;
|
|
10
|
+
ConfigIndex(request: ConfigRequest): Promise<ConfigResponse>;
|
|
10
11
|
}
|
|
11
12
|
//# 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,EACH,gBAAgB,EAChB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAChD,aAAa,EACb,cAAc,EACd,SAAS,EACT,UAAU,EACb,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6C;IACvE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;gBAE1B,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM;IAcjE,OAAO,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IAoBhD,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAwB5D,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAyBhE,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;CAwBtE"}
|
package/dist/api.js
CHANGED
|
@@ -62,5 +62,20 @@ class ApiService {
|
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
+
ConfigIndex(request) {
|
|
66
|
+
return new Promise(async (resolve, reject) => {
|
|
67
|
+
const response = await fetch(`${this.url}/${this.namespace}/ConfigIndex`, {
|
|
68
|
+
method: "POST",
|
|
69
|
+
headers: this.headers,
|
|
70
|
+
body: new Uint8Array(api_1.ConfigRequest.encode(request).finish()),
|
|
71
|
+
});
|
|
72
|
+
if (response.ok) {
|
|
73
|
+
resolve(api_1.ConfigResponse.decode(new Uint8Array(await response.arrayBuffer())));
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
reject(await response.text());
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
65
80
|
}
|
|
66
81
|
exports.ApiService = ApiService;
|
package/dist/api.test.js
CHANGED
|
@@ -11,11 +11,19 @@ const api_1 = require("./api");
|
|
|
11
11
|
let res = await c.MeIndex({});
|
|
12
12
|
console.log("MeIndex", res);
|
|
13
13
|
});
|
|
14
|
+
(0, vitest_1.it)("ConfigIndex", async () => {
|
|
15
|
+
let res = await c.ConfigIndex({
|
|
16
|
+
domain: "api.myavl.ir"
|
|
17
|
+
});
|
|
18
|
+
console.log("ConfigIndex", res);
|
|
19
|
+
});
|
|
14
20
|
(0, vitest_1.it)("DeviceIndex", async () => {
|
|
15
21
|
let res = await c.DeviceIndex({
|
|
16
22
|
includeDeviceStatus: false,
|
|
17
23
|
organizationId: undefined,
|
|
18
|
-
queryFilter:
|
|
24
|
+
queryFilter: {},
|
|
25
|
+
order: undefined,
|
|
26
|
+
sort: undefined,
|
|
19
27
|
search: undefined,
|
|
20
28
|
trackerId: undefined,
|
|
21
29
|
disablePagination: false,
|
|
@@ -123,6 +123,16 @@ export interface LiveLocationRelated {
|
|
|
123
123
|
createdAt?: Date | undefined;
|
|
124
124
|
updatedAt?: Date | undefined;
|
|
125
125
|
}
|
|
126
|
+
export interface Config {
|
|
127
|
+
id: Long;
|
|
128
|
+
organizationId: Long;
|
|
129
|
+
createdBy?: Long | undefined;
|
|
130
|
+
updatedBy?: Long | undefined;
|
|
131
|
+
key: string;
|
|
132
|
+
value: string;
|
|
133
|
+
createdAt?: Date | undefined;
|
|
134
|
+
updatedAt?: Date | undefined;
|
|
135
|
+
}
|
|
126
136
|
export declare const Gallery: MessageFns<Gallery>;
|
|
127
137
|
export declare const IoList: MessageFns<IoList>;
|
|
128
138
|
export declare const IoList_ItemsEntry: MessageFns<IoList_ItemsEntry>;
|
|
@@ -134,6 +144,7 @@ export declare const ChargeLog: MessageFns<ChargeLog>;
|
|
|
134
144
|
export declare const TrialLog: MessageFns<TrialLog>;
|
|
135
145
|
export declare const LiveLocation: MessageFns<LiveLocation>;
|
|
136
146
|
export declare const LiveLocationRelated: MessageFns<LiveLocationRelated>;
|
|
147
|
+
export declare const Config: MessageFns<Config>;
|
|
137
148
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
138
149
|
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 {} ? {
|
|
139
150
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/fatehan/models/models.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,KAAK,EAGL,IAAI,EACJ,YAAY,EACZ,QAAQ,EAGT,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,IAAI,CAAC;IACT,QAAQ,EAAE,IAAI,CAAC;IACf,gBAAgB,EAAE,UAAU,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CACtC;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAA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AAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAAE,CAAC;AAoCnG,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
|
|
@@ -8,7 +8,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.LiveLocationRelated = exports.LiveLocation = exports.TrialLog = exports.ChargeLog = exports.DeviceStatusList = exports.PersonalAccessToken = exports.SinotrackCache = exports.HeartbeatCache = exports.IoList_ItemsEntry = exports.IoList = exports.Gallery = exports.ChargeLog_Type = exports.protobufPackage = void 0;
|
|
11
|
+
exports.Config = exports.LiveLocationRelated = exports.LiveLocation = exports.TrialLog = exports.ChargeLog = exports.DeviceStatusList = exports.PersonalAccessToken = exports.SinotrackCache = exports.HeartbeatCache = exports.IoList_ItemsEntry = exports.IoList = exports.Gallery = exports.ChargeLog_Type = exports.protobufPackage = void 0;
|
|
12
12
|
exports.chargeLog_TypeFromJSON = chargeLog_TypeFromJSON;
|
|
13
13
|
exports.chargeLog_TypeToJSON = chargeLog_TypeToJSON;
|
|
14
14
|
/* eslint-disable */
|
|
@@ -1703,14 +1703,14 @@ exports.LiveLocation = {
|
|
|
1703
1703
|
fromJSON(object) {
|
|
1704
1704
|
return {
|
|
1705
1705
|
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
1706
|
-
organizationId: isSet(object.
|
|
1707
|
-
createdBy: isSet(object.
|
|
1708
|
-
updatedBy: isSet(object.
|
|
1706
|
+
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : long_1.default.UZERO,
|
|
1707
|
+
createdBy: isSet(object.created_by) ? long_1.default.fromValue(object.created_by) : undefined,
|
|
1708
|
+
updatedBy: isSet(object.updated_by) ? long_1.default.fromValue(object.updated_by) : undefined,
|
|
1709
1709
|
uuid: isSet(object.uuid) ? globalThis.String(object.uuid) : "",
|
|
1710
|
-
expiresAt: isSet(object.
|
|
1710
|
+
expiresAt: isSet(object.expires_at) ? fromJsonTimestamp(object.expires_at) : undefined,
|
|
1711
1711
|
password: isSet(object.password) ? globalThis.String(object.password) : undefined,
|
|
1712
|
-
createdAt: isSet(object.
|
|
1713
|
-
updatedAt: isSet(object.
|
|
1712
|
+
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
1713
|
+
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
1714
1714
|
objects: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.objects)
|
|
1715
1715
|
? object.objects.map((e) => exports.LiveLocationRelated.fromJSON(e))
|
|
1716
1716
|
: [],
|
|
@@ -1723,28 +1723,28 @@ exports.LiveLocation = {
|
|
|
1723
1723
|
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
1724
1724
|
}
|
|
1725
1725
|
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
1726
|
-
obj.
|
|
1726
|
+
obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
|
|
1727
1727
|
}
|
|
1728
1728
|
if (message.createdBy !== undefined) {
|
|
1729
|
-
obj.
|
|
1729
|
+
obj.created_by = (message.createdBy || long_1.default.UZERO).toString();
|
|
1730
1730
|
}
|
|
1731
1731
|
if (message.updatedBy !== undefined) {
|
|
1732
|
-
obj.
|
|
1732
|
+
obj.updated_by = (message.updatedBy || long_1.default.UZERO).toString();
|
|
1733
1733
|
}
|
|
1734
1734
|
if (message.uuid !== "") {
|
|
1735
1735
|
obj.uuid = message.uuid;
|
|
1736
1736
|
}
|
|
1737
1737
|
if (message.expiresAt !== undefined) {
|
|
1738
|
-
obj.
|
|
1738
|
+
obj.expires_at = message.expiresAt.toISOString();
|
|
1739
1739
|
}
|
|
1740
1740
|
if (message.password !== undefined) {
|
|
1741
1741
|
obj.password = message.password;
|
|
1742
1742
|
}
|
|
1743
1743
|
if (message.createdAt !== undefined) {
|
|
1744
|
-
obj.
|
|
1744
|
+
obj.created_at = message.createdAt.toISOString();
|
|
1745
1745
|
}
|
|
1746
1746
|
if (message.updatedAt !== undefined) {
|
|
1747
|
-
obj.
|
|
1747
|
+
obj.updated_at = message.updatedAt.toISOString();
|
|
1748
1748
|
}
|
|
1749
1749
|
if ((_a = message.objects) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1750
1750
|
obj.objects = message.objects.map((e) => exports.LiveLocationRelated.toJSON(e));
|
|
@@ -1801,10 +1801,10 @@ exports.LiveLocationRelated = {
|
|
|
1801
1801
|
writer.uint32(34).string(message.objectType);
|
|
1802
1802
|
}
|
|
1803
1803
|
if (message.createdAt !== undefined) {
|
|
1804
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(
|
|
1804
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
|
|
1805
1805
|
}
|
|
1806
1806
|
if (message.updatedAt !== undefined) {
|
|
1807
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(
|
|
1807
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(66).fork()).join();
|
|
1808
1808
|
}
|
|
1809
1809
|
return writer;
|
|
1810
1810
|
},
|
|
@@ -1843,15 +1843,15 @@ exports.LiveLocationRelated = {
|
|
|
1843
1843
|
message.objectType = reader.string();
|
|
1844
1844
|
continue;
|
|
1845
1845
|
}
|
|
1846
|
-
case
|
|
1847
|
-
if (tag !==
|
|
1846
|
+
case 7: {
|
|
1847
|
+
if (tag !== 58) {
|
|
1848
1848
|
break;
|
|
1849
1849
|
}
|
|
1850
1850
|
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1851
1851
|
continue;
|
|
1852
1852
|
}
|
|
1853
|
-
case
|
|
1854
|
-
if (tag !==
|
|
1853
|
+
case 8: {
|
|
1854
|
+
if (tag !== 66) {
|
|
1855
1855
|
break;
|
|
1856
1856
|
}
|
|
1857
1857
|
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
@@ -1868,11 +1868,11 @@ exports.LiveLocationRelated = {
|
|
|
1868
1868
|
fromJSON(object) {
|
|
1869
1869
|
return {
|
|
1870
1870
|
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
1871
|
-
liveLocationId: isSet(object.
|
|
1872
|
-
objectId: isSet(object.
|
|
1873
|
-
objectType: isSet(object.
|
|
1874
|
-
createdAt: isSet(object.
|
|
1875
|
-
updatedAt: isSet(object.
|
|
1871
|
+
liveLocationId: isSet(object.live_location_id) ? long_1.default.fromValue(object.live_location_id) : long_1.default.UZERO,
|
|
1872
|
+
objectId: isSet(object.object_id) ? long_1.default.fromValue(object.object_id) : long_1.default.UZERO,
|
|
1873
|
+
objectType: isSet(object.object_type) ? globalThis.String(object.object_type) : "",
|
|
1874
|
+
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
1875
|
+
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
1876
1876
|
};
|
|
1877
1877
|
},
|
|
1878
1878
|
toJSON(message) {
|
|
@@ -1881,19 +1881,19 @@ exports.LiveLocationRelated = {
|
|
|
1881
1881
|
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
1882
1882
|
}
|
|
1883
1883
|
if (!message.liveLocationId.equals(long_1.default.UZERO)) {
|
|
1884
|
-
obj.
|
|
1884
|
+
obj.live_location_id = (message.liveLocationId || long_1.default.UZERO).toString();
|
|
1885
1885
|
}
|
|
1886
1886
|
if (!message.objectId.equals(long_1.default.UZERO)) {
|
|
1887
|
-
obj.
|
|
1887
|
+
obj.object_id = (message.objectId || long_1.default.UZERO).toString();
|
|
1888
1888
|
}
|
|
1889
1889
|
if (message.objectType !== "") {
|
|
1890
|
-
obj.
|
|
1890
|
+
obj.object_type = message.objectType;
|
|
1891
1891
|
}
|
|
1892
1892
|
if (message.createdAt !== undefined) {
|
|
1893
|
-
obj.
|
|
1893
|
+
obj.created_at = message.createdAt.toISOString();
|
|
1894
1894
|
}
|
|
1895
1895
|
if (message.updatedAt !== undefined) {
|
|
1896
|
-
obj.
|
|
1896
|
+
obj.updated_at = message.updatedAt.toISOString();
|
|
1897
1897
|
}
|
|
1898
1898
|
return obj;
|
|
1899
1899
|
},
|
|
@@ -1916,6 +1916,180 @@ exports.LiveLocationRelated = {
|
|
|
1916
1916
|
return message;
|
|
1917
1917
|
},
|
|
1918
1918
|
};
|
|
1919
|
+
function createBaseConfig() {
|
|
1920
|
+
return {
|
|
1921
|
+
id: long_1.default.UZERO,
|
|
1922
|
+
organizationId: long_1.default.UZERO,
|
|
1923
|
+
createdBy: undefined,
|
|
1924
|
+
updatedBy: undefined,
|
|
1925
|
+
key: "",
|
|
1926
|
+
value: "",
|
|
1927
|
+
createdAt: undefined,
|
|
1928
|
+
updatedAt: undefined,
|
|
1929
|
+
};
|
|
1930
|
+
}
|
|
1931
|
+
exports.Config = {
|
|
1932
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1933
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
1934
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
1935
|
+
}
|
|
1936
|
+
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
1937
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
1938
|
+
}
|
|
1939
|
+
if (message.createdBy !== undefined) {
|
|
1940
|
+
writer.uint32(24).uint64(message.createdBy.toString());
|
|
1941
|
+
}
|
|
1942
|
+
if (message.updatedBy !== undefined) {
|
|
1943
|
+
writer.uint32(32).uint64(message.updatedBy.toString());
|
|
1944
|
+
}
|
|
1945
|
+
if (message.key !== "") {
|
|
1946
|
+
writer.uint32(42).string(message.key);
|
|
1947
|
+
}
|
|
1948
|
+
if (message.value !== "") {
|
|
1949
|
+
writer.uint32(50).string(message.value);
|
|
1950
|
+
}
|
|
1951
|
+
if (message.createdAt !== undefined) {
|
|
1952
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
|
|
1953
|
+
}
|
|
1954
|
+
if (message.updatedAt !== undefined) {
|
|
1955
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(66).fork()).join();
|
|
1956
|
+
}
|
|
1957
|
+
return writer;
|
|
1958
|
+
},
|
|
1959
|
+
decode(input, length) {
|
|
1960
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1961
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1962
|
+
const message = createBaseConfig();
|
|
1963
|
+
while (reader.pos < end) {
|
|
1964
|
+
const tag = reader.uint32();
|
|
1965
|
+
switch (tag >>> 3) {
|
|
1966
|
+
case 1: {
|
|
1967
|
+
if (tag !== 8) {
|
|
1968
|
+
break;
|
|
1969
|
+
}
|
|
1970
|
+
message.id = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1971
|
+
continue;
|
|
1972
|
+
}
|
|
1973
|
+
case 2: {
|
|
1974
|
+
if (tag !== 16) {
|
|
1975
|
+
break;
|
|
1976
|
+
}
|
|
1977
|
+
message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1978
|
+
continue;
|
|
1979
|
+
}
|
|
1980
|
+
case 3: {
|
|
1981
|
+
if (tag !== 24) {
|
|
1982
|
+
break;
|
|
1983
|
+
}
|
|
1984
|
+
message.createdBy = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1985
|
+
continue;
|
|
1986
|
+
}
|
|
1987
|
+
case 4: {
|
|
1988
|
+
if (tag !== 32) {
|
|
1989
|
+
break;
|
|
1990
|
+
}
|
|
1991
|
+
message.updatedBy = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1992
|
+
continue;
|
|
1993
|
+
}
|
|
1994
|
+
case 5: {
|
|
1995
|
+
if (tag !== 42) {
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1998
|
+
message.key = reader.string();
|
|
1999
|
+
continue;
|
|
2000
|
+
}
|
|
2001
|
+
case 6: {
|
|
2002
|
+
if (tag !== 50) {
|
|
2003
|
+
break;
|
|
2004
|
+
}
|
|
2005
|
+
message.value = reader.string();
|
|
2006
|
+
continue;
|
|
2007
|
+
}
|
|
2008
|
+
case 7: {
|
|
2009
|
+
if (tag !== 58) {
|
|
2010
|
+
break;
|
|
2011
|
+
}
|
|
2012
|
+
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2013
|
+
continue;
|
|
2014
|
+
}
|
|
2015
|
+
case 8: {
|
|
2016
|
+
if (tag !== 66) {
|
|
2017
|
+
break;
|
|
2018
|
+
}
|
|
2019
|
+
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2020
|
+
continue;
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2024
|
+
break;
|
|
2025
|
+
}
|
|
2026
|
+
reader.skip(tag & 7);
|
|
2027
|
+
}
|
|
2028
|
+
return message;
|
|
2029
|
+
},
|
|
2030
|
+
fromJSON(object) {
|
|
2031
|
+
return {
|
|
2032
|
+
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
2033
|
+
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : long_1.default.UZERO,
|
|
2034
|
+
createdBy: isSet(object.created_by) ? long_1.default.fromValue(object.created_by) : undefined,
|
|
2035
|
+
updatedBy: isSet(object.updated_by) ? long_1.default.fromValue(object.updated_by) : undefined,
|
|
2036
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2037
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
2038
|
+
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
2039
|
+
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
2040
|
+
};
|
|
2041
|
+
},
|
|
2042
|
+
toJSON(message) {
|
|
2043
|
+
const obj = {};
|
|
2044
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2045
|
+
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
2046
|
+
}
|
|
2047
|
+
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
2048
|
+
obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
|
|
2049
|
+
}
|
|
2050
|
+
if (message.createdBy !== undefined) {
|
|
2051
|
+
obj.created_by = (message.createdBy || long_1.default.UZERO).toString();
|
|
2052
|
+
}
|
|
2053
|
+
if (message.updatedBy !== undefined) {
|
|
2054
|
+
obj.updated_by = (message.updatedBy || long_1.default.UZERO).toString();
|
|
2055
|
+
}
|
|
2056
|
+
if (message.key !== "") {
|
|
2057
|
+
obj.key = message.key;
|
|
2058
|
+
}
|
|
2059
|
+
if (message.value !== "") {
|
|
2060
|
+
obj.value = message.value;
|
|
2061
|
+
}
|
|
2062
|
+
if (message.createdAt !== undefined) {
|
|
2063
|
+
obj.created_at = message.createdAt.toISOString();
|
|
2064
|
+
}
|
|
2065
|
+
if (message.updatedAt !== undefined) {
|
|
2066
|
+
obj.updated_at = message.updatedAt.toISOString();
|
|
2067
|
+
}
|
|
2068
|
+
return obj;
|
|
2069
|
+
},
|
|
2070
|
+
create(base) {
|
|
2071
|
+
return exports.Config.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2072
|
+
},
|
|
2073
|
+
fromPartial(object) {
|
|
2074
|
+
var _a, _b, _c, _d;
|
|
2075
|
+
const message = createBaseConfig();
|
|
2076
|
+
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
2077
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
2078
|
+
? long_1.default.fromValue(object.organizationId)
|
|
2079
|
+
: long_1.default.UZERO;
|
|
2080
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
2081
|
+
? long_1.default.fromValue(object.createdBy)
|
|
2082
|
+
: undefined;
|
|
2083
|
+
message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
|
|
2084
|
+
? long_1.default.fromValue(object.updatedBy)
|
|
2085
|
+
: undefined;
|
|
2086
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
2087
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
2088
|
+
message.createdAt = (_c = object.createdAt) !== null && _c !== void 0 ? _c : undefined;
|
|
2089
|
+
message.updatedAt = (_d = object.updatedAt) !== null && _d !== void 0 ? _d : undefined;
|
|
2090
|
+
return message;
|
|
2091
|
+
},
|
|
2092
|
+
};
|
|
1919
2093
|
function bytesFromBase64(b64) {
|
|
1920
2094
|
if (globalThis.Buffer) {
|
|
1921
2095
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
@@ -3,8 +3,18 @@ import Long from "long";
|
|
|
3
3
|
import { Area } from "../areas/area";
|
|
4
4
|
import { Currency } from "../financial/financial";
|
|
5
5
|
import { Permission, User } from "../identities/identities";
|
|
6
|
+
import { Config } from "../models/models";
|
|
6
7
|
import { DeviceRepo, PersonRepo } from "./repositories";
|
|
7
8
|
export declare const protobufPackage = "com.fatehan.services";
|
|
9
|
+
export interface ConfigRequest {
|
|
10
|
+
domain?: string | undefined;
|
|
11
|
+
partnerId?: Long | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface ConfigResponse {
|
|
14
|
+
cost: number;
|
|
15
|
+
records: number;
|
|
16
|
+
list: Config[];
|
|
17
|
+
}
|
|
8
18
|
export interface DeviceRequest {
|
|
9
19
|
disablePagination: boolean;
|
|
10
20
|
page?: number | undefined;
|
|
@@ -13,7 +23,15 @@ export interface DeviceRequest {
|
|
|
13
23
|
trackerId?: Long | undefined;
|
|
14
24
|
search?: string | undefined;
|
|
15
25
|
includeDeviceStatus: boolean;
|
|
16
|
-
queryFilter
|
|
26
|
+
queryFilter: {
|
|
27
|
+
[key: string]: FilterScope;
|
|
28
|
+
};
|
|
29
|
+
sort?: string | undefined;
|
|
30
|
+
order?: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface DeviceRequest_QueryFilterEntry {
|
|
33
|
+
key: string;
|
|
34
|
+
value?: FilterScope | undefined;
|
|
17
35
|
}
|
|
18
36
|
export interface DeviceResponse {
|
|
19
37
|
currentPage: number;
|
|
@@ -23,6 +41,7 @@ export interface DeviceResponse {
|
|
|
23
41
|
perPage: number;
|
|
24
42
|
cost: Long;
|
|
25
43
|
total: number;
|
|
44
|
+
serverTime?: Date | undefined;
|
|
26
45
|
data: DeviceRepo[];
|
|
27
46
|
}
|
|
28
47
|
export interface MeRequest {
|
|
@@ -72,18 +91,10 @@ export interface FilterScope {
|
|
|
72
91
|
/** date filter type only */
|
|
73
92
|
type?: string | undefined;
|
|
74
93
|
}
|
|
75
|
-
export
|
|
76
|
-
|
|
77
|
-
order?: string | undefined;
|
|
78
|
-
filter: {
|
|
79
|
-
[key: string]: FilterScope;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
export interface QueryFilter_FilterEntry {
|
|
83
|
-
key: string;
|
|
84
|
-
value?: FilterScope | undefined;
|
|
85
|
-
}
|
|
94
|
+
export declare const ConfigRequest: MessageFns<ConfigRequest>;
|
|
95
|
+
export declare const ConfigResponse: MessageFns<ConfigResponse>;
|
|
86
96
|
export declare const DeviceRequest: MessageFns<DeviceRequest>;
|
|
97
|
+
export declare const DeviceRequest_QueryFilterEntry: MessageFns<DeviceRequest_QueryFilterEntry>;
|
|
87
98
|
export declare const DeviceResponse: MessageFns<DeviceResponse>;
|
|
88
99
|
export declare const MeRequest: MessageFns<MeRequest>;
|
|
89
100
|
export declare const MeResponse: MessageFns<MeResponse>;
|
|
@@ -91,8 +102,6 @@ export declare const AreaIndexRequest: MessageFns<AreaIndexRequest>;
|
|
|
91
102
|
export declare const AreaIndexResponse: MessageFns<AreaIndexResponse>;
|
|
92
103
|
export declare const FilterConditions: MessageFns<FilterConditions>;
|
|
93
104
|
export declare const FilterScope: MessageFns<FilterScope>;
|
|
94
|
-
export declare const QueryFilter: MessageFns<QueryFilter>;
|
|
95
|
-
export declare const QueryFilter_FilterEntry: MessageFns<QueryFilter_FilterEntry>;
|
|
96
105
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
97
106
|
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 {} ? {
|
|
98
107
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/fatehan/services/api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EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAAE,CAAC;AAoCnG,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
|
|
@@ -8,15 +8,173 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.
|
|
11
|
+
exports.FilterScope = exports.FilterConditions = exports.AreaIndexResponse = exports.AreaIndexRequest = exports.MeResponse = exports.MeRequest = exports.DeviceResponse = exports.DeviceRequest_QueryFilterEntry = exports.DeviceRequest = exports.ConfigResponse = exports.ConfigRequest = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
13
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
14
14
|
const long_1 = __importDefault(require("long"));
|
|
15
15
|
const area_1 = require("../areas/area");
|
|
16
16
|
const financial_1 = require("../financial/financial");
|
|
17
|
+
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
17
18
|
const identities_1 = require("../identities/identities");
|
|
19
|
+
const models_1 = require("../models/models");
|
|
18
20
|
const repositories_1 = require("./repositories");
|
|
19
21
|
exports.protobufPackage = "com.fatehan.services";
|
|
22
|
+
function createBaseConfigRequest() {
|
|
23
|
+
return { domain: undefined, partnerId: undefined };
|
|
24
|
+
}
|
|
25
|
+
exports.ConfigRequest = {
|
|
26
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
27
|
+
if (message.domain !== undefined) {
|
|
28
|
+
writer.uint32(10).string(message.domain);
|
|
29
|
+
}
|
|
30
|
+
if (message.partnerId !== undefined) {
|
|
31
|
+
writer.uint32(16).uint64(message.partnerId.toString());
|
|
32
|
+
}
|
|
33
|
+
return writer;
|
|
34
|
+
},
|
|
35
|
+
decode(input, length) {
|
|
36
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
37
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
38
|
+
const message = createBaseConfigRequest();
|
|
39
|
+
while (reader.pos < end) {
|
|
40
|
+
const tag = reader.uint32();
|
|
41
|
+
switch (tag >>> 3) {
|
|
42
|
+
case 1: {
|
|
43
|
+
if (tag !== 10) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.domain = reader.string();
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
case 2: {
|
|
50
|
+
if (tag !== 16) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
message.partnerId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
reader.skip(tag & 7);
|
|
61
|
+
}
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
fromJSON(object) {
|
|
65
|
+
return {
|
|
66
|
+
domain: isSet(object.domain) ? globalThis.String(object.domain) : undefined,
|
|
67
|
+
partnerId: isSet(object.partner_id) ? long_1.default.fromValue(object.partner_id) : undefined,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
toJSON(message) {
|
|
71
|
+
const obj = {};
|
|
72
|
+
if (message.domain !== undefined) {
|
|
73
|
+
obj.domain = message.domain;
|
|
74
|
+
}
|
|
75
|
+
if (message.partnerId !== undefined) {
|
|
76
|
+
obj.partner_id = (message.partnerId || long_1.default.UZERO).toString();
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
},
|
|
80
|
+
create(base) {
|
|
81
|
+
return exports.ConfigRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
82
|
+
},
|
|
83
|
+
fromPartial(object) {
|
|
84
|
+
var _a;
|
|
85
|
+
const message = createBaseConfigRequest();
|
|
86
|
+
message.domain = (_a = object.domain) !== null && _a !== void 0 ? _a : undefined;
|
|
87
|
+
message.partnerId = (object.partnerId !== undefined && object.partnerId !== null)
|
|
88
|
+
? long_1.default.fromValue(object.partnerId)
|
|
89
|
+
: undefined;
|
|
90
|
+
return message;
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
function createBaseConfigResponse() {
|
|
94
|
+
return { cost: 0, records: 0, list: [] };
|
|
95
|
+
}
|
|
96
|
+
exports.ConfigResponse = {
|
|
97
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
98
|
+
if (message.cost !== 0) {
|
|
99
|
+
writer.uint32(8).uint32(message.cost);
|
|
100
|
+
}
|
|
101
|
+
if (message.records !== 0) {
|
|
102
|
+
writer.uint32(16).uint32(message.records);
|
|
103
|
+
}
|
|
104
|
+
for (const v of message.list) {
|
|
105
|
+
models_1.Config.encode(v, writer.uint32(26).fork()).join();
|
|
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 = createBaseConfigResponse();
|
|
113
|
+
while (reader.pos < end) {
|
|
114
|
+
const tag = reader.uint32();
|
|
115
|
+
switch (tag >>> 3) {
|
|
116
|
+
case 1: {
|
|
117
|
+
if (tag !== 8) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
message.cost = reader.uint32();
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
case 2: {
|
|
124
|
+
if (tag !== 16) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
message.records = reader.uint32();
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
case 3: {
|
|
131
|
+
if (tag !== 26) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
message.list.push(models_1.Config.decode(reader, reader.uint32()));
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
reader.skip(tag & 7);
|
|
142
|
+
}
|
|
143
|
+
return message;
|
|
144
|
+
},
|
|
145
|
+
fromJSON(object) {
|
|
146
|
+
return {
|
|
147
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
148
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
149
|
+
list: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.list) ? object.list.map((e) => models_1.Config.fromJSON(e)) : [],
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
toJSON(message) {
|
|
153
|
+
var _a;
|
|
154
|
+
const obj = {};
|
|
155
|
+
if (message.cost !== 0) {
|
|
156
|
+
obj.cost = Math.round(message.cost);
|
|
157
|
+
}
|
|
158
|
+
if (message.records !== 0) {
|
|
159
|
+
obj.records = Math.round(message.records);
|
|
160
|
+
}
|
|
161
|
+
if ((_a = message.list) === null || _a === void 0 ? void 0 : _a.length) {
|
|
162
|
+
obj.list = message.list.map((e) => models_1.Config.toJSON(e));
|
|
163
|
+
}
|
|
164
|
+
return obj;
|
|
165
|
+
},
|
|
166
|
+
create(base) {
|
|
167
|
+
return exports.ConfigResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
168
|
+
},
|
|
169
|
+
fromPartial(object) {
|
|
170
|
+
var _a, _b, _c;
|
|
171
|
+
const message = createBaseConfigResponse();
|
|
172
|
+
message.cost = (_a = object.cost) !== null && _a !== void 0 ? _a : 0;
|
|
173
|
+
message.records = (_b = object.records) !== null && _b !== void 0 ? _b : 0;
|
|
174
|
+
message.list = ((_c = object.list) === null || _c === void 0 ? void 0 : _c.map((e) => models_1.Config.fromPartial(e))) || [];
|
|
175
|
+
return message;
|
|
176
|
+
},
|
|
177
|
+
};
|
|
20
178
|
function createBaseDeviceRequest() {
|
|
21
179
|
return {
|
|
22
180
|
disablePagination: false,
|
|
@@ -26,7 +184,9 @@ function createBaseDeviceRequest() {
|
|
|
26
184
|
trackerId: undefined,
|
|
27
185
|
search: undefined,
|
|
28
186
|
includeDeviceStatus: false,
|
|
29
|
-
queryFilter:
|
|
187
|
+
queryFilter: {},
|
|
188
|
+
sort: undefined,
|
|
189
|
+
order: undefined,
|
|
30
190
|
};
|
|
31
191
|
}
|
|
32
192
|
exports.DeviceRequest = {
|
|
@@ -52,8 +212,14 @@ exports.DeviceRequest = {
|
|
|
52
212
|
if (message.includeDeviceStatus !== false) {
|
|
53
213
|
writer.uint32(56).bool(message.includeDeviceStatus);
|
|
54
214
|
}
|
|
55
|
-
|
|
56
|
-
exports.
|
|
215
|
+
Object.entries(message.queryFilter).forEach(([key, value]) => {
|
|
216
|
+
exports.DeviceRequest_QueryFilterEntry.encode({ key: key, value }, writer.uint32(66).fork()).join();
|
|
217
|
+
});
|
|
218
|
+
if (message.sort !== undefined) {
|
|
219
|
+
writer.uint32(74).string(message.sort);
|
|
220
|
+
}
|
|
221
|
+
if (message.order !== undefined) {
|
|
222
|
+
writer.uint32(82).string(message.order);
|
|
57
223
|
}
|
|
58
224
|
return writer;
|
|
59
225
|
},
|
|
@@ -117,7 +283,24 @@ exports.DeviceRequest = {
|
|
|
117
283
|
if (tag !== 66) {
|
|
118
284
|
break;
|
|
119
285
|
}
|
|
120
|
-
|
|
286
|
+
const entry8 = exports.DeviceRequest_QueryFilterEntry.decode(reader, reader.uint32());
|
|
287
|
+
if (entry8.value !== undefined) {
|
|
288
|
+
message.queryFilter[entry8.key] = entry8.value;
|
|
289
|
+
}
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
case 9: {
|
|
293
|
+
if (tag !== 74) {
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
message.sort = reader.string();
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
case 10: {
|
|
300
|
+
if (tag !== 82) {
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
message.order = reader.string();
|
|
121
304
|
continue;
|
|
122
305
|
}
|
|
123
306
|
}
|
|
@@ -139,7 +322,14 @@ exports.DeviceRequest = {
|
|
|
139
322
|
includeDeviceStatus: isSet(object.include_device_status)
|
|
140
323
|
? globalThis.Boolean(object.include_device_status)
|
|
141
324
|
: false,
|
|
142
|
-
queryFilter:
|
|
325
|
+
queryFilter: isObject(object.query_filter)
|
|
326
|
+
? Object.entries(object.query_filter).reduce((acc, [key, value]) => {
|
|
327
|
+
acc[key] = exports.FilterScope.fromJSON(value);
|
|
328
|
+
return acc;
|
|
329
|
+
}, {})
|
|
330
|
+
: {},
|
|
331
|
+
sort: isSet(object.sort) ? globalThis.String(object.sort) : undefined,
|
|
332
|
+
order: isSet(object.order) ? globalThis.String(object.order) : undefined,
|
|
143
333
|
};
|
|
144
334
|
},
|
|
145
335
|
toJSON(message) {
|
|
@@ -165,8 +355,20 @@ exports.DeviceRequest = {
|
|
|
165
355
|
if (message.includeDeviceStatus !== false) {
|
|
166
356
|
obj.include_device_status = message.includeDeviceStatus;
|
|
167
357
|
}
|
|
168
|
-
if (message.queryFilter
|
|
169
|
-
|
|
358
|
+
if (message.queryFilter) {
|
|
359
|
+
const entries = Object.entries(message.queryFilter);
|
|
360
|
+
if (entries.length > 0) {
|
|
361
|
+
obj.query_filter = {};
|
|
362
|
+
entries.forEach(([k, v]) => {
|
|
363
|
+
obj.query_filter[k] = exports.FilterScope.toJSON(v);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (message.sort !== undefined) {
|
|
368
|
+
obj.sort = message.sort;
|
|
369
|
+
}
|
|
370
|
+
if (message.order !== undefined) {
|
|
371
|
+
obj.order = message.order;
|
|
170
372
|
}
|
|
171
373
|
return obj;
|
|
172
374
|
},
|
|
@@ -174,7 +376,7 @@ exports.DeviceRequest = {
|
|
|
174
376
|
return exports.DeviceRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
175
377
|
},
|
|
176
378
|
fromPartial(object) {
|
|
177
|
-
var _a, _b, _c, _d, _e;
|
|
379
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
178
380
|
const message = createBaseDeviceRequest();
|
|
179
381
|
message.disablePagination = (_a = object.disablePagination) !== null && _a !== void 0 ? _a : false;
|
|
180
382
|
message.page = (_b = object.page) !== null && _b !== void 0 ? _b : undefined;
|
|
@@ -187,14 +389,100 @@ exports.DeviceRequest = {
|
|
|
187
389
|
: undefined;
|
|
188
390
|
message.search = (_d = object.search) !== null && _d !== void 0 ? _d : undefined;
|
|
189
391
|
message.includeDeviceStatus = (_e = object.includeDeviceStatus) !== null && _e !== void 0 ? _e : false;
|
|
190
|
-
message.queryFilter = (object.queryFilter !==
|
|
191
|
-
|
|
392
|
+
message.queryFilter = Object.entries((_f = object.queryFilter) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
|
|
393
|
+
if (value !== undefined) {
|
|
394
|
+
acc[key] = exports.FilterScope.fromPartial(value);
|
|
395
|
+
}
|
|
396
|
+
return acc;
|
|
397
|
+
}, {});
|
|
398
|
+
message.sort = (_g = object.sort) !== null && _g !== void 0 ? _g : undefined;
|
|
399
|
+
message.order = (_h = object.order) !== null && _h !== void 0 ? _h : undefined;
|
|
400
|
+
return message;
|
|
401
|
+
},
|
|
402
|
+
};
|
|
403
|
+
function createBaseDeviceRequest_QueryFilterEntry() {
|
|
404
|
+
return { key: "", value: undefined };
|
|
405
|
+
}
|
|
406
|
+
exports.DeviceRequest_QueryFilterEntry = {
|
|
407
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
408
|
+
if (message.key !== "") {
|
|
409
|
+
writer.uint32(10).string(message.key);
|
|
410
|
+
}
|
|
411
|
+
if (message.value !== undefined) {
|
|
412
|
+
exports.FilterScope.encode(message.value, writer.uint32(18).fork()).join();
|
|
413
|
+
}
|
|
414
|
+
return writer;
|
|
415
|
+
},
|
|
416
|
+
decode(input, length) {
|
|
417
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
418
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
419
|
+
const message = createBaseDeviceRequest_QueryFilterEntry();
|
|
420
|
+
while (reader.pos < end) {
|
|
421
|
+
const tag = reader.uint32();
|
|
422
|
+
switch (tag >>> 3) {
|
|
423
|
+
case 1: {
|
|
424
|
+
if (tag !== 10) {
|
|
425
|
+
break;
|
|
426
|
+
}
|
|
427
|
+
message.key = reader.string();
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
case 2: {
|
|
431
|
+
if (tag !== 18) {
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
message.value = exports.FilterScope.decode(reader, reader.uint32());
|
|
435
|
+
continue;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
439
|
+
break;
|
|
440
|
+
}
|
|
441
|
+
reader.skip(tag & 7);
|
|
442
|
+
}
|
|
443
|
+
return message;
|
|
444
|
+
},
|
|
445
|
+
fromJSON(object) {
|
|
446
|
+
return {
|
|
447
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
448
|
+
value: isSet(object.value) ? exports.FilterScope.fromJSON(object.value) : undefined,
|
|
449
|
+
};
|
|
450
|
+
},
|
|
451
|
+
toJSON(message) {
|
|
452
|
+
const obj = {};
|
|
453
|
+
if (message.key !== "") {
|
|
454
|
+
obj.key = message.key;
|
|
455
|
+
}
|
|
456
|
+
if (message.value !== undefined) {
|
|
457
|
+
obj.value = exports.FilterScope.toJSON(message.value);
|
|
458
|
+
}
|
|
459
|
+
return obj;
|
|
460
|
+
},
|
|
461
|
+
create(base) {
|
|
462
|
+
return exports.DeviceRequest_QueryFilterEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
463
|
+
},
|
|
464
|
+
fromPartial(object) {
|
|
465
|
+
var _a;
|
|
466
|
+
const message = createBaseDeviceRequest_QueryFilterEntry();
|
|
467
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
468
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
469
|
+
? exports.FilterScope.fromPartial(object.value)
|
|
192
470
|
: undefined;
|
|
193
471
|
return message;
|
|
194
472
|
},
|
|
195
473
|
};
|
|
196
474
|
function createBaseDeviceResponse() {
|
|
197
|
-
return {
|
|
475
|
+
return {
|
|
476
|
+
currentPage: 0,
|
|
477
|
+
from: 0,
|
|
478
|
+
to: 0,
|
|
479
|
+
lastPage: 0,
|
|
480
|
+
perPage: 0,
|
|
481
|
+
cost: long_1.default.ZERO,
|
|
482
|
+
total: 0,
|
|
483
|
+
serverTime: undefined,
|
|
484
|
+
data: [],
|
|
485
|
+
};
|
|
198
486
|
}
|
|
199
487
|
exports.DeviceResponse = {
|
|
200
488
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -219,8 +507,11 @@ exports.DeviceResponse = {
|
|
|
219
507
|
if (message.total !== 0) {
|
|
220
508
|
writer.uint32(56).uint32(message.total);
|
|
221
509
|
}
|
|
510
|
+
if (message.serverTime !== undefined) {
|
|
511
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.serverTime), writer.uint32(66).fork()).join();
|
|
512
|
+
}
|
|
222
513
|
for (const v of message.data) {
|
|
223
|
-
repositories_1.DeviceRepo.encode(v, writer.uint32(
|
|
514
|
+
repositories_1.DeviceRepo.encode(v, writer.uint32(74).fork()).join();
|
|
224
515
|
}
|
|
225
516
|
return writer;
|
|
226
517
|
},
|
|
@@ -284,6 +575,13 @@ exports.DeviceResponse = {
|
|
|
284
575
|
if (tag !== 66) {
|
|
285
576
|
break;
|
|
286
577
|
}
|
|
578
|
+
message.serverTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
579
|
+
continue;
|
|
580
|
+
}
|
|
581
|
+
case 9: {
|
|
582
|
+
if (tag !== 74) {
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
287
585
|
message.data.push(repositories_1.DeviceRepo.decode(reader, reader.uint32()));
|
|
288
586
|
continue;
|
|
289
587
|
}
|
|
@@ -304,6 +602,7 @@ exports.DeviceResponse = {
|
|
|
304
602
|
perPage: isSet(object.per_page) ? globalThis.Number(object.per_page) : 0,
|
|
305
603
|
cost: isSet(object.cost) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO,
|
|
306
604
|
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
|
|
605
|
+
serverTime: isSet(object.server_time) ? fromJsonTimestamp(object.server_time) : undefined,
|
|
307
606
|
data: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.data) ? object.data.map((e) => repositories_1.DeviceRepo.fromJSON(e)) : [],
|
|
308
607
|
};
|
|
309
608
|
},
|
|
@@ -331,6 +630,9 @@ exports.DeviceResponse = {
|
|
|
331
630
|
if (message.total !== 0) {
|
|
332
631
|
obj.total = Math.round(message.total);
|
|
333
632
|
}
|
|
633
|
+
if (message.serverTime !== undefined) {
|
|
634
|
+
obj.server_time = message.serverTime.toISOString();
|
|
635
|
+
}
|
|
334
636
|
if ((_a = message.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
335
637
|
obj.data = message.data.map((e) => repositories_1.DeviceRepo.toJSON(e));
|
|
336
638
|
}
|
|
@@ -340,7 +642,7 @@ exports.DeviceResponse = {
|
|
|
340
642
|
return exports.DeviceResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
341
643
|
},
|
|
342
644
|
fromPartial(object) {
|
|
343
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
645
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
344
646
|
const message = createBaseDeviceResponse();
|
|
345
647
|
message.currentPage = (_a = object.currentPage) !== null && _a !== void 0 ? _a : 0;
|
|
346
648
|
message.from = (_b = object.from) !== null && _b !== void 0 ? _b : 0;
|
|
@@ -349,7 +651,8 @@ exports.DeviceResponse = {
|
|
|
349
651
|
message.perPage = (_e = object.perPage) !== null && _e !== void 0 ? _e : 0;
|
|
350
652
|
message.cost = (object.cost !== undefined && object.cost !== null) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO;
|
|
351
653
|
message.total = (_f = object.total) !== null && _f !== void 0 ? _f : 0;
|
|
352
|
-
message.
|
|
654
|
+
message.serverTime = (_g = object.serverTime) !== null && _g !== void 0 ? _g : undefined;
|
|
655
|
+
message.data = ((_h = object.data) === null || _h === void 0 ? void 0 : _h.map((e) => repositories_1.DeviceRepo.fromPartial(e))) || [];
|
|
353
656
|
return message;
|
|
354
657
|
},
|
|
355
658
|
};
|
|
@@ -1083,180 +1386,30 @@ exports.FilterScope = {
|
|
|
1083
1386
|
return message;
|
|
1084
1387
|
},
|
|
1085
1388
|
};
|
|
1086
|
-
function
|
|
1087
|
-
|
|
1389
|
+
function toTimestamp(date) {
|
|
1390
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
|
|
1391
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
1392
|
+
return { seconds, nanos };
|
|
1088
1393
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
const tag = reader.uint32();
|
|
1108
|
-
switch (tag >>> 3) {
|
|
1109
|
-
case 1: {
|
|
1110
|
-
if (tag !== 10) {
|
|
1111
|
-
break;
|
|
1112
|
-
}
|
|
1113
|
-
message.sort = reader.string();
|
|
1114
|
-
continue;
|
|
1115
|
-
}
|
|
1116
|
-
case 2: {
|
|
1117
|
-
if (tag !== 18) {
|
|
1118
|
-
break;
|
|
1119
|
-
}
|
|
1120
|
-
message.order = reader.string();
|
|
1121
|
-
continue;
|
|
1122
|
-
}
|
|
1123
|
-
case 3: {
|
|
1124
|
-
if (tag !== 26) {
|
|
1125
|
-
break;
|
|
1126
|
-
}
|
|
1127
|
-
const entry3 = exports.QueryFilter_FilterEntry.decode(reader, reader.uint32());
|
|
1128
|
-
if (entry3.value !== undefined) {
|
|
1129
|
-
message.filter[entry3.key] = entry3.value;
|
|
1130
|
-
}
|
|
1131
|
-
continue;
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1135
|
-
break;
|
|
1136
|
-
}
|
|
1137
|
-
reader.skip(tag & 7);
|
|
1138
|
-
}
|
|
1139
|
-
return message;
|
|
1140
|
-
},
|
|
1141
|
-
fromJSON(object) {
|
|
1142
|
-
return {
|
|
1143
|
-
sort: isSet(object.sort) ? globalThis.String(object.sort) : undefined,
|
|
1144
|
-
order: isSet(object.order) ? globalThis.String(object.order) : undefined,
|
|
1145
|
-
filter: isObject(object.filter)
|
|
1146
|
-
? Object.entries(object.filter).reduce((acc, [key, value]) => {
|
|
1147
|
-
acc[key] = exports.FilterScope.fromJSON(value);
|
|
1148
|
-
return acc;
|
|
1149
|
-
}, {})
|
|
1150
|
-
: {},
|
|
1151
|
-
};
|
|
1152
|
-
},
|
|
1153
|
-
toJSON(message) {
|
|
1154
|
-
const obj = {};
|
|
1155
|
-
if (message.sort !== undefined) {
|
|
1156
|
-
obj.sort = message.sort;
|
|
1157
|
-
}
|
|
1158
|
-
if (message.order !== undefined) {
|
|
1159
|
-
obj.order = message.order;
|
|
1160
|
-
}
|
|
1161
|
-
if (message.filter) {
|
|
1162
|
-
const entries = Object.entries(message.filter);
|
|
1163
|
-
if (entries.length > 0) {
|
|
1164
|
-
obj.filter = {};
|
|
1165
|
-
entries.forEach(([k, v]) => {
|
|
1166
|
-
obj.filter[k] = exports.FilterScope.toJSON(v);
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
return obj;
|
|
1171
|
-
},
|
|
1172
|
-
create(base) {
|
|
1173
|
-
return exports.QueryFilter.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1174
|
-
},
|
|
1175
|
-
fromPartial(object) {
|
|
1176
|
-
var _a, _b, _c;
|
|
1177
|
-
const message = createBaseQueryFilter();
|
|
1178
|
-
message.sort = (_a = object.sort) !== null && _a !== void 0 ? _a : undefined;
|
|
1179
|
-
message.order = (_b = object.order) !== null && _b !== void 0 ? _b : undefined;
|
|
1180
|
-
message.filter = Object.entries((_c = object.filter) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
1181
|
-
if (value !== undefined) {
|
|
1182
|
-
acc[key] = exports.FilterScope.fromPartial(value);
|
|
1183
|
-
}
|
|
1184
|
-
return acc;
|
|
1185
|
-
}, {});
|
|
1186
|
-
return message;
|
|
1187
|
-
},
|
|
1188
|
-
};
|
|
1189
|
-
function createBaseQueryFilter_FilterEntry() {
|
|
1190
|
-
return { key: "", value: undefined };
|
|
1394
|
+
function fromTimestamp(t) {
|
|
1395
|
+
let millis = (t.seconds.toNumber() || 0) * 1000;
|
|
1396
|
+
millis += (t.nanos || 0) / 1000000;
|
|
1397
|
+
return new globalThis.Date(millis);
|
|
1398
|
+
}
|
|
1399
|
+
function fromJsonTimestamp(o) {
|
|
1400
|
+
if (o instanceof globalThis.Date) {
|
|
1401
|
+
return o;
|
|
1402
|
+
}
|
|
1403
|
+
else if (typeof o === "string") {
|
|
1404
|
+
return new globalThis.Date(o);
|
|
1405
|
+
}
|
|
1406
|
+
else {
|
|
1407
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
function numberToLong(number) {
|
|
1411
|
+
return long_1.default.fromNumber(number);
|
|
1191
1412
|
}
|
|
1192
|
-
exports.QueryFilter_FilterEntry = {
|
|
1193
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1194
|
-
if (message.key !== "") {
|
|
1195
|
-
writer.uint32(10).string(message.key);
|
|
1196
|
-
}
|
|
1197
|
-
if (message.value !== undefined) {
|
|
1198
|
-
exports.FilterScope.encode(message.value, writer.uint32(18).fork()).join();
|
|
1199
|
-
}
|
|
1200
|
-
return writer;
|
|
1201
|
-
},
|
|
1202
|
-
decode(input, length) {
|
|
1203
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1204
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1205
|
-
const message = createBaseQueryFilter_FilterEntry();
|
|
1206
|
-
while (reader.pos < end) {
|
|
1207
|
-
const tag = reader.uint32();
|
|
1208
|
-
switch (tag >>> 3) {
|
|
1209
|
-
case 1: {
|
|
1210
|
-
if (tag !== 10) {
|
|
1211
|
-
break;
|
|
1212
|
-
}
|
|
1213
|
-
message.key = reader.string();
|
|
1214
|
-
continue;
|
|
1215
|
-
}
|
|
1216
|
-
case 2: {
|
|
1217
|
-
if (tag !== 18) {
|
|
1218
|
-
break;
|
|
1219
|
-
}
|
|
1220
|
-
message.value = exports.FilterScope.decode(reader, reader.uint32());
|
|
1221
|
-
continue;
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1225
|
-
break;
|
|
1226
|
-
}
|
|
1227
|
-
reader.skip(tag & 7);
|
|
1228
|
-
}
|
|
1229
|
-
return message;
|
|
1230
|
-
},
|
|
1231
|
-
fromJSON(object) {
|
|
1232
|
-
return {
|
|
1233
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1234
|
-
value: isSet(object.value) ? exports.FilterScope.fromJSON(object.value) : undefined,
|
|
1235
|
-
};
|
|
1236
|
-
},
|
|
1237
|
-
toJSON(message) {
|
|
1238
|
-
const obj = {};
|
|
1239
|
-
if (message.key !== "") {
|
|
1240
|
-
obj.key = message.key;
|
|
1241
|
-
}
|
|
1242
|
-
if (message.value !== undefined) {
|
|
1243
|
-
obj.value = exports.FilterScope.toJSON(message.value);
|
|
1244
|
-
}
|
|
1245
|
-
return obj;
|
|
1246
|
-
},
|
|
1247
|
-
create(base) {
|
|
1248
|
-
return exports.QueryFilter_FilterEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1249
|
-
},
|
|
1250
|
-
fromPartial(object) {
|
|
1251
|
-
var _a;
|
|
1252
|
-
const message = createBaseQueryFilter_FilterEntry();
|
|
1253
|
-
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
1254
|
-
message.value = (object.value !== undefined && object.value !== null)
|
|
1255
|
-
? exports.FilterScope.fromPartial(object.value)
|
|
1256
|
-
: undefined;
|
|
1257
|
-
return message;
|
|
1258
|
-
},
|
|
1259
|
-
};
|
|
1260
1413
|
function isObject(value) {
|
|
1261
1414
|
return typeof value === "object" && value !== null;
|
|
1262
1415
|
}
|