@talex-touch/utils 1.0.42 → 1.0.45
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/.eslintcache +1 -0
- package/__tests__/cloud-sync-sdk.test.ts +442 -0
- package/__tests__/icons/icons.test.ts +84 -0
- package/__tests__/plugin-sdk-lifecycle.test.ts +130 -0
- package/__tests__/power-sdk.test.ts +143 -0
- package/__tests__/preset-export-types.test.ts +108 -0
- package/__tests__/search/fuzzy-match.test.ts +137 -0
- package/__tests__/transport/port-policy.test.ts +44 -0
- package/__tests__/transport-domain-sdks.test.ts +152 -0
- package/__tests__/types/update.test.ts +67 -0
- package/account/account-sdk.ts +915 -0
- package/account/index.ts +2 -0
- package/account/types.ts +321 -0
- package/analytics/client.ts +136 -0
- package/analytics/index.ts +2 -0
- package/analytics/types.ts +156 -0
- package/animation/auto-resize.ts +322 -0
- package/animation/window-node.ts +26 -19
- package/auth/clerk-types.ts +12 -30
- package/auth/index.ts +0 -2
- package/auth/useAuthState.ts +6 -14
- package/base/index.ts +2 -0
- package/base/log-level.ts +105 -0
- package/channel/index.ts +170 -69
- package/cloud-sync/cloud-sync-sdk.ts +450 -0
- package/cloud-sync/index.ts +1 -0
- package/common/file-scan-utils.ts +17 -9
- package/common/index.ts +4 -0
- package/common/logger/index.ts +46 -0
- package/common/logger/logger-manager.ts +303 -0
- package/common/logger/module-logger.ts +270 -0
- package/common/logger/transport-logger.ts +234 -0
- package/common/logger/types.ts +93 -0
- package/common/search/gather.ts +48 -6
- package/common/search/index.ts +8 -0
- package/common/storage/constants.ts +13 -0
- package/common/storage/entity/app-settings.ts +245 -0
- package/common/storage/entity/index.ts +3 -0
- package/common/storage/entity/layout-atom-types.ts +147 -0
- package/common/storage/entity/openers.ts +1 -0
- package/common/storage/entity/preset-cloud-api.ts +132 -0
- package/common/storage/entity/preset-export-types.ts +256 -0
- package/common/storage/entity/shortcut-settings.ts +1 -0
- package/common/storage/shortcut-storage.ts +11 -0
- package/common/utils/clone-diagnostics.ts +105 -0
- package/common/utils/file.ts +16 -8
- package/common/utils/index.ts +6 -2
- package/common/utils/payload-preview.ts +173 -0
- package/common/utils/polling.ts +167 -13
- package/common/utils/safe-path.ts +103 -0
- package/common/utils/safe-shell.ts +115 -0
- package/common/utils/task-queue.ts +4 -1
- package/core-box/builder/tuff-builder.ts +0 -1
- package/core-box/index.ts +1 -1
- package/core-box/recommendation.ts +38 -1
- package/core-box/tuff/tuff-dsl.ts +32 -0
- package/electron/download-manager.ts +10 -7
- package/electron/env-tool.ts +42 -40
- package/electron/index.ts +0 -1
- package/env/index.ts +156 -0
- package/eslint.config.js +55 -0
- package/i18n/index.ts +62 -0
- package/i18n/locales/en.json +226 -0
- package/i18n/locales/zh.json +226 -0
- package/i18n/message-keys.ts +236 -0
- package/i18n/resolver.ts +181 -0
- package/icons/index.ts +257 -0
- package/icons/svg.ts +69 -0
- package/index.ts +9 -1
- package/intelligence/client.ts +72 -42
- package/market/constants.ts +9 -5
- package/market/index.ts +1 -1
- package/market/types.ts +19 -4
- package/package.json +15 -5
- package/permission/index.ts +143 -46
- package/permission/legacy.ts +26 -0
- package/permission/registry.ts +304 -0
- package/permission/types.ts +164 -0
- package/plugin/channel.ts +68 -39
- package/plugin/index.ts +80 -7
- package/plugin/install.ts +3 -0
- package/plugin/log/types.ts +22 -5
- package/plugin/node/logger-manager.ts +11 -3
- package/plugin/node/logger.ts +24 -17
- package/plugin/preload.ts +25 -2
- package/plugin/providers/index.ts +4 -4
- package/plugin/providers/market-client.ts +6 -3
- package/plugin/providers/npm-provider.ts +22 -7
- package/plugin/providers/tpex-provider.ts +22 -8
- package/plugin/sdk/box-items.ts +14 -0
- package/plugin/sdk/box-sdk.ts +64 -0
- package/plugin/sdk/channel.ts +119 -4
- package/plugin/sdk/clipboard.ts +26 -12
- package/plugin/sdk/cloud-sync.ts +113 -0
- package/plugin/sdk/common.ts +19 -11
- package/plugin/sdk/core-box.ts +6 -15
- package/plugin/sdk/division-box.ts +160 -65
- package/plugin/sdk/examples/storage-onDidChange-example.js +5 -2
- package/plugin/sdk/feature-sdk.ts +111 -76
- package/plugin/sdk/flow.ts +146 -45
- package/plugin/sdk/hooks/bridge.ts +13 -6
- package/plugin/sdk/hooks/life-cycle.ts +35 -16
- package/plugin/sdk/index.ts +14 -3
- package/plugin/sdk/intelligence.ts +87 -0
- package/plugin/sdk/meta/README.md +179 -0
- package/plugin/sdk/meta-sdk.ts +244 -0
- package/plugin/sdk/notification.ts +9 -0
- package/plugin/sdk/plugin-info.ts +64 -0
- package/plugin/sdk/power.ts +155 -0
- package/plugin/sdk/recommend.ts +21 -0
- package/plugin/sdk/service/index.ts +12 -8
- package/plugin/sdk/sqlite.ts +141 -0
- package/plugin/sdk/storage.ts +2 -6
- package/plugin/sdk/system.ts +2 -9
- package/plugin/sdk/temp-files.ts +41 -0
- package/plugin/sdk/touch-sdk.ts +18 -0
- package/plugin/sdk/types.ts +44 -4
- package/plugin/sdk/window/index.ts +12 -9
- package/plugin/sdk-version.ts +231 -0
- package/preload/renderer.ts +3 -2
- package/renderer/hooks/arg-mapper.ts +16 -2
- package/renderer/hooks/index.ts +13 -0
- package/renderer/hooks/initialize.ts +2 -1
- package/renderer/hooks/use-agent-market-sdk.ts +7 -0
- package/renderer/hooks/use-agent-market.ts +106 -0
- package/renderer/hooks/use-agents-sdk.ts +7 -0
- package/renderer/hooks/use-app-sdk.ts +7 -0
- package/renderer/hooks/use-channel.ts +33 -4
- package/renderer/hooks/use-download-sdk.ts +21 -0
- package/renderer/hooks/use-intelligence-sdk.ts +7 -0
- package/renderer/hooks/use-intelligence-stats.ts +290 -0
- package/renderer/hooks/use-intelligence.ts +55 -214
- package/renderer/hooks/use-market-sdk.ts +16 -0
- package/renderer/hooks/use-notification-sdk.ts +7 -0
- package/renderer/hooks/use-permission-sdk.ts +7 -0
- package/renderer/hooks/use-permission.ts +325 -0
- package/renderer/hooks/use-platform-sdk.ts +7 -0
- package/renderer/hooks/use-plugin-sdk.ts +16 -0
- package/renderer/hooks/use-settings-sdk.ts +7 -0
- package/renderer/hooks/use-update-sdk.ts +21 -0
- package/renderer/index.ts +1 -0
- package/renderer/ref.ts +19 -10
- package/renderer/shared/components/SharedPluginDetailContent.vue +84 -0
- package/renderer/shared/components/SharedPluginDetailHeader.vue +116 -0
- package/renderer/shared/components/SharedPluginDetailMetaList.vue +39 -0
- package/renderer/shared/components/SharedPluginDetailReadme.vue +45 -0
- package/renderer/shared/components/SharedPluginDetailVersions.vue +98 -0
- package/renderer/shared/components/index.ts +5 -0
- package/renderer/shared/components/shims-vue.d.ts +5 -0
- package/renderer/shared/index.ts +2 -0
- package/renderer/shared/plugin-detail.ts +62 -0
- package/renderer/storage/app-settings.ts +3 -1
- package/renderer/storage/base-storage.ts +508 -82
- package/renderer/storage/intelligence-storage.ts +31 -40
- package/renderer/storage/openers.ts +3 -1
- package/renderer/storage/storage-subscription.ts +126 -42
- package/renderer/touch-sdk/env.ts +10 -10
- package/renderer/touch-sdk/index.ts +114 -18
- package/renderer/touch-sdk/terminal.ts +24 -13
- package/search/feature-matcher.ts +279 -0
- package/search/fuzzy-match.ts +64 -34
- package/search/index.ts +10 -0
- package/search/levenshtein-utils.ts +17 -11
- package/transport/errors.ts +310 -0
- package/transport/event/builder.ts +378 -0
- package/transport/event/index.ts +7 -0
- package/transport/event/types.ts +292 -0
- package/transport/events/index.ts +2690 -0
- package/transport/events/meta-overlay.ts +79 -0
- package/transport/events/types/agents.ts +177 -0
- package/transport/events/types/app-index.ts +20 -0
- package/transport/events/types/app.ts +475 -0
- package/transport/events/types/box-item.ts +222 -0
- package/transport/events/types/clipboard.ts +80 -0
- package/transport/events/types/core-box.ts +534 -0
- package/transport/events/types/device-idle.ts +7 -0
- package/transport/events/types/division-box.ts +99 -0
- package/transport/events/types/download.ts +115 -0
- package/transport/events/types/file-index.ts +84 -0
- package/transport/events/types/flow.ts +149 -0
- package/transport/events/types/index.ts +70 -0
- package/transport/events/types/market.ts +39 -0
- package/transport/events/types/meta-overlay.ts +184 -0
- package/transport/events/types/notification.ts +140 -0
- package/transport/events/types/permission.ts +90 -0
- package/transport/events/types/platform.ts +8 -0
- package/transport/events/types/plugin.ts +631 -0
- package/transport/events/types/sentry.ts +20 -0
- package/transport/events/types/storage.ts +208 -0
- package/transport/events/types/transport.ts +60 -0
- package/transport/events/types/tray.ts +16 -0
- package/transport/events/types/update.ts +78 -0
- package/transport/index.ts +141 -0
- package/transport/main.ts +2 -0
- package/transport/prelude.ts +208 -0
- package/transport/sdk/constants.ts +29 -0
- package/transport/sdk/domains/agents-market.ts +47 -0
- package/transport/sdk/domains/agents.ts +62 -0
- package/transport/sdk/domains/app.ts +48 -0
- package/transport/sdk/domains/disposable.ts +35 -0
- package/transport/sdk/domains/download.ts +139 -0
- package/transport/sdk/domains/index.ts +13 -0
- package/transport/sdk/domains/intelligence.ts +616 -0
- package/transport/sdk/domains/market.ts +35 -0
- package/transport/sdk/domains/notification.ts +62 -0
- package/transport/sdk/domains/permission.ts +85 -0
- package/transport/sdk/domains/platform.ts +19 -0
- package/transport/sdk/domains/plugin.ts +144 -0
- package/transport/sdk/domains/settings.ts +102 -0
- package/transport/sdk/domains/update.ts +64 -0
- package/transport/sdk/index.ts +60 -0
- package/transport/sdk/main-transport.ts +710 -0
- package/transport/sdk/main.ts +9 -0
- package/transport/sdk/plugin-transport.ts +654 -0
- package/transport/sdk/port-policy.ts +38 -0
- package/transport/sdk/renderer-transport.ts +1165 -0
- package/transport/types.ts +605 -0
- package/types/agent.ts +399 -0
- package/types/cloud-sync.ts +157 -0
- package/types/division-box.ts +31 -31
- package/types/download.ts +1 -0
- package/types/flow.ts +63 -12
- package/types/icon.ts +2 -1
- package/types/index.ts +5 -0
- package/types/intelligence.ts +166 -173
- package/types/modules/base.ts +2 -0
- package/types/path-browserify.d.ts +5 -0
- package/types/platform.ts +12 -0
- package/types/startup-info.ts +32 -0
- package/types/touch-app-core.ts +8 -8
- package/types/update.ts +94 -1
- package/vitest.config.ts +25 -0
- package/auth/useClerkConfig.ts +0 -40
- package/auth/useClerkProvider.ts +0 -52
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions for Plugin domain events
|
|
3
|
+
* @module @talex-touch/utils/transport/events/types/plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Plugin Lifecycle Types
|
|
8
|
+
// ============================================================================
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Plugin status enumeration.
|
|
12
|
+
*/
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Plugin Management (Renderer/Main) Types
|
|
15
|
+
// ============================================================================
|
|
16
|
+
|
|
17
|
+
import type { ITouchPlugin } from '../../../plugin'
|
|
18
|
+
import type {
|
|
19
|
+
PluginInstallConfirmRequest,
|
|
20
|
+
PluginInstallConfirmResponse,
|
|
21
|
+
PluginInstallProgressEvent,
|
|
22
|
+
} from '../../../plugin/install'
|
|
23
|
+
import type { PluginInstallRequest } from '../../../plugin/providers/types'
|
|
24
|
+
import type {
|
|
25
|
+
InputChangedRequest,
|
|
26
|
+
PluginFilters,
|
|
27
|
+
PluginStateEvent,
|
|
28
|
+
RegisterWidgetRequest,
|
|
29
|
+
TriggerFeatureRequest,
|
|
30
|
+
} from '../../../plugin/sdk/types'
|
|
31
|
+
|
|
32
|
+
export enum PluginStatus {
|
|
33
|
+
/**
|
|
34
|
+
* Plugin is not loaded.
|
|
35
|
+
*/
|
|
36
|
+
UNLOADED = 'unloaded',
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Plugin is currently loading.
|
|
40
|
+
*/
|
|
41
|
+
LOADING = 'loading',
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Plugin is loaded and active.
|
|
45
|
+
*/
|
|
46
|
+
ACTIVE = 'active',
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Plugin is loaded but disabled.
|
|
50
|
+
*/
|
|
51
|
+
DISABLED = 'disabled',
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Plugin encountered an error.
|
|
55
|
+
*/
|
|
56
|
+
ERROR = 'error',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Request to load a plugin.
|
|
61
|
+
*/
|
|
62
|
+
export interface PluginLoadRequest {
|
|
63
|
+
/**
|
|
64
|
+
* Plugin name to load.
|
|
65
|
+
*/
|
|
66
|
+
name: string
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Request to unload a plugin.
|
|
71
|
+
*/
|
|
72
|
+
export interface PluginUnloadRequest {
|
|
73
|
+
/**
|
|
74
|
+
* Plugin name to unload.
|
|
75
|
+
*/
|
|
76
|
+
name: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Request to reload a plugin.
|
|
81
|
+
*/
|
|
82
|
+
export interface PluginReloadRequest {
|
|
83
|
+
/**
|
|
84
|
+
* Plugin name to reload.
|
|
85
|
+
*/
|
|
86
|
+
name: string
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Request to enable a plugin.
|
|
91
|
+
*/
|
|
92
|
+
export interface PluginEnableRequest {
|
|
93
|
+
/**
|
|
94
|
+
* Plugin name to enable.
|
|
95
|
+
*/
|
|
96
|
+
name: string
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Request to disable a plugin.
|
|
101
|
+
*/
|
|
102
|
+
export interface PluginDisableRequest {
|
|
103
|
+
/**
|
|
104
|
+
* Plugin name to disable.
|
|
105
|
+
*/
|
|
106
|
+
name: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Plugin information returned after lifecycle operations.
|
|
111
|
+
*/
|
|
112
|
+
export interface PluginInfo {
|
|
113
|
+
/**
|
|
114
|
+
* Plugin name (unique identifier).
|
|
115
|
+
*/
|
|
116
|
+
name: string
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Plugin version.
|
|
120
|
+
*/
|
|
121
|
+
version: string
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Current plugin status.
|
|
125
|
+
*/
|
|
126
|
+
status: PluginStatus
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Display name.
|
|
130
|
+
*/
|
|
131
|
+
displayName?: string
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Plugin description.
|
|
135
|
+
*/
|
|
136
|
+
description?: string
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Plugin author.
|
|
140
|
+
*/
|
|
141
|
+
author?: string
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Plugin icon.
|
|
145
|
+
*/
|
|
146
|
+
icon?: string
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Whether this is a dev mode plugin.
|
|
150
|
+
*/
|
|
151
|
+
isDev?: boolean
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Plugin path on disk.
|
|
155
|
+
*/
|
|
156
|
+
path?: string
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Error message if status is ERROR.
|
|
160
|
+
*/
|
|
161
|
+
error?: string
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export type PluginInstallSource = 'dev' | 'tpex'
|
|
165
|
+
|
|
166
|
+
export type PluginInstallStatus = 'success' | 'exists' | 'error'
|
|
167
|
+
|
|
168
|
+
export interface PluginInstallCompletedPayload {
|
|
169
|
+
name?: string
|
|
170
|
+
source: PluginInstallSource
|
|
171
|
+
status: PluginInstallStatus
|
|
172
|
+
error?: string
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ============================================================================
|
|
176
|
+
// Feature Types
|
|
177
|
+
// ============================================================================
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Request to trigger a plugin feature.
|
|
181
|
+
*/
|
|
182
|
+
export interface FeatureTriggerRequest {
|
|
183
|
+
/**
|
|
184
|
+
* Plugin name.
|
|
185
|
+
*/
|
|
186
|
+
pluginName: string
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Feature ID to trigger.
|
|
190
|
+
*/
|
|
191
|
+
featureId: string
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Query/input for the feature.
|
|
195
|
+
*/
|
|
196
|
+
query?: unknown
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Additional context.
|
|
200
|
+
*/
|
|
201
|
+
context?: Record<string, unknown>
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Response from feature trigger.
|
|
206
|
+
*/
|
|
207
|
+
export interface FeatureTriggerResponse {
|
|
208
|
+
/**
|
|
209
|
+
* Whether the feature was triggered successfully.
|
|
210
|
+
*/
|
|
211
|
+
success: boolean
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Result data from the feature.
|
|
215
|
+
*/
|
|
216
|
+
data?: unknown
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Error message if not successful.
|
|
220
|
+
*/
|
|
221
|
+
error?: string
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// ============================================================================
|
|
225
|
+
// Log Types
|
|
226
|
+
// ============================================================================
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Log level enumeration.
|
|
230
|
+
*/
|
|
231
|
+
export enum PluginLogLevel {
|
|
232
|
+
DEBUG = 'debug',
|
|
233
|
+
INFO = 'info',
|
|
234
|
+
WARN = 'warn',
|
|
235
|
+
ERROR = 'error',
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Plugin log entry.
|
|
240
|
+
*/
|
|
241
|
+
export interface PluginLogEntry {
|
|
242
|
+
/**
|
|
243
|
+
* Plugin name that generated this log.
|
|
244
|
+
*/
|
|
245
|
+
pluginName: string
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Log level.
|
|
249
|
+
*/
|
|
250
|
+
level: PluginLogLevel
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Log message.
|
|
254
|
+
*/
|
|
255
|
+
message: string
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Timestamp when log was created.
|
|
259
|
+
*/
|
|
260
|
+
timestamp: number
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Additional data.
|
|
264
|
+
*/
|
|
265
|
+
data?: unknown
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Stack trace (for errors).
|
|
269
|
+
*/
|
|
270
|
+
stack?: string
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// ============================================================================
|
|
274
|
+
// Message Transport Types
|
|
275
|
+
// ============================================================================
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Plugin message for inter-plugin or plugin-main communication.
|
|
279
|
+
*/
|
|
280
|
+
export interface PluginMessage {
|
|
281
|
+
/**
|
|
282
|
+
* Source plugin name.
|
|
283
|
+
*/
|
|
284
|
+
from: string
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Target plugin name (or '*' for broadcast).
|
|
288
|
+
*/
|
|
289
|
+
to: string
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Message type/event name.
|
|
293
|
+
*/
|
|
294
|
+
type: string
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Message payload.
|
|
298
|
+
*/
|
|
299
|
+
payload?: unknown
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Message ID for request-response correlation.
|
|
303
|
+
*/
|
|
304
|
+
messageId?: string
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Whether this is a response to a previous message.
|
|
308
|
+
*/
|
|
309
|
+
isResponse?: boolean
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Response to a plugin message.
|
|
314
|
+
*/
|
|
315
|
+
export interface PluginMessageResponse {
|
|
316
|
+
/**
|
|
317
|
+
* Whether the message was delivered.
|
|
318
|
+
*/
|
|
319
|
+
delivered: boolean
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Response data (if synchronous).
|
|
323
|
+
*/
|
|
324
|
+
data?: unknown
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Error if delivery failed.
|
|
328
|
+
*/
|
|
329
|
+
error?: string
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface PluginApiListRequest {
|
|
333
|
+
filters?: PluginFilters
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export type PluginApiListResponse = ITouchPlugin[]
|
|
337
|
+
|
|
338
|
+
export interface PluginApiGetRequest {
|
|
339
|
+
name: string
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export type PluginApiGetResponse = ITouchPlugin | null
|
|
343
|
+
|
|
344
|
+
export interface PluginApiGetStatusRequest {
|
|
345
|
+
name: string
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export type PluginApiGetStatusResponse = number
|
|
349
|
+
|
|
350
|
+
export interface PluginApiOperationRequest {
|
|
351
|
+
name: string
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface PluginApiOperationResponse {
|
|
355
|
+
success: boolean
|
|
356
|
+
error?: string
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export type PluginApiInstallRequest = PluginInstallRequest
|
|
360
|
+
export type PluginApiInstallResponse = PluginApiOperationResponse
|
|
361
|
+
|
|
362
|
+
export type PluginApiUninstallRequest = PluginApiOperationRequest
|
|
363
|
+
export type PluginApiUninstallResponse = PluginApiOperationResponse
|
|
364
|
+
|
|
365
|
+
export type PluginApiTriggerFeatureRequest = TriggerFeatureRequest
|
|
366
|
+
export type PluginApiTriggerFeatureResponse = unknown
|
|
367
|
+
|
|
368
|
+
export type PluginApiRegisterWidgetRequest = RegisterWidgetRequest
|
|
369
|
+
export type PluginApiRegisterWidgetResponse = PluginApiOperationResponse
|
|
370
|
+
|
|
371
|
+
export type PluginApiFeatureInputChangedRequest = InputChangedRequest
|
|
372
|
+
|
|
373
|
+
export interface PluginApiOpenFolderRequest {
|
|
374
|
+
name: string
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface PluginApiGetOfficialListRequest {
|
|
378
|
+
force?: boolean
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export interface PluginApiGetOfficialListResponse {
|
|
382
|
+
plugins: unknown[]
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface PluginApiGetManifestRequest {
|
|
386
|
+
name: string
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export type PluginApiGetManifestResponse = Record<string, unknown> | null
|
|
390
|
+
|
|
391
|
+
export interface PluginApiSaveManifestRequest {
|
|
392
|
+
name: string
|
|
393
|
+
manifest: Record<string, unknown>
|
|
394
|
+
reload?: boolean
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export interface PluginApiSaveManifestResponse {
|
|
398
|
+
success: boolean
|
|
399
|
+
error?: string
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export interface PluginApiSaveWidgetFileRequest {
|
|
403
|
+
name: string
|
|
404
|
+
widgetPath: string
|
|
405
|
+
source: string
|
|
406
|
+
overwrite?: boolean
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface PluginApiSaveWidgetFileResponse {
|
|
410
|
+
success: boolean
|
|
411
|
+
error?: string
|
|
412
|
+
relativePath?: string
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export interface PluginApiGetPathsRequest {
|
|
416
|
+
name: string
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export interface PluginApiGetPathsResponse {
|
|
420
|
+
pluginPath: string
|
|
421
|
+
dataPath: string
|
|
422
|
+
configPath: string
|
|
423
|
+
logsPath: string
|
|
424
|
+
tempPath: string
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export interface PluginApiOpenPathRequest {
|
|
428
|
+
name: string
|
|
429
|
+
pathType: 'plugin' | 'data' | 'config' | 'logs' | 'temp'
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface PluginApiOpenPathResponse {
|
|
433
|
+
success: boolean
|
|
434
|
+
path?: string
|
|
435
|
+
error?: string
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface PluginApiRevealPathRequest {
|
|
439
|
+
name: string
|
|
440
|
+
path: string
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface PluginApiRevealPathResponse {
|
|
444
|
+
success: boolean
|
|
445
|
+
path?: string
|
|
446
|
+
error?: string
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export interface PluginApiGetPerformanceRequest {
|
|
450
|
+
name: string
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export type PluginApiGetPerformanceResponse = unknown
|
|
454
|
+
|
|
455
|
+
export interface PluginApiGetRuntimeStatsRequest {
|
|
456
|
+
name: string
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export type PluginApiGetRuntimeStatsResponse = unknown
|
|
460
|
+
|
|
461
|
+
export interface PluginReconnectDevServerRequest {
|
|
462
|
+
pluginName: string
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export interface PluginReconnectDevServerResponse {
|
|
466
|
+
success: boolean
|
|
467
|
+
error?: string
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export type PluginPushStateChangedPayload = PluginStateEvent
|
|
471
|
+
|
|
472
|
+
export interface PluginPushStatusUpdatedPayload {
|
|
473
|
+
plugin: string
|
|
474
|
+
status: number
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface PluginPushReloadReadmePayload {
|
|
478
|
+
source?: string
|
|
479
|
+
plugin: string
|
|
480
|
+
readme: string
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export interface PluginPushCrashedPayload {
|
|
484
|
+
plugin?: string
|
|
485
|
+
message?: string
|
|
486
|
+
stack?: string
|
|
487
|
+
[key: string]: unknown
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export type PluginInstallProgressPayload = PluginInstallProgressEvent
|
|
491
|
+
export type PluginInstallConfirmPayload = PluginInstallConfirmRequest
|
|
492
|
+
export type PluginInstallConfirmResponsePayload = PluginInstallConfirmResponse
|
|
493
|
+
|
|
494
|
+
export interface PluginInstallSourceRequest {
|
|
495
|
+
source: string
|
|
496
|
+
hintType?: unknown
|
|
497
|
+
metadata?: Record<string, unknown>
|
|
498
|
+
clientMetadata?: Record<string, unknown>
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface PluginInstallSourceResponse {
|
|
502
|
+
status: 'success' | 'error'
|
|
503
|
+
manifest?: unknown
|
|
504
|
+
provider?: unknown
|
|
505
|
+
official?: boolean
|
|
506
|
+
message?: string
|
|
507
|
+
error?: string
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export interface PluginStorageOpenInEditorRequest {
|
|
511
|
+
pluginName: string
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export interface PluginDevServerStatusRequest {
|
|
515
|
+
pluginName: string
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export interface PluginDevServerStatusResponse {
|
|
519
|
+
monitoring: boolean
|
|
520
|
+
connected: boolean
|
|
521
|
+
error?: string
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export interface PluginPushReloadPayload {
|
|
525
|
+
source?: string
|
|
526
|
+
plugin: unknown
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export interface PluginStorageFileRequest {
|
|
530
|
+
pluginName: string
|
|
531
|
+
fileName: string
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface PluginStorageSetFileRequest extends PluginStorageFileRequest {
|
|
535
|
+
content: unknown
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export interface PluginStorageListFilesRequest {
|
|
539
|
+
pluginName: string
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export interface PluginStorageStatsRequest {
|
|
543
|
+
pluginName: string
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export interface PluginStorageTreeRequest {
|
|
547
|
+
pluginName: string
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export interface PluginStorageFileDetailsRequest extends PluginStorageFileRequest {}
|
|
551
|
+
|
|
552
|
+
export interface PluginStorageClearRequest {
|
|
553
|
+
pluginName: string
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export interface PluginStorageOpenFolderRequest {
|
|
557
|
+
pluginName: string
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export interface PluginStorageUpdatePayload {
|
|
561
|
+
name: string
|
|
562
|
+
fileName?: string
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export interface PluginStorageSyncItem {
|
|
566
|
+
pluginName: string
|
|
567
|
+
fileName: string
|
|
568
|
+
qualifiedName: string
|
|
569
|
+
content: unknown
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export interface PluginStorageListSyncItemsRequest {
|
|
573
|
+
pluginName?: string
|
|
574
|
+
qualifiedNames?: string[]
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface PluginStorageApplySyncItemRequest {
|
|
578
|
+
pluginName: string
|
|
579
|
+
fileName: string
|
|
580
|
+
content: unknown
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export interface PluginStorageDeleteSyncItemRequest {
|
|
584
|
+
pluginName: string
|
|
585
|
+
fileName: string
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export interface PluginSqliteExecuteRequest {
|
|
589
|
+
pluginName?: string
|
|
590
|
+
sql: string
|
|
591
|
+
params?: unknown[]
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export interface PluginSqliteExecuteResponse {
|
|
595
|
+
success: boolean
|
|
596
|
+
rowsAffected?: number
|
|
597
|
+
lastInsertRowId?: number | null
|
|
598
|
+
error?: string
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface PluginSqliteQueryRequest extends PluginSqliteExecuteRequest {}
|
|
602
|
+
|
|
603
|
+
export interface PluginSqliteQueryResponse {
|
|
604
|
+
success: boolean
|
|
605
|
+
rows?: Array<Record<string, unknown>>
|
|
606
|
+
columns?: string[]
|
|
607
|
+
error?: string
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface PluginSqliteTransactionStatement {
|
|
611
|
+
sql: string
|
|
612
|
+
params?: unknown[]
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export interface PluginSqliteTransactionRequest {
|
|
616
|
+
pluginName?: string
|
|
617
|
+
statements: PluginSqliteTransactionStatement[]
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export interface PluginSqliteTransactionResponse {
|
|
621
|
+
success: boolean
|
|
622
|
+
results?: Array<{
|
|
623
|
+
rowsAffected: number
|
|
624
|
+
lastInsertRowId: number | null
|
|
625
|
+
}>
|
|
626
|
+
error?: string
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export type PluginPerformanceGetMetricsResponse = unknown
|
|
630
|
+
|
|
631
|
+
export type PluginPerformanceGetPathsResponse = PluginApiGetPathsResponse
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions for Sentry domain events
|
|
3
|
+
* @module @talex-touch/utils/transport/events/types/sentry
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface SentryUpdateUserRequest {
|
|
7
|
+
user: unknown | null
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type SentryGetConfigResponse = unknown
|
|
11
|
+
|
|
12
|
+
export type SentryGetSearchCountResponse = unknown
|
|
13
|
+
|
|
14
|
+
export type SentryGetTelemetryStatsResponse = unknown
|
|
15
|
+
|
|
16
|
+
export type SentryRecordPerformanceRequest = unknown
|
|
17
|
+
|
|
18
|
+
export interface SentryRecordPerformanceResponse {
|
|
19
|
+
success: boolean
|
|
20
|
+
}
|