@amigo-ai/platform-sdk 0.39.0 → 0.41.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.
- package/api.md +5 -0
- package/dist/index.cjs +52 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -0
- package/dist/index.mjs.map +3 -3
- package/dist/resources/prompt-logs.js +86 -0
- package/dist/resources/prompt-logs.js.map +1 -0
- package/dist/types/generated/api.d.ts +30 -2
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +3 -1
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/prompt-logs.d.ts +76 -0
- package/dist/types/resources/prompt-logs.d.ts.map +1 -0
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/package.json +1 -1
package/api.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1519,6 +1519,56 @@ var OperatorsResource = class extends WorkspaceScopedResource {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
|
+
// src/resources/prompt-logs.ts
|
|
1523
|
+
var PromptLogsResource = class extends WorkspaceScopedResource {
|
|
1524
|
+
/**
|
|
1525
|
+
* One page of prompt-log entries, newest-first.
|
|
1526
|
+
*
|
|
1527
|
+
* When ``params.conversation_id`` is supplied, the response surfaces
|
|
1528
|
+
* ``resolved_call_sid`` (the call_sid the lookup mapped to) and
|
|
1529
|
+
* ``resolved_conversation_kind`` (``"call"`` for voice/sim/scribe,
|
|
1530
|
+
* ``"conversation"`` for text/sms/whatsapp/email) so you can drill
|
|
1531
|
+
* into per-call surfaces afterward without re-querying
|
|
1532
|
+
* ``world.entities``.
|
|
1533
|
+
*
|
|
1534
|
+
* When no selectivity-bearing filter is supplied (no conversation_id /
|
|
1535
|
+
* call_sid / time range), the query is auto-capped to the last 7 days.
|
|
1536
|
+
* The applied window is reported in ``applied_time_window_days``.
|
|
1537
|
+
*/
|
|
1538
|
+
async list(params) {
|
|
1539
|
+
return extractData(
|
|
1540
|
+
await this.client.GET("/v1/{workspace_id}/prompt-logs", {
|
|
1541
|
+
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
1542
|
+
})
|
|
1543
|
+
);
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Auto-paginating async iterator over prompt-log entries. Walks
|
|
1547
|
+
* ``next_offset`` until ``has_more`` is false, yielding individual
|
|
1548
|
+
* entries. Use this when consuming logs at scale (e.g. nightly
|
|
1549
|
+
* backfills) rather than rendering one page in a UI.
|
|
1550
|
+
*
|
|
1551
|
+
* Bounded by the same per-call hard caps as ``list`` (200 items per
|
|
1552
|
+
* page, 10,000 cumulative offset).
|
|
1553
|
+
*/
|
|
1554
|
+
async *listAutoPaging(params) {
|
|
1555
|
+
let offset = 0;
|
|
1556
|
+
while (true) {
|
|
1557
|
+
const page = await this.list({ ...params, offset });
|
|
1558
|
+
for (const entry of page.items) {
|
|
1559
|
+
yield entry;
|
|
1560
|
+
}
|
|
1561
|
+
if (!page.has_more || page.next_offset == null) {
|
|
1562
|
+
return;
|
|
1563
|
+
}
|
|
1564
|
+
if (page.next_offset === offset) {
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
offset = page.next_offset;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1522
1572
|
// src/resources/triggers.ts
|
|
1523
1573
|
var TriggersResource = class extends WorkspaceScopedResource {
|
|
1524
1574
|
async list(params) {
|
|
@@ -6174,6 +6224,7 @@ var AmigoClient = class _AmigoClient {
|
|
|
6174
6224
|
skills;
|
|
6175
6225
|
actions;
|
|
6176
6226
|
operators;
|
|
6227
|
+
promptLogs;
|
|
6177
6228
|
triggers;
|
|
6178
6229
|
services;
|
|
6179
6230
|
contextGraphs;
|
|
@@ -6315,6 +6366,7 @@ var AmigoClient = class _AmigoClient {
|
|
|
6315
6366
|
mutable.skills = new SkillsResource(client, workspaceId2);
|
|
6316
6367
|
mutable.actions = new ActionsResource(client, workspaceId2);
|
|
6317
6368
|
mutable.operators = new OperatorsResource(client, workspaceId2);
|
|
6369
|
+
mutable.promptLogs = new PromptLogsResource(client, workspaceId2);
|
|
6318
6370
|
mutable.triggers = new TriggersResource(client, workspaceId2);
|
|
6319
6371
|
mutable.services = new ServicesResource(client, workspaceId2);
|
|
6320
6372
|
mutable.contextGraphs = new ContextGraphsResource(client, workspaceId2);
|