@vicinae/api 0.6.2 → 0.7.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 (67) hide show
  1. package/README.md +1 -1
  2. package/bin/run.js +2 -2
  3. package/dist/api/ai.js +11 -10
  4. package/dist/api/alert.d.ts +1 -1
  5. package/dist/api/alert.js +4 -5
  6. package/dist/api/bus.d.ts +27 -27
  7. package/dist/api/bus.js +15 -15
  8. package/dist/api/cache.js +15 -6
  9. package/dist/api/clipboard.d.ts +2 -2
  10. package/dist/api/clipboard.js +14 -15
  11. package/dist/api/color.js +1 -3
  12. package/dist/api/components/action-pannel.js +2 -2
  13. package/dist/api/components/actions.d.ts +3 -3
  14. package/dist/api/components/actions.js +16 -16
  15. package/dist/api/components/detail.d.ts +1 -1
  16. package/dist/api/components/detail.js +1 -1
  17. package/dist/api/components/dropdown.js +3 -3
  18. package/dist/api/components/empty-view.d.ts +2 -2
  19. package/dist/api/components/empty-view.js +1 -1
  20. package/dist/api/components/form.d.ts +2 -2
  21. package/dist/api/components/form.js +4 -12
  22. package/dist/api/components/grid.d.ts +4 -4
  23. package/dist/api/components/grid.js +10 -10
  24. package/dist/api/components/index.d.ts +7 -7
  25. package/dist/api/components/list.d.ts +3 -3
  26. package/dist/api/components/list.js +6 -6
  27. package/dist/api/components/menu-bar.js +1 -1
  28. package/dist/api/components/metadata.d.ts +2 -2
  29. package/dist/api/components/metadata.js +1 -1
  30. package/dist/api/components/tag.d.ts +3 -3
  31. package/dist/api/components/tag.js +4 -3
  32. package/dist/api/context/index.d.ts +1 -1
  33. package/dist/api/context/navigation-context.js +6 -2
  34. package/dist/api/context/navigation-provider.d.ts +1 -1
  35. package/dist/api/context/navigation-provider.js +5 -5
  36. package/dist/api/controls.js +3 -3
  37. package/dist/api/environment.js +0 -2
  38. package/dist/api/hooks/index.d.ts +2 -2
  39. package/dist/api/hooks/use-imperative-form-handle.d.ts +2 -2
  40. package/dist/api/hooks/use-imperative-form-handle.js +3 -3
  41. package/dist/api/hooks.js +4 -2
  42. package/dist/api/image.d.ts +1 -1
  43. package/dist/api/image.js +5 -5
  44. package/dist/api/index.d.ts +19 -19
  45. package/dist/api/keyboard.js +4 -5
  46. package/dist/api/local-storage.js +5 -7
  47. package/dist/api/oauth.d.ts +1 -1
  48. package/dist/api/oauth.js +23 -20
  49. package/dist/api/preference.js +2 -2
  50. package/dist/api/proto/application.js +28 -13
  51. package/dist/api/proto/clipboard.js +70 -37
  52. package/dist/api/proto/common.js +5 -1
  53. package/dist/api/proto/extension.js +104 -49
  54. package/dist/api/proto/google/protobuf/struct.js +25 -8
  55. package/dist/api/proto/ipc.js +99 -52
  56. package/dist/api/proto/manager.js +56 -22
  57. package/dist/api/proto/oauth.js +32 -14
  58. package/dist/api/proto/storage.js +66 -28
  59. package/dist/api/proto/ui.js +233 -124
  60. package/dist/api/toast.js +46 -21
  61. package/dist/api/utils.d.ts +1 -1
  62. package/dist/api/utils.js +16 -12
  63. package/dist/commands/build/index.js +18 -2
  64. package/dist/commands/develop/index.js +18 -3
  65. package/dist/index.d.ts +1 -1
  66. package/dist/schemas/manifest.js +225 -1
  67. package/package.json +1 -1
package/dist/api/oauth.js CHANGED
@@ -46,25 +46,25 @@ class PKCEClient {
46
46
  }
47
47
  buildAuthUrl(options, state, codeChallenge, redirectURI) {
48
48
  const params = new URLSearchParams({
49
- response_type: 'code',
49
+ response_type: "code",
50
50
  client_id: options.clientId,
51
51
  redirect_uri: redirectURI,
52
52
  scope: options.scope,
53
53
  state: state,
54
54
  code_challenge: codeChallenge,
55
- code_challenge_method: 'S256',
56
- ...options.extraParameters
55
+ code_challenge_method: "S256",
56
+ ...options.extraParameters,
57
57
  });
58
58
  return `${options.endpoint}?${params}`;
59
59
  }
60
60
  getRedirectURI() {
61
61
  switch (this.redirectMethod) {
62
62
  case exports.OAuth.RedirectMethod.Web:
63
- return 'https://raycast.com/redirect?packageName=Extension';
63
+ return "https://raycast.com/redirect?packageName=Extension";
64
64
  case exports.OAuth.RedirectMethod.App:
65
- return 'raycast://oauth?package_name=Extension';
65
+ return "raycast://oauth?package_name=Extension";
66
66
  case exports.OAuth.RedirectMethod.AppURI:
67
- return 'com.raycast:/oauth?package_name=Extension';
67
+ return "com.raycast:/oauth?package_name=Extension";
68
68
  }
69
69
  }
70
70
  /**
@@ -76,16 +76,18 @@ class PKCEClient {
76
76
  * @returns A promise for an {@link OAuth.AuthorizationRequest} that you can use as input for {@link OAuth.PKCEClient.authorize}.
77
77
  */
78
78
  async authorizationRequest(options) {
79
- const codeVerifier = (0, node_crypto_1.randomBytes)(128).toString('hex');
80
- const codeChallenge = (0, node_crypto_1.createHash)('sha256').update(codeVerifier).digest('base64url');
81
- const state = (0, node_crypto_1.randomBytes)(32).toString('hex');
79
+ const codeVerifier = (0, node_crypto_1.randomBytes)(128).toString("hex");
80
+ const codeChallenge = (0, node_crypto_1.createHash)("sha256")
81
+ .update(codeVerifier)
82
+ .digest("base64url");
83
+ const state = (0, node_crypto_1.randomBytes)(32).toString("hex");
82
84
  const redirectURI = this.getRedirectURI();
83
85
  return {
84
86
  state,
85
87
  codeChallenge,
86
88
  codeVerifier,
87
89
  redirectURI,
88
- toURL: () => this.buildAuthUrl(options, state, codeChallenge, redirectURI)
90
+ toURL: () => this.buildAuthUrl(options, state, codeChallenge, redirectURI),
89
91
  };
90
92
  }
91
93
  /**
@@ -99,16 +101,18 @@ class PKCEClient {
99
101
  */
100
102
  async authorize(options) {
101
103
  const isAuthorizationOptions = (s) => {
102
- return typeof s.url === 'string';
104
+ return typeof s.url === "string";
103
105
  };
104
- const res = await bus_1.bus.turboRequest('oauth.authorize', {
106
+ const res = await bus_1.bus.turboRequest("oauth.authorize", {
105
107
  client: {
106
108
  id: this.providerId,
107
- description: this.description ?? 'Connect to your account',
109
+ description: this.description ?? "Connect to your account",
108
110
  name: this.providerName,
109
- icon: this.providerIcon ? (0, image_1.serializeProtoImage)(this.providerIcon) : undefined
111
+ icon: this.providerIcon
112
+ ? (0, image_1.serializeProtoImage)(this.providerIcon)
113
+ : undefined,
110
114
  },
111
- url: isAuthorizationOptions(options) ? options.url : options.toURL()
115
+ url: isAuthorizationOptions(options) ? options.url : options.toURL(),
112
116
  });
113
117
  if (!res.ok) {
114
118
  throw res.error;
@@ -126,8 +130,7 @@ class PKCEClient {
126
130
  *
127
131
  * @returns A promise that resolves when the token set has been stored.
128
132
  */
129
- async setTokens(options) {
130
- }
133
+ async setTokens(options) { }
131
134
  /**
132
135
  * Retrieves the stored {@link OAuth.TokenSet} for the client.
133
136
  * You can use this to initially check whether the authorization flow should be initiated or
@@ -149,12 +152,12 @@ class PKCEClient {
149
152
  }
150
153
  exports.PKCEClient = PKCEClient;
151
154
  class TokenSet {
152
- accessToken = '';
155
+ accessToken = "";
153
156
  refreshToken;
154
157
  idToken;
155
158
  expiresIn;
156
159
  scope;
157
- updatedAt = new Date;
160
+ updatedAt = new Date();
158
161
  isExpired() {
159
162
  return true;
160
163
  }
@@ -162,5 +165,5 @@ class TokenSet {
162
165
  exports.OAuth = {
163
166
  PKCEClient,
164
167
  RedirectMethod: OauthRedirectMethod,
165
- TokenSet
168
+ TokenSet,
166
169
  };
@@ -9,10 +9,10 @@ const getPreferenceValues = () => {
9
9
  };
10
10
  exports.getPreferenceValues = getPreferenceValues;
11
11
  const openExtensionPreferences = async () => {
12
- await bus_1.bus.request('open-extension-preferences');
12
+ await bus_1.bus.request("open-extension-preferences");
13
13
  };
14
14
  exports.openExtensionPreferences = openExtensionPreferences;
15
15
  const openCommandPreferences = async () => {
16
- await bus_1.bus.request('open-command-preferences');
16
+ await bus_1.bus.request("open-command-preferences");
17
17
  };
18
18
  exports.openCommandPreferences = openCommandPreferences;
@@ -147,7 +147,11 @@ exports.ListApplicationResponse = {
147
147
  return message;
148
148
  },
149
149
  fromJSON(object) {
150
- return { apps: globalThis.Array.isArray(object?.apps) ? object.apps.map((e) => exports.Application.fromJSON(e)) : [] };
150
+ return {
151
+ apps: globalThis.Array.isArray(object?.apps)
152
+ ? object.apps.map((e) => exports.Application.fromJSON(e))
153
+ : [],
154
+ };
151
155
  },
152
156
  toJSON(message) {
153
157
  const obj = {};
@@ -209,8 +213,12 @@ exports.Request = {
209
213
  },
210
214
  fromJSON(object) {
211
215
  return {
212
- list: isSet(object.list) ? exports.ListApplicationRequest.fromJSON(object.list) : undefined,
213
- open: isSet(object.open) ? exports.OpenApplicationRequest.fromJSON(object.open) : undefined,
216
+ list: isSet(object.list)
217
+ ? exports.ListApplicationRequest.fromJSON(object.list)
218
+ : undefined,
219
+ open: isSet(object.open)
220
+ ? exports.OpenApplicationRequest.fromJSON(object.open)
221
+ : undefined,
214
222
  };
215
223
  },
216
224
  toJSON(message) {
@@ -228,12 +236,14 @@ exports.Request = {
228
236
  },
229
237
  fromPartial(object) {
230
238
  const message = createBaseRequest();
231
- message.list = (object.list !== undefined && object.list !== null)
232
- ? exports.ListApplicationRequest.fromPartial(object.list)
233
- : undefined;
234
- message.open = (object.open !== undefined && object.open !== null)
235
- ? exports.OpenApplicationRequest.fromPartial(object.open)
236
- : undefined;
239
+ message.list =
240
+ object.list !== undefined && object.list !== null
241
+ ? exports.ListApplicationRequest.fromPartial(object.list)
242
+ : undefined;
243
+ message.open =
244
+ object.open !== undefined && object.open !== null
245
+ ? exports.OpenApplicationRequest.fromPartial(object.open)
246
+ : undefined;
237
247
  return message;
238
248
  },
239
249
  };
@@ -270,7 +280,11 @@ exports.Response = {
270
280
  return message;
271
281
  },
272
282
  fromJSON(object) {
273
- return { list: isSet(object.list) ? exports.ListApplicationResponse.fromJSON(object.list) : undefined };
283
+ return {
284
+ list: isSet(object.list)
285
+ ? exports.ListApplicationResponse.fromJSON(object.list)
286
+ : undefined,
287
+ };
274
288
  },
275
289
  toJSON(message) {
276
290
  const obj = {};
@@ -284,9 +298,10 @@ exports.Response = {
284
298
  },
285
299
  fromPartial(object) {
286
300
  const message = createBaseResponse();
287
- message.list = (object.list !== undefined && object.list !== null)
288
- ? exports.ListApplicationResponse.fromPartial(object.list)
289
- : undefined;
301
+ message.list =
302
+ object.list !== undefined && object.list !== null
303
+ ? exports.ListApplicationResponse.fromPartial(object.list)
304
+ : undefined;
290
305
  return message;
291
306
  },
292
307
  };
@@ -161,7 +161,11 @@ exports.ClipboardOptions = {
161
161
  return message;
162
162
  },
163
163
  fromJSON(object) {
164
- return { concealed: isSet(object.concealed) ? globalThis.Boolean(object.concealed) : false };
164
+ return {
165
+ concealed: isSet(object.concealed)
166
+ ? globalThis.Boolean(object.concealed)
167
+ : false,
168
+ };
165
169
  },
166
170
  toJSON(message) {
167
171
  const obj = {};
@@ -223,8 +227,12 @@ exports.CopyToClipboardRequest = {
223
227
  },
224
228
  fromJSON(object) {
225
229
  return {
226
- content: isSet(object.content) ? exports.ClipboardContent.fromJSON(object.content) : undefined,
227
- options: isSet(object.options) ? exports.ClipboardOptions.fromJSON(object.options) : undefined,
230
+ content: isSet(object.content)
231
+ ? exports.ClipboardContent.fromJSON(object.content)
232
+ : undefined,
233
+ options: isSet(object.options)
234
+ ? exports.ClipboardOptions.fromJSON(object.options)
235
+ : undefined,
228
236
  };
229
237
  },
230
238
  toJSON(message) {
@@ -242,12 +250,14 @@ exports.CopyToClipboardRequest = {
242
250
  },
243
251
  fromPartial(object) {
244
252
  const message = createBaseCopyToClipboardRequest();
245
- message.content = (object.content !== undefined && object.content !== null)
246
- ? exports.ClipboardContent.fromPartial(object.content)
247
- : undefined;
248
- message.options = (object.options !== undefined && object.options !== null)
249
- ? exports.ClipboardOptions.fromPartial(object.options)
250
- : undefined;
253
+ message.content =
254
+ object.content !== undefined && object.content !== null
255
+ ? exports.ClipboardContent.fromPartial(object.content)
256
+ : undefined;
257
+ message.options =
258
+ object.options !== undefined && object.options !== null
259
+ ? exports.ClipboardOptions.fromPartial(object.options)
260
+ : undefined;
251
261
  return message;
252
262
  },
253
263
  };
@@ -284,7 +294,11 @@ exports.PasteToClipboardRequest = {
284
294
  return message;
285
295
  },
286
296
  fromJSON(object) {
287
- return { content: isSet(object.content) ? exports.ClipboardContent.fromJSON(object.content) : undefined };
297
+ return {
298
+ content: isSet(object.content)
299
+ ? exports.ClipboardContent.fromJSON(object.content)
300
+ : undefined,
301
+ };
288
302
  },
289
303
  toJSON(message) {
290
304
  const obj = {};
@@ -298,9 +312,10 @@ exports.PasteToClipboardRequest = {
298
312
  },
299
313
  fromPartial(object) {
300
314
  const message = createBasePasteToClipboardRequest();
301
- message.content = (object.content !== undefined && object.content !== null)
302
- ? exports.ClipboardContent.fromPartial(object.content)
303
- : undefined;
315
+ message.content =
316
+ object.content !== undefined && object.content !== null
317
+ ? exports.ClipboardContent.fromPartial(object.content)
318
+ : undefined;
304
319
  return message;
305
320
  },
306
321
  };
@@ -359,8 +374,12 @@ exports.ClipboardContent = {
359
374
  fromJSON(object) {
360
375
  return {
361
376
  text: isSet(object.text) ? globalThis.String(object.text) : undefined,
362
- html: isSet(object.html) ? exports.ClipboardHtmlContent.fromJSON(object.html) : undefined,
363
- path: isSet(object.path) ? exports.ClipboardPathContent.fromJSON(object.path) : undefined,
377
+ html: isSet(object.html)
378
+ ? exports.ClipboardHtmlContent.fromJSON(object.html)
379
+ : undefined,
380
+ path: isSet(object.path)
381
+ ? exports.ClipboardPathContent.fromJSON(object.path)
382
+ : undefined,
364
383
  };
365
384
  },
366
385
  toJSON(message) {
@@ -382,12 +401,14 @@ exports.ClipboardContent = {
382
401
  fromPartial(object) {
383
402
  const message = createBaseClipboardContent();
384
403
  message.text = object.text ?? undefined;
385
- message.html = (object.html !== undefined && object.html !== null)
386
- ? exports.ClipboardHtmlContent.fromPartial(object.html)
387
- : undefined;
388
- message.path = (object.path !== undefined && object.path !== null)
389
- ? exports.ClipboardPathContent.fromPartial(object.path)
390
- : undefined;
404
+ message.html =
405
+ object.html !== undefined && object.html !== null
406
+ ? exports.ClipboardHtmlContent.fromPartial(object.html)
407
+ : undefined;
408
+ message.path =
409
+ object.path !== undefined && object.path !== null
410
+ ? exports.ClipboardPathContent.fromPartial(object.path)
411
+ : undefined;
391
412
  return message;
392
413
  },
393
414
  };
@@ -509,8 +530,12 @@ exports.Request = {
509
530
  },
510
531
  fromJSON(object) {
511
532
  return {
512
- copy: isSet(object.copy) ? exports.CopyToClipboardRequest.fromJSON(object.copy) : undefined,
513
- paste: isSet(object.paste) ? exports.PasteToClipboardRequest.fromJSON(object.paste) : undefined,
533
+ copy: isSet(object.copy)
534
+ ? exports.CopyToClipboardRequest.fromJSON(object.copy)
535
+ : undefined,
536
+ paste: isSet(object.paste)
537
+ ? exports.PasteToClipboardRequest.fromJSON(object.paste)
538
+ : undefined,
514
539
  };
515
540
  },
516
541
  toJSON(message) {
@@ -528,12 +553,14 @@ exports.Request = {
528
553
  },
529
554
  fromPartial(object) {
530
555
  const message = createBaseRequest();
531
- message.copy = (object.copy !== undefined && object.copy !== null)
532
- ? exports.CopyToClipboardRequest.fromPartial(object.copy)
533
- : undefined;
534
- message.paste = (object.paste !== undefined && object.paste !== null)
535
- ? exports.PasteToClipboardRequest.fromPartial(object.paste)
536
- : undefined;
556
+ message.copy =
557
+ object.copy !== undefined && object.copy !== null
558
+ ? exports.CopyToClipboardRequest.fromPartial(object.copy)
559
+ : undefined;
560
+ message.paste =
561
+ object.paste !== undefined && object.paste !== null
562
+ ? exports.PasteToClipboardRequest.fromPartial(object.paste)
563
+ : undefined;
537
564
  return message;
538
565
  },
539
566
  };
@@ -581,8 +608,12 @@ exports.Response = {
581
608
  },
582
609
  fromJSON(object) {
583
610
  return {
584
- copy: isSet(object.copy) ? exports.CopyToClipboardResponse.fromJSON(object.copy) : undefined,
585
- paste: isSet(object.paste) ? exports.PasteToClipboardResponse.fromJSON(object.paste) : undefined,
611
+ copy: isSet(object.copy)
612
+ ? exports.CopyToClipboardResponse.fromJSON(object.copy)
613
+ : undefined,
614
+ paste: isSet(object.paste)
615
+ ? exports.PasteToClipboardResponse.fromJSON(object.paste)
616
+ : undefined,
586
617
  };
587
618
  },
588
619
  toJSON(message) {
@@ -600,12 +631,14 @@ exports.Response = {
600
631
  },
601
632
  fromPartial(object) {
602
633
  const message = createBaseResponse();
603
- message.copy = (object.copy !== undefined && object.copy !== null)
604
- ? exports.CopyToClipboardResponse.fromPartial(object.copy)
605
- : undefined;
606
- message.paste = (object.paste !== undefined && object.paste !== null)
607
- ? exports.PasteToClipboardResponse.fromPartial(object.paste)
608
- : undefined;
634
+ message.copy =
635
+ object.copy !== undefined && object.copy !== null
636
+ ? exports.CopyToClipboardResponse.fromPartial(object.copy)
637
+ : undefined;
638
+ message.paste =
639
+ object.paste !== undefined && object.paste !== null
640
+ ? exports.PasteToClipboardResponse.fromPartial(object.paste)
641
+ : undefined;
609
642
  return message;
610
643
  },
611
644
  };
@@ -79,7 +79,11 @@ exports.ErrorResponse = {
79
79
  return message;
80
80
  },
81
81
  fromJSON(object) {
82
- return { errorText: isSet(object.errorText) ? globalThis.String(object.errorText) : "" };
82
+ return {
83
+ errorText: isSet(object.errorText)
84
+ ? globalThis.String(object.errorText)
85
+ : "",
86
+ };
83
87
  },
84
88
  toJSON(message) {
85
89
  const obj = {};
@@ -59,7 +59,9 @@ exports.Request = {
59
59
  },
60
60
  fromJSON(object) {
61
61
  return {
62
- requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
62
+ requestId: isSet(object.requestId)
63
+ ? globalThis.String(object.requestId)
64
+ : "",
63
65
  data: isSet(object.data) ? exports.RequestData.fromJSON(object.data) : undefined,
64
66
  };
65
67
  },
@@ -79,14 +81,21 @@ exports.Request = {
79
81
  fromPartial(object) {
80
82
  const message = createBaseRequest();
81
83
  message.requestId = object.requestId ?? "";
82
- message.data = (object.data !== undefined && object.data !== null)
83
- ? exports.RequestData.fromPartial(object.data)
84
- : undefined;
84
+ message.data =
85
+ object.data !== undefined && object.data !== null
86
+ ? exports.RequestData.fromPartial(object.data)
87
+ : undefined;
85
88
  return message;
86
89
  },
87
90
  };
88
91
  function createBaseRequestData() {
89
- return { ui: undefined, app: undefined, clipboard: undefined, storage: undefined, oauth: undefined };
92
+ return {
93
+ ui: undefined,
94
+ app: undefined,
95
+ clipboard: undefined,
96
+ storage: undefined,
97
+ oauth: undefined,
98
+ };
90
99
  }
91
100
  exports.RequestData = {
92
101
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -161,8 +170,12 @@ exports.RequestData = {
161
170
  return {
162
171
  ui: isSet(object.ui) ? ui_1.Request.fromJSON(object.ui) : undefined,
163
172
  app: isSet(object.app) ? application_1.Request.fromJSON(object.app) : undefined,
164
- clipboard: isSet(object.clipboard) ? clipboard_1.Request.fromJSON(object.clipboard) : undefined,
165
- storage: isSet(object.storage) ? storage_1.Request.fromJSON(object.storage) : undefined,
173
+ clipboard: isSet(object.clipboard)
174
+ ? clipboard_1.Request.fromJSON(object.clipboard)
175
+ : undefined,
176
+ storage: isSet(object.storage)
177
+ ? storage_1.Request.fromJSON(object.storage)
178
+ : undefined,
166
179
  oauth: isSet(object.oauth) ? oauth_1.Request.fromJSON(object.oauth) : undefined,
167
180
  };
168
181
  },
@@ -190,17 +203,26 @@ exports.RequestData = {
190
203
  },
191
204
  fromPartial(object) {
192
205
  const message = createBaseRequestData();
193
- message.ui = (object.ui !== undefined && object.ui !== null) ? ui_1.Request.fromPartial(object.ui) : undefined;
194
- message.app = (object.app !== undefined && object.app !== null) ? application_1.Request.fromPartial(object.app) : undefined;
195
- message.clipboard = (object.clipboard !== undefined && object.clipboard !== null)
196
- ? clipboard_1.Request.fromPartial(object.clipboard)
197
- : undefined;
198
- message.storage = (object.storage !== undefined && object.storage !== null)
199
- ? storage_1.Request.fromPartial(object.storage)
200
- : undefined;
201
- message.oauth = (object.oauth !== undefined && object.oauth !== null)
202
- ? oauth_1.Request.fromPartial(object.oauth)
203
- : undefined;
206
+ message.ui =
207
+ object.ui !== undefined && object.ui !== null
208
+ ? ui_1.Request.fromPartial(object.ui)
209
+ : undefined;
210
+ message.app =
211
+ object.app !== undefined && object.app !== null
212
+ ? application_1.Request.fromPartial(object.app)
213
+ : undefined;
214
+ message.clipboard =
215
+ object.clipboard !== undefined && object.clipboard !== null
216
+ ? clipboard_1.Request.fromPartial(object.clipboard)
217
+ : undefined;
218
+ message.storage =
219
+ object.storage !== undefined && object.storage !== null
220
+ ? storage_1.Request.fromPartial(object.storage)
221
+ : undefined;
222
+ message.oauth =
223
+ object.oauth !== undefined && object.oauth !== null
224
+ ? oauth_1.Request.fromPartial(object.oauth)
225
+ : undefined;
204
226
  return message;
205
227
  },
206
228
  };
@@ -258,9 +280,13 @@ exports.Response = {
258
280
  },
259
281
  fromJSON(object) {
260
282
  return {
261
- requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
283
+ requestId: isSet(object.requestId)
284
+ ? globalThis.String(object.requestId)
285
+ : "",
262
286
  data: isSet(object.data) ? exports.ResponseData.fromJSON(object.data) : undefined,
263
- error: isSet(object.error) ? common_1.ErrorResponse.fromJSON(object.error) : undefined,
287
+ error: isSet(object.error)
288
+ ? common_1.ErrorResponse.fromJSON(object.error)
289
+ : undefined,
264
290
  };
265
291
  },
266
292
  toJSON(message) {
@@ -282,17 +308,25 @@ exports.Response = {
282
308
  fromPartial(object) {
283
309
  const message = createBaseResponse();
284
310
  message.requestId = object.requestId ?? "";
285
- message.data = (object.data !== undefined && object.data !== null)
286
- ? exports.ResponseData.fromPartial(object.data)
287
- : undefined;
288
- message.error = (object.error !== undefined && object.error !== null)
289
- ? common_1.ErrorResponse.fromPartial(object.error)
290
- : undefined;
311
+ message.data =
312
+ object.data !== undefined && object.data !== null
313
+ ? exports.ResponseData.fromPartial(object.data)
314
+ : undefined;
315
+ message.error =
316
+ object.error !== undefined && object.error !== null
317
+ ? common_1.ErrorResponse.fromPartial(object.error)
318
+ : undefined;
291
319
  return message;
292
320
  },
293
321
  };
294
322
  function createBaseResponseData() {
295
- return { ui: undefined, app: undefined, clipboard: undefined, storage: undefined, oauth: undefined };
323
+ return {
324
+ ui: undefined,
325
+ app: undefined,
326
+ clipboard: undefined,
327
+ storage: undefined,
328
+ oauth: undefined,
329
+ };
296
330
  }
297
331
  exports.ResponseData = {
298
332
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -367,9 +401,15 @@ exports.ResponseData = {
367
401
  return {
368
402
  ui: isSet(object.ui) ? ui_1.Response.fromJSON(object.ui) : undefined,
369
403
  app: isSet(object.app) ? application_1.Response.fromJSON(object.app) : undefined,
370
- clipboard: isSet(object.clipboard) ? clipboard_1.Response.fromJSON(object.clipboard) : undefined,
371
- storage: isSet(object.storage) ? storage_1.Response.fromJSON(object.storage) : undefined,
372
- oauth: isSet(object.oauth) ? oauth_1.Response.fromJSON(object.oauth) : undefined,
404
+ clipboard: isSet(object.clipboard)
405
+ ? clipboard_1.Response.fromJSON(object.clipboard)
406
+ : undefined,
407
+ storage: isSet(object.storage)
408
+ ? storage_1.Response.fromJSON(object.storage)
409
+ : undefined,
410
+ oauth: isSet(object.oauth)
411
+ ? oauth_1.Response.fromJSON(object.oauth)
412
+ : undefined,
373
413
  };
374
414
  },
375
415
  toJSON(message) {
@@ -396,17 +436,26 @@ exports.ResponseData = {
396
436
  },
397
437
  fromPartial(object) {
398
438
  const message = createBaseResponseData();
399
- message.ui = (object.ui !== undefined && object.ui !== null) ? ui_1.Response.fromPartial(object.ui) : undefined;
400
- message.app = (object.app !== undefined && object.app !== null) ? application_1.Response.fromPartial(object.app) : undefined;
401
- message.clipboard = (object.clipboard !== undefined && object.clipboard !== null)
402
- ? clipboard_1.Response.fromPartial(object.clipboard)
403
- : undefined;
404
- message.storage = (object.storage !== undefined && object.storage !== null)
405
- ? storage_1.Response.fromPartial(object.storage)
406
- : undefined;
407
- message.oauth = (object.oauth !== undefined && object.oauth !== null)
408
- ? oauth_1.Response.fromPartial(object.oauth)
409
- : undefined;
439
+ message.ui =
440
+ object.ui !== undefined && object.ui !== null
441
+ ? ui_1.Response.fromPartial(object.ui)
442
+ : undefined;
443
+ message.app =
444
+ object.app !== undefined && object.app !== null
445
+ ? application_1.Response.fromPartial(object.app)
446
+ : undefined;
447
+ message.clipboard =
448
+ object.clipboard !== undefined && object.clipboard !== null
449
+ ? clipboard_1.Response.fromPartial(object.clipboard)
450
+ : undefined;
451
+ message.storage =
452
+ object.storage !== undefined && object.storage !== null
453
+ ? storage_1.Response.fromPartial(object.storage)
454
+ : undefined;
455
+ message.oauth =
456
+ object.oauth !== undefined && object.oauth !== null
457
+ ? oauth_1.Response.fromPartial(object.oauth)
458
+ : undefined;
410
459
  return message;
411
460
  },
412
461
  };
@@ -465,8 +514,12 @@ exports.Event = {
465
514
  fromJSON(object) {
466
515
  return {
467
516
  id: isSet(object.id) ? globalThis.String(object.id) : "",
468
- generic: isSet(object.generic) ? exports.GenericEventData.fromJSON(object.generic) : undefined,
469
- crash: isSet(object.crash) ? exports.CrashEventData.fromJSON(object.crash) : undefined,
517
+ generic: isSet(object.generic)
518
+ ? exports.GenericEventData.fromJSON(object.generic)
519
+ : undefined,
520
+ crash: isSet(object.crash)
521
+ ? exports.CrashEventData.fromJSON(object.crash)
522
+ : undefined,
470
523
  };
471
524
  },
472
525
  toJSON(message) {
@@ -488,12 +541,14 @@ exports.Event = {
488
541
  fromPartial(object) {
489
542
  const message = createBaseEvent();
490
543
  message.id = object.id ?? "";
491
- message.generic = (object.generic !== undefined && object.generic !== null)
492
- ? exports.GenericEventData.fromPartial(object.generic)
493
- : undefined;
494
- message.crash = (object.crash !== undefined && object.crash !== null)
495
- ? exports.CrashEventData.fromPartial(object.crash)
496
- : undefined;
544
+ message.generic =
545
+ object.generic !== undefined && object.generic !== null
546
+ ? exports.GenericEventData.fromPartial(object.generic)
547
+ : undefined;
548
+ message.crash =
549
+ object.crash !== undefined && object.crash !== null
550
+ ? exports.CrashEventData.fromPartial(object.crash)
551
+ : undefined;
497
552
  return message;
498
553
  },
499
554
  };