@pouchy_ai/admin-sdk 0.15.0 → 0.15.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/CHANGELOG.md +21 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.15.1 — 2026-08-03
|
|
6
|
+
|
|
7
|
+
- **Docs fix: `MonthUsage.mauLimit` prescribed a call that does not compile.**
|
|
8
|
+
0.15.0 documented the account-scope workaround as
|
|
9
|
+
`getUsageHistory({ scope: 'account' })`. `scope` is a **response**
|
|
10
|
+
discriminant the server decides — `GET /usage/history` reads only `months` —
|
|
11
|
+
so the literal fails excess-property checking against the method's own
|
|
12
|
+
declared `{ months?: number }`, and casting past it just appends a query
|
|
13
|
+
parameter nothing reads. The advice is now the call that works: invoke
|
|
14
|
+
`getUsageHistory()` and read the returned `scope`, which is `'account'`
|
|
15
|
+
whenever the server can resolve one and `'project'` when it cannot. Note the
|
|
16
|
+
consequence the old wording hid — there is no way to *force* account scope, so
|
|
17
|
+
a `'project'` series on a multi-project account carries the same
|
|
18
|
+
understatement as `mau` itself.
|
|
19
|
+
|
|
20
|
+
No type or runtime change; every 0.15.0 signature is unchanged.
|
|
21
|
+
|
|
22
|
+
A drift gate now checks every documented `method({ key … })` example in the
|
|
23
|
+
source and the README against the keys that method actually declares, so the
|
|
24
|
+
next piece of prose that outruns the surface fails a merge.
|
|
25
|
+
|
|
5
26
|
## 0.15.0 — 2026-08-03
|
|
6
27
|
|
|
7
28
|
- **`MonthUsage` now types the whole meter, including credits and voice.** The
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ADMIN_SDK_VERSION = "0.15.
|
|
1
|
+
export declare const ADMIN_SDK_VERSION = "0.15.1";
|
|
2
2
|
export declare const DEFAULT_BASE_URL = "https://pouchy.ai/v1/admin";
|
|
3
3
|
/** Deadline for the routes whose server handler declares `maxDuration: 300` —
|
|
4
4
|
* the server's own ceiling plus headroom, so a client abort can only ever mean
|
|
@@ -233,9 +233,16 @@ export interface MonthUsage {
|
|
|
233
233
|
mauTest?: number;
|
|
234
234
|
/** The plan's monthly MAU cap. ACCOUNT-scoped (pooled across the owner's
|
|
235
235
|
* projects) while `mau` above is this project's slice, so `mau / mauLimit`
|
|
236
|
-
* understates consumption on a multi-project account
|
|
237
|
-
*
|
|
238
|
-
* the number the mint gate actually enforces
|
|
236
|
+
* understates consumption on a multi-project account.
|
|
237
|
+
*
|
|
238
|
+
* For the number the mint gate actually enforces, call `getUsageHistory()`
|
|
239
|
+
* and READ its `scope`: the server pools across the account whenever it can
|
|
240
|
+
* resolve one and answers `scope: 'account'`, falling back to this project's
|
|
241
|
+
* own slice (`'project'`) when it cannot. `scope` is a response
|
|
242
|
+
* discriminant, not a request option — there is no parameter that forces
|
|
243
|
+
* account scope, so a series that comes back `'project'` on a multi-project
|
|
244
|
+
* account means the account could not be resolved, and comparing it against
|
|
245
|
+
* `mauLimit` has the same understatement as `mau` does. */
|
|
239
246
|
mauLimit: number;
|
|
240
247
|
sessions: number;
|
|
241
248
|
tokensIn: number;
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// import { createAdminClient } from '@pouchy_ai/admin-sdk';
|
|
9
9
|
// const admin = createAdminClient({ adminKey: process.env.POUCHY_ADMIN_KEY! });
|
|
10
10
|
// const { agents } = await admin.listAgents();
|
|
11
|
-
export const ADMIN_SDK_VERSION = '0.15.
|
|
11
|
+
export const ADMIN_SDK_VERSION = '0.15.1';
|
|
12
12
|
export const DEFAULT_BASE_URL = 'https://pouchy.ai/v1/admin';
|
|
13
13
|
/** Default per-request timeout (ms). A hung upstream otherwise never rejects. */
|
|
14
14
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/admin-sdk",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Typed TypeScript client for the Pouchy Admin API \u2014 manage agents, keys, end users, knowledge, skills, channels, schedules, webhooks and credentials headlessly, with a project Admin key.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|