Skip to content

Commit 13aebb4

Browse files
🔄 Sync from private repository - 2026-04-01 08:46:00
1 parent 0859e77 commit 13aebb4

13 files changed

Lines changed: 557 additions & 92 deletions

File tree

API.en.md

Lines changed: 104 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ Read file content
442442

443443
| Name | Type | Description | Optional |
444444
|------|------|-------------|----------|
445-
| `path` | `string` | Absolute file path | No |
445+
| `path` | `string` | Absolute path, or relative path resolved under Documents | No |
446446

447447
**Returns:** `string`
448448

@@ -460,7 +460,7 @@ Write content to a file
460460

461461
| Name | Type | Description | Optional |
462462
|------|------|-------------|----------|
463-
| `path` | `string` | Absolute file path | No |
463+
| `path` | `string` | Absolute path, or relative path resolved under Documents | No |
464464
| `content` | `string` | The content to be written | No |
465465

466466
**Returns:** `boolean`
@@ -479,7 +479,7 @@ Append content to a file
479479

480480
| Name | Type | Description | Optional |
481481
|------|------|-------------|----------|
482-
| `path` | `string` | Absolute file path | No |
482+
| `path` | `string` | Absolute path, or relative path resolved under Documents | No |
483483
| `content` | `string` | The content to be appended | No |
484484

485485
**Returns:** `boolean`
@@ -498,7 +498,7 @@ Check if a file exists
498498

499499
| Name | Type | Description | Optional |
500500
|------|------|-------------|----------|
501-
| `path` | `string` | Absolute file path | No |
501+
| `path` | `string` | Absolute path, or relative path resolved under Documents | No |
502502

503503
**Returns:** `boolean`
504504

@@ -516,7 +516,7 @@ Delete a file
516516

517517
| Name | Type | Description | Optional |
518518
|------|------|-------------|----------|
519-
| `path` | `string` | Absolute file path | No |
519+
| `path` | `string` | Absolute path, or relative path resolved under Documents | No |
520520

521521
**Returns:** `boolean`
522522

@@ -946,7 +946,7 @@ Download a file (async, returns Promise)
946946

947947
**Returns:** `Promise<{ success: boolean, path?: string, error?: string }>`
948948

949-
*Returns a Promise that resolves with success status and local file path*
949+
*Returns a Promise that resolves with success status and local file path. Set sync: true for synchronous mode*
950950

951951
---
952952

@@ -2300,6 +2300,20 @@ Request location access permissions
23002300

23012301
---
23022302

2303+
### `location.requestAccessAsync`
2304+
2305+
![Not Supported](https://img.shields.io/badge/Trigger-None-red)
2306+
2307+
**Signature:** `requestAccessAsync()`
2308+
2309+
Request location access permissions asynchronously
2310+
2311+
**Returns:** `Promise<void>`
2312+
2313+
*Promise resolved after the permission flow finishes*
2314+
2315+
---
2316+
23032317
### `location.getAccessStatus`
23042318

23052319
**Signature:** `getAccessStatus()`
@@ -2336,6 +2350,18 @@ Retrieve current geographic location
23362350

23372351
---
23382352

2353+
### `location.getCurrentAsync`
2354+
2355+
**Signature:** `getCurrentAsync()`
2356+
2357+
Retrieve current geographic location asynchronously
2358+
2359+
**Returns:** `Promise<{ lat: number, lng: number, alt: number, course: number, speed: number, accuracy: number, timestamp: number } \| null>`
2360+
2361+
*Promise resolved with location data object, or null if failed*
2362+
2363+
---
2364+
23392365
### `location.current`
23402366

23412367
**Signature:** `current()`
@@ -2387,6 +2413,24 @@ Geocoding: Address to coordinates
23872413

23882414
---
23892415

2416+
### `location.geocodeAsync`
2417+
2418+
**Signature:** `geocodeAsync(address)`
2419+
2420+
Geocoding asynchronously: Address to coordinates
2421+
2422+
**Parameters:**
2423+
2424+
| Name | Type | Description | Optional |
2425+
|------|------|-------------|----------|
2426+
| `address` | `string` | Target address string | No |
2427+
2428+
**Returns:** `Promise<[{ lat: number, lng: number, name: string }]>`
2429+
2430+
*Promise resolved with an array of geographic location objects*
2431+
2432+
---
2433+
23902434
### `location.reverseGeocode`
23912435

23922436
**Signature:** `reverseGeocode(lat, lng, locale?)`
@@ -2407,6 +2451,26 @@ Reverse Geocoding: Coordinates to address
24072451

24082452
---
24092453

2454+
### `location.reverseGeocodeAsync`
2455+
2456+
**Signature:** `reverseGeocodeAsync(lat, lng, locale?)`
2457+
2458+
Reverse Geocoding asynchronously: Coordinates to address
2459+
2460+
**Parameters:**
2461+
2462+
| Name | Type | Description | Optional |
2463+
|------|------|-------------|----------|
2464+
| `lat` | `number` | Latitude | No |
2465+
| `lng` | `number` | Longitude | No |
2466+
| `locale` | `string` | Locale identifier (optional, e.g., 'en_US', defaults to system language) | Yes |
2467+
2468+
**Returns:** `Promise<[{ name: string, country: string, locality: string, administrativeArea: string, subLocality: string, thoroughfare: string, postalCode: string }]>`
2469+
2470+
*Promise resolved with an array of address information objects*
2471+
2472+
---
2473+
24102474
### `location.isLocationServicesEnabled`
24112475

24122476
**Signature:** `isLocationServicesEnabled()`
@@ -2451,6 +2515,26 @@ Toggle system location services (Requires TrollStore)
24512515

24522516
---
24532517

2518+
### `location.setLocationServicesEnabledAsync`
2519+
2520+
![Full Support](https://img.shields.io/badge/Trigger-Full-brightgreen)
2521+
2522+
**Signature:** `setLocationServicesEnabledAsync(enabled)`
2523+
2524+
Toggle system location services asynchronously (Requires TrollStore)
2525+
2526+
**Parameters:**
2527+
2528+
| Name | Type | Description | Optional |
2529+
|------|------|-------------|----------|
2530+
| `enabled` | `boolean` | True to enable, false to disable | No |
2531+
2532+
**Returns:** `Promise<{ success: boolean, enabled?: boolean, message?: string }>`
2533+
2534+
*Promise resolved with operation result*
2535+
2536+
---
2537+
24542538
### `location.toggleLocationServices`
24552539

24562540
![Full Support](https://img.shields.io/badge/Trigger-Full-brightgreen)
@@ -2465,6 +2549,20 @@ Switch location services state (Requires TrollStore)
24652549

24662550
---
24672551

2552+
### `location.toggleLocationServicesAsync`
2553+
2554+
![Full Support](https://img.shields.io/badge/Trigger-Full-brightgreen)
2555+
2556+
**Signature:** `toggleLocationServicesAsync()`
2557+
2558+
Switch location services state asynchronously (Requires TrollStore)
2559+
2560+
**Returns:** `Promise<{ success: boolean, enabled?: boolean, message?: string }>`
2561+
2562+
*Promise resolved with operation result*
2563+
2564+
---
2565+
24682566
## calendar
24692567

24702568
![Limited Support](https://img.shields.io/badge/Trigger-Limited-orange)

API.md

Lines changed: 104 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ iCloud 文件操作
441441

442442
| Name | Type | Description | Optional |
443443
|------|------|-------------|----------|
444-
| `path` | `string` | 文件绝对路径 | No |
444+
| `path` | `string` | 绝对路径,或自动解析到 Documents 下的相对路径 | No |
445445

446446
**Returns:** `string`
447447

@@ -459,7 +459,7 @@ iCloud 文件操作
459459

460460
| Name | Type | Description | Optional |
461461
|------|------|-------------|----------|
462-
| `path` | `string` | 文件绝对路径 | No |
462+
| `path` | `string` | 绝对路径,或自动解析到 Documents 下的相对路径 | No |
463463
| `content` | `string` | 要写入的内容 | No |
464464

465465
**Returns:** `boolean`
@@ -478,7 +478,7 @@ iCloud 文件操作
478478

479479
| Name | Type | Description | Optional |
480480
|------|------|-------------|----------|
481-
| `path` | `string` | 文件绝对路径 | No |
481+
| `path` | `string` | 绝对路径,或自动解析到 Documents 下的相对路径 | No |
482482
| `content` | `string` | 要追加的内容 | No |
483483

484484
**Returns:** `boolean`
@@ -497,7 +497,7 @@ iCloud 文件操作
497497

498498
| Name | Type | Description | Optional |
499499
|------|------|-------------|----------|
500-
| `path` | `string` | 文件绝对路径 | No |
500+
| `path` | `string` | 绝对路径,或自动解析到 Documents 下的相对路径 | No |
501501

502502
**Returns:** `boolean`
503503

@@ -515,7 +515,7 @@ iCloud 文件操作
515515

516516
| Name | Type | Description | Optional |
517517
|------|------|-------------|----------|
518-
| `path` | `string` | 文件绝对路径 | No |
518+
| `path` | `string` | 绝对路径,或自动解析到 Documents 下的相对路径 | No |
519519

520520
**Returns:** `boolean`
521521

@@ -945,7 +945,7 @@ iCloud 文件操作
945945

946946
**Returns:** `Promise<{ success: boolean, path?: string, error?: string }>`
947947

948-
*返回 Promise,resolve 时包含成功状态和本地文件路径*
948+
*返回 Promise,resolve 时包含成功状态和本地文件路径。设置 sync: true 可使用同步模式*
949949

950950
---
951951

@@ -2299,6 +2299,20 @@ Base64 解码
22992299

23002300
---
23012301

2302+
### `location.requestAccessAsync`
2303+
2304+
![Not Supported](https://img.shields.io/badge/Trigger-None-red)
2305+
2306+
**Signature:** `requestAccessAsync()`
2307+
2308+
异步请求定位权限
2309+
2310+
**Returns:** `Promise<void>`
2311+
2312+
*权限流程完成后 resolve*
2313+
2314+
---
2315+
23022316
### `location.getAccessStatus`
23032317

23042318
**Signature:** `getAccessStatus()`
@@ -2335,6 +2349,18 @@ Base64 解码
23352349

23362350
---
23372351

2352+
### `location.getCurrentAsync`
2353+
2354+
**Signature:** `getCurrentAsync()`
2355+
2356+
异步获取当前位置
2357+
2358+
**Returns:** `Promise<{ lat: number, lng: number, alt: number, course: number, speed: number, accuracy: number, timestamp: number } \| null>`
2359+
2360+
*resolve 时返回位置信息对象,失败返回 null*
2361+
2362+
---
2363+
23382364
### `location.current`
23392365

23402366
**Signature:** `current()`
@@ -2386,6 +2412,24 @@ Base64 解码
23862412

23872413
---
23882414

2415+
### `location.geocodeAsync`
2416+
2417+
**Signature:** `geocodeAsync(address)`
2418+
2419+
异步地址转坐标
2420+
2421+
**Parameters:**
2422+
2423+
| Name | Type | Description | Optional |
2424+
|------|------|-------------|----------|
2425+
| `address` | `string` | 地址字符串 | No |
2426+
2427+
**Returns:** `Promise<[{ lat: number, lng: number, name: string }]>`
2428+
2429+
*resolve 时返回地理位置对象数组*
2430+
2431+
---
2432+
23892433
### `location.reverseGeocode`
23902434

23912435
**Signature:** `reverseGeocode(lat, lng, locale?)`
@@ -2406,6 +2450,26 @@ Base64 解码
24062450

24072451
---
24082452

2453+
### `location.reverseGeocodeAsync`
2454+
2455+
**Signature:** `reverseGeocodeAsync(lat, lng, locale?)`
2456+
2457+
异步坐标转地址
2458+
2459+
**Parameters:**
2460+
2461+
| Name | Type | Description | Optional |
2462+
|------|------|-------------|----------|
2463+
| `lat` | `number` | 纬度 | No |
2464+
| `lng` | `number` | 经度 | No |
2465+
| `locale` | `string` | 语言区域标识(可选,如 'zh_CN'、'en_US',默认使用系统语言) | Yes |
2466+
2467+
**Returns:** `Promise<[{ name: string, country: string, locality: string, administrativeArea: string, subLocality: string, thoroughfare: string, postalCode: string }]>`
2468+
2469+
*resolve 时返回地址信息对象数组*
2470+
2471+
---
2472+
24092473
### `location.isLocationServicesEnabled`
24102474

24112475
**Signature:** `isLocationServicesEnabled()`
@@ -2450,6 +2514,26 @@ Base64 解码
24502514

24512515
---
24522516

2517+
### `location.setLocationServicesEnabledAsync`
2518+
2519+
![Full Support](https://img.shields.io/badge/Trigger-Full-brightgreen)
2520+
2521+
**Signature:** `setLocationServicesEnabledAsync(enabled)`
2522+
2523+
异步开关系统定位服务(需要 TrollStore 权限)
2524+
2525+
**Parameters:**
2526+
2527+
| Name | Type | Description | Optional |
2528+
|------|------|-------------|----------|
2529+
| `enabled` | `boolean` | true 开启,false 关闭 | No |
2530+
2531+
**Returns:** `Promise<{ success: boolean, enabled?: boolean, message?: string }>`
2532+
2533+
*resolve 时返回操作结果*
2534+
2535+
---
2536+
24532537
### `location.toggleLocationServices`
24542538

24552539
![Full Support](https://img.shields.io/badge/Trigger-Full-brightgreen)
@@ -2464,6 +2548,20 @@ Base64 解码
24642548

24652549
---
24662550

2551+
### `location.toggleLocationServicesAsync`
2552+
2553+
![Full Support](https://img.shields.io/badge/Trigger-Full-brightgreen)
2554+
2555+
**Signature:** `toggleLocationServicesAsync()`
2556+
2557+
异步切换定位服务状态(需要 TrollStore 权限)
2558+
2559+
**Returns:** `Promise<{ success: boolean, enabled?: boolean, message?: string }>`
2560+
2561+
*resolve 时返回操作结果*
2562+
2563+
---
2564+
24672565
## calendar
24682566

24692567
![Limited Support](https://img.shields.io/badge/Trigger-Limited-orange)

TrollScript-Private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 3f3063bc41031131e6b082d5fbcade16bbbed53d
1+
Subproject commit c624fb1bc54949ff6e403dfc1dd885e9eb9459e1

0 commit comments

Comments
 (0)