@vicinae/api 0.20.8 → 0.20.10

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 (76) hide show
  1. package/dist/api/alert.d.ts +1 -1
  2. package/dist/api/alert.js +9 -14
  3. package/dist/api/client.d.ts +7 -0
  4. package/dist/api/client.js +11 -0
  5. package/dist/api/clipboard.d.ts +4 -8
  6. package/dist/api/clipboard.js +13 -18
  7. package/dist/api/color.d.ts +4 -10
  8. package/dist/api/color.js +8 -47
  9. package/dist/api/command.js +4 -6
  10. package/dist/api/controls.js +9 -56
  11. package/dist/api/environment.d.ts +0 -11
  12. package/dist/api/environment.js +2 -1
  13. package/dist/api/file-search.d.ts +3 -4
  14. package/dist/api/file-search.js +6 -4
  15. package/dist/api/globals.d.ts +9 -0
  16. package/dist/api/globals.js +5 -0
  17. package/dist/api/hooks/use-imperative-form-handle.d.ts +1 -1
  18. package/dist/api/hooks/use-imperative-form-handle.js +6 -3
  19. package/dist/api/hooks/use-navigation.d.ts +2 -2
  20. package/dist/api/hooks/use-navigation.js +2 -5
  21. package/dist/api/image.d.ts +4 -4
  22. package/dist/api/image.js +12 -51
  23. package/dist/api/index.d.ts +0 -2
  24. package/dist/api/index.js +0 -2
  25. package/dist/api/local-storage.js +7 -14
  26. package/dist/api/oauth.d.ts +1 -1
  27. package/dist/api/oauth.js +7 -15
  28. package/dist/api/preference.d.ts +2 -4
  29. package/dist/api/preference.js +10 -6
  30. package/dist/api/proto/api.d.ts +240 -0
  31. package/dist/api/proto/api.js +271 -0
  32. package/dist/api/toast.js +7 -77
  33. package/dist/api/utils.d.ts +6 -2
  34. package/dist/api/utils.js +9 -26
  35. package/dist/api/window-management.d.ts +3 -5
  36. package/dist/api/window-management.js +14 -27
  37. package/dist/schemas/manifest.d.ts +3 -3
  38. package/package.json +1 -4
  39. package/dist/api/bus.d.ts +0 -125
  40. package/dist/api/bus.js +0 -201
  41. package/dist/api/context/index.d.ts +0 -1
  42. package/dist/api/context/index.js +0 -17
  43. package/dist/api/context/navigation-context.d.ts +0 -7
  44. package/dist/api/context/navigation-context.js +0 -12
  45. package/dist/api/context/navigation-provider.d.ts +0 -7
  46. package/dist/api/context/navigation-provider.js +0 -58
  47. package/dist/api/hooks.d.ts +0 -1
  48. package/dist/api/hooks.js +0 -30
  49. package/dist/api/proto/application.d.ts +0 -79
  50. package/dist/api/proto/application.js +0 -826
  51. package/dist/api/proto/clipboard.d.ts +0 -88
  52. package/dist/api/proto/clipboard.js +0 -929
  53. package/dist/api/proto/command.d.ts +0 -35
  54. package/dist/api/proto/command.js +0 -182
  55. package/dist/api/proto/common.d.ts +0 -28
  56. package/dist/api/proto/common.js +0 -102
  57. package/dist/api/proto/extension.d.ts +0 -106
  58. package/dist/api/proto/extension.js +0 -1122
  59. package/dist/api/proto/file-search.d.ts +0 -42
  60. package/dist/api/proto/file-search.js +0 -290
  61. package/dist/api/proto/google/protobuf/struct.d.ts +0 -107
  62. package/dist/api/proto/google/protobuf/struct.js +0 -456
  63. package/dist/api/proto/ipc.d.ts +0 -64
  64. package/dist/api/proto/ipc.js +0 -604
  65. package/dist/api/proto/manager.d.ts +0 -87
  66. package/dist/api/proto/manager.js +0 -776
  67. package/dist/api/proto/oauth.d.ts +0 -97
  68. package/dist/api/proto/oauth.js +0 -994
  69. package/dist/api/proto/storage.d.ts +0 -80
  70. package/dist/api/proto/storage.js +0 -804
  71. package/dist/api/proto/ui.d.ts +0 -208
  72. package/dist/api/proto/ui.js +0 -2316
  73. package/dist/api/proto/wlr-clipboard.d.ts +0 -30
  74. package/dist/api/proto/wlr-clipboard.js +0 -158
  75. package/dist/api/proto/wm.d.ts +0 -142
  76. package/dist/api/proto/wm.js +0 -1714
@@ -1,826 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.7.7
5
- // protoc v6.33.1
6
- // source: application.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Application = exports.Response = exports.Request = exports.ShowInFileBrowserRequest = exports.GetDefaultApplicationResponse = exports.GetDefaultApplicationRequest = exports.ListApplicationResponse = exports.ListApplicationRequest = exports.RunInTerminalRequest = exports.OpenApplicationRequest = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- const wire_1 = require("@bufbuild/protobuf/wire");
11
- const common_1 = require("./common");
12
- exports.protobufPackage = "proto.ext.application";
13
- function createBaseOpenApplicationRequest() {
14
- return { target: "", appId: undefined };
15
- }
16
- exports.OpenApplicationRequest = {
17
- encode(message, writer = new wire_1.BinaryWriter()) {
18
- if (message.target !== "") {
19
- writer.uint32(10).string(message.target);
20
- }
21
- if (message.appId !== undefined) {
22
- writer.uint32(18).string(message.appId);
23
- }
24
- return writer;
25
- },
26
- decode(input, length) {
27
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
28
- const end = length === undefined ? reader.len : reader.pos + length;
29
- const message = createBaseOpenApplicationRequest();
30
- while (reader.pos < end) {
31
- const tag = reader.uint32();
32
- switch (tag >>> 3) {
33
- case 1: {
34
- if (tag !== 10) {
35
- break;
36
- }
37
- message.target = reader.string();
38
- continue;
39
- }
40
- case 2: {
41
- if (tag !== 18) {
42
- break;
43
- }
44
- message.appId = reader.string();
45
- continue;
46
- }
47
- }
48
- if ((tag & 7) === 4 || tag === 0) {
49
- break;
50
- }
51
- reader.skip(tag & 7);
52
- }
53
- return message;
54
- },
55
- fromJSON(object) {
56
- return {
57
- target: isSet(object.target) ? globalThis.String(object.target) : "",
58
- appId: isSet(object.appId) ? globalThis.String(object.appId) : undefined,
59
- };
60
- },
61
- toJSON(message) {
62
- const obj = {};
63
- if (message.target !== "") {
64
- obj.target = message.target;
65
- }
66
- if (message.appId !== undefined) {
67
- obj.appId = message.appId;
68
- }
69
- return obj;
70
- },
71
- create(base) {
72
- return exports.OpenApplicationRequest.fromPartial(base ?? {});
73
- },
74
- fromPartial(object) {
75
- const message = createBaseOpenApplicationRequest();
76
- message.target = object.target ?? "";
77
- message.appId = object.appId ?? undefined;
78
- return message;
79
- },
80
- };
81
- function createBaseRunInTerminalRequest() {
82
- return { cmdline: [], appId: undefined, workingDirectory: undefined, title: undefined, hold: false };
83
- }
84
- exports.RunInTerminalRequest = {
85
- encode(message, writer = new wire_1.BinaryWriter()) {
86
- for (const v of message.cmdline) {
87
- writer.uint32(10).string(v);
88
- }
89
- if (message.appId !== undefined) {
90
- writer.uint32(18).string(message.appId);
91
- }
92
- if (message.workingDirectory !== undefined) {
93
- writer.uint32(26).string(message.workingDirectory);
94
- }
95
- if (message.title !== undefined) {
96
- writer.uint32(34).string(message.title);
97
- }
98
- if (message.hold !== false) {
99
- writer.uint32(40).bool(message.hold);
100
- }
101
- return writer;
102
- },
103
- decode(input, length) {
104
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
105
- const end = length === undefined ? reader.len : reader.pos + length;
106
- const message = createBaseRunInTerminalRequest();
107
- while (reader.pos < end) {
108
- const tag = reader.uint32();
109
- switch (tag >>> 3) {
110
- case 1: {
111
- if (tag !== 10) {
112
- break;
113
- }
114
- message.cmdline.push(reader.string());
115
- continue;
116
- }
117
- case 2: {
118
- if (tag !== 18) {
119
- break;
120
- }
121
- message.appId = reader.string();
122
- continue;
123
- }
124
- case 3: {
125
- if (tag !== 26) {
126
- break;
127
- }
128
- message.workingDirectory = reader.string();
129
- continue;
130
- }
131
- case 4: {
132
- if (tag !== 34) {
133
- break;
134
- }
135
- message.title = reader.string();
136
- continue;
137
- }
138
- case 5: {
139
- if (tag !== 40) {
140
- break;
141
- }
142
- message.hold = reader.bool();
143
- continue;
144
- }
145
- }
146
- if ((tag & 7) === 4 || tag === 0) {
147
- break;
148
- }
149
- reader.skip(tag & 7);
150
- }
151
- return message;
152
- },
153
- fromJSON(object) {
154
- return {
155
- cmdline: globalThis.Array.isArray(object?.cmdline) ? object.cmdline.map((e) => globalThis.String(e)) : [],
156
- appId: isSet(object.appId) ? globalThis.String(object.appId) : undefined,
157
- workingDirectory: isSet(object.workingDirectory) ? globalThis.String(object.workingDirectory) : undefined,
158
- title: isSet(object.title) ? globalThis.String(object.title) : undefined,
159
- hold: isSet(object.hold) ? globalThis.Boolean(object.hold) : false,
160
- };
161
- },
162
- toJSON(message) {
163
- const obj = {};
164
- if (message.cmdline?.length) {
165
- obj.cmdline = message.cmdline;
166
- }
167
- if (message.appId !== undefined) {
168
- obj.appId = message.appId;
169
- }
170
- if (message.workingDirectory !== undefined) {
171
- obj.workingDirectory = message.workingDirectory;
172
- }
173
- if (message.title !== undefined) {
174
- obj.title = message.title;
175
- }
176
- if (message.hold !== false) {
177
- obj.hold = message.hold;
178
- }
179
- return obj;
180
- },
181
- create(base) {
182
- return exports.RunInTerminalRequest.fromPartial(base ?? {});
183
- },
184
- fromPartial(object) {
185
- const message = createBaseRunInTerminalRequest();
186
- message.cmdline = object.cmdline?.map((e) => e) || [];
187
- message.appId = object.appId ?? undefined;
188
- message.workingDirectory = object.workingDirectory ?? undefined;
189
- message.title = object.title ?? undefined;
190
- message.hold = object.hold ?? false;
191
- return message;
192
- },
193
- };
194
- function createBaseListApplicationRequest() {
195
- return { target: undefined };
196
- }
197
- exports.ListApplicationRequest = {
198
- encode(message, writer = new wire_1.BinaryWriter()) {
199
- if (message.target !== undefined) {
200
- writer.uint32(10).string(message.target);
201
- }
202
- return writer;
203
- },
204
- decode(input, length) {
205
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
206
- const end = length === undefined ? reader.len : reader.pos + length;
207
- const message = createBaseListApplicationRequest();
208
- while (reader.pos < end) {
209
- const tag = reader.uint32();
210
- switch (tag >>> 3) {
211
- case 1: {
212
- if (tag !== 10) {
213
- break;
214
- }
215
- message.target = reader.string();
216
- continue;
217
- }
218
- }
219
- if ((tag & 7) === 4 || tag === 0) {
220
- break;
221
- }
222
- reader.skip(tag & 7);
223
- }
224
- return message;
225
- },
226
- fromJSON(object) {
227
- return { target: isSet(object.target) ? globalThis.String(object.target) : undefined };
228
- },
229
- toJSON(message) {
230
- const obj = {};
231
- if (message.target !== undefined) {
232
- obj.target = message.target;
233
- }
234
- return obj;
235
- },
236
- create(base) {
237
- return exports.ListApplicationRequest.fromPartial(base ?? {});
238
- },
239
- fromPartial(object) {
240
- const message = createBaseListApplicationRequest();
241
- message.target = object.target ?? undefined;
242
- return message;
243
- },
244
- };
245
- function createBaseListApplicationResponse() {
246
- return { apps: [] };
247
- }
248
- exports.ListApplicationResponse = {
249
- encode(message, writer = new wire_1.BinaryWriter()) {
250
- for (const v of message.apps) {
251
- exports.Application.encode(v, writer.uint32(10).fork()).join();
252
- }
253
- return writer;
254
- },
255
- decode(input, length) {
256
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
257
- const end = length === undefined ? reader.len : reader.pos + length;
258
- const message = createBaseListApplicationResponse();
259
- while (reader.pos < end) {
260
- const tag = reader.uint32();
261
- switch (tag >>> 3) {
262
- case 1: {
263
- if (tag !== 10) {
264
- break;
265
- }
266
- message.apps.push(exports.Application.decode(reader, reader.uint32()));
267
- continue;
268
- }
269
- }
270
- if ((tag & 7) === 4 || tag === 0) {
271
- break;
272
- }
273
- reader.skip(tag & 7);
274
- }
275
- return message;
276
- },
277
- fromJSON(object) {
278
- return { apps: globalThis.Array.isArray(object?.apps) ? object.apps.map((e) => exports.Application.fromJSON(e)) : [] };
279
- },
280
- toJSON(message) {
281
- const obj = {};
282
- if (message.apps?.length) {
283
- obj.apps = message.apps.map((e) => exports.Application.toJSON(e));
284
- }
285
- return obj;
286
- },
287
- create(base) {
288
- return exports.ListApplicationResponse.fromPartial(base ?? {});
289
- },
290
- fromPartial(object) {
291
- const message = createBaseListApplicationResponse();
292
- message.apps = object.apps?.map((e) => exports.Application.fromPartial(e)) || [];
293
- return message;
294
- },
295
- };
296
- function createBaseGetDefaultApplicationRequest() {
297
- return { target: "" };
298
- }
299
- exports.GetDefaultApplicationRequest = {
300
- encode(message, writer = new wire_1.BinaryWriter()) {
301
- if (message.target !== "") {
302
- writer.uint32(10).string(message.target);
303
- }
304
- return writer;
305
- },
306
- decode(input, length) {
307
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
308
- const end = length === undefined ? reader.len : reader.pos + length;
309
- const message = createBaseGetDefaultApplicationRequest();
310
- while (reader.pos < end) {
311
- const tag = reader.uint32();
312
- switch (tag >>> 3) {
313
- case 1: {
314
- if (tag !== 10) {
315
- break;
316
- }
317
- message.target = reader.string();
318
- continue;
319
- }
320
- }
321
- if ((tag & 7) === 4 || tag === 0) {
322
- break;
323
- }
324
- reader.skip(tag & 7);
325
- }
326
- return message;
327
- },
328
- fromJSON(object) {
329
- return { target: isSet(object.target) ? globalThis.String(object.target) : "" };
330
- },
331
- toJSON(message) {
332
- const obj = {};
333
- if (message.target !== "") {
334
- obj.target = message.target;
335
- }
336
- return obj;
337
- },
338
- create(base) {
339
- return exports.GetDefaultApplicationRequest.fromPartial(base ?? {});
340
- },
341
- fromPartial(object) {
342
- const message = createBaseGetDefaultApplicationRequest();
343
- message.target = object.target ?? "";
344
- return message;
345
- },
346
- };
347
- function createBaseGetDefaultApplicationResponse() {
348
- return { app: undefined };
349
- }
350
- exports.GetDefaultApplicationResponse = {
351
- encode(message, writer = new wire_1.BinaryWriter()) {
352
- if (message.app !== undefined) {
353
- exports.Application.encode(message.app, writer.uint32(10).fork()).join();
354
- }
355
- return writer;
356
- },
357
- decode(input, length) {
358
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
359
- const end = length === undefined ? reader.len : reader.pos + length;
360
- const message = createBaseGetDefaultApplicationResponse();
361
- while (reader.pos < end) {
362
- const tag = reader.uint32();
363
- switch (tag >>> 3) {
364
- case 1: {
365
- if (tag !== 10) {
366
- break;
367
- }
368
- message.app = exports.Application.decode(reader, reader.uint32());
369
- continue;
370
- }
371
- }
372
- if ((tag & 7) === 4 || tag === 0) {
373
- break;
374
- }
375
- reader.skip(tag & 7);
376
- }
377
- return message;
378
- },
379
- fromJSON(object) {
380
- return { app: isSet(object.app) ? exports.Application.fromJSON(object.app) : undefined };
381
- },
382
- toJSON(message) {
383
- const obj = {};
384
- if (message.app !== undefined) {
385
- obj.app = exports.Application.toJSON(message.app);
386
- }
387
- return obj;
388
- },
389
- create(base) {
390
- return exports.GetDefaultApplicationResponse.fromPartial(base ?? {});
391
- },
392
- fromPartial(object) {
393
- const message = createBaseGetDefaultApplicationResponse();
394
- message.app = (object.app !== undefined && object.app !== null) ? exports.Application.fromPartial(object.app) : undefined;
395
- return message;
396
- },
397
- };
398
- function createBaseShowInFileBrowserRequest() {
399
- return { target: "", select: false };
400
- }
401
- exports.ShowInFileBrowserRequest = {
402
- encode(message, writer = new wire_1.BinaryWriter()) {
403
- if (message.target !== "") {
404
- writer.uint32(10).string(message.target);
405
- }
406
- if (message.select !== false) {
407
- writer.uint32(16).bool(message.select);
408
- }
409
- return writer;
410
- },
411
- decode(input, length) {
412
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
413
- const end = length === undefined ? reader.len : reader.pos + length;
414
- const message = createBaseShowInFileBrowserRequest();
415
- while (reader.pos < end) {
416
- const tag = reader.uint32();
417
- switch (tag >>> 3) {
418
- case 1: {
419
- if (tag !== 10) {
420
- break;
421
- }
422
- message.target = reader.string();
423
- continue;
424
- }
425
- case 2: {
426
- if (tag !== 16) {
427
- break;
428
- }
429
- message.select = reader.bool();
430
- continue;
431
- }
432
- }
433
- if ((tag & 7) === 4 || tag === 0) {
434
- break;
435
- }
436
- reader.skip(tag & 7);
437
- }
438
- return message;
439
- },
440
- fromJSON(object) {
441
- return {
442
- target: isSet(object.target) ? globalThis.String(object.target) : "",
443
- select: isSet(object.select) ? globalThis.Boolean(object.select) : false,
444
- };
445
- },
446
- toJSON(message) {
447
- const obj = {};
448
- if (message.target !== "") {
449
- obj.target = message.target;
450
- }
451
- if (message.select !== false) {
452
- obj.select = message.select;
453
- }
454
- return obj;
455
- },
456
- create(base) {
457
- return exports.ShowInFileBrowserRequest.fromPartial(base ?? {});
458
- },
459
- fromPartial(object) {
460
- const message = createBaseShowInFileBrowserRequest();
461
- message.target = object.target ?? "";
462
- message.select = object.select ?? false;
463
- return message;
464
- },
465
- };
466
- function createBaseRequest() {
467
- return {
468
- list: undefined,
469
- open: undefined,
470
- getDefault: undefined,
471
- runInTerminal: undefined,
472
- showInFileBrowser: undefined,
473
- };
474
- }
475
- exports.Request = {
476
- encode(message, writer = new wire_1.BinaryWriter()) {
477
- if (message.list !== undefined) {
478
- exports.ListApplicationRequest.encode(message.list, writer.uint32(10).fork()).join();
479
- }
480
- if (message.open !== undefined) {
481
- exports.OpenApplicationRequest.encode(message.open, writer.uint32(18).fork()).join();
482
- }
483
- if (message.getDefault !== undefined) {
484
- exports.GetDefaultApplicationRequest.encode(message.getDefault, writer.uint32(26).fork()).join();
485
- }
486
- if (message.runInTerminal !== undefined) {
487
- exports.RunInTerminalRequest.encode(message.runInTerminal, writer.uint32(34).fork()).join();
488
- }
489
- if (message.showInFileBrowser !== undefined) {
490
- exports.ShowInFileBrowserRequest.encode(message.showInFileBrowser, writer.uint32(42).fork()).join();
491
- }
492
- return writer;
493
- },
494
- decode(input, length) {
495
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
496
- const end = length === undefined ? reader.len : reader.pos + length;
497
- const message = createBaseRequest();
498
- while (reader.pos < end) {
499
- const tag = reader.uint32();
500
- switch (tag >>> 3) {
501
- case 1: {
502
- if (tag !== 10) {
503
- break;
504
- }
505
- message.list = exports.ListApplicationRequest.decode(reader, reader.uint32());
506
- continue;
507
- }
508
- case 2: {
509
- if (tag !== 18) {
510
- break;
511
- }
512
- message.open = exports.OpenApplicationRequest.decode(reader, reader.uint32());
513
- continue;
514
- }
515
- case 3: {
516
- if (tag !== 26) {
517
- break;
518
- }
519
- message.getDefault = exports.GetDefaultApplicationRequest.decode(reader, reader.uint32());
520
- continue;
521
- }
522
- case 4: {
523
- if (tag !== 34) {
524
- break;
525
- }
526
- message.runInTerminal = exports.RunInTerminalRequest.decode(reader, reader.uint32());
527
- continue;
528
- }
529
- case 5: {
530
- if (tag !== 42) {
531
- break;
532
- }
533
- message.showInFileBrowser = exports.ShowInFileBrowserRequest.decode(reader, reader.uint32());
534
- continue;
535
- }
536
- }
537
- if ((tag & 7) === 4 || tag === 0) {
538
- break;
539
- }
540
- reader.skip(tag & 7);
541
- }
542
- return message;
543
- },
544
- fromJSON(object) {
545
- return {
546
- list: isSet(object.list) ? exports.ListApplicationRequest.fromJSON(object.list) : undefined,
547
- open: isSet(object.open) ? exports.OpenApplicationRequest.fromJSON(object.open) : undefined,
548
- getDefault: isSet(object.getDefault) ? exports.GetDefaultApplicationRequest.fromJSON(object.getDefault) : undefined,
549
- runInTerminal: isSet(object.runInTerminal) ? exports.RunInTerminalRequest.fromJSON(object.runInTerminal) : undefined,
550
- showInFileBrowser: isSet(object.showInFileBrowser)
551
- ? exports.ShowInFileBrowserRequest.fromJSON(object.showInFileBrowser)
552
- : undefined,
553
- };
554
- },
555
- toJSON(message) {
556
- const obj = {};
557
- if (message.list !== undefined) {
558
- obj.list = exports.ListApplicationRequest.toJSON(message.list);
559
- }
560
- if (message.open !== undefined) {
561
- obj.open = exports.OpenApplicationRequest.toJSON(message.open);
562
- }
563
- if (message.getDefault !== undefined) {
564
- obj.getDefault = exports.GetDefaultApplicationRequest.toJSON(message.getDefault);
565
- }
566
- if (message.runInTerminal !== undefined) {
567
- obj.runInTerminal = exports.RunInTerminalRequest.toJSON(message.runInTerminal);
568
- }
569
- if (message.showInFileBrowser !== undefined) {
570
- obj.showInFileBrowser = exports.ShowInFileBrowserRequest.toJSON(message.showInFileBrowser);
571
- }
572
- return obj;
573
- },
574
- create(base) {
575
- return exports.Request.fromPartial(base ?? {});
576
- },
577
- fromPartial(object) {
578
- const message = createBaseRequest();
579
- message.list = (object.list !== undefined && object.list !== null)
580
- ? exports.ListApplicationRequest.fromPartial(object.list)
581
- : undefined;
582
- message.open = (object.open !== undefined && object.open !== null)
583
- ? exports.OpenApplicationRequest.fromPartial(object.open)
584
- : undefined;
585
- message.getDefault = (object.getDefault !== undefined && object.getDefault !== null)
586
- ? exports.GetDefaultApplicationRequest.fromPartial(object.getDefault)
587
- : undefined;
588
- message.runInTerminal = (object.runInTerminal !== undefined && object.runInTerminal !== null)
589
- ? exports.RunInTerminalRequest.fromPartial(object.runInTerminal)
590
- : undefined;
591
- message.showInFileBrowser = (object.showInFileBrowser !== undefined && object.showInFileBrowser !== null)
592
- ? exports.ShowInFileBrowserRequest.fromPartial(object.showInFileBrowser)
593
- : undefined;
594
- return message;
595
- },
596
- };
597
- function createBaseResponse() {
598
- return {
599
- list: undefined,
600
- open: undefined,
601
- getDefault: undefined,
602
- runInTerminal: undefined,
603
- showInFileBrowser: undefined,
604
- };
605
- }
606
- exports.Response = {
607
- encode(message, writer = new wire_1.BinaryWriter()) {
608
- if (message.list !== undefined) {
609
- exports.ListApplicationResponse.encode(message.list, writer.uint32(10).fork()).join();
610
- }
611
- if (message.open !== undefined) {
612
- common_1.AckResponse.encode(message.open, writer.uint32(18).fork()).join();
613
- }
614
- if (message.getDefault !== undefined) {
615
- exports.GetDefaultApplicationResponse.encode(message.getDefault, writer.uint32(26).fork()).join();
616
- }
617
- if (message.runInTerminal !== undefined) {
618
- common_1.AckResponse.encode(message.runInTerminal, writer.uint32(34).fork()).join();
619
- }
620
- if (message.showInFileBrowser !== undefined) {
621
- common_1.AckResponse.encode(message.showInFileBrowser, writer.uint32(42).fork()).join();
622
- }
623
- return writer;
624
- },
625
- decode(input, length) {
626
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
627
- const end = length === undefined ? reader.len : reader.pos + length;
628
- const message = createBaseResponse();
629
- while (reader.pos < end) {
630
- const tag = reader.uint32();
631
- switch (tag >>> 3) {
632
- case 1: {
633
- if (tag !== 10) {
634
- break;
635
- }
636
- message.list = exports.ListApplicationResponse.decode(reader, reader.uint32());
637
- continue;
638
- }
639
- case 2: {
640
- if (tag !== 18) {
641
- break;
642
- }
643
- message.open = common_1.AckResponse.decode(reader, reader.uint32());
644
- continue;
645
- }
646
- case 3: {
647
- if (tag !== 26) {
648
- break;
649
- }
650
- message.getDefault = exports.GetDefaultApplicationResponse.decode(reader, reader.uint32());
651
- continue;
652
- }
653
- case 4: {
654
- if (tag !== 34) {
655
- break;
656
- }
657
- message.runInTerminal = common_1.AckResponse.decode(reader, reader.uint32());
658
- continue;
659
- }
660
- case 5: {
661
- if (tag !== 42) {
662
- break;
663
- }
664
- message.showInFileBrowser = common_1.AckResponse.decode(reader, reader.uint32());
665
- continue;
666
- }
667
- }
668
- if ((tag & 7) === 4 || tag === 0) {
669
- break;
670
- }
671
- reader.skip(tag & 7);
672
- }
673
- return message;
674
- },
675
- fromJSON(object) {
676
- return {
677
- list: isSet(object.list) ? exports.ListApplicationResponse.fromJSON(object.list) : undefined,
678
- open: isSet(object.open) ? common_1.AckResponse.fromJSON(object.open) : undefined,
679
- getDefault: isSet(object.getDefault) ? exports.GetDefaultApplicationResponse.fromJSON(object.getDefault) : undefined,
680
- runInTerminal: isSet(object.runInTerminal) ? common_1.AckResponse.fromJSON(object.runInTerminal) : undefined,
681
- showInFileBrowser: isSet(object.showInFileBrowser) ? common_1.AckResponse.fromJSON(object.showInFileBrowser) : undefined,
682
- };
683
- },
684
- toJSON(message) {
685
- const obj = {};
686
- if (message.list !== undefined) {
687
- obj.list = exports.ListApplicationResponse.toJSON(message.list);
688
- }
689
- if (message.open !== undefined) {
690
- obj.open = common_1.AckResponse.toJSON(message.open);
691
- }
692
- if (message.getDefault !== undefined) {
693
- obj.getDefault = exports.GetDefaultApplicationResponse.toJSON(message.getDefault);
694
- }
695
- if (message.runInTerminal !== undefined) {
696
- obj.runInTerminal = common_1.AckResponse.toJSON(message.runInTerminal);
697
- }
698
- if (message.showInFileBrowser !== undefined) {
699
- obj.showInFileBrowser = common_1.AckResponse.toJSON(message.showInFileBrowser);
700
- }
701
- return obj;
702
- },
703
- create(base) {
704
- return exports.Response.fromPartial(base ?? {});
705
- },
706
- fromPartial(object) {
707
- const message = createBaseResponse();
708
- message.list = (object.list !== undefined && object.list !== null)
709
- ? exports.ListApplicationResponse.fromPartial(object.list)
710
- : undefined;
711
- message.open = (object.open !== undefined && object.open !== null)
712
- ? common_1.AckResponse.fromPartial(object.open)
713
- : undefined;
714
- message.getDefault = (object.getDefault !== undefined && object.getDefault !== null)
715
- ? exports.GetDefaultApplicationResponse.fromPartial(object.getDefault)
716
- : undefined;
717
- message.runInTerminal = (object.runInTerminal !== undefined && object.runInTerminal !== null)
718
- ? common_1.AckResponse.fromPartial(object.runInTerminal)
719
- : undefined;
720
- message.showInFileBrowser = (object.showInFileBrowser !== undefined && object.showInFileBrowser !== null)
721
- ? common_1.AckResponse.fromPartial(object.showInFileBrowser)
722
- : undefined;
723
- return message;
724
- },
725
- };
726
- function createBaseApplication() {
727
- return { id: "", name: "", icon: "", path: "" };
728
- }
729
- exports.Application = {
730
- encode(message, writer = new wire_1.BinaryWriter()) {
731
- if (message.id !== "") {
732
- writer.uint32(10).string(message.id);
733
- }
734
- if (message.name !== "") {
735
- writer.uint32(18).string(message.name);
736
- }
737
- if (message.icon !== "") {
738
- writer.uint32(26).string(message.icon);
739
- }
740
- if (message.path !== "") {
741
- writer.uint32(34).string(message.path);
742
- }
743
- return writer;
744
- },
745
- decode(input, length) {
746
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
747
- const end = length === undefined ? reader.len : reader.pos + length;
748
- const message = createBaseApplication();
749
- while (reader.pos < end) {
750
- const tag = reader.uint32();
751
- switch (tag >>> 3) {
752
- case 1: {
753
- if (tag !== 10) {
754
- break;
755
- }
756
- message.id = reader.string();
757
- continue;
758
- }
759
- case 2: {
760
- if (tag !== 18) {
761
- break;
762
- }
763
- message.name = reader.string();
764
- continue;
765
- }
766
- case 3: {
767
- if (tag !== 26) {
768
- break;
769
- }
770
- message.icon = reader.string();
771
- continue;
772
- }
773
- case 4: {
774
- if (tag !== 34) {
775
- break;
776
- }
777
- message.path = reader.string();
778
- continue;
779
- }
780
- }
781
- if ((tag & 7) === 4 || tag === 0) {
782
- break;
783
- }
784
- reader.skip(tag & 7);
785
- }
786
- return message;
787
- },
788
- fromJSON(object) {
789
- return {
790
- id: isSet(object.id) ? globalThis.String(object.id) : "",
791
- name: isSet(object.name) ? globalThis.String(object.name) : "",
792
- icon: isSet(object.icon) ? globalThis.String(object.icon) : "",
793
- path: isSet(object.path) ? globalThis.String(object.path) : "",
794
- };
795
- },
796
- toJSON(message) {
797
- const obj = {};
798
- if (message.id !== "") {
799
- obj.id = message.id;
800
- }
801
- if (message.name !== "") {
802
- obj.name = message.name;
803
- }
804
- if (message.icon !== "") {
805
- obj.icon = message.icon;
806
- }
807
- if (message.path !== "") {
808
- obj.path = message.path;
809
- }
810
- return obj;
811
- },
812
- create(base) {
813
- return exports.Application.fromPartial(base ?? {});
814
- },
815
- fromPartial(object) {
816
- const message = createBaseApplication();
817
- message.id = object.id ?? "";
818
- message.name = object.name ?? "";
819
- message.icon = object.icon ?? "";
820
- message.path = object.path ?? "";
821
- return message;
822
- },
823
- };
824
- function isSet(value) {
825
- return value !== null && value !== undefined;
826
- }