Fix custom usage script summaries (#3129)

Co-authored-by: Zihao Han <hanhan3344@users.noreply.github.com>
This commit is contained in:
Zihao Han
2026-05-27 10:50:29 +08:00
committed by GitHub
parent 9c2add9a09
commit 8e21b061cf
7 changed files with 166 additions and 21 deletions
@@ -176,18 +176,18 @@ Interval for automatically refreshing usage data (minutes):
## Extractor Return Format
The extractor function must return an object containing the following fields:
The extractor function returns an object containing the following fields. All fields are optional:
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `isValid` | boolean | No | Whether the account is valid, defaults to true |
| `invalidMessage` | string | No | Message when invalid |
| `remaining` | number | Yes | Remaining balance |
| `unit` | string | Yes | Unit (e.g., USD, CNY, times) |
| `remaining` | number | No | Remaining balance |
| `unit` | string | No | Unit (e.g., USD, CNY, times) |
| `planName` | string | No | Plan name (supports multi-plan) |
| `total` | number | No | Total balance |
| `used` | number | No | Used amount |
| `extra` | object | No | Additional information |
| `extra` | string | No | Additional display text |
## Test Script