@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.
- package/README.md +1 -1
- package/bin/run.js +2 -2
- package/dist/api/ai.js +11 -10
- package/dist/api/alert.d.ts +1 -1
- package/dist/api/alert.js +4 -5
- package/dist/api/bus.d.ts +27 -27
- package/dist/api/bus.js +15 -15
- package/dist/api/cache.js +15 -6
- package/dist/api/clipboard.d.ts +2 -2
- package/dist/api/clipboard.js +14 -15
- package/dist/api/color.js +1 -3
- package/dist/api/components/action-pannel.js +2 -2
- package/dist/api/components/actions.d.ts +3 -3
- package/dist/api/components/actions.js +16 -16
- package/dist/api/components/detail.d.ts +1 -1
- package/dist/api/components/detail.js +1 -1
- package/dist/api/components/dropdown.js +3 -3
- package/dist/api/components/empty-view.d.ts +2 -2
- package/dist/api/components/empty-view.js +1 -1
- package/dist/api/components/form.d.ts +2 -2
- package/dist/api/components/form.js +4 -12
- package/dist/api/components/grid.d.ts +4 -4
- package/dist/api/components/grid.js +10 -10
- package/dist/api/components/index.d.ts +7 -7
- package/dist/api/components/list.d.ts +3 -3
- package/dist/api/components/list.js +6 -6
- package/dist/api/components/menu-bar.js +1 -1
- package/dist/api/components/metadata.d.ts +2 -2
- package/dist/api/components/metadata.js +1 -1
- package/dist/api/components/tag.d.ts +3 -3
- package/dist/api/components/tag.js +4 -3
- package/dist/api/context/index.d.ts +1 -1
- package/dist/api/context/navigation-context.js +6 -2
- package/dist/api/context/navigation-provider.d.ts +1 -1
- package/dist/api/context/navigation-provider.js +5 -5
- package/dist/api/controls.js +3 -3
- package/dist/api/environment.js +0 -2
- package/dist/api/hooks/index.d.ts +2 -2
- package/dist/api/hooks/use-imperative-form-handle.d.ts +2 -2
- package/dist/api/hooks/use-imperative-form-handle.js +3 -3
- package/dist/api/hooks.js +4 -2
- package/dist/api/image.d.ts +1 -1
- package/dist/api/image.js +5 -5
- package/dist/api/index.d.ts +19 -19
- package/dist/api/keyboard.js +4 -5
- package/dist/api/local-storage.js +5 -7
- package/dist/api/oauth.d.ts +1 -1
- package/dist/api/oauth.js +23 -20
- package/dist/api/preference.js +2 -2
- package/dist/api/proto/application.js +28 -13
- package/dist/api/proto/clipboard.js +70 -37
- package/dist/api/proto/common.js +5 -1
- package/dist/api/proto/extension.js +104 -49
- package/dist/api/proto/google/protobuf/struct.js +25 -8
- package/dist/api/proto/ipc.js +99 -52
- package/dist/api/proto/manager.js +56 -22
- package/dist/api/proto/oauth.js +32 -14
- package/dist/api/proto/storage.js +66 -28
- package/dist/api/proto/ui.js +233 -124
- package/dist/api/toast.js +46 -21
- package/dist/api/utils.d.ts +1 -1
- package/dist/api/utils.js +16 -12
- package/dist/commands/build/index.js +18 -2
- package/dist/commands/develop/index.js +18 -3
- package/dist/index.d.ts +1 -1
- package/dist/schemas/manifest.js +225 -1
- 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:
|
|
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:
|
|
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
|
|
63
|
+
return "https://raycast.com/redirect?packageName=Extension";
|
|
64
64
|
case exports.OAuth.RedirectMethod.App:
|
|
65
|
-
return
|
|
65
|
+
return "raycast://oauth?package_name=Extension";
|
|
66
66
|
case exports.OAuth.RedirectMethod.AppURI:
|
|
67
|
-
return
|
|
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(
|
|
80
|
-
const codeChallenge = (0, node_crypto_1.createHash)(
|
|
81
|
-
|
|
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 ===
|
|
104
|
+
return typeof s.url === "string";
|
|
103
105
|
};
|
|
104
|
-
const res = await bus_1.bus.turboRequest(
|
|
106
|
+
const res = await bus_1.bus.turboRequest("oauth.authorize", {
|
|
105
107
|
client: {
|
|
106
108
|
id: this.providerId,
|
|
107
|
-
description: this.description ??
|
|
109
|
+
description: this.description ?? "Connect to your account",
|
|
108
110
|
name: this.providerName,
|
|
109
|
-
icon: this.providerIcon
|
|
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
|
};
|
package/dist/api/preference.js
CHANGED
|
@@ -9,10 +9,10 @@ const getPreferenceValues = () => {
|
|
|
9
9
|
};
|
|
10
10
|
exports.getPreferenceValues = getPreferenceValues;
|
|
11
11
|
const openExtensionPreferences = async () => {
|
|
12
|
-
await bus_1.bus.request(
|
|
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(
|
|
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 {
|
|
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)
|
|
213
|
-
|
|
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 =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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 {
|
|
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 =
|
|
288
|
-
|
|
289
|
-
|
|
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 {
|
|
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)
|
|
227
|
-
|
|
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 =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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 {
|
|
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 =
|
|
302
|
-
|
|
303
|
-
|
|
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)
|
|
363
|
-
|
|
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 =
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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)
|
|
513
|
-
|
|
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 =
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
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)
|
|
585
|
-
|
|
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 =
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
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
|
};
|
package/dist/api/proto/common.js
CHANGED
|
@@ -79,7 +79,11 @@ exports.ErrorResponse = {
|
|
|
79
79
|
return message;
|
|
80
80
|
},
|
|
81
81
|
fromJSON(object) {
|
|
82
|
-
return {
|
|
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)
|
|
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 =
|
|
83
|
-
|
|
84
|
-
|
|
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 {
|
|
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)
|
|
165
|
-
|
|
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 =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
message.
|
|
202
|
-
|
|
203
|
-
|
|
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)
|
|
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)
|
|
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 =
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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 {
|
|
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)
|
|
371
|
-
|
|
372
|
-
|
|
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 =
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
message.
|
|
408
|
-
|
|
409
|
-
|
|
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)
|
|
469
|
-
|
|
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 =
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
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
|
};
|