@fatehan/tsrp 1.0.25 → 1.0.26
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.
|
@@ -16,7 +16,6 @@ export interface CommandContent {
|
|
|
16
16
|
message?: string | undefined;
|
|
17
17
|
params: string[];
|
|
18
18
|
rawCommand?: string | undefined;
|
|
19
|
-
command: Uint8Array;
|
|
20
19
|
}
|
|
21
20
|
export interface CommandAkn {
|
|
22
21
|
code: number;
|
|
@@ -61,12 +60,21 @@ export interface CommandStruct {
|
|
|
61
60
|
createdAt?: Date | undefined;
|
|
62
61
|
updatedAt?: Date | undefined;
|
|
63
62
|
}
|
|
63
|
+
export interface DevicePoolRequestRefetch {
|
|
64
|
+
}
|
|
65
|
+
export interface DevicePoolRequest {
|
|
66
|
+
deviceId: Long;
|
|
67
|
+
requested?: Date | undefined;
|
|
68
|
+
requestRefetch?: DevicePoolRequestRefetch | undefined;
|
|
69
|
+
}
|
|
64
70
|
export declare const CommandContent: MessageFns<CommandContent>;
|
|
65
71
|
export declare const CommandAkn: MessageFns<CommandAkn>;
|
|
66
72
|
export declare const Command: MessageFns<Command>;
|
|
67
73
|
export declare const CommandValidation: MessageFns<CommandValidation>;
|
|
68
74
|
export declare const CommandFormat: MessageFns<CommandFormat>;
|
|
69
75
|
export declare const CommandStruct: MessageFns<CommandStruct>;
|
|
76
|
+
export declare const DevicePoolRequestRefetch: MessageFns<DevicePoolRequestRefetch>;
|
|
77
|
+
export declare const DevicePoolRequest: MessageFns<DevicePoolRequest>;
|
|
70
78
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
71
79
|
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 {} ? {
|
|
72
80
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/fatehan/packets/messages.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,oBAAY,aAAa;IACvB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,KAAK,IAAI;IACT,IAAI,IAAI;IACR,YAAY,KAAK;CAClB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,aAAa,CAmBhE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAcjE;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,IAAI,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/fatehan/packets/messages.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,oBAAY,aAAa;IACvB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,KAAK,IAAI;IACT,IAAI,IAAI;IACR,YAAY,KAAK;CAClB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,aAAa,CAmBhE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAcjE;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,IAAI,CAAC;IACf,SA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B,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.CommandStruct = exports.CommandFormat = exports.CommandValidation = exports.Command = exports.CommandAkn = exports.CommandContent = exports.CommandStatus = exports.protobufPackage = void 0;
|
|
11
|
+
exports.DevicePoolRequest = exports.DevicePoolRequestRefetch = exports.CommandStruct = exports.CommandFormat = exports.CommandValidation = exports.Command = exports.CommandAkn = exports.CommandContent = exports.CommandStatus = exports.protobufPackage = void 0;
|
|
12
12
|
exports.commandStatusFromJSON = commandStatusFromJSON;
|
|
13
13
|
exports.commandStatusToJSON = commandStatusToJSON;
|
|
14
14
|
/* eslint-disable */
|
|
@@ -60,14 +60,7 @@ function commandStatusToJSON(object) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
function createBaseCommandContent() {
|
|
63
|
-
return {
|
|
64
|
-
deviceId: long_1.default.UZERO,
|
|
65
|
-
commandId: undefined,
|
|
66
|
-
message: undefined,
|
|
67
|
-
params: [],
|
|
68
|
-
rawCommand: undefined,
|
|
69
|
-
command: new Uint8Array(0),
|
|
70
|
-
};
|
|
63
|
+
return { deviceId: long_1.default.UZERO, commandId: undefined, message: undefined, params: [], rawCommand: undefined };
|
|
71
64
|
}
|
|
72
65
|
exports.CommandContent = {
|
|
73
66
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -86,9 +79,6 @@ exports.CommandContent = {
|
|
|
86
79
|
if (message.rawCommand !== undefined) {
|
|
87
80
|
writer.uint32(42).string(message.rawCommand);
|
|
88
81
|
}
|
|
89
|
-
if (message.command.length !== 0) {
|
|
90
|
-
writer.uint32(50).bytes(message.command);
|
|
91
|
-
}
|
|
92
82
|
return writer;
|
|
93
83
|
},
|
|
94
84
|
decode(input, length) {
|
|
@@ -133,13 +123,6 @@ exports.CommandContent = {
|
|
|
133
123
|
message.rawCommand = reader.string();
|
|
134
124
|
continue;
|
|
135
125
|
}
|
|
136
|
-
case 6: {
|
|
137
|
-
if (tag !== 50) {
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
message.command = reader.bytes();
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
126
|
}
|
|
144
127
|
if ((tag & 7) === 4 || tag === 0) {
|
|
145
128
|
break;
|
|
@@ -155,7 +138,6 @@ exports.CommandContent = {
|
|
|
155
138
|
message: isSet(object.message) ? globalThis.String(object.message) : undefined,
|
|
156
139
|
params: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.params) ? object.params.map((e) => globalThis.String(e)) : [],
|
|
157
140
|
rawCommand: isSet(object.raw_command) ? globalThis.String(object.raw_command) : undefined,
|
|
158
|
-
command: isSet(object.command) ? bytesFromBase64(object.command) : new Uint8Array(0),
|
|
159
141
|
};
|
|
160
142
|
},
|
|
161
143
|
toJSON(message) {
|
|
@@ -176,16 +158,13 @@ exports.CommandContent = {
|
|
|
176
158
|
if (message.rawCommand !== undefined) {
|
|
177
159
|
obj.raw_command = message.rawCommand;
|
|
178
160
|
}
|
|
179
|
-
if (message.command.length !== 0) {
|
|
180
|
-
obj.command = base64FromBytes(message.command);
|
|
181
|
-
}
|
|
182
161
|
return obj;
|
|
183
162
|
},
|
|
184
163
|
create(base) {
|
|
185
164
|
return exports.CommandContent.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
186
165
|
},
|
|
187
166
|
fromPartial(object) {
|
|
188
|
-
var _a, _b, _c
|
|
167
|
+
var _a, _b, _c;
|
|
189
168
|
const message = createBaseCommandContent();
|
|
190
169
|
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
191
170
|
? long_1.default.fromValue(object.deviceId)
|
|
@@ -196,7 +175,6 @@ exports.CommandContent = {
|
|
|
196
175
|
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : undefined;
|
|
197
176
|
message.params = ((_b = object.params) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
198
177
|
message.rawCommand = (_c = object.rawCommand) !== null && _c !== void 0 ? _c : undefined;
|
|
199
|
-
message.command = (_d = object.command) !== null && _d !== void 0 ? _d : new Uint8Array(0);
|
|
200
178
|
return message;
|
|
201
179
|
},
|
|
202
180
|
};
|
|
@@ -942,31 +920,133 @@ exports.CommandStruct = {
|
|
|
942
920
|
return message;
|
|
943
921
|
},
|
|
944
922
|
};
|
|
945
|
-
function
|
|
946
|
-
|
|
947
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
948
|
-
}
|
|
949
|
-
else {
|
|
950
|
-
const bin = globalThis.atob(b64);
|
|
951
|
-
const arr = new Uint8Array(bin.length);
|
|
952
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
953
|
-
arr[i] = bin.charCodeAt(i);
|
|
954
|
-
}
|
|
955
|
-
return arr;
|
|
956
|
-
}
|
|
923
|
+
function createBaseDevicePoolRequestRefetch() {
|
|
924
|
+
return {};
|
|
957
925
|
}
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
return
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
const
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
926
|
+
exports.DevicePoolRequestRefetch = {
|
|
927
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
928
|
+
return writer;
|
|
929
|
+
},
|
|
930
|
+
decode(input, length) {
|
|
931
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
932
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
933
|
+
const message = createBaseDevicePoolRequestRefetch();
|
|
934
|
+
while (reader.pos < end) {
|
|
935
|
+
const tag = reader.uint32();
|
|
936
|
+
switch (tag >>> 3) {
|
|
937
|
+
}
|
|
938
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
939
|
+
break;
|
|
940
|
+
}
|
|
941
|
+
reader.skip(tag & 7);
|
|
942
|
+
}
|
|
943
|
+
return message;
|
|
944
|
+
},
|
|
945
|
+
fromJSON(_) {
|
|
946
|
+
return {};
|
|
947
|
+
},
|
|
948
|
+
toJSON(_) {
|
|
949
|
+
const obj = {};
|
|
950
|
+
return obj;
|
|
951
|
+
},
|
|
952
|
+
create(base) {
|
|
953
|
+
return exports.DevicePoolRequestRefetch.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
954
|
+
},
|
|
955
|
+
fromPartial(_) {
|
|
956
|
+
const message = createBaseDevicePoolRequestRefetch();
|
|
957
|
+
return message;
|
|
958
|
+
},
|
|
959
|
+
};
|
|
960
|
+
function createBaseDevicePoolRequest() {
|
|
961
|
+
return { deviceId: long_1.default.UZERO, requested: undefined, requestRefetch: undefined };
|
|
969
962
|
}
|
|
963
|
+
exports.DevicePoolRequest = {
|
|
964
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
965
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
966
|
+
writer.uint32(8).uint64(message.deviceId.toString());
|
|
967
|
+
}
|
|
968
|
+
if (message.requested !== undefined) {
|
|
969
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.requested), writer.uint32(18).fork()).join();
|
|
970
|
+
}
|
|
971
|
+
if (message.requestRefetch !== undefined) {
|
|
972
|
+
exports.DevicePoolRequestRefetch.encode(message.requestRefetch, writer.uint32(26).fork()).join();
|
|
973
|
+
}
|
|
974
|
+
return writer;
|
|
975
|
+
},
|
|
976
|
+
decode(input, length) {
|
|
977
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
978
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
979
|
+
const message = createBaseDevicePoolRequest();
|
|
980
|
+
while (reader.pos < end) {
|
|
981
|
+
const tag = reader.uint32();
|
|
982
|
+
switch (tag >>> 3) {
|
|
983
|
+
case 1: {
|
|
984
|
+
if (tag !== 8) {
|
|
985
|
+
break;
|
|
986
|
+
}
|
|
987
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
988
|
+
continue;
|
|
989
|
+
}
|
|
990
|
+
case 2: {
|
|
991
|
+
if (tag !== 18) {
|
|
992
|
+
break;
|
|
993
|
+
}
|
|
994
|
+
message.requested = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
995
|
+
continue;
|
|
996
|
+
}
|
|
997
|
+
case 3: {
|
|
998
|
+
if (tag !== 26) {
|
|
999
|
+
break;
|
|
1000
|
+
}
|
|
1001
|
+
message.requestRefetch = exports.DevicePoolRequestRefetch.decode(reader, reader.uint32());
|
|
1002
|
+
continue;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
reader.skip(tag & 7);
|
|
1009
|
+
}
|
|
1010
|
+
return message;
|
|
1011
|
+
},
|
|
1012
|
+
fromJSON(object) {
|
|
1013
|
+
return {
|
|
1014
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
1015
|
+
requested: isSet(object.requested) ? fromJsonTimestamp(object.requested) : undefined,
|
|
1016
|
+
requestRefetch: isSet(object.requestRefetch)
|
|
1017
|
+
? exports.DevicePoolRequestRefetch.fromJSON(object.requestRefetch)
|
|
1018
|
+
: undefined,
|
|
1019
|
+
};
|
|
1020
|
+
},
|
|
1021
|
+
toJSON(message) {
|
|
1022
|
+
const obj = {};
|
|
1023
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
1024
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
1025
|
+
}
|
|
1026
|
+
if (message.requested !== undefined) {
|
|
1027
|
+
obj.requested = message.requested.toISOString();
|
|
1028
|
+
}
|
|
1029
|
+
if (message.requestRefetch !== undefined) {
|
|
1030
|
+
obj.requestRefetch = exports.DevicePoolRequestRefetch.toJSON(message.requestRefetch);
|
|
1031
|
+
}
|
|
1032
|
+
return obj;
|
|
1033
|
+
},
|
|
1034
|
+
create(base) {
|
|
1035
|
+
return exports.DevicePoolRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1036
|
+
},
|
|
1037
|
+
fromPartial(object) {
|
|
1038
|
+
var _a;
|
|
1039
|
+
const message = createBaseDevicePoolRequest();
|
|
1040
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
1041
|
+
? long_1.default.fromValue(object.deviceId)
|
|
1042
|
+
: long_1.default.UZERO;
|
|
1043
|
+
message.requested = (_a = object.requested) !== null && _a !== void 0 ? _a : undefined;
|
|
1044
|
+
message.requestRefetch = (object.requestRefetch !== undefined && object.requestRefetch !== null)
|
|
1045
|
+
? exports.DevicePoolRequestRefetch.fromPartial(object.requestRefetch)
|
|
1046
|
+
: undefined;
|
|
1047
|
+
return message;
|
|
1048
|
+
},
|
|
1049
|
+
};
|
|
970
1050
|
function toTimestamp(date) {
|
|
971
1051
|
const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
|
|
972
1052
|
const nanos = (date.getTime() % 1000) * 1000000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fatehan/tsrp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "fatehan main models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/google-protobuf": "^3.15.12",
|
|
30
30
|
"@types/long": "^5.0.0",
|
|
31
|
-
"@types/node": "^24.0.
|
|
31
|
+
"@types/node": "^24.0.7",
|
|
32
32
|
"ts-node": "^10.9.2",
|
|
33
33
|
"ts-proto": "^2.7.5",
|
|
34
34
|
"typescript": "^5.8.3",
|