@vicinae/api 0.9.0 → 0.9.2
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/dist/api/ai.js +2 -41
- package/dist/api/alert.js +8 -21
- package/dist/api/bus.d.ts +10 -7
- package/dist/api/bus.js +0 -33
- package/dist/api/cache.d.ts +64 -73
- package/dist/api/cache.js +163 -14
- package/dist/api/clipboard.d.ts +1 -1
- package/dist/api/clipboard.js +3 -9
- package/dist/api/controls.d.ts +3 -0
- package/dist/api/controls.js +5 -1
- package/dist/api/environment.d.ts +5 -0
- package/dist/api/file-search.d.ts +49 -0
- package/dist/api/file-search.js +49 -0
- package/dist/api/index.d.ts +2 -1
- package/dist/api/index.js +2 -1
- package/dist/api/lib/result.d.ts +3 -1
- package/dist/api/lib/result.js +2 -2
- package/dist/api/preference.js +2 -3
- package/dist/api/proto/application.d.ts +14 -0
- package/dist/api/proto/application.js +207 -37
- package/dist/api/proto/clipboard.js +38 -71
- package/dist/api/proto/common.js +2 -6
- package/dist/api/proto/daemon.js +5 -15
- package/dist/api/proto/extension.d.ts +16 -10
- package/dist/api/proto/extension.js +118 -91
- package/dist/api/proto/file-search.d.ts +42 -0
- package/dist/api/proto/file-search.js +290 -0
- package/dist/api/proto/google/protobuf/struct.js +9 -26
- package/dist/api/proto/ipc.js +53 -100
- package/dist/api/proto/manager.d.ts +2 -0
- package/dist/api/proto/manager.js +54 -49
- package/dist/api/proto/oauth.js +15 -33
- package/dist/api/proto/storage.js +29 -67
- package/dist/api/proto/ui.d.ts +11 -2
- package/dist/api/proto/ui.js +267 -254
- package/dist/api/proto/wlr-clipboard.js +4 -12
- package/dist/api/proto/wm.d.ts +111 -0
- package/dist/api/proto/wm.js +1266 -0
- package/dist/api/raycast/index.d.ts +24 -0
- package/dist/api/raycast/index.js +40 -0
- package/dist/api/raycast/system.d.ts +20 -0
- package/dist/api/raycast/system.js +73 -0
- package/dist/api/raycast/window-management.d.ts +42 -0
- package/dist/api/raycast/window-management.js +82 -0
- package/dist/api/toast.js +47 -5
- package/dist/api/utils.d.ts +5 -11
- package/dist/api/utils.js +20 -31
- package/dist/api/window-management.d.ts +39 -0
- package/dist/api/window-management.js +55 -0
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FileInfo as ProtoFileInfo } from './proto/file-search';
|
|
2
|
+
export declare namespace FileSearch {
|
|
3
|
+
/**
|
|
4
|
+
* For now we provide no options, but in the future we will implement mime type and file type filtering.
|
|
5
|
+
* */
|
|
6
|
+
type SearchOptions = {};
|
|
7
|
+
type FileInfo = ProtoFileInfo;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Access Vicinae's built-in file search functionality.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* This API provides read-only access to the file search system.
|
|
14
|
+
* Use this to find existing files indexed by Vicinae.
|
|
15
|
+
* This does **not** provide indexing capabilities.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { FileSearch } from '@vicinae/api';
|
|
20
|
+
*
|
|
21
|
+
* const results = await FileSearch.search('invoice');
|
|
22
|
+
* console.log(`Found ${results.length} files`);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
declare class FileSearchImpl {
|
|
28
|
+
/**
|
|
29
|
+
* Search for files matching the provided query string.
|
|
30
|
+
*
|
|
31
|
+
* @param query - Search term (min. 1 character) - the shorter the query the longer the average search takes.
|
|
32
|
+
* @param options - Search configuration options
|
|
33
|
+
* @returns Promise resolving to array of matching files
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Uses prefix matching on filename tokens. For example:
|
|
37
|
+
* - File: "invoice-new-motherboard.pdf"
|
|
38
|
+
* - Matches: "inv", "new", "mother", "pdf"
|
|
39
|
+
* - No match: "board", "oice" (not prefixes)
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const files = await fileSearch.search('invoice');
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
search(query: string, _?: FileSearch.SearchOptions): Promise<FileSearch.FileInfo[]>;
|
|
47
|
+
}
|
|
48
|
+
export declare const FileSearch: FileSearchImpl;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileSearch = void 0;
|
|
4
|
+
const bus_1 = require("./bus");
|
|
5
|
+
;
|
|
6
|
+
/**
|
|
7
|
+
* Access Vicinae's built-in file search functionality.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This API provides read-only access to the file search system.
|
|
11
|
+
* Use this to find existing files indexed by Vicinae.
|
|
12
|
+
* This does **not** provide indexing capabilities.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { FileSearch } from '@vicinae/api';
|
|
17
|
+
*
|
|
18
|
+
* const results = await FileSearch.search('invoice');
|
|
19
|
+
* console.log(`Found ${results.length} files`);
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
class FileSearchImpl {
|
|
25
|
+
/**
|
|
26
|
+
* Search for files matching the provided query string.
|
|
27
|
+
*
|
|
28
|
+
* @param query - Search term (min. 1 character) - the shorter the query the longer the average search takes.
|
|
29
|
+
* @param options - Search configuration options
|
|
30
|
+
* @returns Promise resolving to array of matching files
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Uses prefix matching on filename tokens. For example:
|
|
34
|
+
* - File: "invoice-new-motherboard.pdf"
|
|
35
|
+
* - Matches: "inv", "new", "mother", "pdf"
|
|
36
|
+
* - No match: "board", "oice" (not prefixes)
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const files = await fileSearch.search('invoice');
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
async search(query, _ = {}) {
|
|
44
|
+
const res = await bus_1.bus.turboRequest('fileSearch.search', { query });
|
|
45
|
+
return res.unwrap().files;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
;
|
|
49
|
+
exports.FileSearch = new FileSearchImpl();
|
package/dist/api/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from "./clipboard.js";
|
|
|
14
14
|
export * from "./utils";
|
|
15
15
|
export * from "./local-storage.js";
|
|
16
16
|
export * from "./oauth.js";
|
|
17
|
-
export * from "./ai.js";
|
|
18
17
|
export * from "./alert.js";
|
|
19
18
|
export * from "./preference.js";
|
|
19
|
+
export * from './file-search.js';
|
|
20
|
+
export * from './window-management.js';
|
package/dist/api/index.js
CHANGED
|
@@ -30,6 +30,7 @@ __exportStar(require("./clipboard.js"), exports);
|
|
|
30
30
|
__exportStar(require("./utils"), exports);
|
|
31
31
|
__exportStar(require("./local-storage.js"), exports);
|
|
32
32
|
__exportStar(require("./oauth.js"), exports);
|
|
33
|
-
__exportStar(require("./ai.js"), exports);
|
|
34
33
|
__exportStar(require("./alert.js"), exports);
|
|
35
34
|
__exportStar(require("./preference.js"), exports);
|
|
35
|
+
__exportStar(require("./file-search.js"), exports);
|
|
36
|
+
__exportStar(require("./window-management.js"), exports);
|
package/dist/api/lib/result.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export type Result<T, E = undefined> = {
|
|
2
|
+
unwrap: () => T;
|
|
3
|
+
} & ({
|
|
2
4
|
ok: true;
|
|
3
5
|
value: T;
|
|
4
6
|
} | {
|
|
5
7
|
ok: false;
|
|
6
8
|
error: E | undefined;
|
|
7
|
-
};
|
|
9
|
+
});
|
|
8
10
|
export declare const Ok: <T>(data: T) => Result<T, never>;
|
|
9
11
|
export declare const Err: <E>(error?: E) => Result<never, E>;
|
package/dist/api/lib/result.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Err = exports.Ok = void 0;
|
|
4
4
|
const Ok = (data) => {
|
|
5
|
-
return { ok: true, value: data };
|
|
5
|
+
return { ok: true, value: data, unwrap: () => data };
|
|
6
6
|
};
|
|
7
7
|
exports.Ok = Ok;
|
|
8
8
|
const Err = (error) => {
|
|
9
|
-
return { ok: false, error };
|
|
9
|
+
return { ok: false, error, unwrap: () => { throw error; } };
|
|
10
10
|
};
|
|
11
11
|
exports.Err = Err;
|
package/dist/api/preference.js
CHANGED
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.openCommandPreferences = exports.openExtensionPreferences = exports.getPreferenceValues = void 0;
|
|
4
4
|
const worker_threads_1 = require("worker_threads");
|
|
5
|
-
const bus_1 = require("./bus");
|
|
6
5
|
const getPreferenceValues = () => {
|
|
7
6
|
const { preferenceValues = {} } = worker_threads_1.workerData;
|
|
8
7
|
return preferenceValues;
|
|
9
8
|
};
|
|
10
9
|
exports.getPreferenceValues = getPreferenceValues;
|
|
11
10
|
const openExtensionPreferences = async () => {
|
|
12
|
-
|
|
11
|
+
console.error('openExtensionPreferences is not implemented');
|
|
13
12
|
};
|
|
14
13
|
exports.openExtensionPreferences = openExtensionPreferences;
|
|
15
14
|
const openCommandPreferences = async () => {
|
|
16
|
-
|
|
15
|
+
console.error('openCommandPreferences is not implemented');
|
|
17
16
|
};
|
|
18
17
|
exports.openCommandPreferences = openCommandPreferences;
|
|
@@ -1,29 +1,43 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { AckResponse } from "./common";
|
|
2
3
|
export declare const protobufPackage = "proto.ext.application";
|
|
3
4
|
export interface OpenApplicationRequest {
|
|
4
5
|
target: string;
|
|
5
6
|
appId?: string | undefined;
|
|
6
7
|
}
|
|
7
8
|
export interface ListApplicationRequest {
|
|
9
|
+
target?: string | undefined;
|
|
8
10
|
}
|
|
9
11
|
export interface ListApplicationResponse {
|
|
10
12
|
apps: Application[];
|
|
11
13
|
}
|
|
14
|
+
export interface GetDefaultApplicationRequest {
|
|
15
|
+
target: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetDefaultApplicationResponse {
|
|
18
|
+
app: Application | undefined;
|
|
19
|
+
}
|
|
12
20
|
export interface Request {
|
|
13
21
|
list?: ListApplicationRequest | undefined;
|
|
14
22
|
open?: OpenApplicationRequest | undefined;
|
|
23
|
+
getDefault?: GetDefaultApplicationRequest | undefined;
|
|
15
24
|
}
|
|
16
25
|
export interface Response {
|
|
17
26
|
list?: ListApplicationResponse | undefined;
|
|
27
|
+
open?: AckResponse | undefined;
|
|
28
|
+
getDefault?: GetDefaultApplicationResponse | undefined;
|
|
18
29
|
}
|
|
19
30
|
export interface Application {
|
|
20
31
|
id: string;
|
|
21
32
|
name: string;
|
|
22
33
|
icon: string;
|
|
34
|
+
path: string;
|
|
23
35
|
}
|
|
24
36
|
export declare const OpenApplicationRequest: MessageFns<OpenApplicationRequest>;
|
|
25
37
|
export declare const ListApplicationRequest: MessageFns<ListApplicationRequest>;
|
|
26
38
|
export declare const ListApplicationResponse: MessageFns<ListApplicationResponse>;
|
|
39
|
+
export declare const GetDefaultApplicationRequest: MessageFns<GetDefaultApplicationRequest>;
|
|
40
|
+
export declare const GetDefaultApplicationResponse: MessageFns<GetDefaultApplicationResponse>;
|
|
27
41
|
export declare const Request: MessageFns<Request>;
|
|
28
42
|
export declare const Response: MessageFns<Response>;
|
|
29
43
|
export declare const Application: MessageFns<Application>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.7.
|
|
4
|
+
// protoc-gen-ts_proto v2.7.7
|
|
5
5
|
// protoc v6.31.1
|
|
6
6
|
// source: application.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Application = exports.Response = exports.Request = exports.ListApplicationResponse = exports.ListApplicationRequest = exports.OpenApplicationRequest = exports.protobufPackage = void 0;
|
|
8
|
+
exports.Application = exports.Response = exports.Request = exports.GetDefaultApplicationResponse = exports.GetDefaultApplicationRequest = exports.ListApplicationResponse = exports.ListApplicationRequest = exports.OpenApplicationRequest = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const common_1 = require("./common");
|
|
11
12
|
exports.protobufPackage = "proto.ext.application";
|
|
12
13
|
function createBaseOpenApplicationRequest() {
|
|
13
14
|
return { target: "", appId: undefined };
|
|
@@ -78,10 +79,13 @@ exports.OpenApplicationRequest = {
|
|
|
78
79
|
},
|
|
79
80
|
};
|
|
80
81
|
function createBaseListApplicationRequest() {
|
|
81
|
-
return {};
|
|
82
|
+
return { target: undefined };
|
|
82
83
|
}
|
|
83
84
|
exports.ListApplicationRequest = {
|
|
84
|
-
encode(
|
|
85
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
86
|
+
if (message.target !== undefined) {
|
|
87
|
+
writer.uint32(10).string(message.target);
|
|
88
|
+
}
|
|
85
89
|
return writer;
|
|
86
90
|
},
|
|
87
91
|
decode(input, length) {
|
|
@@ -91,6 +95,13 @@ exports.ListApplicationRequest = {
|
|
|
91
95
|
while (reader.pos < end) {
|
|
92
96
|
const tag = reader.uint32();
|
|
93
97
|
switch (tag >>> 3) {
|
|
98
|
+
case 1: {
|
|
99
|
+
if (tag !== 10) {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
message.target = reader.string();
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
94
105
|
}
|
|
95
106
|
if ((tag & 7) === 4 || tag === 0) {
|
|
96
107
|
break;
|
|
@@ -99,18 +110,22 @@ exports.ListApplicationRequest = {
|
|
|
99
110
|
}
|
|
100
111
|
return message;
|
|
101
112
|
},
|
|
102
|
-
fromJSON(
|
|
103
|
-
return {};
|
|
113
|
+
fromJSON(object) {
|
|
114
|
+
return { target: isSet(object.target) ? globalThis.String(object.target) : undefined };
|
|
104
115
|
},
|
|
105
|
-
toJSON(
|
|
116
|
+
toJSON(message) {
|
|
106
117
|
const obj = {};
|
|
118
|
+
if (message.target !== undefined) {
|
|
119
|
+
obj.target = message.target;
|
|
120
|
+
}
|
|
107
121
|
return obj;
|
|
108
122
|
},
|
|
109
123
|
create(base) {
|
|
110
124
|
return exports.ListApplicationRequest.fromPartial(base ?? {});
|
|
111
125
|
},
|
|
112
|
-
fromPartial(
|
|
126
|
+
fromPartial(object) {
|
|
113
127
|
const message = createBaseListApplicationRequest();
|
|
128
|
+
message.target = object.target ?? undefined;
|
|
114
129
|
return message;
|
|
115
130
|
},
|
|
116
131
|
};
|
|
@@ -147,11 +162,7 @@ exports.ListApplicationResponse = {
|
|
|
147
162
|
return message;
|
|
148
163
|
},
|
|
149
164
|
fromJSON(object) {
|
|
150
|
-
return {
|
|
151
|
-
apps: globalThis.Array.isArray(object?.apps)
|
|
152
|
-
? object.apps.map((e) => exports.Application.fromJSON(e))
|
|
153
|
-
: [],
|
|
154
|
-
};
|
|
165
|
+
return { apps: globalThis.Array.isArray(object?.apps) ? object.apps.map((e) => exports.Application.fromJSON(e)) : [] };
|
|
155
166
|
},
|
|
156
167
|
toJSON(message) {
|
|
157
168
|
const obj = {};
|
|
@@ -169,8 +180,110 @@ exports.ListApplicationResponse = {
|
|
|
169
180
|
return message;
|
|
170
181
|
},
|
|
171
182
|
};
|
|
183
|
+
function createBaseGetDefaultApplicationRequest() {
|
|
184
|
+
return { target: "" };
|
|
185
|
+
}
|
|
186
|
+
exports.GetDefaultApplicationRequest = {
|
|
187
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
188
|
+
if (message.target !== "") {
|
|
189
|
+
writer.uint32(10).string(message.target);
|
|
190
|
+
}
|
|
191
|
+
return writer;
|
|
192
|
+
},
|
|
193
|
+
decode(input, length) {
|
|
194
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
195
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
196
|
+
const message = createBaseGetDefaultApplicationRequest();
|
|
197
|
+
while (reader.pos < end) {
|
|
198
|
+
const tag = reader.uint32();
|
|
199
|
+
switch (tag >>> 3) {
|
|
200
|
+
case 1: {
|
|
201
|
+
if (tag !== 10) {
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
message.target = reader.string();
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
reader.skip(tag & 7);
|
|
212
|
+
}
|
|
213
|
+
return message;
|
|
214
|
+
},
|
|
215
|
+
fromJSON(object) {
|
|
216
|
+
return { target: isSet(object.target) ? globalThis.String(object.target) : "" };
|
|
217
|
+
},
|
|
218
|
+
toJSON(message) {
|
|
219
|
+
const obj = {};
|
|
220
|
+
if (message.target !== "") {
|
|
221
|
+
obj.target = message.target;
|
|
222
|
+
}
|
|
223
|
+
return obj;
|
|
224
|
+
},
|
|
225
|
+
create(base) {
|
|
226
|
+
return exports.GetDefaultApplicationRequest.fromPartial(base ?? {});
|
|
227
|
+
},
|
|
228
|
+
fromPartial(object) {
|
|
229
|
+
const message = createBaseGetDefaultApplicationRequest();
|
|
230
|
+
message.target = object.target ?? "";
|
|
231
|
+
return message;
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
function createBaseGetDefaultApplicationResponse() {
|
|
235
|
+
return { app: undefined };
|
|
236
|
+
}
|
|
237
|
+
exports.GetDefaultApplicationResponse = {
|
|
238
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
239
|
+
if (message.app !== undefined) {
|
|
240
|
+
exports.Application.encode(message.app, writer.uint32(10).fork()).join();
|
|
241
|
+
}
|
|
242
|
+
return writer;
|
|
243
|
+
},
|
|
244
|
+
decode(input, length) {
|
|
245
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
246
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
247
|
+
const message = createBaseGetDefaultApplicationResponse();
|
|
248
|
+
while (reader.pos < end) {
|
|
249
|
+
const tag = reader.uint32();
|
|
250
|
+
switch (tag >>> 3) {
|
|
251
|
+
case 1: {
|
|
252
|
+
if (tag !== 10) {
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
message.app = exports.Application.decode(reader, reader.uint32());
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
reader.skip(tag & 7);
|
|
263
|
+
}
|
|
264
|
+
return message;
|
|
265
|
+
},
|
|
266
|
+
fromJSON(object) {
|
|
267
|
+
return { app: isSet(object.app) ? exports.Application.fromJSON(object.app) : undefined };
|
|
268
|
+
},
|
|
269
|
+
toJSON(message) {
|
|
270
|
+
const obj = {};
|
|
271
|
+
if (message.app !== undefined) {
|
|
272
|
+
obj.app = exports.Application.toJSON(message.app);
|
|
273
|
+
}
|
|
274
|
+
return obj;
|
|
275
|
+
},
|
|
276
|
+
create(base) {
|
|
277
|
+
return exports.GetDefaultApplicationResponse.fromPartial(base ?? {});
|
|
278
|
+
},
|
|
279
|
+
fromPartial(object) {
|
|
280
|
+
const message = createBaseGetDefaultApplicationResponse();
|
|
281
|
+
message.app = (object.app !== undefined && object.app !== null) ? exports.Application.fromPartial(object.app) : undefined;
|
|
282
|
+
return message;
|
|
283
|
+
},
|
|
284
|
+
};
|
|
172
285
|
function createBaseRequest() {
|
|
173
|
-
return { list: undefined, open: undefined };
|
|
286
|
+
return { list: undefined, open: undefined, getDefault: undefined };
|
|
174
287
|
}
|
|
175
288
|
exports.Request = {
|
|
176
289
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -180,6 +293,9 @@ exports.Request = {
|
|
|
180
293
|
if (message.open !== undefined) {
|
|
181
294
|
exports.OpenApplicationRequest.encode(message.open, writer.uint32(18).fork()).join();
|
|
182
295
|
}
|
|
296
|
+
if (message.getDefault !== undefined) {
|
|
297
|
+
exports.GetDefaultApplicationRequest.encode(message.getDefault, writer.uint32(26).fork()).join();
|
|
298
|
+
}
|
|
183
299
|
return writer;
|
|
184
300
|
},
|
|
185
301
|
decode(input, length) {
|
|
@@ -203,6 +319,13 @@ exports.Request = {
|
|
|
203
319
|
message.open = exports.OpenApplicationRequest.decode(reader, reader.uint32());
|
|
204
320
|
continue;
|
|
205
321
|
}
|
|
322
|
+
case 3: {
|
|
323
|
+
if (tag !== 26) {
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
message.getDefault = exports.GetDefaultApplicationRequest.decode(reader, reader.uint32());
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
206
329
|
}
|
|
207
330
|
if ((tag & 7) === 4 || tag === 0) {
|
|
208
331
|
break;
|
|
@@ -213,12 +336,9 @@ exports.Request = {
|
|
|
213
336
|
},
|
|
214
337
|
fromJSON(object) {
|
|
215
338
|
return {
|
|
216
|
-
list: isSet(object.list)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
open: isSet(object.open)
|
|
220
|
-
? exports.OpenApplicationRequest.fromJSON(object.open)
|
|
221
|
-
: undefined,
|
|
339
|
+
list: isSet(object.list) ? exports.ListApplicationRequest.fromJSON(object.list) : undefined,
|
|
340
|
+
open: isSet(object.open) ? exports.OpenApplicationRequest.fromJSON(object.open) : undefined,
|
|
341
|
+
getDefault: isSet(object.getDefault) ? exports.GetDefaultApplicationRequest.fromJSON(object.getDefault) : undefined,
|
|
222
342
|
};
|
|
223
343
|
},
|
|
224
344
|
toJSON(message) {
|
|
@@ -229,6 +349,9 @@ exports.Request = {
|
|
|
229
349
|
if (message.open !== undefined) {
|
|
230
350
|
obj.open = exports.OpenApplicationRequest.toJSON(message.open);
|
|
231
351
|
}
|
|
352
|
+
if (message.getDefault !== undefined) {
|
|
353
|
+
obj.getDefault = exports.GetDefaultApplicationRequest.toJSON(message.getDefault);
|
|
354
|
+
}
|
|
232
355
|
return obj;
|
|
233
356
|
},
|
|
234
357
|
create(base) {
|
|
@@ -236,25 +359,32 @@ exports.Request = {
|
|
|
236
359
|
},
|
|
237
360
|
fromPartial(object) {
|
|
238
361
|
const message = createBaseRequest();
|
|
239
|
-
message.list =
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
362
|
+
message.list = (object.list !== undefined && object.list !== null)
|
|
363
|
+
? exports.ListApplicationRequest.fromPartial(object.list)
|
|
364
|
+
: undefined;
|
|
365
|
+
message.open = (object.open !== undefined && object.open !== null)
|
|
366
|
+
? exports.OpenApplicationRequest.fromPartial(object.open)
|
|
367
|
+
: undefined;
|
|
368
|
+
message.getDefault = (object.getDefault !== undefined && object.getDefault !== null)
|
|
369
|
+
? exports.GetDefaultApplicationRequest.fromPartial(object.getDefault)
|
|
370
|
+
: undefined;
|
|
247
371
|
return message;
|
|
248
372
|
},
|
|
249
373
|
};
|
|
250
374
|
function createBaseResponse() {
|
|
251
|
-
return { list: undefined };
|
|
375
|
+
return { list: undefined, open: undefined, getDefault: undefined };
|
|
252
376
|
}
|
|
253
377
|
exports.Response = {
|
|
254
378
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
255
379
|
if (message.list !== undefined) {
|
|
256
380
|
exports.ListApplicationResponse.encode(message.list, writer.uint32(10).fork()).join();
|
|
257
381
|
}
|
|
382
|
+
if (message.open !== undefined) {
|
|
383
|
+
common_1.AckResponse.encode(message.open, writer.uint32(18).fork()).join();
|
|
384
|
+
}
|
|
385
|
+
if (message.getDefault !== undefined) {
|
|
386
|
+
exports.GetDefaultApplicationResponse.encode(message.getDefault, writer.uint32(26).fork()).join();
|
|
387
|
+
}
|
|
258
388
|
return writer;
|
|
259
389
|
},
|
|
260
390
|
decode(input, length) {
|
|
@@ -271,6 +401,20 @@ exports.Response = {
|
|
|
271
401
|
message.list = exports.ListApplicationResponse.decode(reader, reader.uint32());
|
|
272
402
|
continue;
|
|
273
403
|
}
|
|
404
|
+
case 2: {
|
|
405
|
+
if (tag !== 18) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
message.open = common_1.AckResponse.decode(reader, reader.uint32());
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
case 3: {
|
|
412
|
+
if (tag !== 26) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
message.getDefault = exports.GetDefaultApplicationResponse.decode(reader, reader.uint32());
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
274
418
|
}
|
|
275
419
|
if ((tag & 7) === 4 || tag === 0) {
|
|
276
420
|
break;
|
|
@@ -281,9 +425,9 @@ exports.Response = {
|
|
|
281
425
|
},
|
|
282
426
|
fromJSON(object) {
|
|
283
427
|
return {
|
|
284
|
-
list: isSet(object.list)
|
|
285
|
-
|
|
286
|
-
|
|
428
|
+
list: isSet(object.list) ? exports.ListApplicationResponse.fromJSON(object.list) : undefined,
|
|
429
|
+
open: isSet(object.open) ? common_1.AckResponse.fromJSON(object.open) : undefined,
|
|
430
|
+
getDefault: isSet(object.getDefault) ? exports.GetDefaultApplicationResponse.fromJSON(object.getDefault) : undefined,
|
|
287
431
|
};
|
|
288
432
|
},
|
|
289
433
|
toJSON(message) {
|
|
@@ -291,6 +435,12 @@ exports.Response = {
|
|
|
291
435
|
if (message.list !== undefined) {
|
|
292
436
|
obj.list = exports.ListApplicationResponse.toJSON(message.list);
|
|
293
437
|
}
|
|
438
|
+
if (message.open !== undefined) {
|
|
439
|
+
obj.open = common_1.AckResponse.toJSON(message.open);
|
|
440
|
+
}
|
|
441
|
+
if (message.getDefault !== undefined) {
|
|
442
|
+
obj.getDefault = exports.GetDefaultApplicationResponse.toJSON(message.getDefault);
|
|
443
|
+
}
|
|
294
444
|
return obj;
|
|
295
445
|
},
|
|
296
446
|
create(base) {
|
|
@@ -298,15 +448,20 @@ exports.Response = {
|
|
|
298
448
|
},
|
|
299
449
|
fromPartial(object) {
|
|
300
450
|
const message = createBaseResponse();
|
|
301
|
-
message.list =
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
451
|
+
message.list = (object.list !== undefined && object.list !== null)
|
|
452
|
+
? exports.ListApplicationResponse.fromPartial(object.list)
|
|
453
|
+
: undefined;
|
|
454
|
+
message.open = (object.open !== undefined && object.open !== null)
|
|
455
|
+
? common_1.AckResponse.fromPartial(object.open)
|
|
456
|
+
: undefined;
|
|
457
|
+
message.getDefault = (object.getDefault !== undefined && object.getDefault !== null)
|
|
458
|
+
? exports.GetDefaultApplicationResponse.fromPartial(object.getDefault)
|
|
459
|
+
: undefined;
|
|
305
460
|
return message;
|
|
306
461
|
},
|
|
307
462
|
};
|
|
308
463
|
function createBaseApplication() {
|
|
309
|
-
return { id: "", name: "", icon: "" };
|
|
464
|
+
return { id: "", name: "", icon: "", path: "" };
|
|
310
465
|
}
|
|
311
466
|
exports.Application = {
|
|
312
467
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -319,6 +474,9 @@ exports.Application = {
|
|
|
319
474
|
if (message.icon !== "") {
|
|
320
475
|
writer.uint32(26).string(message.icon);
|
|
321
476
|
}
|
|
477
|
+
if (message.path !== "") {
|
|
478
|
+
writer.uint32(34).string(message.path);
|
|
479
|
+
}
|
|
322
480
|
return writer;
|
|
323
481
|
},
|
|
324
482
|
decode(input, length) {
|
|
@@ -349,6 +507,13 @@ exports.Application = {
|
|
|
349
507
|
message.icon = reader.string();
|
|
350
508
|
continue;
|
|
351
509
|
}
|
|
510
|
+
case 4: {
|
|
511
|
+
if (tag !== 34) {
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
message.path = reader.string();
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
352
517
|
}
|
|
353
518
|
if ((tag & 7) === 4 || tag === 0) {
|
|
354
519
|
break;
|
|
@@ -362,6 +527,7 @@ exports.Application = {
|
|
|
362
527
|
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
363
528
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
364
529
|
icon: isSet(object.icon) ? globalThis.String(object.icon) : "",
|
|
530
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
365
531
|
};
|
|
366
532
|
},
|
|
367
533
|
toJSON(message) {
|
|
@@ -375,6 +541,9 @@ exports.Application = {
|
|
|
375
541
|
if (message.icon !== "") {
|
|
376
542
|
obj.icon = message.icon;
|
|
377
543
|
}
|
|
544
|
+
if (message.path !== "") {
|
|
545
|
+
obj.path = message.path;
|
|
546
|
+
}
|
|
378
547
|
return obj;
|
|
379
548
|
},
|
|
380
549
|
create(base) {
|
|
@@ -385,6 +554,7 @@ exports.Application = {
|
|
|
385
554
|
message.id = object.id ?? "";
|
|
386
555
|
message.name = object.name ?? "";
|
|
387
556
|
message.icon = object.icon ?? "";
|
|
557
|
+
message.path = object.path ?? "";
|
|
388
558
|
return message;
|
|
389
559
|
},
|
|
390
560
|
};
|