mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
Merge pull request #76 from budiga/token-plan-openapi
Token plan openapi
This commit is contained in:
@@ -124,7 +124,7 @@ bl quota request --model qwen3.6-plus --tpm 6000000 # 申请临时 TPM 提额
|
||||
bl quota history # 查看提额历史记录
|
||||
|
||||
# Token Plan 团队版管理(需 AK/SK,见下方认证说明)
|
||||
bl token-plan seats # 查看订阅席位明细
|
||||
bl token-plan list-seats # 查看订阅席位明细
|
||||
bl token-plan add-member --account-name dev --org-id org_xxx
|
||||
bl token-plan assign-seats --workspace-id ws_xxx --seat-type standard --account-id acc_xxx
|
||||
bl token-plan create-key --account-id acc_xxx --workspace-id ws_xxx
|
||||
|
||||
@@ -46,10 +46,10 @@ import quotaList from "./quota/list.ts";
|
||||
import quotaRequest from "./quota/request.ts";
|
||||
import quotaHistory from "./quota/history.ts";
|
||||
import quotaCheck from "./quota/check.ts";
|
||||
import tokenplanSeats from "./token-plan/seats.ts";
|
||||
import tokenplanCreateKey from "./token-plan/create-key.ts";
|
||||
import tokenplanAssignSeats from "./token-plan/assign-seats.ts";
|
||||
import tokenplanAddMember from "./token-plan/add-member.ts";
|
||||
import tokenPlanListSeats from "./token-plan/list-seats.ts";
|
||||
import tokenPlanCreateKey from "./token-plan/create-key.ts";
|
||||
import tokenPlanAssignSeats from "./token-plan/assign-seats.ts";
|
||||
import tokenPlanAddMember from "./token-plan/add-member.ts";
|
||||
|
||||
/** Command registry map (no dependency on registry.ts — safe for build-time import). */
|
||||
export const commands: Record<string, Command> = {
|
||||
@@ -98,9 +98,9 @@ export const commands: Record<string, Command> = {
|
||||
"quota request": quotaRequest,
|
||||
"quota history": quotaHistory,
|
||||
"quota check": quotaCheck,
|
||||
"token-plan seats": tokenplanSeats,
|
||||
"token-plan create-key": tokenplanCreateKey,
|
||||
"token-plan assign-seats": tokenplanAssignSeats,
|
||||
"token-plan add-member": tokenplanAddMember,
|
||||
"token-plan list-seats": tokenPlanListSeats,
|
||||
"token-plan create-key": tokenPlanCreateKey,
|
||||
"token-plan assign-seats": tokenPlanAssignSeats,
|
||||
"token-plan add-member": tokenPlanAddMember,
|
||||
update: update,
|
||||
};
|
||||
|
||||
+5
-5
@@ -23,9 +23,9 @@ const API_ACTION = "GetSubscriptionSeatDetails";
|
||||
const API_PATH = "/tokenplan/subscription/seat-detail";
|
||||
|
||||
export default defineCommand({
|
||||
name: "token-plan seats",
|
||||
name: "token-plan list-seats",
|
||||
description: "List Token Plan subscription seat details",
|
||||
usage: "bl token-plan seats [flags]",
|
||||
usage: "bl token-plan list-seats [flags]",
|
||||
options: [
|
||||
{ flag: "--page-no <n>", description: "Page number (default: 1)", type: "number" },
|
||||
{ flag: "--page-size <n>", description: "Page size (default: 10)", type: "number" },
|
||||
@@ -52,9 +52,9 @@ export default defineCommand({
|
||||
...TOKEN_PLAN_AK_OPTIONS,
|
||||
],
|
||||
examples: [
|
||||
"bl token-plan seats",
|
||||
"bl token-plan seats --page-size 20 --status NORMAL",
|
||||
"bl token-plan seats --query-assigned true --seat-type standard",
|
||||
"bl token-plan list-seats",
|
||||
"bl token-plan list-seats --page-size 20 --status NORMAL",
|
||||
"bl token-plan list-seats --query-assigned true --seat-type standard",
|
||||
],
|
||||
async run(config: Config, flags: GlobalFlags) {
|
||||
const format = detectOutputFormat(config.output);
|
||||
@@ -48,7 +48,7 @@ Use this index for the full quick index and global flags.
|
||||
| `bl token-plan add-member` | Add a member to a Token Plan organization | [token-plan.md](token-plan.md) |
|
||||
| `bl token-plan assign-seats` | Batch assign Token Plan seats to members | [token-plan.md](token-plan.md) |
|
||||
| `bl token-plan create-key` | Create a Token Plan API key for a seat | [token-plan.md](token-plan.md) |
|
||||
| `bl token-plan seats` | List Token Plan subscription seat details | [token-plan.md](token-plan.md) |
|
||||
| `bl token-plan list-seats` | List Token Plan subscription seat details | [token-plan.md](token-plan.md) |
|
||||
| `bl update` | Update bl to the latest version | [update.md](update.md) |
|
||||
| `bl usage free` | Query free-tier quota for models (all models if --model is omitted) | [usage.md](usage.md) |
|
||||
| `bl usage freetier` | Enable or disable auto-stop for free-tier models. Enables by default; use --off to disable | [usage.md](usage.md) |
|
||||
@@ -81,7 +81,7 @@ Use this index for the full quick index and global flags.
|
||||
| `search` | `web` | [search.md](search.md) |
|
||||
| `speech` | `recognize`, `synthesize` | [speech.md](speech.md) |
|
||||
| `text` | `chat` | [text.md](text.md) |
|
||||
| `token-plan` | `add-member`, `assign-seats`, `create-key`, `seats` | [token-plan.md](token-plan.md) |
|
||||
| `token-plan` | `add-member`, `assign-seats`, `create-key`, `list-seats` | [token-plan.md](token-plan.md) |
|
||||
| `update` | `(root)` | [update.md](update.md) |
|
||||
| `usage` | `free`, `freetier`, `stats` | [usage.md](usage.md) |
|
||||
| `video` | `download`, `edit`, `generate`, `ref`, `task get` | [video.md](video.md) |
|
||||
|
||||
@@ -12,7 +12,7 @@ Index: [index.md](index.md)
|
||||
| `bl token-plan add-member` | Add a member to a Token Plan organization |
|
||||
| `bl token-plan assign-seats` | Batch assign Token Plan seats to members |
|
||||
| `bl token-plan create-key` | Create a Token Plan API key for a seat |
|
||||
| `bl token-plan seats` | List Token Plan subscription seat details |
|
||||
| `bl token-plan list-seats` | List Token Plan subscription seat details |
|
||||
|
||||
## Command details
|
||||
|
||||
@@ -112,13 +112,13 @@ bl token-plan create-key --account-id acc_123 --workspace-id ws_456
|
||||
bl token-plan create-key --account-id acc_123 --workspace-id ws_456 --description 'Dev key'
|
||||
```
|
||||
|
||||
### `bl token-plan seats`
|
||||
### `bl token-plan list-seats`
|
||||
|
||||
| Field | Value |
|
||||
| --------------- | ----------------------------------------- |
|
||||
| **Name** | `token-plan seats` |
|
||||
| **Name** | `token-plan list-seats` |
|
||||
| **Description** | List Token Plan subscription seat details |
|
||||
| **Usage** | `bl token-plan seats [flags]` |
|
||||
| **Usage** | `bl token-plan list-seats [flags]` |
|
||||
|
||||
#### Options
|
||||
|
||||
@@ -139,13 +139,13 @@ bl token-plan create-key --account-id acc_123 --workspace-id ws_456 --descriptio
|
||||
#### Examples
|
||||
|
||||
```bash
|
||||
bl token-plan seats
|
||||
bl token-plan list-seats
|
||||
```
|
||||
|
||||
```bash
|
||||
bl token-plan seats --page-size 20 --status NORMAL
|
||||
bl token-plan list-seats --page-size 20 --status NORMAL
|
||||
```
|
||||
|
||||
```bash
|
||||
bl token-plan seats --query-assigned true --seat-type standard
|
||||
bl token-plan list-seats --query-assigned true --seat-type standard
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user