@dompling/trollscript-types 1.0.51 → 1.0.53

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 (2) hide show
  1. package/index.d.ts +0 -448
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -131,12 +131,6 @@ interface Storage {
131
131
  declare const storage: Storage;
132
132
 
133
133
  interface Icloud {
134
- /**
135
- * 检查 iCloud 是否可用
136
- * @returns 是否可用
137
- */
138
- isAvailable(): boolean;
139
-
140
134
  /**
141
135
  * 获取 iCloud 容器路径
142
136
  * @returns iCloud 容器的本地路径,不可用时返回 null
@@ -1240,313 +1234,6 @@ interface Notification {
1240
1234
 
1241
1235
  declare const notification: Notification;
1242
1236
 
1243
- interface Alarm {
1244
- /**
1245
- * 请求通知权限
1246
- * @returns 是否授权成功
1247
- */
1248
- requestAccess(): any;
1249
-
1250
- /**
1251
- * 获取权限状态
1252
- * @returns 权限状态
1253
- */
1254
- getAccessStatus(): any;
1255
-
1256
- /**
1257
- * 创建一次性闹钟
1258
- * @param timestamp 触发时间戳
1259
- * @param title 标题
1260
- * @param options 选项 { sound }
1261
- * @returns 创建的闹钟 ID
1262
- */
1263
- createOnce(timestamp: number, title: string, options: Record<string, any>): any;
1264
-
1265
- /**
1266
- * 创建每日重复闹钟
1267
- * @param hour 小时 (0-23)
1268
- * @param minute 分钟 (0-59)
1269
- * @param title 标题
1270
- * @param options 选项 { sound }
1271
- * @returns 创建的闹钟 ID
1272
- */
1273
- createDaily(hour: number, minute: number, title: string, options: Record<string, any>): any;
1274
-
1275
- /**
1276
- * 创建每周重复闹钟
1277
- * @param weekday 周几 (1-7, 周日为1)
1278
- * @param hour 小时 (0-23)
1279
- * @param minute 分钟 (0-59)
1280
- * @param title 标题
1281
- * @param options 选项 { sound }
1282
- * @returns 创建的闹钟 ID
1283
- */
1284
- createWeekly(weekday: number, hour: number, minute: number, title: string, options: Record<string, any>): any;
1285
-
1286
- /**
1287
- * 创建倒计时提醒
1288
- * @param seconds 秒数
1289
- * @param title 标题
1290
- * @param options 选项 { sound }
1291
- * @returns 创建的闹钟 ID
1292
- */
1293
- createCountdown(seconds: number, title: string, options: Record<string, any>): any;
1294
-
1295
- /**
1296
- * 获取待触发的闹钟
1297
- * @returns 待触发闹钟列表
1298
- */
1299
- getPending(): any;
1300
-
1301
- /**
1302
- * 获取闹钟数量
1303
- * @returns 闹钟数量
1304
- */
1305
- getCount(): any;
1306
-
1307
- /**
1308
- * 取消指定闹钟
1309
- * @param id 闹钟 ID
1310
- */
1311
- cancel(id: string): void;
1312
-
1313
- /**
1314
- * 取消所有闹钟
1315
- */
1316
- cancelAll(): void;
1317
-
1318
- /**
1319
- * 打开系统时钟
1320
- */
1321
- openClockApp(): void;
1322
-
1323
- /**
1324
- * 打开计时器
1325
- */
1326
- openTimer(): void;
1327
-
1328
- }
1329
-
1330
- declare const alarm: Alarm;
1331
-
1332
- interface Media {
1333
- /**
1334
- * 播放
1335
- */
1336
- play(): void;
1337
-
1338
- /**
1339
- * 暂停
1340
- */
1341
- pause(): void;
1342
-
1343
- /**
1344
- * 停止
1345
- */
1346
- stop(): void;
1347
-
1348
- /**
1349
- * 切换播放/暂停
1350
- */
1351
- togglePlayPause(): void;
1352
-
1353
- /**
1354
- * 下一首
1355
- */
1356
- next(): void;
1357
-
1358
- /**
1359
- * 上一首
1360
- */
1361
- previous(): void;
1362
-
1363
- /**
1364
- * 跳到开头
1365
- */
1366
- skipToBeginning(): void;
1367
-
1368
- /**
1369
- * 获取播放状态
1370
- * @returns 播放状态
1371
- */
1372
- getPlaybackState(): any;
1373
-
1374
- /**
1375
- * 是否正在播放
1376
- * @returns 是否正在播放
1377
- */
1378
- isPlaying(): boolean;
1379
-
1380
- /**
1381
- * 获取当前播放信息
1382
- * @returns 当前播放信息对象
1383
- */
1384
- getNowPlaying(): any;
1385
-
1386
- /**
1387
- * 获取音量
1388
- * @returns 当前音量(0.0-1.0)
1389
- */
1390
- getVolume(): number;
1391
-
1392
- /**
1393
- * 设置音量
1394
- * @param volume 音量 (0.0 - 1.0)
1395
- */
1396
- setVolume(volume: number): void;
1397
-
1398
- /**
1399
- * 获取重复模式
1400
- * @returns 重复模式
1401
- */
1402
- getRepeatMode(): any;
1403
-
1404
- /**
1405
- * 设置重复模式
1406
- * @param mode 'none' | 'one' | 'all'
1407
- */
1408
- setRepeatMode(mode: string): void;
1409
-
1410
- /**
1411
- * 获取随机播放模式
1412
- * @returns 随机播放模式
1413
- */
1414
- getShuffleMode(): any;
1415
-
1416
- /**
1417
- * 设置随机播放模式
1418
- * @param mode 'off' | 'songs' | 'albums'
1419
- */
1420
- setShuffleMode(mode: string): void;
1421
-
1422
- /**
1423
- * 获取当前播放时间
1424
- * @returns 当前播放时间(秒)
1425
- */
1426
- getCurrentTime(): number;
1427
-
1428
- /**
1429
- * 设置播放时间
1430
- * @param time 时间 (秒)
1431
- */
1432
- setCurrentTime(time: number): void;
1433
-
1434
- /**
1435
- * 快进
1436
- * @param seconds 秒数 (默认 15)
1437
- */
1438
- seekForward(seconds: number): void;
1439
-
1440
- /**
1441
- * 快退
1442
- * @param seconds 秒数 (默认 15)
1443
- */
1444
- seekBackward(seconds: number): void;
1445
-
1446
- /**
1447
- * 请求音乐库权限
1448
- * @returns 是否授权成功
1449
- */
1450
- requestAccess(): any;
1451
-
1452
- /**
1453
- * 获取权限状态
1454
- * @returns 权限状态
1455
- */
1456
- getAccessStatus(): any;
1457
-
1458
- /**
1459
- * 搜索音乐库
1460
- * @param query 搜索关键词
1461
- * @returns 歌曲列表数组
1462
- */
1463
- searchSongs(query: string): any;
1464
-
1465
- /**
1466
- * 播放指定歌曲
1467
- * @param persistentID 歌曲 ID
1468
- */
1469
- playSong(persistentID: string): void;
1470
-
1471
- /**
1472
- * 获取所有歌曲
1473
- * @returns 歌曲列表数组
1474
- */
1475
- getAllSongs(): any;
1476
-
1477
- /**
1478
- * 获取所有专辑
1479
- * @returns 专辑列表数组
1480
- */
1481
- getAlbums(): any;
1482
-
1483
- /**
1484
- * 获取所有艺术家
1485
- * @returns 艺术家列表数组
1486
- */
1487
- getArtists(): any;
1488
-
1489
- /**
1490
- * 获取播放列表
1491
- * @returns 播放列表数组
1492
- */
1493
- getPlaylists(): any;
1494
-
1495
- /**
1496
- * 播放专辑
1497
- * @param id 专辑 ID
1498
- */
1499
- playAlbum(id: string): void;
1500
-
1501
- /**
1502
- * 播放艺术家
1503
- * @param id 艺术家 ID
1504
- */
1505
- playArtist(id: string): void;
1506
-
1507
- /**
1508
- * 播放播放列表
1509
- * @param id 播放列表 ID
1510
- * @returns 无返回值
1511
- */
1512
- playPlaylist(id: string): void;
1513
-
1514
- }
1515
-
1516
- declare const media: Media;
1517
-
1518
- interface Mail {
1519
- /**
1520
- * 检查邮件功能是否可用
1521
- * @returns 是否能发送邮件
1522
- */
1523
- isAvailable(): boolean;
1524
-
1525
- /**
1526
- * 打开邮件编辑器
1527
- * @param options 邮件选项 { to: string|string[], cc?: string|string[], bcc?: string|string[], subject?: string, body?: string, isHTML?: boolean, attachments?: [{path, mimeType?, filename?}] }
1528
- * @returns 包含发送结果的对象
1529
- */
1530
- compose(options: Record<string, any>): any;
1531
-
1532
- /**
1533
- * 通过 URL Scheme 发送邮件 (sendDirect 的别名)
1534
- * @param options 邮件选项 { to: string|string[], cc?: string, bcc?: string, subject?: string, body?: string }
1535
- * @returns 是否成功打开邮件客户端
1536
- */
1537
- send(options: Record<string, any>): boolean;
1538
-
1539
- /**
1540
- * 通过 URL Scheme 发送邮件(打开默认邮件客户端)
1541
- * @param options 邮件选项 { to: string|string[], cc?: string, bcc?: string, subject?: string, body?: string }
1542
- * @returns 是否成功打开邮件客户端
1543
- */
1544
- sendDirect(options: Record<string, any>): boolean;
1545
-
1546
- }
1547
-
1548
- declare const mail: Mail;
1549
-
1550
1237
  interface Sms {
1551
1238
  /**
1552
1239
  * 检查短信权限
@@ -1728,141 +1415,6 @@ interface Shortcuts {
1728
1415
 
1729
1416
  declare const shortcuts: Shortcuts;
1730
1417
 
1731
- interface Bluetooth {
1732
- /**
1733
- * 蓝牙是否开启
1734
- */
1735
- isEnabled(): boolean;
1736
-
1737
- /**
1738
- * 获取蓝牙状态
1739
- */
1740
- getStatus(): any;
1741
-
1742
- /**
1743
- * 设置蓝牙开关
1744
- * @param enabled 是否开启
1745
- * @returns 无返回值
1746
- */
1747
- setEnabled(enabled: boolean): void;
1748
-
1749
- /**
1750
- * 打开蓝牙
1751
- * @returns 无返回值
1752
- */
1753
- turnOn(): void;
1754
-
1755
- /**
1756
- * 关闭蓝牙
1757
- * @returns 无返回值
1758
- */
1759
- turnOff(): void;
1760
-
1761
- /**
1762
- * 获取配对设备
1763
- */
1764
- getPairedDevices(): any;
1765
-
1766
- /**
1767
- * 获取已连接设备
1768
- */
1769
- getConnectedDevices(): any;
1770
-
1771
- /**
1772
- * 连接设备
1773
- * @param id 设备 UUID
1774
- */
1775
- connectDevice(id: string): any;
1776
-
1777
- /**
1778
- * 断开设备
1779
- * @param id 设备 UUID
1780
- */
1781
- disconnectDevice(id: string): any;
1782
-
1783
- /**
1784
- * 开始扫描
1785
- * @returns 无返回值
1786
- */
1787
- startScan(): void;
1788
-
1789
- /**
1790
- * 停止扫描
1791
- * @returns 无返回值
1792
- */
1793
- stopScan(): void;
1794
-
1795
- /**
1796
- * 打开蓝牙设置
1797
- * @returns 无返回值
1798
- */
1799
- openSettings(): void;
1800
-
1801
- }
1802
-
1803
- declare const bluetooth: Bluetooth;
1804
-
1805
- interface Memo {
1806
- /**
1807
- * 创建备忘录
1808
- * @param title 备忘录标题
1809
- * @param content 备忘录内容
1810
- * @param tags 标签列表
1811
- * @returns { success: 是否成功, id: 备忘录ID, memo: 备忘录对象 }
1812
- */
1813
- create(title: string, content: string, tags: any): Record<string, any>;
1814
-
1815
- /**
1816
- * 获取所有备忘录
1817
- * @returns 备忘录数组 [{ id: ID, title: 标题, content: 内容, createdAt: 创建时间, updatedAt: 更新时间, tags: 标签 }]
1818
- */
1819
- getAll(): any;
1820
-
1821
- /**
1822
- * 根据 ID 获取备忘录
1823
- * @param id 备忘录 ID
1824
- * @returns 备忘录对象或 null(不存在时)
1825
- */
1826
- getById(id: string): any;
1827
-
1828
- /**
1829
- * 搜索备忘录(标题和内容)
1830
- * @param keyword 搜索关键词
1831
- * @returns 匹配的备忘录数组
1832
- */
1833
- search(keyword: string): any;
1834
-
1835
- /**
1836
- * 更新备忘录
1837
- * @param id 备忘录 ID
1838
- * @param data 更新数据 { title?: 新标题, content?: 新内容, tags?: 新标签 }
1839
- * @returns { success: 是否成功, id: 备忘录ID }
1840
- */
1841
- update(id: string, data: Record<string, any>): Record<string, any>;
1842
-
1843
- /**
1844
- * 删除备忘录
1845
- * @param id 备忘录 ID
1846
- * @returns { success: 是否成功, id: 已删除的ID }
1847
- */
1848
- delete(id: string): Record<string, any>;
1849
-
1850
- /**
1851
- * 清空所有备忘录
1852
- * @returns { success: 是否成功 }
1853
- */
1854
- clear(): Record<string, any>;
1855
-
1856
- /**
1857
- * 获取备忘录数量
1858
- * @returns 备忘录总数
1859
- */
1860
- count(): number;
1861
-
1862
- }
1863
-
1864
- declare const memo: Memo;
1865
-
1866
1418
  interface System {
1867
1419
  /**
1868
1420
  * 检查 WiFi 是否开启
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dompling/trollscript-types",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "TypeScript definitions for TrollScript",
5
5
  "main": "",
6
6
  "types": "index.d.ts",