@narrative.io/data-collaboration-sdk-ts 2.102.0 → 2.103.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/build/agents/index.d.ts +7 -0
- package/build/agents/index.js +8 -0
- package/package.json +1 -1
package/build/agents/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseApi } from "../base-api";
|
|
2
|
+
import type { ApiRecordsV2, PaginationOptions } from "../types";
|
|
2
3
|
import type { ConversationId, ConversationResponse, CreateConversationRequest, CreateRunRequest, ListMessagesResponse, RunId, RunResponse } from "./types";
|
|
3
4
|
export * from "./types";
|
|
4
5
|
/**
|
|
@@ -17,6 +18,12 @@ export declare class AgentsApi extends BaseApi {
|
|
|
17
18
|
* are pinned at creation; everything else in `defaults` is overridable per-run.
|
|
18
19
|
*/
|
|
19
20
|
createAgentConversation(request: CreateConversationRequest): Promise<ConversationResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* List the calling user's agent conversations, newest first by `created_at`.
|
|
23
|
+
* Scoped to both `company_id` and `user_id` from the bearer token — peers in
|
|
24
|
+
* the same company are not visible. Never 404s; empty state is `records: []`.
|
|
25
|
+
*/
|
|
26
|
+
listAgentConversations(options?: PaginationOptions): Promise<ApiRecordsV2<ConversationResponse>>;
|
|
20
27
|
/**
|
|
21
28
|
* Read a conversation's metadata + current `version`. Always re-read this
|
|
22
29
|
* immediately before starting a run — `version` is the compare-and-swap
|
package/build/agents/index.js
CHANGED
|
@@ -21,6 +21,14 @@ export class AgentsApi extends BaseApi {
|
|
|
21
21
|
async createAgentConversation(request) {
|
|
22
22
|
return await this.post(conversationsResource, request);
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* List the calling user's agent conversations, newest first by `created_at`.
|
|
26
|
+
* Scoped to both `company_id` and `user_id` from the bearer token — peers in
|
|
27
|
+
* the same company are not visible. Never 404s; empty state is `records: []`.
|
|
28
|
+
*/
|
|
29
|
+
async listAgentConversations(options) {
|
|
30
|
+
return await this.get(conversationsResource, options ? { ...options } : undefined);
|
|
31
|
+
}
|
|
24
32
|
/**
|
|
25
33
|
* Read a conversation's metadata + current `version`. Always re-read this
|
|
26
34
|
* immediately before starting a run — `version` is the compare-and-swap
|