@ekhein/lamda-node-sdk 1.0.2 → 2.0.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.
Files changed (154) hide show
  1. package/dist/src/constants/activity.flag.d.ts +22 -0
  2. package/dist/src/constants/activity.flag.js +22 -0
  3. package/dist/src/constants/android.intent.d.ts +56 -0
  4. package/dist/src/constants/android.intent.js +56 -0
  5. package/dist/src/constants/android.permission.d.ts +30 -0
  6. package/dist/src/constants/android.permission.js +30 -0
  7. package/dist/src/constants/index.d.ts +3 -0
  8. package/dist/src/constants/index.js +3 -0
  9. package/dist/src/decorators/inject.decorator.d.ts +2 -0
  10. package/dist/src/decorators/inject.decorator.js +15 -0
  11. package/dist/src/exceptions/remoteCall.exception.d.ts +7 -0
  12. package/dist/src/exceptions/remoteCall.exception.js +12 -0
  13. package/dist/src/exceptions/timeout.exception.d.ts +4 -0
  14. package/dist/src/exceptions/timeout.exception.js +6 -0
  15. package/dist/src/interceptor/remoteException.Interceptor.d.ts +2 -0
  16. package/dist/src/interceptor/remoteException.Interceptor.js +13 -0
  17. package/dist/{main.d.ts → src/main.d.ts} +9 -21
  18. package/dist/src/main.js +135 -0
  19. package/dist/src/rpc/application.d.ts +136 -0
  20. package/dist/src/rpc/application.js +1537 -0
  21. package/dist/src/rpc/debug.d.ts +19 -0
  22. package/dist/src/rpc/debug.js +56 -0
  23. package/dist/{rpc → src/rpc}/file.d.ts +11 -13
  24. package/dist/src/rpc/file.js +373 -0
  25. package/dist/src/rpc/google/protobuf/any.d.ts +20 -0
  26. package/dist/src/rpc/google/protobuf/any.js +98 -0
  27. package/dist/src/rpc/google/protobuf/empty.d.ts +18 -0
  28. package/dist/src/rpc/google/protobuf/empty.js +39 -0
  29. package/dist/{rpc → src/rpc}/google/protobuf/struct.d.ts +19 -21
  30. package/dist/src/rpc/google/protobuf/struct.js +438 -0
  31. package/dist/src/rpc/policy.d.ts +22 -0
  32. package/dist/src/rpc/policy.js +103 -0
  33. package/dist/src/rpc/proxy.d.ts +106 -0
  34. package/dist/src/rpc/proxy.js +774 -0
  35. package/dist/{rpc → src/rpc}/services.d.ts +421 -424
  36. package/dist/src/rpc/services.js +1493 -0
  37. package/dist/src/rpc/settings.d.ts +29 -0
  38. package/dist/src/rpc/settings.js +125 -0
  39. package/dist/src/rpc/shell.d.ts +34 -0
  40. package/dist/src/rpc/shell.js +294 -0
  41. package/dist/{rpc → src/rpc}/status.d.ts +17 -19
  42. package/dist/src/rpc/status.js +896 -0
  43. package/dist/src/rpc/storage.d.ts +22 -0
  44. package/dist/src/rpc/storage.js +128 -0
  45. package/dist/src/rpc/types.d.ts +34 -0
  46. package/dist/src/rpc/types.js +281 -0
  47. package/dist/{rpc → src/rpc}/uiautomator.d.ts +87 -89
  48. package/dist/src/rpc/uiautomator.js +5350 -0
  49. package/dist/src/rpc/util.d.ts +101 -0
  50. package/dist/src/rpc/util.js +1158 -0
  51. package/dist/{rpc → src/rpc}/wifi.d.ts +23 -25
  52. package/dist/src/rpc/wifi.js +971 -0
  53. package/package.json +4 -9
  54. package/dist/chunk-3HDKHFYE.js +0 -1602
  55. package/dist/chunk-3JBDAA2H.js +0 -439
  56. package/dist/chunk-4AHM55IO.js +0 -1172
  57. package/dist/chunk-6HD35RPW.js +0 -5370
  58. package/dist/chunk-7XF22HAW.js +0 -907
  59. package/dist/chunk-7YGA6EOV.js +0 -109
  60. package/dist/chunk-ADS4GRIL.js +0 -14
  61. package/dist/chunk-FSLE4VGI.js +0 -48
  62. package/dist/chunk-H7Z6XFBF.js +0 -134
  63. package/dist/chunk-KJKSI2WL.js +0 -62
  64. package/dist/chunk-O52JGDU7.js +0 -800
  65. package/dist/chunk-ORXTTWPB.js +0 -379
  66. package/dist/chunk-OZJH6SR7.js +0 -20
  67. package/dist/chunk-P53F45YO.js +0 -64
  68. package/dist/chunk-QXMPY6EE.js +0 -289
  69. package/dist/chunk-SBFKX3ZY.js +0 -1554
  70. package/dist/chunk-WFQEBPE6.js +0 -300
  71. package/dist/chunk-X4LTH2UN.js +0 -983
  72. package/dist/chunk-XAX5BZL3.js +0 -132
  73. package/dist/chunk-ZXF5DGTC.js +0 -45
  74. package/dist/constants/activity.flag.cjs +0 -92
  75. package/dist/constants/activity.flag.d.cts +0 -24
  76. package/dist/constants/activity.flag.d.ts +0 -24
  77. package/dist/constants/activity.flag.js +0 -49
  78. package/dist/constants/android.permission.cjs +0 -116
  79. package/dist/constants/android.permission.d.cts +0 -32
  80. package/dist/constants/android.permission.d.ts +0 -32
  81. package/dist/constants/android.permission.js +0 -65
  82. package/dist/constants/index.cjs +0 -186
  83. package/dist/constants/index.d.cts +0 -2
  84. package/dist/constants/index.d.ts +0 -2
  85. package/dist/constants/index.js +0 -111
  86. package/dist/decorators/inject.decorator.cjs +0 -43
  87. package/dist/decorators/inject.decorator.d.cts +0 -5
  88. package/dist/decorators/inject.decorator.d.ts +0 -5
  89. package/dist/decorators/inject.decorator.js +0 -7
  90. package/dist/main.cjs +0 -11969
  91. package/dist/main.d.cts +0 -37
  92. package/dist/main.js +0 -112
  93. package/dist/rpc/application.cjs +0 -2019
  94. package/dist/rpc/application.d.cts +0 -138
  95. package/dist/rpc/application.d.ts +0 -138
  96. package/dist/rpc/application.js +0 -50
  97. package/dist/rpc/debug.cjs +0 -86
  98. package/dist/rpc/debug.d.cts +0 -21
  99. package/dist/rpc/debug.d.ts +0 -21
  100. package/dist/rpc/debug.js +0 -9
  101. package/dist/rpc/file.cjs +0 -405
  102. package/dist/rpc/file.d.cts +0 -40
  103. package/dist/rpc/file.js +0 -13
  104. package/dist/rpc/google/protobuf/any.cjs +0 -126
  105. package/dist/rpc/google/protobuf/any.d.cts +0 -22
  106. package/dist/rpc/google/protobuf/any.d.ts +0 -22
  107. package/dist/rpc/google/protobuf/any.js +0 -103
  108. package/dist/rpc/google/protobuf/empty.cjs +0 -69
  109. package/dist/rpc/google/protobuf/empty.d.cts +0 -20
  110. package/dist/rpc/google/protobuf/empty.d.ts +0 -20
  111. package/dist/rpc/google/protobuf/empty.js +0 -9
  112. package/dist/rpc/google/protobuf/struct.cjs +0 -469
  113. package/dist/rpc/google/protobuf/struct.d.cts +0 -65
  114. package/dist/rpc/google/protobuf/struct.js +0 -21
  115. package/dist/rpc/policy.cjs +0 -133
  116. package/dist/rpc/policy.d.cts +0 -24
  117. package/dist/rpc/policy.d.ts +0 -24
  118. package/dist/rpc/policy.js +0 -9
  119. package/dist/rpc/proxy.cjs +0 -1109
  120. package/dist/rpc/proxy.d.cts +0 -108
  121. package/dist/rpc/proxy.d.ts +0 -108
  122. package/dist/rpc/proxy.js +0 -49
  123. package/dist/rpc/services.cjs +0 -11898
  124. package/dist/rpc/services.d.cts +0 -1920
  125. package/dist/rpc/services.js +0 -48
  126. package/dist/rpc/settings.cjs +0 -161
  127. package/dist/rpc/settings.d.cts +0 -31
  128. package/dist/rpc/settings.d.ts +0 -31
  129. package/dist/rpc/settings.js +0 -15
  130. package/dist/rpc/shell.cjs +0 -326
  131. package/dist/rpc/shell.d.cts +0 -36
  132. package/dist/rpc/shell.d.ts +0 -36
  133. package/dist/rpc/shell.js +0 -13
  134. package/dist/rpc/status.cjs +0 -936
  135. package/dist/rpc/status.d.cts +0 -76
  136. package/dist/rpc/status.js +0 -19
  137. package/dist/rpc/storage.cjs +0 -156
  138. package/dist/rpc/storage.d.cts +0 -24
  139. package/dist/rpc/storage.d.ts +0 -24
  140. package/dist/rpc/storage.js +0 -9
  141. package/dist/rpc/types.cjs +0 -317
  142. package/dist/rpc/types.d.cts +0 -36
  143. package/dist/rpc/types.d.ts +0 -36
  144. package/dist/rpc/types.js +0 -17
  145. package/dist/rpc/uiautomator.cjs +0 -5446
  146. package/dist/rpc/uiautomator.d.cts +0 -618
  147. package/dist/rpc/uiautomator.js +0 -113
  148. package/dist/rpc/util.cjs +0 -1212
  149. package/dist/rpc/util.d.cts +0 -103
  150. package/dist/rpc/util.d.ts +0 -103
  151. package/dist/rpc/util.js +0 -41
  152. package/dist/rpc/wifi.cjs +0 -1015
  153. package/dist/rpc/wifi.d.cts +0 -84
  154. package/dist/rpc/wifi.js +0 -25
@@ -0,0 +1,19 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "lamda.rpc";
3
+ export interface ADBDConfigRequest {
4
+ adbPubkey: string;
5
+ }
6
+ export declare const ADBDConfigRequest: MessageFns<ADBDConfigRequest>;
7
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
8
+ 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 {} ? {
9
+ [K in keyof T]?: DeepPartial<T[K]>;
10
+ } : Partial<T>;
11
+ export interface MessageFns<T> {
12
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
13
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
14
+ fromJSON(object: any): T;
15
+ toJSON(message: T): unknown;
16
+ create(base?: DeepPartial<T>): T;
17
+ fromPartial(object: DeepPartial<T>): T;
18
+ }
19
+ export {};
@@ -0,0 +1,56 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export const protobufPackage = "lamda.rpc";
3
+ function createBaseADBDConfigRequest() {
4
+ return { adbPubkey: "" };
5
+ }
6
+ export const ADBDConfigRequest = {
7
+ encode(message, writer = new BinaryWriter()) {
8
+ if (message.adbPubkey !== "") {
9
+ writer.uint32(10).string(message.adbPubkey);
10
+ }
11
+ return writer;
12
+ },
13
+ decode(input, length) {
14
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
15
+ let end = length === undefined ? reader.len : reader.pos + length;
16
+ const message = createBaseADBDConfigRequest();
17
+ while (reader.pos < end) {
18
+ const tag = reader.uint32();
19
+ switch (tag >>> 3) {
20
+ case 1: {
21
+ if (tag !== 10) {
22
+ break;
23
+ }
24
+ message.adbPubkey = reader.string();
25
+ continue;
26
+ }
27
+ }
28
+ if ((tag & 7) === 4 || tag === 0) {
29
+ break;
30
+ }
31
+ reader.skip(tag & 7);
32
+ }
33
+ return message;
34
+ },
35
+ fromJSON(object) {
36
+ return { adbPubkey: isSet(object.adbPubkey) ? globalThis.String(object.adbPubkey) : "" };
37
+ },
38
+ toJSON(message) {
39
+ const obj = {};
40
+ if (message.adbPubkey !== "") {
41
+ obj.adbPubkey = message.adbPubkey;
42
+ }
43
+ return obj;
44
+ },
45
+ create(base) {
46
+ return ADBDConfigRequest.fromPartial(base ?? {});
47
+ },
48
+ fromPartial(object) {
49
+ const message = createBaseADBDConfigRequest();
50
+ message.adbPubkey = object.adbPubkey ?? "";
51
+ return message;
52
+ },
53
+ };
54
+ function isSet(value) {
55
+ return value !== null && value !== undefined;
56
+ }
@@ -1,7 +1,6 @@
1
- import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
-
3
- declare const protobufPackage = "lamda.rpc";
4
- interface FileStat {
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "lamda.rpc";
3
+ export interface FileStat {
5
4
  name: string;
6
5
  path: string;
7
6
  directory: boolean;
@@ -13,22 +12,22 @@ interface FileStat {
13
12
  stGid: number;
14
13
  stSize: number;
15
14
  }
16
- declare const FileStat: MessageFns<FileStat>;
17
- interface FileRequest {
15
+ export interface FileRequest {
18
16
  path: string;
19
17
  mode: number;
20
18
  payload: Uint8Array;
21
19
  }
22
- declare const FileRequest: MessageFns<FileRequest>;
23
- interface FileDataResponse {
20
+ export interface FileDataResponse {
24
21
  payload: Uint8Array;
25
22
  }
26
- declare const FileDataResponse: MessageFns<FileDataResponse>;
23
+ export declare const FileStat: MessageFns<FileStat>;
24
+ export declare const FileRequest: MessageFns<FileRequest>;
25
+ export declare const FileDataResponse: MessageFns<FileDataResponse>;
27
26
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
28
- 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 {} ? {
27
+ 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 {} ? {
29
28
  [K in keyof T]?: DeepPartial<T[K]>;
30
29
  } : Partial<T>;
31
- interface MessageFns<T> {
30
+ export interface MessageFns<T> {
32
31
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
33
32
  decode(input: BinaryReader | Uint8Array, length?: number): T;
34
33
  fromJSON(object: any): T;
@@ -36,5 +35,4 @@ interface MessageFns<T> {
36
35
  create(base?: DeepPartial<T>): T;
37
36
  fromPartial(object: DeepPartial<T>): T;
38
37
  }
39
-
40
- export { type DeepPartial, FileDataResponse, FileRequest, FileStat, type MessageFns, protobufPackage };
38
+ export {};
@@ -0,0 +1,373 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export const protobufPackage = "lamda.rpc";
3
+ function createBaseFileStat() {
4
+ return {
5
+ name: "",
6
+ path: "",
7
+ directory: false,
8
+ stMode: 0,
9
+ stAtime: 0,
10
+ stMtime: 0,
11
+ stCtime: 0,
12
+ stUid: 0,
13
+ stGid: 0,
14
+ stSize: 0,
15
+ };
16
+ }
17
+ export const FileStat = {
18
+ encode(message, writer = new BinaryWriter()) {
19
+ if (message.name !== "") {
20
+ writer.uint32(10).string(message.name);
21
+ }
22
+ if (message.path !== "") {
23
+ writer.uint32(18).string(message.path);
24
+ }
25
+ if (message.directory !== false) {
26
+ writer.uint32(24).bool(message.directory);
27
+ }
28
+ if (message.stMode !== 0) {
29
+ writer.uint32(32).int64(message.stMode);
30
+ }
31
+ if (message.stAtime !== 0) {
32
+ writer.uint32(40).int64(message.stAtime);
33
+ }
34
+ if (message.stMtime !== 0) {
35
+ writer.uint32(48).int64(message.stMtime);
36
+ }
37
+ if (message.stCtime !== 0) {
38
+ writer.uint32(56).int64(message.stCtime);
39
+ }
40
+ if (message.stUid !== 0) {
41
+ writer.uint32(64).int32(message.stUid);
42
+ }
43
+ if (message.stGid !== 0) {
44
+ writer.uint32(72).int32(message.stGid);
45
+ }
46
+ if (message.stSize !== 0) {
47
+ writer.uint32(80).int64(message.stSize);
48
+ }
49
+ return writer;
50
+ },
51
+ decode(input, length) {
52
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
53
+ let end = length === undefined ? reader.len : reader.pos + length;
54
+ const message = createBaseFileStat();
55
+ while (reader.pos < end) {
56
+ const tag = reader.uint32();
57
+ switch (tag >>> 3) {
58
+ case 1: {
59
+ if (tag !== 10) {
60
+ break;
61
+ }
62
+ message.name = reader.string();
63
+ continue;
64
+ }
65
+ case 2: {
66
+ if (tag !== 18) {
67
+ break;
68
+ }
69
+ message.path = reader.string();
70
+ continue;
71
+ }
72
+ case 3: {
73
+ if (tag !== 24) {
74
+ break;
75
+ }
76
+ message.directory = reader.bool();
77
+ continue;
78
+ }
79
+ case 4: {
80
+ if (tag !== 32) {
81
+ break;
82
+ }
83
+ message.stMode = longToNumber(reader.int64());
84
+ continue;
85
+ }
86
+ case 5: {
87
+ if (tag !== 40) {
88
+ break;
89
+ }
90
+ message.stAtime = longToNumber(reader.int64());
91
+ continue;
92
+ }
93
+ case 6: {
94
+ if (tag !== 48) {
95
+ break;
96
+ }
97
+ message.stMtime = longToNumber(reader.int64());
98
+ continue;
99
+ }
100
+ case 7: {
101
+ if (tag !== 56) {
102
+ break;
103
+ }
104
+ message.stCtime = longToNumber(reader.int64());
105
+ continue;
106
+ }
107
+ case 8: {
108
+ if (tag !== 64) {
109
+ break;
110
+ }
111
+ message.stUid = reader.int32();
112
+ continue;
113
+ }
114
+ case 9: {
115
+ if (tag !== 72) {
116
+ break;
117
+ }
118
+ message.stGid = reader.int32();
119
+ continue;
120
+ }
121
+ case 10: {
122
+ if (tag !== 80) {
123
+ break;
124
+ }
125
+ message.stSize = longToNumber(reader.int64());
126
+ continue;
127
+ }
128
+ }
129
+ if ((tag & 7) === 4 || tag === 0) {
130
+ break;
131
+ }
132
+ reader.skip(tag & 7);
133
+ }
134
+ return message;
135
+ },
136
+ fromJSON(object) {
137
+ return {
138
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
139
+ path: isSet(object.path) ? globalThis.String(object.path) : "",
140
+ directory: isSet(object.directory) ? globalThis.Boolean(object.directory) : false,
141
+ stMode: isSet(object.stMode) ? globalThis.Number(object.stMode) : 0,
142
+ stAtime: isSet(object.stAtime) ? globalThis.Number(object.stAtime) : 0,
143
+ stMtime: isSet(object.stMtime) ? globalThis.Number(object.stMtime) : 0,
144
+ stCtime: isSet(object.stCtime) ? globalThis.Number(object.stCtime) : 0,
145
+ stUid: isSet(object.stUid) ? globalThis.Number(object.stUid) : 0,
146
+ stGid: isSet(object.stGid) ? globalThis.Number(object.stGid) : 0,
147
+ stSize: isSet(object.stSize) ? globalThis.Number(object.stSize) : 0,
148
+ };
149
+ },
150
+ toJSON(message) {
151
+ const obj = {};
152
+ if (message.name !== "") {
153
+ obj.name = message.name;
154
+ }
155
+ if (message.path !== "") {
156
+ obj.path = message.path;
157
+ }
158
+ if (message.directory !== false) {
159
+ obj.directory = message.directory;
160
+ }
161
+ if (message.stMode !== 0) {
162
+ obj.stMode = Math.round(message.stMode);
163
+ }
164
+ if (message.stAtime !== 0) {
165
+ obj.stAtime = Math.round(message.stAtime);
166
+ }
167
+ if (message.stMtime !== 0) {
168
+ obj.stMtime = Math.round(message.stMtime);
169
+ }
170
+ if (message.stCtime !== 0) {
171
+ obj.stCtime = Math.round(message.stCtime);
172
+ }
173
+ if (message.stUid !== 0) {
174
+ obj.stUid = Math.round(message.stUid);
175
+ }
176
+ if (message.stGid !== 0) {
177
+ obj.stGid = Math.round(message.stGid);
178
+ }
179
+ if (message.stSize !== 0) {
180
+ obj.stSize = Math.round(message.stSize);
181
+ }
182
+ return obj;
183
+ },
184
+ create(base) {
185
+ return FileStat.fromPartial(base ?? {});
186
+ },
187
+ fromPartial(object) {
188
+ const message = createBaseFileStat();
189
+ message.name = object.name ?? "";
190
+ message.path = object.path ?? "";
191
+ message.directory = object.directory ?? false;
192
+ message.stMode = object.stMode ?? 0;
193
+ message.stAtime = object.stAtime ?? 0;
194
+ message.stMtime = object.stMtime ?? 0;
195
+ message.stCtime = object.stCtime ?? 0;
196
+ message.stUid = object.stUid ?? 0;
197
+ message.stGid = object.stGid ?? 0;
198
+ message.stSize = object.stSize ?? 0;
199
+ return message;
200
+ },
201
+ };
202
+ function createBaseFileRequest() {
203
+ return { path: "", mode: 0, payload: new Uint8Array(0) };
204
+ }
205
+ export const FileRequest = {
206
+ encode(message, writer = new BinaryWriter()) {
207
+ if (message.path !== "") {
208
+ writer.uint32(10).string(message.path);
209
+ }
210
+ if (message.mode !== 0) {
211
+ writer.uint32(16).uint64(message.mode);
212
+ }
213
+ if (message.payload.length !== 0) {
214
+ writer.uint32(26).bytes(message.payload);
215
+ }
216
+ return writer;
217
+ },
218
+ decode(input, length) {
219
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
220
+ let end = length === undefined ? reader.len : reader.pos + length;
221
+ const message = createBaseFileRequest();
222
+ while (reader.pos < end) {
223
+ const tag = reader.uint32();
224
+ switch (tag >>> 3) {
225
+ case 1: {
226
+ if (tag !== 10) {
227
+ break;
228
+ }
229
+ message.path = reader.string();
230
+ continue;
231
+ }
232
+ case 2: {
233
+ if (tag !== 16) {
234
+ break;
235
+ }
236
+ message.mode = longToNumber(reader.uint64());
237
+ continue;
238
+ }
239
+ case 3: {
240
+ if (tag !== 26) {
241
+ break;
242
+ }
243
+ message.payload = reader.bytes();
244
+ continue;
245
+ }
246
+ }
247
+ if ((tag & 7) === 4 || tag === 0) {
248
+ break;
249
+ }
250
+ reader.skip(tag & 7);
251
+ }
252
+ return message;
253
+ },
254
+ fromJSON(object) {
255
+ return {
256
+ path: isSet(object.path) ? globalThis.String(object.path) : "",
257
+ mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
258
+ payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0),
259
+ };
260
+ },
261
+ toJSON(message) {
262
+ const obj = {};
263
+ if (message.path !== "") {
264
+ obj.path = message.path;
265
+ }
266
+ if (message.mode !== 0) {
267
+ obj.mode = Math.round(message.mode);
268
+ }
269
+ if (message.payload.length !== 0) {
270
+ obj.payload = base64FromBytes(message.payload);
271
+ }
272
+ return obj;
273
+ },
274
+ create(base) {
275
+ return FileRequest.fromPartial(base ?? {});
276
+ },
277
+ fromPartial(object) {
278
+ const message = createBaseFileRequest();
279
+ message.path = object.path ?? "";
280
+ message.mode = object.mode ?? 0;
281
+ message.payload = object.payload ?? new Uint8Array(0);
282
+ return message;
283
+ },
284
+ };
285
+ function createBaseFileDataResponse() {
286
+ return { payload: new Uint8Array(0) };
287
+ }
288
+ export const FileDataResponse = {
289
+ encode(message, writer = new BinaryWriter()) {
290
+ if (message.payload.length !== 0) {
291
+ writer.uint32(10).bytes(message.payload);
292
+ }
293
+ return writer;
294
+ },
295
+ decode(input, length) {
296
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
297
+ let end = length === undefined ? reader.len : reader.pos + length;
298
+ const message = createBaseFileDataResponse();
299
+ while (reader.pos < end) {
300
+ const tag = reader.uint32();
301
+ switch (tag >>> 3) {
302
+ case 1: {
303
+ if (tag !== 10) {
304
+ break;
305
+ }
306
+ message.payload = reader.bytes();
307
+ continue;
308
+ }
309
+ }
310
+ if ((tag & 7) === 4 || tag === 0) {
311
+ break;
312
+ }
313
+ reader.skip(tag & 7);
314
+ }
315
+ return message;
316
+ },
317
+ fromJSON(object) {
318
+ return { payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0) };
319
+ },
320
+ toJSON(message) {
321
+ const obj = {};
322
+ if (message.payload.length !== 0) {
323
+ obj.payload = base64FromBytes(message.payload);
324
+ }
325
+ return obj;
326
+ },
327
+ create(base) {
328
+ return FileDataResponse.fromPartial(base ?? {});
329
+ },
330
+ fromPartial(object) {
331
+ const message = createBaseFileDataResponse();
332
+ message.payload = object.payload ?? new Uint8Array(0);
333
+ return message;
334
+ },
335
+ };
336
+ function bytesFromBase64(b64) {
337
+ if (globalThis.Buffer) {
338
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
339
+ }
340
+ else {
341
+ const bin = globalThis.atob(b64);
342
+ const arr = new Uint8Array(bin.length);
343
+ for (let i = 0; i < bin.length; ++i) {
344
+ arr[i] = bin.charCodeAt(i);
345
+ }
346
+ return arr;
347
+ }
348
+ }
349
+ function base64FromBytes(arr) {
350
+ if (globalThis.Buffer) {
351
+ return globalThis.Buffer.from(arr).toString("base64");
352
+ }
353
+ else {
354
+ const bin = [];
355
+ arr.forEach((byte) => {
356
+ bin.push(globalThis.String.fromCharCode(byte));
357
+ });
358
+ return globalThis.btoa(bin.join(""));
359
+ }
360
+ }
361
+ function longToNumber(int64) {
362
+ const num = globalThis.Number(int64.toString());
363
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
364
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
365
+ }
366
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
367
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
368
+ }
369
+ return num;
370
+ }
371
+ function isSet(value) {
372
+ return value !== null && value !== undefined;
373
+ }
@@ -0,0 +1,20 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ export interface Any {
4
+ typeUrl: string;
5
+ value: Uint8Array;
6
+ }
7
+ export declare const Any: MessageFns<Any>;
8
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
9
+ 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 {} ? {
10
+ [K in keyof T]?: DeepPartial<T[K]>;
11
+ } : Partial<T>;
12
+ export interface MessageFns<T> {
13
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
14
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
15
+ fromJSON(object: any): T;
16
+ toJSON(message: T): unknown;
17
+ create(base?: DeepPartial<T>): T;
18
+ fromPartial(object: DeepPartial<T>): T;
19
+ }
20
+ export {};
@@ -0,0 +1,98 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export const protobufPackage = "google.protobuf";
3
+ function createBaseAny() {
4
+ return { typeUrl: "", value: new Uint8Array(0) };
5
+ }
6
+ export const Any = {
7
+ encode(message, writer = new BinaryWriter()) {
8
+ if (message.typeUrl !== "") {
9
+ writer.uint32(10).string(message.typeUrl);
10
+ }
11
+ if (message.value.length !== 0) {
12
+ writer.uint32(18).bytes(message.value);
13
+ }
14
+ return writer;
15
+ },
16
+ decode(input, length) {
17
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
18
+ let end = length === undefined ? reader.len : reader.pos + length;
19
+ const message = createBaseAny();
20
+ while (reader.pos < end) {
21
+ const tag = reader.uint32();
22
+ switch (tag >>> 3) {
23
+ case 1: {
24
+ if (tag !== 10) {
25
+ break;
26
+ }
27
+ message.typeUrl = reader.string();
28
+ continue;
29
+ }
30
+ case 2: {
31
+ if (tag !== 18) {
32
+ break;
33
+ }
34
+ message.value = reader.bytes();
35
+ continue;
36
+ }
37
+ }
38
+ if ((tag & 7) === 4 || tag === 0) {
39
+ break;
40
+ }
41
+ reader.skip(tag & 7);
42
+ }
43
+ return message;
44
+ },
45
+ fromJSON(object) {
46
+ return {
47
+ typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
48
+ value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
49
+ };
50
+ },
51
+ toJSON(message) {
52
+ const obj = {};
53
+ if (message.typeUrl !== "") {
54
+ obj.typeUrl = message.typeUrl;
55
+ }
56
+ if (message.value.length !== 0) {
57
+ obj.value = base64FromBytes(message.value);
58
+ }
59
+ return obj;
60
+ },
61
+ create(base) {
62
+ return Any.fromPartial(base ?? {});
63
+ },
64
+ fromPartial(object) {
65
+ const message = createBaseAny();
66
+ message.typeUrl = object.typeUrl ?? "";
67
+ message.value = object.value ?? new Uint8Array(0);
68
+ return message;
69
+ },
70
+ };
71
+ function bytesFromBase64(b64) {
72
+ if (globalThis.Buffer) {
73
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
74
+ }
75
+ else {
76
+ const bin = globalThis.atob(b64);
77
+ const arr = new Uint8Array(bin.length);
78
+ for (let i = 0; i < bin.length; ++i) {
79
+ arr[i] = bin.charCodeAt(i);
80
+ }
81
+ return arr;
82
+ }
83
+ }
84
+ function base64FromBytes(arr) {
85
+ if (globalThis.Buffer) {
86
+ return globalThis.Buffer.from(arr).toString("base64");
87
+ }
88
+ else {
89
+ const bin = [];
90
+ arr.forEach((byte) => {
91
+ bin.push(globalThis.String.fromCharCode(byte));
92
+ });
93
+ return globalThis.btoa(bin.join(""));
94
+ }
95
+ }
96
+ function isSet(value) {
97
+ return value !== null && value !== undefined;
98
+ }
@@ -0,0 +1,18 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ export interface Empty {
4
+ }
5
+ export declare const Empty: MessageFns<Empty>;
6
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
7
+ 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 {} ? {
8
+ [K in keyof T]?: DeepPartial<T[K]>;
9
+ } : Partial<T>;
10
+ export interface MessageFns<T> {
11
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
12
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
13
+ fromJSON(object: any): T;
14
+ toJSON(message: T): unknown;
15
+ create(base?: DeepPartial<T>): T;
16
+ fromPartial(object: DeepPartial<T>): T;
17
+ }
18
+ export {};
@@ -0,0 +1,39 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export const protobufPackage = "google.protobuf";
3
+ function createBaseEmpty() {
4
+ return {};
5
+ }
6
+ export const Empty = {
7
+ encode(_, writer = new BinaryWriter()) {
8
+ return writer;
9
+ },
10
+ decode(input, length) {
11
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
12
+ let end = length === undefined ? reader.len : reader.pos + length;
13
+ const message = createBaseEmpty();
14
+ while (reader.pos < end) {
15
+ const tag = reader.uint32();
16
+ switch (tag >>> 3) {
17
+ }
18
+ if ((tag & 7) === 4 || tag === 0) {
19
+ break;
20
+ }
21
+ reader.skip(tag & 7);
22
+ }
23
+ return message;
24
+ },
25
+ fromJSON(_) {
26
+ return {};
27
+ },
28
+ toJSON(_) {
29
+ const obj = {};
30
+ return obj;
31
+ },
32
+ create(base) {
33
+ return Empty.fromPartial(base ?? {});
34
+ },
35
+ fromPartial(_) {
36
+ const message = createBaseEmpty();
37
+ return message;
38
+ },
39
+ };