@croffledev/croffle-types 1.1.0 → 1.1.1
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/index.d.ts +46 -11
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -48,14 +48,22 @@ export interface FeatureContextMenu {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/** 설정 항목 스키마 (extension SDK / manifest 공용) */
|
|
51
|
-
export type ConfigItemType =
|
|
51
|
+
export type ConfigItemType =
|
|
52
|
+
| "string"
|
|
53
|
+
| "number"
|
|
54
|
+
| "boolean"
|
|
55
|
+
| "select"
|
|
56
|
+
| "path";
|
|
52
57
|
|
|
53
58
|
export interface ConfigItemSchema<T = unknown> {
|
|
54
59
|
type: ConfigItemType;
|
|
55
60
|
label: string;
|
|
56
61
|
description?: string;
|
|
57
62
|
defaultValue: T;
|
|
58
|
-
options?: Array<{
|
|
63
|
+
options?: Array<{
|
|
64
|
+
label: string;
|
|
65
|
+
value: T extends string | number ? T : never;
|
|
66
|
+
}>;
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
/** extension이 기여하는 설정 섹션 (선언형) */
|
|
@@ -280,9 +288,15 @@ export namespace tags {
|
|
|
280
288
|
}
|
|
281
289
|
|
|
282
290
|
export namespace schedules {
|
|
283
|
-
export function getAll(period: {
|
|
291
|
+
export function getAll(period: {
|
|
292
|
+
start: string;
|
|
293
|
+
end: string;
|
|
294
|
+
}): Promise<Schedule[]>;
|
|
284
295
|
export function create(data: Partial<Schedule>): Promise<Schedule>;
|
|
285
|
-
export function update(
|
|
296
|
+
export function update(
|
|
297
|
+
id: string,
|
|
298
|
+
data: Partial<Schedule>,
|
|
299
|
+
): Promise<Schedule>;
|
|
286
300
|
export function remove(id: string): Promise<boolean>;
|
|
287
301
|
export function exportSchedulesToFile(period?: {
|
|
288
302
|
start: string;
|
|
@@ -298,7 +312,11 @@ export namespace pluginInfo {
|
|
|
298
312
|
export function getEnabled(): Promise<PluginInfo[]>;
|
|
299
313
|
export function getByName(name: string): Promise<PluginInfo | null>;
|
|
300
314
|
export function install(data: Partial<PluginInfo>): Promise<PluginInfo>;
|
|
301
|
-
export function
|
|
315
|
+
export function installFromLocal(zipPath: string): Promise<PluginInfo>;
|
|
316
|
+
export function toggle(
|
|
317
|
+
name: string,
|
|
318
|
+
enable: boolean,
|
|
319
|
+
): Promise<PluginInfo | null>;
|
|
302
320
|
export function uninstall(name: string): Promise<boolean>;
|
|
303
321
|
}
|
|
304
322
|
|
|
@@ -310,7 +328,9 @@ export namespace search {
|
|
|
310
328
|
export namespace settings {
|
|
311
329
|
export function getAll(): Promise<AppSettings>;
|
|
312
330
|
export function getOf(key: string): Promise<AppSettings[keyof AppSettings]>;
|
|
313
|
-
export function update(
|
|
331
|
+
export function update(
|
|
332
|
+
newSettings: Partial<AppSettings>,
|
|
333
|
+
): Promise<AppSettings>;
|
|
314
334
|
}
|
|
315
335
|
|
|
316
336
|
/** 플러그인별 설정 저장소 (pluginStorage 기반) */
|
|
@@ -328,13 +348,19 @@ export namespace pluginSettings {
|
|
|
328
348
|
|
|
329
349
|
export namespace pluginStorage {
|
|
330
350
|
export function get(pluginId: string, key: string): Promise<string | null>;
|
|
331
|
-
export function set(
|
|
351
|
+
export function set(
|
|
352
|
+
pluginId: string,
|
|
353
|
+
key: string,
|
|
354
|
+
value: string,
|
|
355
|
+
): Promise<void>;
|
|
332
356
|
}
|
|
333
357
|
|
|
334
358
|
export namespace os {
|
|
335
359
|
export function showNotification(title: string, body: string): Promise<void>;
|
|
336
360
|
export function getClipboard(): Promise<ClipboardResult>;
|
|
337
|
-
export function setClipboard(
|
|
361
|
+
export function setClipboard(
|
|
362
|
+
data: ClipboardTextData | ClipboardImageData,
|
|
363
|
+
): Promise<void>;
|
|
338
364
|
}
|
|
339
365
|
|
|
340
366
|
export namespace http {
|
|
@@ -352,7 +378,10 @@ export namespace http {
|
|
|
352
378
|
|
|
353
379
|
export namespace event {
|
|
354
380
|
export function emit(type: string, payload: unknown): void;
|
|
355
|
-
export function on(
|
|
381
|
+
export function on(
|
|
382
|
+
type: string,
|
|
383
|
+
callback: (payload: unknown) => void,
|
|
384
|
+
): () => void;
|
|
356
385
|
}
|
|
357
386
|
|
|
358
387
|
export const base: {
|
|
@@ -393,7 +422,10 @@ export const enums: {
|
|
|
393
422
|
};
|
|
394
423
|
|
|
395
424
|
export const ui: {
|
|
396
|
-
registerView: (
|
|
425
|
+
registerView: (
|
|
426
|
+
viewId: string,
|
|
427
|
+
renderFn: (container: HTMLElement) => void,
|
|
428
|
+
) => void;
|
|
397
429
|
registerContextMenu: (
|
|
398
430
|
target: string,
|
|
399
431
|
command: string,
|
|
@@ -404,5 +436,8 @@ export const ui: {
|
|
|
404
436
|
* 설정 모달에 탭을 추가합니다.
|
|
405
437
|
* @param tabId 고유 탭 ID (플러그인 ID와 조합해 `${pluginId}:${tabId}` 형태로 저장됨)
|
|
406
438
|
*/
|
|
407
|
-
registerSettingsTab: (
|
|
439
|
+
registerSettingsTab: (
|
|
440
|
+
tabId: string,
|
|
441
|
+
options: RegisterSettingsTabOptions,
|
|
442
|
+
) => void;
|
|
408
443
|
};
|