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