@optima-chat/ads-cli 0.8.1 → 0.9.0
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.
|
@@ -6,17 +6,18 @@ import { getApiClient } from '../../lib/api-client.js';
|
|
|
6
6
|
import { handleError } from '../../utils/errors.js';
|
|
7
7
|
import { getCustomerId } from '../../utils/customer-id.js';
|
|
8
8
|
export const checkCommand = new Command('check')
|
|
9
|
-
.description('
|
|
9
|
+
.description('检查账号配置状态(链接状态、权限等)')
|
|
10
10
|
.action(async () => {
|
|
11
11
|
try {
|
|
12
12
|
const customerId = getCustomerId();
|
|
13
13
|
const client = getApiClient();
|
|
14
14
|
// Check account via backend API
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const checkResult = await client.checkAccount(customerId);
|
|
16
|
+
// New format with status field
|
|
17
17
|
const result = {
|
|
18
18
|
customer_id: checkResult.customerId || customerId,
|
|
19
|
-
|
|
19
|
+
status: checkResult.status || (checkResult.connected ? 'active' : 'not_linked'),
|
|
20
|
+
message: checkResult.message || null,
|
|
20
21
|
info: checkResult.info ? {
|
|
21
22
|
name: checkResult.info.descriptive_name || null,
|
|
22
23
|
currency: checkResult.info.currency_code || null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/commands/account/check.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;KAC7C,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/commands/account/check.ts"],"names":[],"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