@keelcodes/sdk 2.1.0 → 2.1.1

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.
package/dist/account.d.ts CHANGED
@@ -40,7 +40,8 @@ export declare class AccountAPI {
40
40
  /** 按模块签发 key(用户订阅哪个模块,就为哪个模块签发)。 */
41
41
  apikey: {
42
42
  create: (p: ApikeyCreateParams) => Promise<ApikeyResult>;
43
- revoke: (apiKey: string) => Promise<unknown>;
43
+ /** 撤销 key;`id` 为 `GET /v1/account/apikey` 返回的 key id(非明文)。 */
44
+ revoke: (id: string) => Promise<unknown>;
44
45
  };
45
46
  subscription: {
46
47
  get: (module: KeelModule) => Promise<SubscriptionResult>;
package/dist/account.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  // ---------------------------------------------------------------------------
3
- // @keelcodes/sdk — account 模块(3 动作)
3
+ // @keelcodes/sdk — account 模块
4
4
  // ---------------------------------------------------------------------------
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AccountAPI = void 0;
@@ -14,7 +14,8 @@ class AccountAPI {
14
14
  /** 按模块签发 key(用户订阅哪个模块,就为哪个模块签发)。 */
15
15
  this.apikey = {
16
16
  create: (p) => this.http.post('/v1/account/apikey', p),
17
- revoke: (apiKey) => this.http.post('/v1/account/apikey/revoke', { apiKey }),
17
+ /** 撤销 key;`id` 为 `GET /v1/account/apikey` 返回的 key id(非明文)。 */
18
+ revoke: (id) => this.http.post('/v1/account/apikey/revoke', { id }),
18
19
  };
19
20
  this.subscription = {
20
21
  get: (module) => this.http.get('/v1/account/subscription?module=' + module),
package/dist/http.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { KeelConfig } from './types';
2
- /** SDK 版本(契约 §5,基线 2.1.0,随包版本同步)。 */
3
- export declare const SDK_VERSION = "2.1.0";
2
+ /** SDK 版本(契约 §5,基线 2.1.1,随包版本同步)。 */
3
+ export declare const SDK_VERSION = "2.1.1";
4
4
  export declare class HttpClient {
5
5
  private baseUrl;
6
6
  private headers;
package/dist/http.js CHANGED
@@ -5,8 +5,8 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.HttpClient = exports.SDK_VERSION = void 0;
7
7
  const errors_1 = require("./errors");
8
- /** SDK 版本(契约 §5,基线 2.1.0,随包版本同步)。 */
9
- exports.SDK_VERSION = '2.1.0';
8
+ /** SDK 版本(契约 §5,基线 2.1.1,随包版本同步)。 */
9
+ exports.SDK_VERSION = '2.1.1';
10
10
  /**
11
11
  * 钱包签名的复用时长(ms):首次签名后在该窗口内复用,避免每个请求都触发钱包弹窗。
12
12
  * 服务端会话 TTL 为 24h,此处取 1h 留足余量。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keelcodes/sdk",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Keel SDK — unified access to payment / wallet / data / account modules over https://keel.codes",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",