@roarkanalytics/sdk 2.22.0 → 2.23.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 +27 -0
- package/client.d.mts +31 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +31 -10
- package/client.d.ts.map +1 -1
- package/client.js +34 -6
- package/client.js.map +1 -1
- package/client.mjs +34 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-endpoint.d.mts +309 -0
- package/resources/agent-endpoint.d.mts.map +1 -0
- package/resources/agent-endpoint.d.ts +309 -0
- package/resources/agent-endpoint.d.ts.map +1 -0
- package/resources/agent-endpoint.js +35 -0
- package/resources/agent-endpoint.js.map +1 -0
- package/resources/agent-endpoint.mjs +31 -0
- package/resources/agent-endpoint.mjs.map +1 -0
- package/resources/agent.d.mts +193 -0
- package/resources/agent.d.mts.map +1 -0
- package/resources/agent.d.ts +193 -0
- package/resources/agent.d.ts.map +1 -0
- package/resources/agent.js +34 -0
- package/resources/agent.js.map +1 -0
- package/resources/agent.mjs +30 -0
- package/resources/agent.mjs.map +1 -0
- package/resources/call.d.mts +120 -1
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +120 -1
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +7 -0
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +7 -0
- package/resources/call.mjs.map +1 -1
- package/resources/evaluation.d.mts +2097 -617
- package/resources/evaluation.d.mts.map +1 -1
- package/resources/evaluation.d.ts +2097 -617
- package/resources/evaluation.d.ts.map +1 -1
- package/resources/evaluation.js +14 -0
- package/resources/evaluation.js.map +1 -1
- package/resources/evaluation.mjs +14 -0
- package/resources/evaluation.mjs.map +1 -1
- package/resources/http-request-definition.d.mts +339 -0
- package/resources/http-request-definition.d.mts.map +1 -0
- package/resources/http-request-definition.d.ts +339 -0
- package/resources/http-request-definition.d.ts.map +1 -0
- package/resources/http-request-definition.js +36 -0
- package/resources/http-request-definition.js.map +1 -0
- package/resources/http-request-definition.mjs +32 -0
- package/resources/http-request-definition.mjs.map +1 -0
- package/resources/index.d.mts +11 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +19 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +9 -2
- package/resources/index.mjs.map +1 -1
- package/resources/simulation-job.d.mts +393 -0
- package/resources/simulation-job.d.mts.map +1 -0
- package/resources/simulation-job.d.ts +393 -0
- package/resources/simulation-job.d.ts.map +1 -0
- package/resources/simulation-job.js +38 -0
- package/resources/simulation-job.js.map +1 -0
- package/resources/simulation-job.mjs +34 -0
- package/resources/simulation-job.mjs.map +1 -0
- package/resources/{persona.d.mts → simulation-persona.d.mts} +62 -33
- package/resources/simulation-persona.d.mts.map +1 -0
- package/resources/{persona.d.ts → simulation-persona.d.ts} +62 -33
- package/resources/simulation-persona.d.ts.map +1 -0
- package/resources/{persona.js → simulation-persona.js} +18 -13
- package/resources/simulation-persona.js.map +1 -0
- package/resources/{persona.mjs → simulation-persona.mjs} +16 -11
- package/resources/simulation-persona.mjs.map +1 -0
- package/resources/simulation-run-plan-job.d.mts +359 -0
- package/resources/simulation-run-plan-job.d.mts.map +1 -0
- package/resources/simulation-run-plan-job.d.ts +359 -0
- package/resources/simulation-run-plan-job.d.ts.map +1 -0
- package/resources/simulation-run-plan-job.js +50 -0
- package/resources/simulation-run-plan-job.js.map +1 -0
- package/resources/simulation-run-plan-job.mjs +46 -0
- package/resources/simulation-run-plan-job.mjs.map +1 -0
- package/resources/simulation-run-plan.d.mts +660 -0
- package/resources/simulation-run-plan.d.mts.map +1 -0
- package/resources/simulation-run-plan.d.ts +660 -0
- package/resources/simulation-run-plan.d.ts.map +1 -0
- package/resources/simulation-run-plan.js +93 -0
- package/resources/simulation-run-plan.js.map +1 -0
- package/resources/simulation-run-plan.mjs +89 -0
- package/resources/simulation-run-plan.mjs.map +1 -0
- package/resources/simulation-scenario.d.mts +335 -0
- package/resources/simulation-scenario.d.mts.map +1 -0
- package/resources/simulation-scenario.d.ts +335 -0
- package/resources/simulation-scenario.d.ts.map +1 -0
- package/resources/simulation-scenario.js +40 -0
- package/resources/simulation-scenario.js.map +1 -0
- package/resources/simulation-scenario.mjs +36 -0
- package/resources/simulation-scenario.mjs.map +1 -0
- package/resources/webhook.d.mts +212 -0
- package/resources/webhook.d.mts.map +1 -0
- package/resources/webhook.d.ts +212 -0
- package/resources/webhook.d.ts.map +1 -0
- package/resources/webhook.js +35 -0
- package/resources/webhook.js.map +1 -0
- package/resources/webhook.mjs +31 -0
- package/resources/webhook.mjs.map +1 -0
- package/src/client.ts +208 -43
- package/src/resources/agent-endpoint.ts +400 -0
- package/src/resources/agent.ts +263 -0
- package/src/resources/call.ts +149 -0
- package/src/resources/evaluation.ts +3044 -1154
- package/src/resources/http-request-definition.ts +410 -0
- package/src/resources/index.ts +89 -21
- package/src/resources/simulation-job.ts +527 -0
- package/src/resources/{persona.ts → simulation-persona.ts} +78 -40
- package/src/resources/simulation-run-plan-job.ts +521 -0
- package/src/resources/simulation-run-plan.ts +840 -0
- package/src/resources/simulation-scenario.ts +463 -0
- package/src/resources/webhook.ts +318 -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
- package/resources/persona.d.mts.map +0 -1
- package/resources/persona.d.ts.map +0 -1
- package/resources/persona.js.map +0 -1
- package/resources/persona.mjs.map +0 -1
- package/resources/simulation.d.mts +0 -802
- package/resources/simulation.d.mts.map +0 -1
- package/resources/simulation.d.ts +0 -802
- package/resources/simulation.d.ts.map +0 -1
- package/resources/simulation.js +0 -90
- package/resources/simulation.js.map +0 -1
- package/resources/simulation.mjs +0 -86
- package/resources/simulation.mjs.map +0 -1
- package/src/resources/simulation.ts +0 -1069
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class AgentEndpoint extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new agent endpoint for the authenticated project.
|
|
11
|
+
*/
|
|
12
|
+
create(body: AgentEndpointCreateParams, options?: RequestOptions): APIPromise<AgentEndpointCreateResponse> {
|
|
13
|
+
return this._client.post('/v1/agent/endpoint', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Updates an existing agent endpoint by its ID. Only environment and
|
|
18
|
+
* outboundDialType can be modified.
|
|
19
|
+
*/
|
|
20
|
+
update(
|
|
21
|
+
endpointID: string,
|
|
22
|
+
body: AgentEndpointUpdateParams | null | undefined = {},
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): APIPromise<AgentEndpointUpdateResponse> {
|
|
25
|
+
return this._client.put(path`/v1/agent/endpoint/${endpointID}`, { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Returns a paginated list of agent endpoints for the authenticated project.
|
|
30
|
+
*/
|
|
31
|
+
list(
|
|
32
|
+
query: AgentEndpointListParams | null | undefined = {},
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): APIPromise<AgentEndpointListResponse> {
|
|
35
|
+
return this._client.get('/v1/agent/endpoint', { query, ...options });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Returns a specific agent endpoint by its ID.
|
|
40
|
+
*/
|
|
41
|
+
getByID(endpointID: string, options?: RequestOptions): APIPromise<AgentEndpointGetByIDResponse> {
|
|
42
|
+
return this._client.get(path`/v1/agent/endpoint/${endpointID}`, options);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface AgentEndpointCreateResponse {
|
|
47
|
+
/**
|
|
48
|
+
* Detailed agent endpoint response
|
|
49
|
+
*/
|
|
50
|
+
data: AgentEndpointCreateResponse.Data;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export namespace AgentEndpointCreateResponse {
|
|
54
|
+
/**
|
|
55
|
+
* Detailed agent endpoint response
|
|
56
|
+
*/
|
|
57
|
+
export interface Data {
|
|
58
|
+
/**
|
|
59
|
+
* Agent endpoint ID
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Agent ID this endpoint belongs to
|
|
65
|
+
*/
|
|
66
|
+
agentId: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Creation timestamp
|
|
70
|
+
*/
|
|
71
|
+
createdAt: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Agent endpoint direction (INCOMING, OUTGOING, INCOMING_AND_OUTGOING)
|
|
75
|
+
*/
|
|
76
|
+
direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Agent endpoint environment
|
|
80
|
+
*/
|
|
81
|
+
environment: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* ID of the linked HTTP request definition for outbound dialing
|
|
85
|
+
*/
|
|
86
|
+
outboundDialHttpRequestDefinitionId: string | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Outbound dial type (NONE or HTTP_REQUEST)
|
|
90
|
+
*/
|
|
91
|
+
outboundDialType: 'NONE' | 'HTTP_REQUEST';
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Agent endpoint type (PHONE or WEBSOCKET)
|
|
95
|
+
*/
|
|
96
|
+
type: 'PHONE' | 'WEBSOCKET';
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Last update timestamp
|
|
100
|
+
*/
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Agent endpoint value (phone number or websocket URL)
|
|
105
|
+
*/
|
|
106
|
+
value: string;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface AgentEndpointUpdateResponse {
|
|
111
|
+
/**
|
|
112
|
+
* Detailed agent endpoint response
|
|
113
|
+
*/
|
|
114
|
+
data: AgentEndpointUpdateResponse.Data;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export namespace AgentEndpointUpdateResponse {
|
|
118
|
+
/**
|
|
119
|
+
* Detailed agent endpoint response
|
|
120
|
+
*/
|
|
121
|
+
export interface Data {
|
|
122
|
+
/**
|
|
123
|
+
* Agent endpoint ID
|
|
124
|
+
*/
|
|
125
|
+
id: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Agent ID this endpoint belongs to
|
|
129
|
+
*/
|
|
130
|
+
agentId: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Creation timestamp
|
|
134
|
+
*/
|
|
135
|
+
createdAt: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Agent endpoint direction (INCOMING, OUTGOING, INCOMING_AND_OUTGOING)
|
|
139
|
+
*/
|
|
140
|
+
direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Agent endpoint environment
|
|
144
|
+
*/
|
|
145
|
+
environment: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* ID of the linked HTTP request definition for outbound dialing
|
|
149
|
+
*/
|
|
150
|
+
outboundDialHttpRequestDefinitionId: string | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Outbound dial type (NONE or HTTP_REQUEST)
|
|
154
|
+
*/
|
|
155
|
+
outboundDialType: 'NONE' | 'HTTP_REQUEST';
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Agent endpoint type (PHONE or WEBSOCKET)
|
|
159
|
+
*/
|
|
160
|
+
type: 'PHONE' | 'WEBSOCKET';
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Last update timestamp
|
|
164
|
+
*/
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Agent endpoint value (phone number or websocket URL)
|
|
169
|
+
*/
|
|
170
|
+
value: string;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface AgentEndpointListResponse {
|
|
175
|
+
data: Array<AgentEndpointListResponse.Data>;
|
|
176
|
+
|
|
177
|
+
pagination: AgentEndpointListResponse.Pagination;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export namespace AgentEndpointListResponse {
|
|
181
|
+
/**
|
|
182
|
+
* Detailed agent endpoint response
|
|
183
|
+
*/
|
|
184
|
+
export interface Data {
|
|
185
|
+
/**
|
|
186
|
+
* Agent endpoint ID
|
|
187
|
+
*/
|
|
188
|
+
id: string;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Agent ID this endpoint belongs to
|
|
192
|
+
*/
|
|
193
|
+
agentId: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Creation timestamp
|
|
197
|
+
*/
|
|
198
|
+
createdAt: string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Agent endpoint direction (INCOMING, OUTGOING, INCOMING_AND_OUTGOING)
|
|
202
|
+
*/
|
|
203
|
+
direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Agent endpoint environment
|
|
207
|
+
*/
|
|
208
|
+
environment: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* ID of the linked HTTP request definition for outbound dialing
|
|
212
|
+
*/
|
|
213
|
+
outboundDialHttpRequestDefinitionId: string | null;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Outbound dial type (NONE or HTTP_REQUEST)
|
|
217
|
+
*/
|
|
218
|
+
outboundDialType: 'NONE' | 'HTTP_REQUEST';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Agent endpoint type (PHONE or WEBSOCKET)
|
|
222
|
+
*/
|
|
223
|
+
type: 'PHONE' | 'WEBSOCKET';
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Last update timestamp
|
|
227
|
+
*/
|
|
228
|
+
updatedAt: string;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Agent endpoint value (phone number or websocket URL)
|
|
232
|
+
*/
|
|
233
|
+
value: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface Pagination {
|
|
237
|
+
/**
|
|
238
|
+
* Whether there are more items to fetch
|
|
239
|
+
*/
|
|
240
|
+
hasMore: boolean;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Cursor for the next page of items
|
|
244
|
+
*/
|
|
245
|
+
nextCursor: string | null;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Total number of items
|
|
249
|
+
*/
|
|
250
|
+
total: number;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface AgentEndpointGetByIDResponse {
|
|
255
|
+
/**
|
|
256
|
+
* Detailed agent endpoint response
|
|
257
|
+
*/
|
|
258
|
+
data: AgentEndpointGetByIDResponse.Data;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export namespace AgentEndpointGetByIDResponse {
|
|
262
|
+
/**
|
|
263
|
+
* Detailed agent endpoint response
|
|
264
|
+
*/
|
|
265
|
+
export interface Data {
|
|
266
|
+
/**
|
|
267
|
+
* Agent endpoint ID
|
|
268
|
+
*/
|
|
269
|
+
id: string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Agent ID this endpoint belongs to
|
|
273
|
+
*/
|
|
274
|
+
agentId: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Creation timestamp
|
|
278
|
+
*/
|
|
279
|
+
createdAt: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Agent endpoint direction (INCOMING, OUTGOING, INCOMING_AND_OUTGOING)
|
|
283
|
+
*/
|
|
284
|
+
direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Agent endpoint environment
|
|
288
|
+
*/
|
|
289
|
+
environment: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* ID of the linked HTTP request definition for outbound dialing
|
|
293
|
+
*/
|
|
294
|
+
outboundDialHttpRequestDefinitionId: string | null;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Outbound dial type (NONE or HTTP_REQUEST)
|
|
298
|
+
*/
|
|
299
|
+
outboundDialType: 'NONE' | 'HTTP_REQUEST';
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Agent endpoint type (PHONE or WEBSOCKET)
|
|
303
|
+
*/
|
|
304
|
+
type: 'PHONE' | 'WEBSOCKET';
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Last update timestamp
|
|
308
|
+
*/
|
|
309
|
+
updatedAt: string;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Agent endpoint value (phone number or websocket URL)
|
|
313
|
+
*/
|
|
314
|
+
value: string;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface AgentEndpointCreateParams {
|
|
319
|
+
/**
|
|
320
|
+
* Agent ID to associate this endpoint with
|
|
321
|
+
*/
|
|
322
|
+
agentId: string;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Call direction: INCOMING, OUTGOING, or INCOMING_AND_OUTGOING
|
|
326
|
+
*/
|
|
327
|
+
direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Phone number in E.164 format (e.g., +12345678900)
|
|
331
|
+
*/
|
|
332
|
+
value: string;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Environment name (default: production)
|
|
336
|
+
*/
|
|
337
|
+
environment?: string;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* ID of the HTTP request definition for outbound dialing (required when
|
|
341
|
+
* outboundDialType is HTTP_REQUEST)
|
|
342
|
+
*/
|
|
343
|
+
outboundDialHttpRequestDefinitionId?: string | null;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Outbound dial type: NONE or HTTP_REQUEST (default: NONE)
|
|
347
|
+
*/
|
|
348
|
+
outboundDialType?: 'NONE' | 'HTTP_REQUEST';
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface AgentEndpointUpdateParams {
|
|
352
|
+
/**
|
|
353
|
+
* Environment name
|
|
354
|
+
*/
|
|
355
|
+
environment?: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* ID of the HTTP request definition for outbound dialing
|
|
359
|
+
*/
|
|
360
|
+
outboundDialHttpRequestDefinitionId?: string | null;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Outbound dial type: NONE or HTTP_REQUEST
|
|
364
|
+
*/
|
|
365
|
+
outboundDialType?: 'NONE' | 'HTTP_REQUEST';
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface AgentEndpointListParams {
|
|
369
|
+
/**
|
|
370
|
+
* Cursor for pagination - endpoint ID to start after
|
|
371
|
+
*/
|
|
372
|
+
after?: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Filter by agent ID
|
|
376
|
+
*/
|
|
377
|
+
agentId?: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Maximum number of endpoints to return (default: 20, max: 50)
|
|
381
|
+
*/
|
|
382
|
+
limit?: number;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Search text to filter endpoints
|
|
386
|
+
*/
|
|
387
|
+
searchText?: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export declare namespace AgentEndpoint {
|
|
391
|
+
export {
|
|
392
|
+
type AgentEndpointCreateResponse as AgentEndpointCreateResponse,
|
|
393
|
+
type AgentEndpointUpdateResponse as AgentEndpointUpdateResponse,
|
|
394
|
+
type AgentEndpointListResponse as AgentEndpointListResponse,
|
|
395
|
+
type AgentEndpointGetByIDResponse as AgentEndpointGetByIDResponse,
|
|
396
|
+
type AgentEndpointCreateParams as AgentEndpointCreateParams,
|
|
397
|
+
type AgentEndpointUpdateParams as AgentEndpointUpdateParams,
|
|
398
|
+
type AgentEndpointListParams as AgentEndpointListParams,
|
|
399
|
+
};
|
|
400
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Agent extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new agent for the authenticated project.
|
|
11
|
+
*/
|
|
12
|
+
create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse> {
|
|
13
|
+
return this._client.post('/v1/agent', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Updates an existing agent by its ID.
|
|
18
|
+
*/
|
|
19
|
+
update(
|
|
20
|
+
agentID: string,
|
|
21
|
+
body: AgentUpdateParams | null | undefined = {},
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): APIPromise<AgentUpdateResponse> {
|
|
24
|
+
return this._client.put(path`/v1/agent/${agentID}`, { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns a paginated list of agents for the authenticated project.
|
|
29
|
+
*/
|
|
30
|
+
list(
|
|
31
|
+
query: AgentListParams | null | undefined = {},
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): APIPromise<AgentListResponse> {
|
|
34
|
+
return this._client.get('/v1/agent', { query, ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns a specific agent by its ID.
|
|
39
|
+
*/
|
|
40
|
+
getByID(agentID: string, options?: RequestOptions): APIPromise<AgentGetByIDResponse> {
|
|
41
|
+
return this._client.get(path`/v1/agent/${agentID}`, options);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface AgentCreateResponse {
|
|
46
|
+
data: AgentCreateResponse.Data;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export namespace AgentCreateResponse {
|
|
50
|
+
export interface Data {
|
|
51
|
+
/**
|
|
52
|
+
* Unique identifier of the agent
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Creation timestamp in ISO 8601 format
|
|
58
|
+
*/
|
|
59
|
+
createdAt: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Custom identifier for the agent
|
|
63
|
+
*/
|
|
64
|
+
customId: string | null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Description of the agent
|
|
68
|
+
*/
|
|
69
|
+
description: string | null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Name of the agent
|
|
73
|
+
*/
|
|
74
|
+
name: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Last update timestamp in ISO 8601 format
|
|
78
|
+
*/
|
|
79
|
+
updatedAt: string;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface AgentUpdateResponse {
|
|
84
|
+
data: AgentUpdateResponse.Data;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export namespace AgentUpdateResponse {
|
|
88
|
+
export interface Data {
|
|
89
|
+
/**
|
|
90
|
+
* Unique identifier of the agent
|
|
91
|
+
*/
|
|
92
|
+
id: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Creation timestamp in ISO 8601 format
|
|
96
|
+
*/
|
|
97
|
+
createdAt: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Custom identifier for the agent
|
|
101
|
+
*/
|
|
102
|
+
customId: string | null;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Description of the agent
|
|
106
|
+
*/
|
|
107
|
+
description: string | null;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Name of the agent
|
|
111
|
+
*/
|
|
112
|
+
name: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Last update timestamp in ISO 8601 format
|
|
116
|
+
*/
|
|
117
|
+
updatedAt: string;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface AgentListResponse {
|
|
122
|
+
data: Array<AgentListResponse.Data>;
|
|
123
|
+
|
|
124
|
+
pagination: AgentListResponse.Pagination;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export namespace AgentListResponse {
|
|
128
|
+
export interface Data {
|
|
129
|
+
/**
|
|
130
|
+
* Unique identifier of the agent
|
|
131
|
+
*/
|
|
132
|
+
id: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Creation timestamp in ISO 8601 format
|
|
136
|
+
*/
|
|
137
|
+
createdAt: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Custom identifier for the agent
|
|
141
|
+
*/
|
|
142
|
+
customId: string | null;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Description of the agent
|
|
146
|
+
*/
|
|
147
|
+
description: string | null;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Name of the agent
|
|
151
|
+
*/
|
|
152
|
+
name: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Last update timestamp in ISO 8601 format
|
|
156
|
+
*/
|
|
157
|
+
updatedAt: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface Pagination {
|
|
161
|
+
/**
|
|
162
|
+
* Whether there are more items to fetch
|
|
163
|
+
*/
|
|
164
|
+
hasMore: boolean;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Cursor for the next page of items
|
|
168
|
+
*/
|
|
169
|
+
nextCursor: string | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Total number of items
|
|
173
|
+
*/
|
|
174
|
+
total: number;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface AgentGetByIDResponse {
|
|
179
|
+
data: AgentGetByIDResponse.Data;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export namespace AgentGetByIDResponse {
|
|
183
|
+
export interface Data {
|
|
184
|
+
/**
|
|
185
|
+
* Unique identifier of the agent
|
|
186
|
+
*/
|
|
187
|
+
id: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Creation timestamp in ISO 8601 format
|
|
191
|
+
*/
|
|
192
|
+
createdAt: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Custom identifier for the agent
|
|
196
|
+
*/
|
|
197
|
+
customId: string | null;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Description of the agent
|
|
201
|
+
*/
|
|
202
|
+
description: string | null;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Name of the agent
|
|
206
|
+
*/
|
|
207
|
+
name: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Last update timestamp in ISO 8601 format
|
|
211
|
+
*/
|
|
212
|
+
updatedAt: string;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface AgentCreateParams {
|
|
217
|
+
/**
|
|
218
|
+
* Name of the agent
|
|
219
|
+
*/
|
|
220
|
+
name: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Custom identifier for the agent
|
|
224
|
+
*/
|
|
225
|
+
customId?: string | null;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Description of the agent
|
|
229
|
+
*/
|
|
230
|
+
description?: string | null;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface AgentUpdateParams {
|
|
234
|
+
/**
|
|
235
|
+
* Description of the agent
|
|
236
|
+
*/
|
|
237
|
+
description?: string | null;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Name of the agent
|
|
241
|
+
*/
|
|
242
|
+
name?: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export interface AgentListParams {
|
|
246
|
+
after?: string;
|
|
247
|
+
|
|
248
|
+
limit?: number;
|
|
249
|
+
|
|
250
|
+
searchText?: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare namespace Agent {
|
|
254
|
+
export {
|
|
255
|
+
type AgentCreateResponse as AgentCreateResponse,
|
|
256
|
+
type AgentUpdateResponse as AgentUpdateResponse,
|
|
257
|
+
type AgentListResponse as AgentListResponse,
|
|
258
|
+
type AgentGetByIDResponse as AgentGetByIDResponse,
|
|
259
|
+
type AgentCreateParams as AgentCreateParams,
|
|
260
|
+
type AgentUpdateParams as AgentUpdateParams,
|
|
261
|
+
type AgentListParams as AgentListParams,
|
|
262
|
+
};
|
|
263
|
+
}
|