@ekhein/lamda-node-sdk 2.2.3 → 10.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,17 @@ export declare enum ToastDuration {
7
7
  }
8
8
  export declare function toastDurationFromJSON(object: any): ToastDuration;
9
9
  export declare function toastDurationToJSON(object: ToastDuration): string;
10
+ export declare enum AudioStreamType {
11
+ AST_ALARM = 0,
12
+ AST_MEDIA = 1,
13
+ AST_NOTIFICATION = 2,
14
+ AST_RING = 3,
15
+ AST_SYSTEM = 4,
16
+ AST_VOICE = 5,
17
+ UNRECOGNIZED = -1
18
+ }
19
+ export declare function audioStreamTypeFromJSON(object: any): AudioStreamType;
20
+ export declare function audioStreamTypeToJSON(object: AudioStreamType): string;
10
21
  export interface TouchDown {
11
22
  tid: number;
12
23
  x: number;
@@ -55,6 +66,7 @@ export interface ServerInfoResponse {
55
66
  architecture: string;
56
67
  uptime: number;
57
68
  secure: boolean;
69
+ privileged: boolean;
58
70
  }
59
71
  export interface HexPatchRequest {
60
72
  pattern: string;
@@ -72,6 +84,12 @@ export interface HexPatchResponse {
72
84
  count: number;
73
85
  replaces: HexPatchItem[];
74
86
  }
87
+ export interface PlayAudioRequest {
88
+ file: string;
89
+ type: AudioStreamType;
90
+ loop: number;
91
+ interval: number;
92
+ }
75
93
  export declare const TouchDown: MessageFns<TouchDown>;
76
94
  export declare const TouchUp: MessageFns<TouchUp>;
77
95
  export declare const TouchMove: MessageFns<TouchMove>;
@@ -86,6 +104,7 @@ export declare const ServerInfoResponse: MessageFns<ServerInfoResponse>;
86
104
  export declare const HexPatchRequest: MessageFns<HexPatchRequest>;
87
105
  export declare const HexPatchItem: MessageFns<HexPatchItem>;
88
106
  export declare const HexPatchResponse: MessageFns<HexPatchResponse>;
107
+ export declare const PlayAudioRequest: MessageFns<PlayAudioRequest>;
89
108
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
90
109
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
91
110
  [K in keyof T]?: DeepPartial<T[K]>;
package/dist/rpc/util.js CHANGED
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HexPatchResponse = exports.HexPatchItem = exports.HexPatchRequest = exports.ServerInfoResponse = exports.ShowToastRequest = exports.CertifiRequest = exports.SetPropRequest = exports.PerformTouchRequest = exports.TouchSequence = exports.TouchAction = exports.TouchWait = exports.TouchMove = exports.TouchUp = exports.TouchDown = exports.ToastDuration = exports.protobufPackage = void 0;
3
+ exports.PlayAudioRequest = exports.HexPatchResponse = exports.HexPatchItem = exports.HexPatchRequest = exports.ServerInfoResponse = exports.ShowToastRequest = exports.CertifiRequest = exports.SetPropRequest = exports.PerformTouchRequest = exports.TouchSequence = exports.TouchAction = exports.TouchWait = exports.TouchMove = exports.TouchUp = exports.TouchDown = exports.AudioStreamType = exports.ToastDuration = exports.protobufPackage = void 0;
4
4
  exports.toastDurationFromJSON = toastDurationFromJSON;
5
5
  exports.toastDurationToJSON = toastDurationToJSON;
6
+ exports.audioStreamTypeFromJSON = audioStreamTypeFromJSON;
7
+ exports.audioStreamTypeToJSON = audioStreamTypeToJSON;
6
8
  const wire_1 = require("@bufbuild/protobuf/wire");
7
9
  exports.protobufPackage = "lamda.rpc";
8
10
  var ToastDuration;
@@ -36,6 +38,61 @@ function toastDurationToJSON(object) {
36
38
  return "UNRECOGNIZED";
37
39
  }
38
40
  }
41
+ var AudioStreamType;
42
+ (function (AudioStreamType) {
43
+ AudioStreamType[AudioStreamType["AST_ALARM"] = 0] = "AST_ALARM";
44
+ AudioStreamType[AudioStreamType["AST_MEDIA"] = 1] = "AST_MEDIA";
45
+ AudioStreamType[AudioStreamType["AST_NOTIFICATION"] = 2] = "AST_NOTIFICATION";
46
+ AudioStreamType[AudioStreamType["AST_RING"] = 3] = "AST_RING";
47
+ AudioStreamType[AudioStreamType["AST_SYSTEM"] = 4] = "AST_SYSTEM";
48
+ AudioStreamType[AudioStreamType["AST_VOICE"] = 5] = "AST_VOICE";
49
+ AudioStreamType[AudioStreamType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
50
+ })(AudioStreamType || (exports.AudioStreamType = AudioStreamType = {}));
51
+ function audioStreamTypeFromJSON(object) {
52
+ switch (object) {
53
+ case 0:
54
+ case "AST_ALARM":
55
+ return AudioStreamType.AST_ALARM;
56
+ case 1:
57
+ case "AST_MEDIA":
58
+ return AudioStreamType.AST_MEDIA;
59
+ case 2:
60
+ case "AST_NOTIFICATION":
61
+ return AudioStreamType.AST_NOTIFICATION;
62
+ case 3:
63
+ case "AST_RING":
64
+ return AudioStreamType.AST_RING;
65
+ case 4:
66
+ case "AST_SYSTEM":
67
+ return AudioStreamType.AST_SYSTEM;
68
+ case 5:
69
+ case "AST_VOICE":
70
+ return AudioStreamType.AST_VOICE;
71
+ case -1:
72
+ case "UNRECOGNIZED":
73
+ default:
74
+ return AudioStreamType.UNRECOGNIZED;
75
+ }
76
+ }
77
+ function audioStreamTypeToJSON(object) {
78
+ switch (object) {
79
+ case AudioStreamType.AST_ALARM:
80
+ return "AST_ALARM";
81
+ case AudioStreamType.AST_MEDIA:
82
+ return "AST_MEDIA";
83
+ case AudioStreamType.AST_NOTIFICATION:
84
+ return "AST_NOTIFICATION";
85
+ case AudioStreamType.AST_RING:
86
+ return "AST_RING";
87
+ case AudioStreamType.AST_SYSTEM:
88
+ return "AST_SYSTEM";
89
+ case AudioStreamType.AST_VOICE:
90
+ return "AST_VOICE";
91
+ case AudioStreamType.UNRECOGNIZED:
92
+ default:
93
+ return "UNRECOGNIZED";
94
+ }
95
+ }
39
96
  function createBaseTouchDown() {
40
97
  return { tid: 0, x: 0, y: 0, pressure: 0 };
41
98
  }
@@ -745,7 +802,7 @@ exports.ShowToastRequest = {
745
802
  },
746
803
  };
747
804
  function createBaseServerInfoResponse() {
748
- return { uniqueId: "", version: "", architecture: "", uptime: 0, secure: false };
805
+ return { uniqueId: "", version: "", architecture: "", uptime: 0, secure: false, privileged: false };
749
806
  }
750
807
  exports.ServerInfoResponse = {
751
808
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -764,6 +821,9 @@ exports.ServerInfoResponse = {
764
821
  if (message.secure !== false) {
765
822
  writer.uint32(40).bool(message.secure);
766
823
  }
824
+ if (message.privileged !== false) {
825
+ writer.uint32(48).bool(message.privileged);
826
+ }
767
827
  return writer;
768
828
  },
769
829
  decode(input, length) {
@@ -808,6 +868,13 @@ exports.ServerInfoResponse = {
808
868
  message.secure = reader.bool();
809
869
  continue;
810
870
  }
871
+ case 6: {
872
+ if (tag !== 48) {
873
+ break;
874
+ }
875
+ message.privileged = reader.bool();
876
+ continue;
877
+ }
811
878
  }
812
879
  if ((tag & 7) === 4 || tag === 0) {
813
880
  break;
@@ -823,6 +890,7 @@ exports.ServerInfoResponse = {
823
890
  architecture: isSet(object.architecture) ? globalThis.String(object.architecture) : "",
824
891
  uptime: isSet(object.uptime) ? globalThis.Number(object.uptime) : 0,
825
892
  secure: isSet(object.secure) ? globalThis.Boolean(object.secure) : false,
893
+ privileged: isSet(object.privileged) ? globalThis.Boolean(object.privileged) : false,
826
894
  };
827
895
  },
828
896
  toJSON(message) {
@@ -842,6 +910,9 @@ exports.ServerInfoResponse = {
842
910
  if (message.secure !== false) {
843
911
  obj.secure = message.secure;
844
912
  }
913
+ if (message.privileged !== false) {
914
+ obj.privileged = message.privileged;
915
+ }
845
916
  return obj;
846
917
  },
847
918
  create(base) {
@@ -854,6 +925,7 @@ exports.ServerInfoResponse = {
854
925
  message.architecture = object.architecture ?? "";
855
926
  message.uptime = object.uptime ?? 0;
856
927
  message.secure = object.secure ?? false;
928
+ message.privileged = object.privileged ?? false;
857
929
  return message;
858
930
  },
859
931
  };
@@ -1123,6 +1195,104 @@ exports.HexPatchResponse = {
1123
1195
  return message;
1124
1196
  },
1125
1197
  };
1198
+ function createBasePlayAudioRequest() {
1199
+ return { file: "", type: 0, loop: 0, interval: 0 };
1200
+ }
1201
+ exports.PlayAudioRequest = {
1202
+ encode(message, writer = new wire_1.BinaryWriter()) {
1203
+ if (message.file !== "") {
1204
+ writer.uint32(10).string(message.file);
1205
+ }
1206
+ if (message.type !== 0) {
1207
+ writer.uint32(16).int32(message.type);
1208
+ }
1209
+ if (message.loop !== 0) {
1210
+ writer.uint32(24).int32(message.loop);
1211
+ }
1212
+ if (message.interval !== 0) {
1213
+ writer.uint32(32).int32(message.interval);
1214
+ }
1215
+ return writer;
1216
+ },
1217
+ decode(input, length) {
1218
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1219
+ let end = length === undefined ? reader.len : reader.pos + length;
1220
+ const message = createBasePlayAudioRequest();
1221
+ while (reader.pos < end) {
1222
+ const tag = reader.uint32();
1223
+ switch (tag >>> 3) {
1224
+ case 1: {
1225
+ if (tag !== 10) {
1226
+ break;
1227
+ }
1228
+ message.file = reader.string();
1229
+ continue;
1230
+ }
1231
+ case 2: {
1232
+ if (tag !== 16) {
1233
+ break;
1234
+ }
1235
+ message.type = reader.int32();
1236
+ continue;
1237
+ }
1238
+ case 3: {
1239
+ if (tag !== 24) {
1240
+ break;
1241
+ }
1242
+ message.loop = reader.int32();
1243
+ continue;
1244
+ }
1245
+ case 4: {
1246
+ if (tag !== 32) {
1247
+ break;
1248
+ }
1249
+ message.interval = reader.int32();
1250
+ continue;
1251
+ }
1252
+ }
1253
+ if ((tag & 7) === 4 || tag === 0) {
1254
+ break;
1255
+ }
1256
+ reader.skip(tag & 7);
1257
+ }
1258
+ return message;
1259
+ },
1260
+ fromJSON(object) {
1261
+ return {
1262
+ file: isSet(object.file) ? globalThis.String(object.file) : "",
1263
+ type: isSet(object.type) ? audioStreamTypeFromJSON(object.type) : 0,
1264
+ loop: isSet(object.loop) ? globalThis.Number(object.loop) : 0,
1265
+ interval: isSet(object.interval) ? globalThis.Number(object.interval) : 0,
1266
+ };
1267
+ },
1268
+ toJSON(message) {
1269
+ const obj = {};
1270
+ if (message.file !== "") {
1271
+ obj.file = message.file;
1272
+ }
1273
+ if (message.type !== 0) {
1274
+ obj.type = audioStreamTypeToJSON(message.type);
1275
+ }
1276
+ if (message.loop !== 0) {
1277
+ obj.loop = Math.round(message.loop);
1278
+ }
1279
+ if (message.interval !== 0) {
1280
+ obj.interval = Math.round(message.interval);
1281
+ }
1282
+ return obj;
1283
+ },
1284
+ create(base) {
1285
+ return exports.PlayAudioRequest.fromPartial(base ?? {});
1286
+ },
1287
+ fromPartial(object) {
1288
+ const message = createBasePlayAudioRequest();
1289
+ message.file = object.file ?? "";
1290
+ message.type = object.type ?? 0;
1291
+ message.loop = object.loop ?? 0;
1292
+ message.interval = object.interval ?? 0;
1293
+ return message;
1294
+ },
1295
+ };
1126
1296
  function bytesFromBase64(b64) {
1127
1297
  if (globalThis.Buffer) {
1128
1298
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekhein/lamda-node-sdk",
3
- "version": "2.2.3",
3
+ "version": "10.8.0",
4
4
  "author": "ekhein",
5
5
  "license": "MIT",
6
6
  "main": "./dist/main.js",