@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,1122 +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: extension.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.LaunchEventData_ArgumentValuesEntry = exports.LaunchEventData_PreferenceValuesEntry = exports.LaunchEventData = exports.GenericEventData = exports.CrashEventData = exports.Event = exports.ResponseData = exports.Response = exports.RequestData = exports.Request = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- const wire_1 = require("@bufbuild/protobuf/wire");
11
- const application_1 = require("./application");
12
- const clipboard_1 = require("./clipboard");
13
- const command_1 = require("./command");
14
- const common_1 = require("./common");
15
- const file_search_1 = require("./file-search");
16
- const struct_1 = require("./google/protobuf/struct");
17
- const manager_1 = require("./manager");
18
- const oauth_1 = require("./oauth");
19
- const storage_1 = require("./storage");
20
- const ui_1 = require("./ui");
21
- const wm_1 = require("./wm");
22
- exports.protobufPackage = "proto.ext.extension";
23
- function createBaseRequest() {
24
- return { requestId: "", data: undefined };
25
- }
26
- exports.Request = {
27
- encode(message, writer = new wire_1.BinaryWriter()) {
28
- if (message.requestId !== "") {
29
- writer.uint32(10).string(message.requestId);
30
- }
31
- if (message.data !== undefined) {
32
- exports.RequestData.encode(message.data, writer.uint32(18).fork()).join();
33
- }
34
- return writer;
35
- },
36
- decode(input, length) {
37
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
38
- const end = length === undefined ? reader.len : reader.pos + length;
39
- const message = createBaseRequest();
40
- while (reader.pos < end) {
41
- const tag = reader.uint32();
42
- switch (tag >>> 3) {
43
- case 1: {
44
- if (tag !== 10) {
45
- break;
46
- }
47
- message.requestId = reader.string();
48
- continue;
49
- }
50
- case 2: {
51
- if (tag !== 18) {
52
- break;
53
- }
54
- message.data = exports.RequestData.decode(reader, reader.uint32());
55
- continue;
56
- }
57
- }
58
- if ((tag & 7) === 4 || tag === 0) {
59
- break;
60
- }
61
- reader.skip(tag & 7);
62
- }
63
- return message;
64
- },
65
- fromJSON(object) {
66
- return {
67
- requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
68
- data: isSet(object.data) ? exports.RequestData.fromJSON(object.data) : undefined,
69
- };
70
- },
71
- toJSON(message) {
72
- const obj = {};
73
- if (message.requestId !== "") {
74
- obj.requestId = message.requestId;
75
- }
76
- if (message.data !== undefined) {
77
- obj.data = exports.RequestData.toJSON(message.data);
78
- }
79
- return obj;
80
- },
81
- create(base) {
82
- return exports.Request.fromPartial(base ?? {});
83
- },
84
- fromPartial(object) {
85
- const message = createBaseRequest();
86
- message.requestId = object.requestId ?? "";
87
- message.data = (object.data !== undefined && object.data !== null)
88
- ? exports.RequestData.fromPartial(object.data)
89
- : undefined;
90
- return message;
91
- },
92
- };
93
- function createBaseRequestData() {
94
- return {
95
- ui: undefined,
96
- app: undefined,
97
- clipboard: undefined,
98
- storage: undefined,
99
- oauth: undefined,
100
- fileSearch: undefined,
101
- wm: undefined,
102
- command: undefined,
103
- };
104
- }
105
- exports.RequestData = {
106
- encode(message, writer = new wire_1.BinaryWriter()) {
107
- if (message.ui !== undefined) {
108
- ui_1.Request.encode(message.ui, writer.uint32(10).fork()).join();
109
- }
110
- if (message.app !== undefined) {
111
- application_1.Request.encode(message.app, writer.uint32(18).fork()).join();
112
- }
113
- if (message.clipboard !== undefined) {
114
- clipboard_1.Request.encode(message.clipboard, writer.uint32(26).fork()).join();
115
- }
116
- if (message.storage !== undefined) {
117
- storage_1.Request.encode(message.storage, writer.uint32(34).fork()).join();
118
- }
119
- if (message.oauth !== undefined) {
120
- oauth_1.Request.encode(message.oauth, writer.uint32(42).fork()).join();
121
- }
122
- if (message.fileSearch !== undefined) {
123
- file_search_1.Request.encode(message.fileSearch, writer.uint32(50).fork()).join();
124
- }
125
- if (message.wm !== undefined) {
126
- wm_1.Request.encode(message.wm, writer.uint32(58).fork()).join();
127
- }
128
- if (message.command !== undefined) {
129
- command_1.Request.encode(message.command, writer.uint32(66).fork()).join();
130
- }
131
- return writer;
132
- },
133
- decode(input, length) {
134
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
135
- const end = length === undefined ? reader.len : reader.pos + length;
136
- const message = createBaseRequestData();
137
- while (reader.pos < end) {
138
- const tag = reader.uint32();
139
- switch (tag >>> 3) {
140
- case 1: {
141
- if (tag !== 10) {
142
- break;
143
- }
144
- message.ui = ui_1.Request.decode(reader, reader.uint32());
145
- continue;
146
- }
147
- case 2: {
148
- if (tag !== 18) {
149
- break;
150
- }
151
- message.app = application_1.Request.decode(reader, reader.uint32());
152
- continue;
153
- }
154
- case 3: {
155
- if (tag !== 26) {
156
- break;
157
- }
158
- message.clipboard = clipboard_1.Request.decode(reader, reader.uint32());
159
- continue;
160
- }
161
- case 4: {
162
- if (tag !== 34) {
163
- break;
164
- }
165
- message.storage = storage_1.Request.decode(reader, reader.uint32());
166
- continue;
167
- }
168
- case 5: {
169
- if (tag !== 42) {
170
- break;
171
- }
172
- message.oauth = oauth_1.Request.decode(reader, reader.uint32());
173
- continue;
174
- }
175
- case 6: {
176
- if (tag !== 50) {
177
- break;
178
- }
179
- message.fileSearch = file_search_1.Request.decode(reader, reader.uint32());
180
- continue;
181
- }
182
- case 7: {
183
- if (tag !== 58) {
184
- break;
185
- }
186
- message.wm = wm_1.Request.decode(reader, reader.uint32());
187
- continue;
188
- }
189
- case 8: {
190
- if (tag !== 66) {
191
- break;
192
- }
193
- message.command = command_1.Request.decode(reader, reader.uint32());
194
- continue;
195
- }
196
- }
197
- if ((tag & 7) === 4 || tag === 0) {
198
- break;
199
- }
200
- reader.skip(tag & 7);
201
- }
202
- return message;
203
- },
204
- fromJSON(object) {
205
- return {
206
- ui: isSet(object.ui) ? ui_1.Request.fromJSON(object.ui) : undefined,
207
- app: isSet(object.app) ? application_1.Request.fromJSON(object.app) : undefined,
208
- clipboard: isSet(object.clipboard) ? clipboard_1.Request.fromJSON(object.clipboard) : undefined,
209
- storage: isSet(object.storage) ? storage_1.Request.fromJSON(object.storage) : undefined,
210
- oauth: isSet(object.oauth) ? oauth_1.Request.fromJSON(object.oauth) : undefined,
211
- fileSearch: isSet(object.fileSearch) ? file_search_1.Request.fromJSON(object.fileSearch) : undefined,
212
- wm: isSet(object.wm) ? wm_1.Request.fromJSON(object.wm) : undefined,
213
- command: isSet(object.command) ? command_1.Request.fromJSON(object.command) : undefined,
214
- };
215
- },
216
- toJSON(message) {
217
- const obj = {};
218
- if (message.ui !== undefined) {
219
- obj.ui = ui_1.Request.toJSON(message.ui);
220
- }
221
- if (message.app !== undefined) {
222
- obj.app = application_1.Request.toJSON(message.app);
223
- }
224
- if (message.clipboard !== undefined) {
225
- obj.clipboard = clipboard_1.Request.toJSON(message.clipboard);
226
- }
227
- if (message.storage !== undefined) {
228
- obj.storage = storage_1.Request.toJSON(message.storage);
229
- }
230
- if (message.oauth !== undefined) {
231
- obj.oauth = oauth_1.Request.toJSON(message.oauth);
232
- }
233
- if (message.fileSearch !== undefined) {
234
- obj.fileSearch = file_search_1.Request.toJSON(message.fileSearch);
235
- }
236
- if (message.wm !== undefined) {
237
- obj.wm = wm_1.Request.toJSON(message.wm);
238
- }
239
- if (message.command !== undefined) {
240
- obj.command = command_1.Request.toJSON(message.command);
241
- }
242
- return obj;
243
- },
244
- create(base) {
245
- return exports.RequestData.fromPartial(base ?? {});
246
- },
247
- fromPartial(object) {
248
- const message = createBaseRequestData();
249
- message.ui = (object.ui !== undefined && object.ui !== null) ? ui_1.Request.fromPartial(object.ui) : undefined;
250
- message.app = (object.app !== undefined && object.app !== null) ? application_1.Request.fromPartial(object.app) : undefined;
251
- message.clipboard = (object.clipboard !== undefined && object.clipboard !== null)
252
- ? clipboard_1.Request.fromPartial(object.clipboard)
253
- : undefined;
254
- message.storage = (object.storage !== undefined && object.storage !== null)
255
- ? storage_1.Request.fromPartial(object.storage)
256
- : undefined;
257
- message.oauth = (object.oauth !== undefined && object.oauth !== null)
258
- ? oauth_1.Request.fromPartial(object.oauth)
259
- : undefined;
260
- message.fileSearch = (object.fileSearch !== undefined && object.fileSearch !== null)
261
- ? file_search_1.Request.fromPartial(object.fileSearch)
262
- : undefined;
263
- message.wm = (object.wm !== undefined && object.wm !== null) ? wm_1.Request.fromPartial(object.wm) : undefined;
264
- message.command = (object.command !== undefined && object.command !== null)
265
- ? command_1.Request.fromPartial(object.command)
266
- : undefined;
267
- return message;
268
- },
269
- };
270
- function createBaseResponse() {
271
- return { requestId: "", data: undefined, error: undefined };
272
- }
273
- exports.Response = {
274
- encode(message, writer = new wire_1.BinaryWriter()) {
275
- if (message.requestId !== "") {
276
- writer.uint32(10).string(message.requestId);
277
- }
278
- if (message.data !== undefined) {
279
- exports.ResponseData.encode(message.data, writer.uint32(18).fork()).join();
280
- }
281
- if (message.error !== undefined) {
282
- common_1.ErrorResponse.encode(message.error, writer.uint32(26).fork()).join();
283
- }
284
- return writer;
285
- },
286
- decode(input, length) {
287
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
288
- const end = length === undefined ? reader.len : reader.pos + length;
289
- const message = createBaseResponse();
290
- while (reader.pos < end) {
291
- const tag = reader.uint32();
292
- switch (tag >>> 3) {
293
- case 1: {
294
- if (tag !== 10) {
295
- break;
296
- }
297
- message.requestId = reader.string();
298
- continue;
299
- }
300
- case 2: {
301
- if (tag !== 18) {
302
- break;
303
- }
304
- message.data = exports.ResponseData.decode(reader, reader.uint32());
305
- continue;
306
- }
307
- case 3: {
308
- if (tag !== 26) {
309
- break;
310
- }
311
- message.error = common_1.ErrorResponse.decode(reader, reader.uint32());
312
- continue;
313
- }
314
- }
315
- if ((tag & 7) === 4 || tag === 0) {
316
- break;
317
- }
318
- reader.skip(tag & 7);
319
- }
320
- return message;
321
- },
322
- fromJSON(object) {
323
- return {
324
- requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
325
- data: isSet(object.data) ? exports.ResponseData.fromJSON(object.data) : undefined,
326
- error: isSet(object.error) ? common_1.ErrorResponse.fromJSON(object.error) : undefined,
327
- };
328
- },
329
- toJSON(message) {
330
- const obj = {};
331
- if (message.requestId !== "") {
332
- obj.requestId = message.requestId;
333
- }
334
- if (message.data !== undefined) {
335
- obj.data = exports.ResponseData.toJSON(message.data);
336
- }
337
- if (message.error !== undefined) {
338
- obj.error = common_1.ErrorResponse.toJSON(message.error);
339
- }
340
- return obj;
341
- },
342
- create(base) {
343
- return exports.Response.fromPartial(base ?? {});
344
- },
345
- fromPartial(object) {
346
- const message = createBaseResponse();
347
- message.requestId = object.requestId ?? "";
348
- message.data = (object.data !== undefined && object.data !== null)
349
- ? exports.ResponseData.fromPartial(object.data)
350
- : undefined;
351
- message.error = (object.error !== undefined && object.error !== null)
352
- ? common_1.ErrorResponse.fromPartial(object.error)
353
- : undefined;
354
- return message;
355
- },
356
- };
357
- function createBaseResponseData() {
358
- return {
359
- ui: undefined,
360
- app: undefined,
361
- clipboard: undefined,
362
- storage: undefined,
363
- oauth: undefined,
364
- fileSearch: undefined,
365
- wm: undefined,
366
- command: undefined,
367
- };
368
- }
369
- exports.ResponseData = {
370
- encode(message, writer = new wire_1.BinaryWriter()) {
371
- if (message.ui !== undefined) {
372
- ui_1.Response.encode(message.ui, writer.uint32(10).fork()).join();
373
- }
374
- if (message.app !== undefined) {
375
- application_1.Response.encode(message.app, writer.uint32(18).fork()).join();
376
- }
377
- if (message.clipboard !== undefined) {
378
- clipboard_1.Response.encode(message.clipboard, writer.uint32(26).fork()).join();
379
- }
380
- if (message.storage !== undefined) {
381
- storage_1.Response.encode(message.storage, writer.uint32(34).fork()).join();
382
- }
383
- if (message.oauth !== undefined) {
384
- oauth_1.Response.encode(message.oauth, writer.uint32(42).fork()).join();
385
- }
386
- if (message.fileSearch !== undefined) {
387
- file_search_1.Response.encode(message.fileSearch, writer.uint32(50).fork()).join();
388
- }
389
- if (message.wm !== undefined) {
390
- wm_1.Response.encode(message.wm, writer.uint32(58).fork()).join();
391
- }
392
- if (message.command !== undefined) {
393
- command_1.Response.encode(message.command, writer.uint32(66).fork()).join();
394
- }
395
- return writer;
396
- },
397
- decode(input, length) {
398
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
399
- const end = length === undefined ? reader.len : reader.pos + length;
400
- const message = createBaseResponseData();
401
- while (reader.pos < end) {
402
- const tag = reader.uint32();
403
- switch (tag >>> 3) {
404
- case 1: {
405
- if (tag !== 10) {
406
- break;
407
- }
408
- message.ui = ui_1.Response.decode(reader, reader.uint32());
409
- continue;
410
- }
411
- case 2: {
412
- if (tag !== 18) {
413
- break;
414
- }
415
- message.app = application_1.Response.decode(reader, reader.uint32());
416
- continue;
417
- }
418
- case 3: {
419
- if (tag !== 26) {
420
- break;
421
- }
422
- message.clipboard = clipboard_1.Response.decode(reader, reader.uint32());
423
- continue;
424
- }
425
- case 4: {
426
- if (tag !== 34) {
427
- break;
428
- }
429
- message.storage = storage_1.Response.decode(reader, reader.uint32());
430
- continue;
431
- }
432
- case 5: {
433
- if (tag !== 42) {
434
- break;
435
- }
436
- message.oauth = oauth_1.Response.decode(reader, reader.uint32());
437
- continue;
438
- }
439
- case 6: {
440
- if (tag !== 50) {
441
- break;
442
- }
443
- message.fileSearch = file_search_1.Response.decode(reader, reader.uint32());
444
- continue;
445
- }
446
- case 7: {
447
- if (tag !== 58) {
448
- break;
449
- }
450
- message.wm = wm_1.Response.decode(reader, reader.uint32());
451
- continue;
452
- }
453
- case 8: {
454
- if (tag !== 66) {
455
- break;
456
- }
457
- message.command = command_1.Response.decode(reader, reader.uint32());
458
- continue;
459
- }
460
- }
461
- if ((tag & 7) === 4 || tag === 0) {
462
- break;
463
- }
464
- reader.skip(tag & 7);
465
- }
466
- return message;
467
- },
468
- fromJSON(object) {
469
- return {
470
- ui: isSet(object.ui) ? ui_1.Response.fromJSON(object.ui) : undefined,
471
- app: isSet(object.app) ? application_1.Response.fromJSON(object.app) : undefined,
472
- clipboard: isSet(object.clipboard) ? clipboard_1.Response.fromJSON(object.clipboard) : undefined,
473
- storage: isSet(object.storage) ? storage_1.Response.fromJSON(object.storage) : undefined,
474
- oauth: isSet(object.oauth) ? oauth_1.Response.fromJSON(object.oauth) : undefined,
475
- fileSearch: isSet(object.fileSearch) ? file_search_1.Response.fromJSON(object.fileSearch) : undefined,
476
- wm: isSet(object.wm) ? wm_1.Response.fromJSON(object.wm) : undefined,
477
- command: isSet(object.command) ? command_1.Response.fromJSON(object.command) : undefined,
478
- };
479
- },
480
- toJSON(message) {
481
- const obj = {};
482
- if (message.ui !== undefined) {
483
- obj.ui = ui_1.Response.toJSON(message.ui);
484
- }
485
- if (message.app !== undefined) {
486
- obj.app = application_1.Response.toJSON(message.app);
487
- }
488
- if (message.clipboard !== undefined) {
489
- obj.clipboard = clipboard_1.Response.toJSON(message.clipboard);
490
- }
491
- if (message.storage !== undefined) {
492
- obj.storage = storage_1.Response.toJSON(message.storage);
493
- }
494
- if (message.oauth !== undefined) {
495
- obj.oauth = oauth_1.Response.toJSON(message.oauth);
496
- }
497
- if (message.fileSearch !== undefined) {
498
- obj.fileSearch = file_search_1.Response.toJSON(message.fileSearch);
499
- }
500
- if (message.wm !== undefined) {
501
- obj.wm = wm_1.Response.toJSON(message.wm);
502
- }
503
- if (message.command !== undefined) {
504
- obj.command = command_1.Response.toJSON(message.command);
505
- }
506
- return obj;
507
- },
508
- create(base) {
509
- return exports.ResponseData.fromPartial(base ?? {});
510
- },
511
- fromPartial(object) {
512
- const message = createBaseResponseData();
513
- message.ui = (object.ui !== undefined && object.ui !== null) ? ui_1.Response.fromPartial(object.ui) : undefined;
514
- message.app = (object.app !== undefined && object.app !== null) ? application_1.Response.fromPartial(object.app) : undefined;
515
- message.clipboard = (object.clipboard !== undefined && object.clipboard !== null)
516
- ? clipboard_1.Response.fromPartial(object.clipboard)
517
- : undefined;
518
- message.storage = (object.storage !== undefined && object.storage !== null)
519
- ? storage_1.Response.fromPartial(object.storage)
520
- : undefined;
521
- message.oauth = (object.oauth !== undefined && object.oauth !== null)
522
- ? oauth_1.Response.fromPartial(object.oauth)
523
- : undefined;
524
- message.fileSearch = (object.fileSearch !== undefined && object.fileSearch !== null)
525
- ? file_search_1.Response.fromPartial(object.fileSearch)
526
- : undefined;
527
- message.wm = (object.wm !== undefined && object.wm !== null) ? wm_1.Response.fromPartial(object.wm) : undefined;
528
- message.command = (object.command !== undefined && object.command !== null)
529
- ? command_1.Response.fromPartial(object.command)
530
- : undefined;
531
- return message;
532
- },
533
- };
534
- function createBaseEvent() {
535
- return { id: "", generic: undefined, crash: undefined, launch: undefined };
536
- }
537
- exports.Event = {
538
- encode(message, writer = new wire_1.BinaryWriter()) {
539
- if (message.id !== "") {
540
- writer.uint32(10).string(message.id);
541
- }
542
- if (message.generic !== undefined) {
543
- exports.GenericEventData.encode(message.generic, writer.uint32(18).fork()).join();
544
- }
545
- if (message.crash !== undefined) {
546
- exports.CrashEventData.encode(message.crash, writer.uint32(26).fork()).join();
547
- }
548
- if (message.launch !== undefined) {
549
- exports.LaunchEventData.encode(message.launch, writer.uint32(34).fork()).join();
550
- }
551
- return writer;
552
- },
553
- decode(input, length) {
554
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
555
- const end = length === undefined ? reader.len : reader.pos + length;
556
- const message = createBaseEvent();
557
- while (reader.pos < end) {
558
- const tag = reader.uint32();
559
- switch (tag >>> 3) {
560
- case 1: {
561
- if (tag !== 10) {
562
- break;
563
- }
564
- message.id = reader.string();
565
- continue;
566
- }
567
- case 2: {
568
- if (tag !== 18) {
569
- break;
570
- }
571
- message.generic = exports.GenericEventData.decode(reader, reader.uint32());
572
- continue;
573
- }
574
- case 3: {
575
- if (tag !== 26) {
576
- break;
577
- }
578
- message.crash = exports.CrashEventData.decode(reader, reader.uint32());
579
- continue;
580
- }
581
- case 4: {
582
- if (tag !== 34) {
583
- break;
584
- }
585
- message.launch = exports.LaunchEventData.decode(reader, reader.uint32());
586
- continue;
587
- }
588
- }
589
- if ((tag & 7) === 4 || tag === 0) {
590
- break;
591
- }
592
- reader.skip(tag & 7);
593
- }
594
- return message;
595
- },
596
- fromJSON(object) {
597
- return {
598
- id: isSet(object.id) ? globalThis.String(object.id) : "",
599
- generic: isSet(object.generic) ? exports.GenericEventData.fromJSON(object.generic) : undefined,
600
- crash: isSet(object.crash) ? exports.CrashEventData.fromJSON(object.crash) : undefined,
601
- launch: isSet(object.launch) ? exports.LaunchEventData.fromJSON(object.launch) : undefined,
602
- };
603
- },
604
- toJSON(message) {
605
- const obj = {};
606
- if (message.id !== "") {
607
- obj.id = message.id;
608
- }
609
- if (message.generic !== undefined) {
610
- obj.generic = exports.GenericEventData.toJSON(message.generic);
611
- }
612
- if (message.crash !== undefined) {
613
- obj.crash = exports.CrashEventData.toJSON(message.crash);
614
- }
615
- if (message.launch !== undefined) {
616
- obj.launch = exports.LaunchEventData.toJSON(message.launch);
617
- }
618
- return obj;
619
- },
620
- create(base) {
621
- return exports.Event.fromPartial(base ?? {});
622
- },
623
- fromPartial(object) {
624
- const message = createBaseEvent();
625
- message.id = object.id ?? "";
626
- message.generic = (object.generic !== undefined && object.generic !== null)
627
- ? exports.GenericEventData.fromPartial(object.generic)
628
- : undefined;
629
- message.crash = (object.crash !== undefined && object.crash !== null)
630
- ? exports.CrashEventData.fromPartial(object.crash)
631
- : undefined;
632
- message.launch = (object.launch !== undefined && object.launch !== null)
633
- ? exports.LaunchEventData.fromPartial(object.launch)
634
- : undefined;
635
- return message;
636
- },
637
- };
638
- function createBaseCrashEventData() {
639
- return { text: "" };
640
- }
641
- exports.CrashEventData = {
642
- encode(message, writer = new wire_1.BinaryWriter()) {
643
- if (message.text !== "") {
644
- writer.uint32(10).string(message.text);
645
- }
646
- return writer;
647
- },
648
- decode(input, length) {
649
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
650
- const end = length === undefined ? reader.len : reader.pos + length;
651
- const message = createBaseCrashEventData();
652
- while (reader.pos < end) {
653
- const tag = reader.uint32();
654
- switch (tag >>> 3) {
655
- case 1: {
656
- if (tag !== 10) {
657
- break;
658
- }
659
- message.text = reader.string();
660
- continue;
661
- }
662
- }
663
- if ((tag & 7) === 4 || tag === 0) {
664
- break;
665
- }
666
- reader.skip(tag & 7);
667
- }
668
- return message;
669
- },
670
- fromJSON(object) {
671
- return { text: isSet(object.text) ? globalThis.String(object.text) : "" };
672
- },
673
- toJSON(message) {
674
- const obj = {};
675
- if (message.text !== "") {
676
- obj.text = message.text;
677
- }
678
- return obj;
679
- },
680
- create(base) {
681
- return exports.CrashEventData.fromPartial(base ?? {});
682
- },
683
- fromPartial(object) {
684
- const message = createBaseCrashEventData();
685
- message.text = object.text ?? "";
686
- return message;
687
- },
688
- };
689
- function createBaseGenericEventData() {
690
- return { json: "" };
691
- }
692
- exports.GenericEventData = {
693
- encode(message, writer = new wire_1.BinaryWriter()) {
694
- if (message.json !== "") {
695
- writer.uint32(10).string(message.json);
696
- }
697
- return writer;
698
- },
699
- decode(input, length) {
700
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
701
- const end = length === undefined ? reader.len : reader.pos + length;
702
- const message = createBaseGenericEventData();
703
- while (reader.pos < end) {
704
- const tag = reader.uint32();
705
- switch (tag >>> 3) {
706
- case 1: {
707
- if (tag !== 10) {
708
- break;
709
- }
710
- message.json = reader.string();
711
- continue;
712
- }
713
- }
714
- if ((tag & 7) === 4 || tag === 0) {
715
- break;
716
- }
717
- reader.skip(tag & 7);
718
- }
719
- return message;
720
- },
721
- fromJSON(object) {
722
- return { json: isSet(object.json) ? globalThis.String(object.json) : "" };
723
- },
724
- toJSON(message) {
725
- const obj = {};
726
- if (message.json !== "") {
727
- obj.json = message.json;
728
- }
729
- return obj;
730
- },
731
- create(base) {
732
- return exports.GenericEventData.fromPartial(base ?? {});
733
- },
734
- fromPartial(object) {
735
- const message = createBaseGenericEventData();
736
- message.json = object.json ?? "";
737
- return message;
738
- },
739
- };
740
- function createBaseLaunchEventData() {
741
- return {
742
- extensionName: "",
743
- commandName: "",
744
- mode: 0,
745
- entrypoint: "",
746
- assetPath: "",
747
- supportPath: "",
748
- preferenceValues: {},
749
- argumentValues: {},
750
- isRaycast: false,
751
- ownerOrAuthorName: "",
752
- };
753
- }
754
- exports.LaunchEventData = {
755
- encode(message, writer = new wire_1.BinaryWriter()) {
756
- if (message.extensionName !== "") {
757
- writer.uint32(10).string(message.extensionName);
758
- }
759
- if (message.commandName !== "") {
760
- writer.uint32(18).string(message.commandName);
761
- }
762
- if (message.mode !== 0) {
763
- writer.uint32(24).int32(message.mode);
764
- }
765
- if (message.entrypoint !== "") {
766
- writer.uint32(34).string(message.entrypoint);
767
- }
768
- if (message.assetPath !== "") {
769
- writer.uint32(42).string(message.assetPath);
770
- }
771
- if (message.supportPath !== "") {
772
- writer.uint32(50).string(message.supportPath);
773
- }
774
- Object.entries(message.preferenceValues).forEach(([key, value]) => {
775
- if (value !== undefined) {
776
- exports.LaunchEventData_PreferenceValuesEntry.encode({ key: key, value }, writer.uint32(58).fork()).join();
777
- }
778
- });
779
- Object.entries(message.argumentValues).forEach(([key, value]) => {
780
- if (value !== undefined) {
781
- exports.LaunchEventData_ArgumentValuesEntry.encode({ key: key, value }, writer.uint32(66).fork()).join();
782
- }
783
- });
784
- if (message.isRaycast !== false) {
785
- writer.uint32(72).bool(message.isRaycast);
786
- }
787
- if (message.ownerOrAuthorName !== "") {
788
- writer.uint32(82).string(message.ownerOrAuthorName);
789
- }
790
- return writer;
791
- },
792
- decode(input, length) {
793
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
794
- const end = length === undefined ? reader.len : reader.pos + length;
795
- const message = createBaseLaunchEventData();
796
- while (reader.pos < end) {
797
- const tag = reader.uint32();
798
- switch (tag >>> 3) {
799
- case 1: {
800
- if (tag !== 10) {
801
- break;
802
- }
803
- message.extensionName = reader.string();
804
- continue;
805
- }
806
- case 2: {
807
- if (tag !== 18) {
808
- break;
809
- }
810
- message.commandName = reader.string();
811
- continue;
812
- }
813
- case 3: {
814
- if (tag !== 24) {
815
- break;
816
- }
817
- message.mode = reader.int32();
818
- continue;
819
- }
820
- case 4: {
821
- if (tag !== 34) {
822
- break;
823
- }
824
- message.entrypoint = reader.string();
825
- continue;
826
- }
827
- case 5: {
828
- if (tag !== 42) {
829
- break;
830
- }
831
- message.assetPath = reader.string();
832
- continue;
833
- }
834
- case 6: {
835
- if (tag !== 50) {
836
- break;
837
- }
838
- message.supportPath = reader.string();
839
- continue;
840
- }
841
- case 7: {
842
- if (tag !== 58) {
843
- break;
844
- }
845
- const entry7 = exports.LaunchEventData_PreferenceValuesEntry.decode(reader, reader.uint32());
846
- if (entry7.value !== undefined) {
847
- message.preferenceValues[entry7.key] = entry7.value;
848
- }
849
- continue;
850
- }
851
- case 8: {
852
- if (tag !== 66) {
853
- break;
854
- }
855
- const entry8 = exports.LaunchEventData_ArgumentValuesEntry.decode(reader, reader.uint32());
856
- if (entry8.value !== undefined) {
857
- message.argumentValues[entry8.key] = entry8.value;
858
- }
859
- continue;
860
- }
861
- case 9: {
862
- if (tag !== 72) {
863
- break;
864
- }
865
- message.isRaycast = reader.bool();
866
- continue;
867
- }
868
- case 10: {
869
- if (tag !== 82) {
870
- break;
871
- }
872
- message.ownerOrAuthorName = reader.string();
873
- continue;
874
- }
875
- }
876
- if ((tag & 7) === 4 || tag === 0) {
877
- break;
878
- }
879
- reader.skip(tag & 7);
880
- }
881
- return message;
882
- },
883
- fromJSON(object) {
884
- return {
885
- extensionName: isSet(object.extensionName) ? globalThis.String(object.extensionName) : "",
886
- commandName: isSet(object.commandName) ? globalThis.String(object.commandName) : "",
887
- mode: isSet(object.mode) ? (0, manager_1.commandModeFromJSON)(object.mode) : 0,
888
- entrypoint: isSet(object.entrypoint) ? globalThis.String(object.entrypoint) : "",
889
- assetPath: isSet(object.assetPath) ? globalThis.String(object.assetPath) : "",
890
- supportPath: isSet(object.supportPath) ? globalThis.String(object.supportPath) : "",
891
- preferenceValues: isObject(object.preferenceValues)
892
- ? Object.entries(object.preferenceValues).reduce((acc, [key, value]) => {
893
- acc[key] = value;
894
- return acc;
895
- }, {})
896
- : {},
897
- argumentValues: isObject(object.argumentValues)
898
- ? Object.entries(object.argumentValues).reduce((acc, [key, value]) => {
899
- acc[key] = value;
900
- return acc;
901
- }, {})
902
- : {},
903
- isRaycast: isSet(object.isRaycast) ? globalThis.Boolean(object.isRaycast) : false,
904
- ownerOrAuthorName: isSet(object.ownerOrAuthorName) ? globalThis.String(object.ownerOrAuthorName) : "",
905
- };
906
- },
907
- toJSON(message) {
908
- const obj = {};
909
- if (message.extensionName !== "") {
910
- obj.extensionName = message.extensionName;
911
- }
912
- if (message.commandName !== "") {
913
- obj.commandName = message.commandName;
914
- }
915
- if (message.mode !== 0) {
916
- obj.mode = (0, manager_1.commandModeToJSON)(message.mode);
917
- }
918
- if (message.entrypoint !== "") {
919
- obj.entrypoint = message.entrypoint;
920
- }
921
- if (message.assetPath !== "") {
922
- obj.assetPath = message.assetPath;
923
- }
924
- if (message.supportPath !== "") {
925
- obj.supportPath = message.supportPath;
926
- }
927
- if (message.preferenceValues) {
928
- const entries = Object.entries(message.preferenceValues);
929
- if (entries.length > 0) {
930
- obj.preferenceValues = {};
931
- entries.forEach(([k, v]) => {
932
- obj.preferenceValues[k] = v;
933
- });
934
- }
935
- }
936
- if (message.argumentValues) {
937
- const entries = Object.entries(message.argumentValues);
938
- if (entries.length > 0) {
939
- obj.argumentValues = {};
940
- entries.forEach(([k, v]) => {
941
- obj.argumentValues[k] = v;
942
- });
943
- }
944
- }
945
- if (message.isRaycast !== false) {
946
- obj.isRaycast = message.isRaycast;
947
- }
948
- if (message.ownerOrAuthorName !== "") {
949
- obj.ownerOrAuthorName = message.ownerOrAuthorName;
950
- }
951
- return obj;
952
- },
953
- create(base) {
954
- return exports.LaunchEventData.fromPartial(base ?? {});
955
- },
956
- fromPartial(object) {
957
- const message = createBaseLaunchEventData();
958
- message.extensionName = object.extensionName ?? "";
959
- message.commandName = object.commandName ?? "";
960
- message.mode = object.mode ?? 0;
961
- message.entrypoint = object.entrypoint ?? "";
962
- message.assetPath = object.assetPath ?? "";
963
- message.supportPath = object.supportPath ?? "";
964
- message.preferenceValues = Object.entries(object.preferenceValues ?? {}).reduce((acc, [key, value]) => {
965
- if (value !== undefined) {
966
- acc[key] = value;
967
- }
968
- return acc;
969
- }, {});
970
- message.argumentValues = Object.entries(object.argumentValues ?? {}).reduce((acc, [key, value]) => {
971
- if (value !== undefined) {
972
- acc[key] = value;
973
- }
974
- return acc;
975
- }, {});
976
- message.isRaycast = object.isRaycast ?? false;
977
- message.ownerOrAuthorName = object.ownerOrAuthorName ?? "";
978
- return message;
979
- },
980
- };
981
- function createBaseLaunchEventData_PreferenceValuesEntry() {
982
- return { key: "", value: undefined };
983
- }
984
- exports.LaunchEventData_PreferenceValuesEntry = {
985
- encode(message, writer = new wire_1.BinaryWriter()) {
986
- if (message.key !== "") {
987
- writer.uint32(10).string(message.key);
988
- }
989
- if (message.value !== undefined) {
990
- struct_1.Value.encode(struct_1.Value.wrap(message.value), writer.uint32(18).fork()).join();
991
- }
992
- return writer;
993
- },
994
- decode(input, length) {
995
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
996
- const end = length === undefined ? reader.len : reader.pos + length;
997
- const message = createBaseLaunchEventData_PreferenceValuesEntry();
998
- while (reader.pos < end) {
999
- const tag = reader.uint32();
1000
- switch (tag >>> 3) {
1001
- case 1: {
1002
- if (tag !== 10) {
1003
- break;
1004
- }
1005
- message.key = reader.string();
1006
- continue;
1007
- }
1008
- case 2: {
1009
- if (tag !== 18) {
1010
- break;
1011
- }
1012
- message.value = struct_1.Value.unwrap(struct_1.Value.decode(reader, reader.uint32()));
1013
- continue;
1014
- }
1015
- }
1016
- if ((tag & 7) === 4 || tag === 0) {
1017
- break;
1018
- }
1019
- reader.skip(tag & 7);
1020
- }
1021
- return message;
1022
- },
1023
- fromJSON(object) {
1024
- return {
1025
- key: isSet(object.key) ? globalThis.String(object.key) : "",
1026
- value: isSet(object?.value) ? object.value : undefined,
1027
- };
1028
- },
1029
- toJSON(message) {
1030
- const obj = {};
1031
- if (message.key !== "") {
1032
- obj.key = message.key;
1033
- }
1034
- if (message.value !== undefined) {
1035
- obj.value = message.value;
1036
- }
1037
- return obj;
1038
- },
1039
- create(base) {
1040
- return exports.LaunchEventData_PreferenceValuesEntry.fromPartial(base ?? {});
1041
- },
1042
- fromPartial(object) {
1043
- const message = createBaseLaunchEventData_PreferenceValuesEntry();
1044
- message.key = object.key ?? "";
1045
- message.value = object.value ?? undefined;
1046
- return message;
1047
- },
1048
- };
1049
- function createBaseLaunchEventData_ArgumentValuesEntry() {
1050
- return { key: "", value: undefined };
1051
- }
1052
- exports.LaunchEventData_ArgumentValuesEntry = {
1053
- encode(message, writer = new wire_1.BinaryWriter()) {
1054
- if (message.key !== "") {
1055
- writer.uint32(10).string(message.key);
1056
- }
1057
- if (message.value !== undefined) {
1058
- struct_1.Value.encode(struct_1.Value.wrap(message.value), writer.uint32(18).fork()).join();
1059
- }
1060
- return writer;
1061
- },
1062
- decode(input, length) {
1063
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1064
- const end = length === undefined ? reader.len : reader.pos + length;
1065
- const message = createBaseLaunchEventData_ArgumentValuesEntry();
1066
- while (reader.pos < end) {
1067
- const tag = reader.uint32();
1068
- switch (tag >>> 3) {
1069
- case 1: {
1070
- if (tag !== 10) {
1071
- break;
1072
- }
1073
- message.key = reader.string();
1074
- continue;
1075
- }
1076
- case 2: {
1077
- if (tag !== 18) {
1078
- break;
1079
- }
1080
- message.value = struct_1.Value.unwrap(struct_1.Value.decode(reader, reader.uint32()));
1081
- continue;
1082
- }
1083
- }
1084
- if ((tag & 7) === 4 || tag === 0) {
1085
- break;
1086
- }
1087
- reader.skip(tag & 7);
1088
- }
1089
- return message;
1090
- },
1091
- fromJSON(object) {
1092
- return {
1093
- key: isSet(object.key) ? globalThis.String(object.key) : "",
1094
- value: isSet(object?.value) ? object.value : undefined,
1095
- };
1096
- },
1097
- toJSON(message) {
1098
- const obj = {};
1099
- if (message.key !== "") {
1100
- obj.key = message.key;
1101
- }
1102
- if (message.value !== undefined) {
1103
- obj.value = message.value;
1104
- }
1105
- return obj;
1106
- },
1107
- create(base) {
1108
- return exports.LaunchEventData_ArgumentValuesEntry.fromPartial(base ?? {});
1109
- },
1110
- fromPartial(object) {
1111
- const message = createBaseLaunchEventData_ArgumentValuesEntry();
1112
- message.key = object.key ?? "";
1113
- message.value = object.value ?? undefined;
1114
- return message;
1115
- },
1116
- };
1117
- function isObject(value) {
1118
- return typeof value === "object" && value !== null;
1119
- }
1120
- function isSet(value) {
1121
- return value !== null && value !== undefined;
1122
- }