@zavudev/sdk 0.55.0 → 0.56.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/CHANGELOG.md +8 -0
- package/client.d.mts +25 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +25 -10
- package/client.d.ts.map +1 -1
- package/client.js +15 -0
- package/client.js.map +1 -1
- package/client.mjs +15 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-templates.d.mts +97 -0
- package/resources/agent-templates.d.mts.map +1 -0
- package/resources/agent-templates.d.ts +97 -0
- package/resources/agent-templates.d.ts.map +1 -0
- package/resources/agent-templates.js +39 -0
- package/resources/agent-templates.js.map +1 -0
- package/resources/agent-templates.mjs +35 -0
- package/resources/agent-templates.mjs.map +1 -0
- package/resources/agents/agents.d.mts +462 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +462 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +129 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +124 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/index.d.mts +3 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +3 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/agents/index.js +9 -0
- package/resources/agents/index.js.map +1 -0
- package/resources/agents/index.mjs +4 -0
- package/resources/agents/index.mjs.map +1 -0
- package/resources/agents/senders.d.mts +54 -0
- package/resources/agents/senders.d.mts.map +1 -0
- package/resources/agents/senders.d.ts +54 -0
- package/resources/agents/senders.d.ts.map +1 -0
- package/resources/agents/senders.js +45 -0
- package/resources/agents/senders.js.map +1 -0
- package/resources/agents/senders.mjs +41 -0
- package/resources/agents/senders.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +6 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +3 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/calls.d.mts +530 -0
- package/resources/calls.d.mts.map +1 -0
- package/resources/calls.d.ts +530 -0
- package/resources/calls.d.ts.map +1 -0
- package/resources/calls.js +76 -0
- package/resources/calls.js.map +1 -0
- package/resources/calls.mjs +72 -0
- package/resources/calls.mjs.map +1 -0
- package/resources/conversations.d.mts +360 -0
- package/resources/conversations.d.mts.map +1 -0
- package/resources/conversations.d.ts +360 -0
- package/resources/conversations.d.ts.map +1 -0
- package/resources/conversations.js +47 -0
- package/resources/conversations.js.map +1 -0
- package/resources/conversations.mjs +43 -0
- package/resources/conversations.mjs.map +1 -0
- package/resources/email-domains.d.mts +260 -0
- package/resources/email-domains.d.mts.map +1 -0
- package/resources/email-domains.d.ts +260 -0
- package/resources/email-domains.d.ts.map +1 -0
- package/resources/email-domains.js +77 -0
- package/resources/email-domains.js.map +1 -0
- package/resources/email-domains.mjs +73 -0
- package/resources/email-domains.mjs.map +1 -0
- package/resources/functions/functions.d.mts +122 -1
- package/resources/functions/functions.d.mts.map +1 -1
- package/resources/functions/functions.d.ts +122 -1
- package/resources/functions/functions.d.ts.map +1 -1
- package/resources/functions/functions.js +53 -0
- package/resources/functions/functions.js.map +1 -1
- package/resources/functions/functions.mjs +53 -0
- package/resources/functions/functions.mjs.map +1 -1
- package/resources/functions/git-link.d.mts +295 -0
- package/resources/functions/git-link.d.mts.map +1 -0
- package/resources/functions/git-link.d.ts +295 -0
- package/resources/functions/git-link.d.ts.map +1 -0
- package/resources/functions/git-link.js +97 -0
- package/resources/functions/git-link.js.map +1 -0
- package/resources/functions/git-link.mjs +93 -0
- package/resources/functions/git-link.mjs.map +1 -0
- package/resources/functions/index.d.mts +3 -1
- package/resources/functions/index.d.mts.map +1 -1
- package/resources/functions/index.d.ts +3 -1
- package/resources/functions/index.d.ts.map +1 -1
- package/resources/functions/index.js +5 -1
- package/resources/functions/index.js.map +1 -1
- package/resources/functions/index.mjs +2 -0
- package/resources/functions/index.mjs.map +1 -1
- package/resources/functions/triggers.d.mts +164 -0
- package/resources/functions/triggers.d.mts.map +1 -0
- package/resources/functions/triggers.d.ts +164 -0
- package/resources/functions/triggers.d.ts.map +1 -0
- package/resources/functions/triggers.js +74 -0
- package/resources/functions/triggers.js.map +1 -0
- package/resources/functions/triggers.mjs +70 -0
- package/resources/functions/triggers.mjs.map +1 -0
- package/resources/index.d.mts +10 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/introspect.d.mts +74 -1
- package/resources/introspect.d.mts.map +1 -1
- package/resources/introspect.d.ts +74 -1
- package/resources/introspect.d.ts.map +1 -1
- package/resources/introspect.js +22 -0
- package/resources/introspect.js.map +1 -1
- package/resources/introspect.mjs +22 -0
- package/resources/introspect.mjs.map +1 -1
- package/resources/messages.d.mts +54 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +54 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +18 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +18 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/senders/agent/agent.d.mts +4 -3
- package/resources/senders/agent/agent.d.mts.map +1 -1
- package/resources/senders/agent/agent.d.ts +4 -3
- package/resources/senders/agent/agent.d.ts.map +1 -1
- package/resources/senders/agent/agent.js +2 -2
- package/resources/senders/agent/agent.js.map +1 -1
- package/resources/senders/agent/agent.mjs +2 -2
- package/resources/senders/agent/agent.mjs.map +1 -1
- package/resources/senders/agent/index.d.mts +2 -2
- package/resources/senders/agent/index.d.mts.map +1 -1
- package/resources/senders/agent/index.d.ts +2 -2
- package/resources/senders/agent/index.d.ts.map +1 -1
- package/resources/senders/agent/index.js +2 -2
- package/resources/senders/agent/index.js.map +1 -1
- package/resources/senders/agent/index.mjs +1 -1
- package/resources/senders/agent/index.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.d.mts +56 -1
- package/resources/senders/agent/knowledge-bases/documents.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.d.ts +56 -1
- package/resources/senders/agent/knowledge-bases/documents.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.js +33 -0
- package/resources/senders/agent/knowledge-bases/documents.js.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.mjs +33 -0
- package/resources/senders/agent/knowledge-bases/documents.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.mts +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.ts +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.js.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts +2 -2
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts +2 -2
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.js.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs.map +1 -1
- package/resources/senders/agent/tools/index.d.mts +3 -0
- package/resources/senders/agent/tools/index.d.mts.map +1 -0
- package/resources/senders/agent/tools/index.d.ts +3 -0
- package/resources/senders/agent/tools/index.d.ts.map +1 -0
- package/resources/senders/agent/tools/index.js +9 -0
- package/resources/senders/agent/tools/index.js.map +1 -0
- package/resources/senders/agent/tools/index.mjs +4 -0
- package/resources/senders/agent/tools/index.mjs.map +1 -0
- package/resources/senders/agent/tools/tools.d.mts +338 -0
- package/resources/senders/agent/tools/tools.d.mts.map +1 -0
- package/resources/senders/agent/tools/tools.d.ts +338 -0
- package/resources/senders/agent/tools/tools.d.ts.map +1 -0
- package/resources/senders/agent/tools/tools.js +163 -0
- package/resources/senders/agent/tools/tools.js.map +1 -0
- package/resources/senders/agent/tools/tools.mjs +158 -0
- package/resources/senders/agent/tools/tools.mjs.map +1 -0
- package/resources/senders/agent/tools/webhook.d.mts +28 -0
- package/resources/senders/agent/tools/webhook.d.mts.map +1 -0
- package/resources/senders/agent/tools/webhook.d.ts +28 -0
- package/resources/senders/agent/tools/webhook.d.ts.map +1 -0
- package/resources/senders/agent/tools/webhook.js +28 -0
- package/resources/senders/agent/tools/webhook.js.map +1 -0
- package/resources/senders/agent/tools/webhook.mjs +24 -0
- package/resources/senders/agent/tools/webhook.mjs.map +1 -0
- package/resources/senders/agent/tools.d.mts +1 -270
- package/resources/senders/agent/tools.d.mts.map +1 -1
- package/resources/senders/agent/tools.d.ts +1 -270
- package/resources/senders/agent/tools.d.ts.map +1 -1
- package/resources/senders/agent/tools.js +2 -131
- package/resources/senders/agent/tools.js.map +1 -1
- package/resources/senders/agent/tools.mjs +1 -129
- package/resources/senders/agent/tools.mjs.map +1 -1
- package/resources/senders/index.d.mts +2 -1
- package/resources/senders/index.d.mts.map +1 -1
- package/resources/senders/index.d.ts +2 -1
- package/resources/senders/index.d.ts.map +1 -1
- package/resources/senders/index.js +3 -1
- package/resources/senders/index.js.map +1 -1
- package/resources/senders/index.mjs +1 -0
- package/resources/senders/index.mjs.map +1 -1
- package/resources/senders/senders.d.mts +4 -0
- package/resources/senders/senders.d.mts.map +1 -1
- package/resources/senders/senders.d.ts +4 -0
- package/resources/senders/senders.d.ts.map +1 -1
- package/resources/senders/senders.js +4 -0
- package/resources/senders/senders.js.map +1 -1
- package/resources/senders/senders.mjs +4 -0
- package/resources/senders/senders.mjs.map +1 -1
- package/resources/senders/telegram.d.mts +48 -0
- package/resources/senders/telegram.d.mts.map +1 -0
- package/resources/senders/telegram.d.ts +48 -0
- package/resources/senders/telegram.d.ts.map +1 -0
- package/resources/senders/telegram.js +41 -0
- package/resources/senders/telegram.js.map +1 -0
- package/resources/senders/telegram.mjs +37 -0
- package/resources/senders/telegram.mjs.map +1 -0
- package/resources/templates.d.mts +66 -1
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +66 -1
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +31 -0
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +31 -0
- package/resources/templates.mjs.map +1 -1
- package/resources/urls.d.mts +24 -1
- package/resources/urls.d.mts.map +1 -1
- package/resources/urls.d.ts +24 -1
- package/resources/urls.d.ts.map +1 -1
- package/resources/urls.js +15 -0
- package/resources/urls.js.map +1 -1
- package/resources/urls.mjs +15 -0
- package/resources/urls.mjs.map +1 -1
- package/src/client.ts +129 -0
- package/src/resources/agent-templates.ts +128 -0
- package/src/resources/agents/agents.ts +603 -0
- package/src/resources/agents/index.ts +21 -0
- package/src/resources/agents/senders.ts +79 -0
- package/src/resources/agents.ts +3 -0
- package/src/resources/calls.ts +638 -0
- package/src/resources/conversations.ts +472 -0
- package/src/resources/email-domains.ts +337 -0
- package/src/resources/functions/functions.ts +202 -0
- package/src/resources/functions/git-link.ts +398 -0
- package/src/resources/functions/index.ts +22 -0
- package/src/resources/functions/triggers.ts +227 -0
- package/src/resources/index.ts +57 -0
- package/src/resources/introspect.ts +105 -0
- package/src/resources/messages.ts +66 -0
- package/src/resources/senders/agent/agent.ts +23 -17
- package/src/resources/senders/agent/index.ts +4 -1
- package/src/resources/senders/agent/knowledge-bases/documents.ts +89 -0
- package/src/resources/senders/agent/knowledge-bases/index.ts +4 -0
- package/src/resources/senders/agent/knowledge-bases/knowledge-bases.ts +8 -0
- package/src/resources/senders/agent/tools/index.ts +21 -0
- package/src/resources/senders/agent/tools/tools.ts +460 -0
- package/src/resources/senders/agent/tools/webhook.ts +40 -0
- package/src/resources/senders/agent/tools.ts +1 -364
- package/src/resources/senders/index.ts +2 -0
- package/src/resources/senders/senders.ts +10 -0
- package/src/resources/senders/telegram.ts +73 -0
- package/src/resources/templates.ts +80 -0
- package/src/resources/urls.ts +35 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,271 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
-
import { Cursor, type CursorParams, PagePromise } from "../../../core/pagination.mjs";
|
|
4
|
-
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
5
|
-
export declare class Tools extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new tool for an agent. Tools allow the agent to call external webhooks.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const tool = await client.senders.agent.tools.create(
|
|
12
|
-
* 'senderId',
|
|
13
|
-
* {
|
|
14
|
-
* description: 'Get the status of a customer order',
|
|
15
|
-
* name: 'get_order_status',
|
|
16
|
-
* parameters: {
|
|
17
|
-
* type: 'object',
|
|
18
|
-
* properties: {
|
|
19
|
-
* order_id: {
|
|
20
|
-
* type: 'string',
|
|
21
|
-
* description: 'The order ID to look up',
|
|
22
|
-
* },
|
|
23
|
-
* },
|
|
24
|
-
* required: ['order_id'],
|
|
25
|
-
* },
|
|
26
|
-
* webhookUrl:
|
|
27
|
-
* 'https://api.example.com/webhooks/order-status',
|
|
28
|
-
* webhookSecret: 'whsec_...',
|
|
29
|
-
* },
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
create(senderID: string, body: ToolCreateParams, options?: RequestOptions): APIPromise<ToolCreateResponse>;
|
|
34
|
-
/**
|
|
35
|
-
* Get a specific tool.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const tool = await client.senders.agent.tools.retrieve(
|
|
40
|
-
* 'toolId',
|
|
41
|
-
* { senderId: 'senderId' },
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
retrieve(toolID: string, params: ToolRetrieveParams, options?: RequestOptions): APIPromise<ToolRetrieveResponse>;
|
|
46
|
-
/**
|
|
47
|
-
* Update a tool.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const tool = await client.senders.agent.tools.update(
|
|
52
|
-
* 'toolId',
|
|
53
|
-
* { senderId: 'senderId' },
|
|
54
|
-
* );
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
update(toolID: string, params: ToolUpdateParams, options?: RequestOptions): APIPromise<ToolUpdateResponse>;
|
|
58
|
-
/**
|
|
59
|
-
* List tools for an agent.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* // Automatically fetches more pages as needed.
|
|
64
|
-
* for await (const agentTool of client.senders.agent.tools.list(
|
|
65
|
-
* 'senderId',
|
|
66
|
-
* )) {
|
|
67
|
-
* // ...
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
list(senderID: string, query?: ToolListParams | null | undefined, options?: RequestOptions): PagePromise<AgentToolsCursor, AgentTool>;
|
|
72
|
-
/**
|
|
73
|
-
* Delete a tool.
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```ts
|
|
77
|
-
* await client.senders.agent.tools.delete('toolId', {
|
|
78
|
-
* senderId: 'senderId',
|
|
79
|
-
* });
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
delete(toolID: string, params: ToolDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Run a tool with the parameters you supply and return what it answered.
|
|
85
|
-
*
|
|
86
|
-
* The call is synchronous: the response carries the tool's status, body, and
|
|
87
|
-
* duration, so a green result is evidence the tool ran rather than evidence it was
|
|
88
|
-
* accepted. Each run is also recorded and readable afterwards via
|
|
89
|
-
* `GET /v1/senders/{senderId}/agent/tools/{toolId}/test-runs`.
|
|
90
|
-
*
|
|
91
|
-
* A tool that answers with an error is reported as a run with `success: false` —
|
|
92
|
-
* the endpoint itself still returns 200. This fires the tool's real webhook, so a
|
|
93
|
-
* test has whatever side effects the tool has.
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```ts
|
|
97
|
-
* const response = await client.senders.agent.tools.test(
|
|
98
|
-
* 'toolId',
|
|
99
|
-
* {
|
|
100
|
-
* senderId: 'senderId',
|
|
101
|
-
* testParams: { order_id: 'ORD-12345' },
|
|
102
|
-
* },
|
|
103
|
-
* );
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
test(toolID: string, params: ToolTestParams, options?: RequestOptions): APIPromise<ToolTestResponse>;
|
|
107
|
-
}
|
|
108
|
-
export type AgentToolsCursor = Cursor<AgentTool>;
|
|
109
|
-
export interface AgentTool {
|
|
110
|
-
id: string;
|
|
111
|
-
agentId: string;
|
|
112
|
-
createdAt: string;
|
|
113
|
-
/**
|
|
114
|
-
* Description for the LLM to understand when to use this tool.
|
|
115
|
-
*/
|
|
116
|
-
description: string;
|
|
117
|
-
enabled: boolean;
|
|
118
|
-
name: string;
|
|
119
|
-
parameters: ToolParameters;
|
|
120
|
-
updatedAt: string;
|
|
121
|
-
/**
|
|
122
|
-
* HTTPS URL to call when the tool is executed.
|
|
123
|
-
*/
|
|
124
|
-
webhookUrl: string;
|
|
125
|
-
/**
|
|
126
|
-
* Signing secret for this tool's webhook. **Returned only when the tool is
|
|
127
|
-
* created**, never on a later read.
|
|
128
|
-
*
|
|
129
|
-
* Zavu generates one if you do not supply it, and signs every call to this tool
|
|
130
|
-
* with it: `X-Zavu-Signature: <hex>`, the HMAC-SHA256 of the request body. Verify
|
|
131
|
-
* it before trusting the call. Lost it? Rotate with
|
|
132
|
-
* `POST /v1/senders/{senderId}/agent/tools/{toolId}/webhook/secret`.
|
|
133
|
-
*/
|
|
134
|
-
webhookSecret?: string;
|
|
135
|
-
}
|
|
136
|
-
export interface ToolParameters {
|
|
137
|
-
properties: {
|
|
138
|
-
[key: string]: ToolParameters.Properties;
|
|
139
|
-
};
|
|
140
|
-
required: Array<string>;
|
|
141
|
-
type: 'object';
|
|
142
|
-
}
|
|
143
|
-
export declare namespace ToolParameters {
|
|
144
|
-
interface Properties {
|
|
145
|
-
description?: string;
|
|
146
|
-
type?: string;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
export interface ToolCreateResponse {
|
|
150
|
-
tool: AgentTool;
|
|
151
|
-
}
|
|
152
|
-
export interface ToolRetrieveResponse {
|
|
153
|
-
tool: AgentTool;
|
|
154
|
-
}
|
|
155
|
-
export interface ToolUpdateResponse {
|
|
156
|
-
tool: AgentTool;
|
|
157
|
-
}
|
|
158
|
-
export interface ToolTestResponse {
|
|
159
|
-
/**
|
|
160
|
-
* One run of a tool triggered from the test endpoint. Recorded so a test is
|
|
161
|
-
* verifiable after the fact rather than only visible in the response.
|
|
162
|
-
*/
|
|
163
|
-
run: ToolTestResponse.Run;
|
|
164
|
-
}
|
|
165
|
-
export declare namespace ToolTestResponse {
|
|
166
|
-
/**
|
|
167
|
-
* One run of a tool triggered from the test endpoint. Recorded so a test is
|
|
168
|
-
* verifiable after the fact rather than only visible in the response.
|
|
169
|
-
*/
|
|
170
|
-
interface Run {
|
|
171
|
-
id: string;
|
|
172
|
-
createdAt: string;
|
|
173
|
-
durationMs: number;
|
|
174
|
-
/**
|
|
175
|
-
* Whether the tool returned without error. A tool that answered with a non-2xx
|
|
176
|
-
* status is a failed run, not an error of this endpoint.
|
|
177
|
-
*/
|
|
178
|
-
success: boolean;
|
|
179
|
-
toolId: string;
|
|
180
|
-
/**
|
|
181
|
-
* Why the run failed, when it did.
|
|
182
|
-
*/
|
|
183
|
-
error?: string | null;
|
|
184
|
-
/**
|
|
185
|
-
* The parameters the tool was called with.
|
|
186
|
-
*/
|
|
187
|
-
params?: {
|
|
188
|
-
[key: string]: unknown;
|
|
189
|
-
};
|
|
190
|
-
/**
|
|
191
|
-
* The tool's response body, truncated.
|
|
192
|
-
*/
|
|
193
|
-
response?: string | null;
|
|
194
|
-
/**
|
|
195
|
-
* HTTP status the tool's webhook returned. Absent for tools that do not go over
|
|
196
|
-
* HTTP.
|
|
197
|
-
*/
|
|
198
|
-
statusCode?: number | null;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
export interface ToolCreateParams {
|
|
202
|
-
description: string;
|
|
203
|
-
name: string;
|
|
204
|
-
parameters: ToolParameters;
|
|
205
|
-
/**
|
|
206
|
-
* Must be HTTPS.
|
|
207
|
-
*/
|
|
208
|
-
webhookUrl: string;
|
|
209
|
-
enabled?: boolean;
|
|
210
|
-
/**
|
|
211
|
-
* Signing secret for the webhook. Optional: Zavu generates one when omitted and
|
|
212
|
-
* returns it on this response only. Supply your own if you already have a secret
|
|
213
|
-
* you want reused.
|
|
214
|
-
*/
|
|
215
|
-
webhookSecret?: string;
|
|
216
|
-
}
|
|
217
|
-
export interface ToolRetrieveParams {
|
|
218
|
-
senderId: string;
|
|
219
|
-
}
|
|
220
|
-
export interface ToolUpdateParams {
|
|
221
|
-
/**
|
|
222
|
-
* Path param
|
|
223
|
-
*/
|
|
224
|
-
senderId: string;
|
|
225
|
-
/**
|
|
226
|
-
* Body param
|
|
227
|
-
*/
|
|
228
|
-
description?: string;
|
|
229
|
-
/**
|
|
230
|
-
* Body param
|
|
231
|
-
*/
|
|
232
|
-
enabled?: boolean;
|
|
233
|
-
/**
|
|
234
|
-
* Body param
|
|
235
|
-
*/
|
|
236
|
-
name?: string;
|
|
237
|
-
/**
|
|
238
|
-
* Body param
|
|
239
|
-
*/
|
|
240
|
-
parameters?: ToolParameters;
|
|
241
|
-
/**
|
|
242
|
-
* Body param
|
|
243
|
-
*/
|
|
244
|
-
webhookSecret?: string | null;
|
|
245
|
-
/**
|
|
246
|
-
* Body param
|
|
247
|
-
*/
|
|
248
|
-
webhookUrl?: string;
|
|
249
|
-
}
|
|
250
|
-
export interface ToolListParams extends CursorParams {
|
|
251
|
-
enabled?: boolean;
|
|
252
|
-
}
|
|
253
|
-
export interface ToolDeleteParams {
|
|
254
|
-
senderId: string;
|
|
255
|
-
}
|
|
256
|
-
export interface ToolTestParams {
|
|
257
|
-
/**
|
|
258
|
-
* Path param
|
|
259
|
-
*/
|
|
260
|
-
senderId: string;
|
|
261
|
-
/**
|
|
262
|
-
* Body param: Parameters to pass to the tool for testing.
|
|
263
|
-
*/
|
|
264
|
-
testParams: {
|
|
265
|
-
[key: string]: unknown;
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
export declare namespace Tools {
|
|
269
|
-
export { type AgentTool as AgentTool, type ToolParameters as ToolParameters, type ToolCreateResponse as ToolCreateResponse, type ToolRetrieveResponse as ToolRetrieveResponse, type ToolUpdateResponse as ToolUpdateResponse, type ToolTestResponse as ToolTestResponse, type AgentToolsCursor as AgentToolsCursor, type ToolCreateParams as ToolCreateParams, type ToolRetrieveParams as ToolRetrieveParams, type ToolUpdateParams as ToolUpdateParams, type ToolListParams as ToolListParams, type ToolDeleteParams as ToolDeleteParams, type ToolTestParams as ToolTestParams, };
|
|
270
|
-
}
|
|
1
|
+
export * from "./tools/index.mjs";
|
|
271
2
|
//# sourceMappingURL=tools.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../../src/resources/senders/agent/tools.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../../src/resources/senders/agent/tools.ts"],"names":[],"mappings":"AAEA,kCAA8B"}
|
|
@@ -1,271 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
-
import { Cursor, type CursorParams, PagePromise } from "../../../core/pagination.js";
|
|
4
|
-
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
|
-
export declare class Tools extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new tool for an agent. Tools allow the agent to call external webhooks.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const tool = await client.senders.agent.tools.create(
|
|
12
|
-
* 'senderId',
|
|
13
|
-
* {
|
|
14
|
-
* description: 'Get the status of a customer order',
|
|
15
|
-
* name: 'get_order_status',
|
|
16
|
-
* parameters: {
|
|
17
|
-
* type: 'object',
|
|
18
|
-
* properties: {
|
|
19
|
-
* order_id: {
|
|
20
|
-
* type: 'string',
|
|
21
|
-
* description: 'The order ID to look up',
|
|
22
|
-
* },
|
|
23
|
-
* },
|
|
24
|
-
* required: ['order_id'],
|
|
25
|
-
* },
|
|
26
|
-
* webhookUrl:
|
|
27
|
-
* 'https://api.example.com/webhooks/order-status',
|
|
28
|
-
* webhookSecret: 'whsec_...',
|
|
29
|
-
* },
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
create(senderID: string, body: ToolCreateParams, options?: RequestOptions): APIPromise<ToolCreateResponse>;
|
|
34
|
-
/**
|
|
35
|
-
* Get a specific tool.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const tool = await client.senders.agent.tools.retrieve(
|
|
40
|
-
* 'toolId',
|
|
41
|
-
* { senderId: 'senderId' },
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
retrieve(toolID: string, params: ToolRetrieveParams, options?: RequestOptions): APIPromise<ToolRetrieveResponse>;
|
|
46
|
-
/**
|
|
47
|
-
* Update a tool.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const tool = await client.senders.agent.tools.update(
|
|
52
|
-
* 'toolId',
|
|
53
|
-
* { senderId: 'senderId' },
|
|
54
|
-
* );
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
update(toolID: string, params: ToolUpdateParams, options?: RequestOptions): APIPromise<ToolUpdateResponse>;
|
|
58
|
-
/**
|
|
59
|
-
* List tools for an agent.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* // Automatically fetches more pages as needed.
|
|
64
|
-
* for await (const agentTool of client.senders.agent.tools.list(
|
|
65
|
-
* 'senderId',
|
|
66
|
-
* )) {
|
|
67
|
-
* // ...
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
list(senderID: string, query?: ToolListParams | null | undefined, options?: RequestOptions): PagePromise<AgentToolsCursor, AgentTool>;
|
|
72
|
-
/**
|
|
73
|
-
* Delete a tool.
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```ts
|
|
77
|
-
* await client.senders.agent.tools.delete('toolId', {
|
|
78
|
-
* senderId: 'senderId',
|
|
79
|
-
* });
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
delete(toolID: string, params: ToolDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Run a tool with the parameters you supply and return what it answered.
|
|
85
|
-
*
|
|
86
|
-
* The call is synchronous: the response carries the tool's status, body, and
|
|
87
|
-
* duration, so a green result is evidence the tool ran rather than evidence it was
|
|
88
|
-
* accepted. Each run is also recorded and readable afterwards via
|
|
89
|
-
* `GET /v1/senders/{senderId}/agent/tools/{toolId}/test-runs`.
|
|
90
|
-
*
|
|
91
|
-
* A tool that answers with an error is reported as a run with `success: false` —
|
|
92
|
-
* the endpoint itself still returns 200. This fires the tool's real webhook, so a
|
|
93
|
-
* test has whatever side effects the tool has.
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```ts
|
|
97
|
-
* const response = await client.senders.agent.tools.test(
|
|
98
|
-
* 'toolId',
|
|
99
|
-
* {
|
|
100
|
-
* senderId: 'senderId',
|
|
101
|
-
* testParams: { order_id: 'ORD-12345' },
|
|
102
|
-
* },
|
|
103
|
-
* );
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
test(toolID: string, params: ToolTestParams, options?: RequestOptions): APIPromise<ToolTestResponse>;
|
|
107
|
-
}
|
|
108
|
-
export type AgentToolsCursor = Cursor<AgentTool>;
|
|
109
|
-
export interface AgentTool {
|
|
110
|
-
id: string;
|
|
111
|
-
agentId: string;
|
|
112
|
-
createdAt: string;
|
|
113
|
-
/**
|
|
114
|
-
* Description for the LLM to understand when to use this tool.
|
|
115
|
-
*/
|
|
116
|
-
description: string;
|
|
117
|
-
enabled: boolean;
|
|
118
|
-
name: string;
|
|
119
|
-
parameters: ToolParameters;
|
|
120
|
-
updatedAt: string;
|
|
121
|
-
/**
|
|
122
|
-
* HTTPS URL to call when the tool is executed.
|
|
123
|
-
*/
|
|
124
|
-
webhookUrl: string;
|
|
125
|
-
/**
|
|
126
|
-
* Signing secret for this tool's webhook. **Returned only when the tool is
|
|
127
|
-
* created**, never on a later read.
|
|
128
|
-
*
|
|
129
|
-
* Zavu generates one if you do not supply it, and signs every call to this tool
|
|
130
|
-
* with it: `X-Zavu-Signature: <hex>`, the HMAC-SHA256 of the request body. Verify
|
|
131
|
-
* it before trusting the call. Lost it? Rotate with
|
|
132
|
-
* `POST /v1/senders/{senderId}/agent/tools/{toolId}/webhook/secret`.
|
|
133
|
-
*/
|
|
134
|
-
webhookSecret?: string;
|
|
135
|
-
}
|
|
136
|
-
export interface ToolParameters {
|
|
137
|
-
properties: {
|
|
138
|
-
[key: string]: ToolParameters.Properties;
|
|
139
|
-
};
|
|
140
|
-
required: Array<string>;
|
|
141
|
-
type: 'object';
|
|
142
|
-
}
|
|
143
|
-
export declare namespace ToolParameters {
|
|
144
|
-
interface Properties {
|
|
145
|
-
description?: string;
|
|
146
|
-
type?: string;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
export interface ToolCreateResponse {
|
|
150
|
-
tool: AgentTool;
|
|
151
|
-
}
|
|
152
|
-
export interface ToolRetrieveResponse {
|
|
153
|
-
tool: AgentTool;
|
|
154
|
-
}
|
|
155
|
-
export interface ToolUpdateResponse {
|
|
156
|
-
tool: AgentTool;
|
|
157
|
-
}
|
|
158
|
-
export interface ToolTestResponse {
|
|
159
|
-
/**
|
|
160
|
-
* One run of a tool triggered from the test endpoint. Recorded so a test is
|
|
161
|
-
* verifiable after the fact rather than only visible in the response.
|
|
162
|
-
*/
|
|
163
|
-
run: ToolTestResponse.Run;
|
|
164
|
-
}
|
|
165
|
-
export declare namespace ToolTestResponse {
|
|
166
|
-
/**
|
|
167
|
-
* One run of a tool triggered from the test endpoint. Recorded so a test is
|
|
168
|
-
* verifiable after the fact rather than only visible in the response.
|
|
169
|
-
*/
|
|
170
|
-
interface Run {
|
|
171
|
-
id: string;
|
|
172
|
-
createdAt: string;
|
|
173
|
-
durationMs: number;
|
|
174
|
-
/**
|
|
175
|
-
* Whether the tool returned without error. A tool that answered with a non-2xx
|
|
176
|
-
* status is a failed run, not an error of this endpoint.
|
|
177
|
-
*/
|
|
178
|
-
success: boolean;
|
|
179
|
-
toolId: string;
|
|
180
|
-
/**
|
|
181
|
-
* Why the run failed, when it did.
|
|
182
|
-
*/
|
|
183
|
-
error?: string | null;
|
|
184
|
-
/**
|
|
185
|
-
* The parameters the tool was called with.
|
|
186
|
-
*/
|
|
187
|
-
params?: {
|
|
188
|
-
[key: string]: unknown;
|
|
189
|
-
};
|
|
190
|
-
/**
|
|
191
|
-
* The tool's response body, truncated.
|
|
192
|
-
*/
|
|
193
|
-
response?: string | null;
|
|
194
|
-
/**
|
|
195
|
-
* HTTP status the tool's webhook returned. Absent for tools that do not go over
|
|
196
|
-
* HTTP.
|
|
197
|
-
*/
|
|
198
|
-
statusCode?: number | null;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
export interface ToolCreateParams {
|
|
202
|
-
description: string;
|
|
203
|
-
name: string;
|
|
204
|
-
parameters: ToolParameters;
|
|
205
|
-
/**
|
|
206
|
-
* Must be HTTPS.
|
|
207
|
-
*/
|
|
208
|
-
webhookUrl: string;
|
|
209
|
-
enabled?: boolean;
|
|
210
|
-
/**
|
|
211
|
-
* Signing secret for the webhook. Optional: Zavu generates one when omitted and
|
|
212
|
-
* returns it on this response only. Supply your own if you already have a secret
|
|
213
|
-
* you want reused.
|
|
214
|
-
*/
|
|
215
|
-
webhookSecret?: string;
|
|
216
|
-
}
|
|
217
|
-
export interface ToolRetrieveParams {
|
|
218
|
-
senderId: string;
|
|
219
|
-
}
|
|
220
|
-
export interface ToolUpdateParams {
|
|
221
|
-
/**
|
|
222
|
-
* Path param
|
|
223
|
-
*/
|
|
224
|
-
senderId: string;
|
|
225
|
-
/**
|
|
226
|
-
* Body param
|
|
227
|
-
*/
|
|
228
|
-
description?: string;
|
|
229
|
-
/**
|
|
230
|
-
* Body param
|
|
231
|
-
*/
|
|
232
|
-
enabled?: boolean;
|
|
233
|
-
/**
|
|
234
|
-
* Body param
|
|
235
|
-
*/
|
|
236
|
-
name?: string;
|
|
237
|
-
/**
|
|
238
|
-
* Body param
|
|
239
|
-
*/
|
|
240
|
-
parameters?: ToolParameters;
|
|
241
|
-
/**
|
|
242
|
-
* Body param
|
|
243
|
-
*/
|
|
244
|
-
webhookSecret?: string | null;
|
|
245
|
-
/**
|
|
246
|
-
* Body param
|
|
247
|
-
*/
|
|
248
|
-
webhookUrl?: string;
|
|
249
|
-
}
|
|
250
|
-
export interface ToolListParams extends CursorParams {
|
|
251
|
-
enabled?: boolean;
|
|
252
|
-
}
|
|
253
|
-
export interface ToolDeleteParams {
|
|
254
|
-
senderId: string;
|
|
255
|
-
}
|
|
256
|
-
export interface ToolTestParams {
|
|
257
|
-
/**
|
|
258
|
-
* Path param
|
|
259
|
-
*/
|
|
260
|
-
senderId: string;
|
|
261
|
-
/**
|
|
262
|
-
* Body param: Parameters to pass to the tool for testing.
|
|
263
|
-
*/
|
|
264
|
-
testParams: {
|
|
265
|
-
[key: string]: unknown;
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
export declare namespace Tools {
|
|
269
|
-
export { type AgentTool as AgentTool, type ToolParameters as ToolParameters, type ToolCreateResponse as ToolCreateResponse, type ToolRetrieveResponse as ToolRetrieveResponse, type ToolUpdateResponse as ToolUpdateResponse, type ToolTestResponse as ToolTestResponse, type AgentToolsCursor as AgentToolsCursor, type ToolCreateParams as ToolCreateParams, type ToolRetrieveParams as ToolRetrieveParams, type ToolUpdateParams as ToolUpdateParams, type ToolListParams as ToolListParams, type ToolDeleteParams as ToolDeleteParams, type ToolTestParams as ToolTestParams, };
|
|
270
|
-
}
|
|
1
|
+
export * from "./tools/index.js";
|
|
271
2
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/resources/senders/agent/tools.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/resources/senders/agent/tools.ts"],"names":[],"mappings":"AAEA,iCAA8B"}
|
|
@@ -1,135 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
-
const headers_1 = require("../../../internal/headers.js");
|
|
8
|
-
const path_1 = require("../../../internal/utils/path.js");
|
|
9
|
-
class Tools extends resource_1.APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Create a new tool for an agent. Tools allow the agent to call external webhooks.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const tool = await client.senders.agent.tools.create(
|
|
16
|
-
* 'senderId',
|
|
17
|
-
* {
|
|
18
|
-
* description: 'Get the status of a customer order',
|
|
19
|
-
* name: 'get_order_status',
|
|
20
|
-
* parameters: {
|
|
21
|
-
* type: 'object',
|
|
22
|
-
* properties: {
|
|
23
|
-
* order_id: {
|
|
24
|
-
* type: 'string',
|
|
25
|
-
* description: 'The order ID to look up',
|
|
26
|
-
* },
|
|
27
|
-
* },
|
|
28
|
-
* required: ['order_id'],
|
|
29
|
-
* },
|
|
30
|
-
* webhookUrl:
|
|
31
|
-
* 'https://api.example.com/webhooks/order-status',
|
|
32
|
-
* webhookSecret: 'whsec_...',
|
|
33
|
-
* },
|
|
34
|
-
* );
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
create(senderID, body, options) {
|
|
38
|
-
return this._client.post((0, path_1.path) `/v1/senders/${senderID}/agent/tools`, { body, ...options });
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get a specific tool.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* const tool = await client.senders.agent.tools.retrieve(
|
|
46
|
-
* 'toolId',
|
|
47
|
-
* { senderId: 'senderId' },
|
|
48
|
-
* );
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
retrieve(toolID, params, options) {
|
|
52
|
-
const { senderId } = params;
|
|
53
|
-
return this._client.get((0, path_1.path) `/v1/senders/${senderId}/agent/tools/${toolID}`, options);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Update a tool.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const tool = await client.senders.agent.tools.update(
|
|
61
|
-
* 'toolId',
|
|
62
|
-
* { senderId: 'senderId' },
|
|
63
|
-
* );
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
update(toolID, params, options) {
|
|
67
|
-
const { senderId, ...body } = params;
|
|
68
|
-
return this._client.patch((0, path_1.path) `/v1/senders/${senderId}/agent/tools/${toolID}`, { body, ...options });
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* List tools for an agent.
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* ```ts
|
|
75
|
-
* // Automatically fetches more pages as needed.
|
|
76
|
-
* for await (const agentTool of client.senders.agent.tools.list(
|
|
77
|
-
* 'senderId',
|
|
78
|
-
* )) {
|
|
79
|
-
* // ...
|
|
80
|
-
* }
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
list(senderID, query = {}, options) {
|
|
84
|
-
return this._client.getAPIList((0, path_1.path) `/v1/senders/${senderID}/agent/tools`, (pagination_1.Cursor), {
|
|
85
|
-
query,
|
|
86
|
-
...options,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Delete a tool.
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```ts
|
|
94
|
-
* await client.senders.agent.tools.delete('toolId', {
|
|
95
|
-
* senderId: 'senderId',
|
|
96
|
-
* });
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
delete(toolID, params, options) {
|
|
100
|
-
const { senderId } = params;
|
|
101
|
-
return this._client.delete((0, path_1.path) `/v1/senders/${senderId}/agent/tools/${toolID}`, {
|
|
102
|
-
...options,
|
|
103
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Run a tool with the parameters you supply and return what it answered.
|
|
108
|
-
*
|
|
109
|
-
* The call is synchronous: the response carries the tool's status, body, and
|
|
110
|
-
* duration, so a green result is evidence the tool ran rather than evidence it was
|
|
111
|
-
* accepted. Each run is also recorded and readable afterwards via
|
|
112
|
-
* `GET /v1/senders/{senderId}/agent/tools/{toolId}/test-runs`.
|
|
113
|
-
*
|
|
114
|
-
* A tool that answers with an error is reported as a run with `success: false` —
|
|
115
|
-
* the endpoint itself still returns 200. This fires the tool's real webhook, so a
|
|
116
|
-
* test has whatever side effects the tool has.
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* ```ts
|
|
120
|
-
* const response = await client.senders.agent.tools.test(
|
|
121
|
-
* 'toolId',
|
|
122
|
-
* {
|
|
123
|
-
* senderId: 'senderId',
|
|
124
|
-
* testParams: { order_id: 'ORD-12345' },
|
|
125
|
-
* },
|
|
126
|
-
* );
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
test(toolID, params, options) {
|
|
130
|
-
const { senderId, ...body } = params;
|
|
131
|
-
return this._client.post((0, path_1.path) `/v1/senders/${senderId}/agent/tools/${toolID}/test`, { body, ...options });
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
exports.Tools = Tools;
|
|
4
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./tools/index.js"), exports);
|
|
135
6
|
//# sourceMappingURL=tools.js.map
|