@thirdweb-dev/nebula 0.1.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/LICENSE +201 -0
- package/README.md +46 -0
- package/dist/cjs/client/client.gen.js +9 -0
- package/dist/cjs/client/client.gen.js.map +1 -0
- package/dist/cjs/client/index.js +7 -0
- package/dist/cjs/client/index.js.map +1 -0
- package/dist/cjs/client/sdk.gen.js +811 -0
- package/dist/cjs/client/sdk.gen.js.map +1 -0
- package/dist/cjs/client/types.gen.js +4 -0
- package/dist/cjs/client/types.gen.js.map +1 -0
- package/dist/cjs/configure.js +57 -0
- package/dist/cjs/configure.js.map +1 -0
- package/dist/cjs/exports/thirdweb.js +10 -0
- package/dist/cjs/exports/thirdweb.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/client/client.gen.js +6 -0
- package/dist/esm/client/client.gen.js.map +1 -0
- package/dist/esm/client/index.js +4 -0
- package/dist/esm/client/index.js.map +1 -0
- package/dist/esm/client/sdk.gen.js +765 -0
- package/dist/esm/client/sdk.gen.js.map +1 -0
- package/dist/esm/client/types.gen.js +3 -0
- package/dist/esm/client/types.gen.js.map +1 -0
- package/dist/esm/configure.js +52 -0
- package/dist/esm/configure.js.map +1 -0
- package/dist/esm/exports/thirdweb.js +3 -0
- package/dist/esm/exports/thirdweb.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/types/client/client.gen.d.ts +13 -0
- package/dist/types/client/client.gen.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +3 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/sdk.gen.d.ts +225 -0
- package/dist/types/client/sdk.gen.d.ts.map +1 -0
- package/dist/types/client/types.gen.d.ts +3803 -0
- package/dist/types/client/types.gen.d.ts.map +1 -0
- package/dist/types/configure.d.ts +13 -0
- package/dist/types/configure.d.ts.map +1 -0
- package/dist/types/exports/thirdweb.d.ts +4 -0
- package/dist/types/exports/thirdweb.d.ts.map +1 -0
- package/package.json +62 -0
- package/src/client/client.gen.ts +28 -0
- package/src/client/index.ts +4 -0
- package/src/client/sdk.gen.ts +1213 -0
- package/src/client/types.gen.ts +4270 -0
- package/src/configure.ts +76 -0
- package/src/exports/thirdweb.ts +8 -0
|
@@ -0,0 +1,1213 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
Client,
|
|
5
|
+
Options as ClientOptions,
|
|
6
|
+
TDataShape,
|
|
7
|
+
} from "@hey-api/client-fetch";
|
|
8
|
+
import { client as _heyApiClient } from "./client.gen.js";
|
|
9
|
+
import type {
|
|
10
|
+
AuthDelegateLoginData,
|
|
11
|
+
AuthDelegateLoginErrors,
|
|
12
|
+
AuthDelegateLoginResponses,
|
|
13
|
+
CreateAgentData,
|
|
14
|
+
CreateAgentErrors,
|
|
15
|
+
CreateAgentResponses,
|
|
16
|
+
CreateAgentToolData,
|
|
17
|
+
CreateAgentToolErrors,
|
|
18
|
+
CreateAgentToolResponses,
|
|
19
|
+
CreateAgentTriggerData,
|
|
20
|
+
CreateAgentTriggerErrors,
|
|
21
|
+
CreateAgentTriggerResponses,
|
|
22
|
+
CreateConversationData,
|
|
23
|
+
CreateConversationErrors,
|
|
24
|
+
CreateConversationMessageData,
|
|
25
|
+
CreateConversationMessageErrors,
|
|
26
|
+
CreateConversationMessageResponses,
|
|
27
|
+
CreateConversationResponses,
|
|
28
|
+
CreateUserWalletData,
|
|
29
|
+
CreateUserWalletErrors,
|
|
30
|
+
CreateUserWalletResponses,
|
|
31
|
+
DeleteAgentData,
|
|
32
|
+
DeleteAgentErrors,
|
|
33
|
+
DeleteAgentResponses,
|
|
34
|
+
DeleteAgentToolData,
|
|
35
|
+
DeleteAgentToolErrors,
|
|
36
|
+
DeleteAgentToolResponses,
|
|
37
|
+
DeleteAgentTriggerData,
|
|
38
|
+
DeleteAgentTriggerErrors,
|
|
39
|
+
DeleteAgentTriggerResponses,
|
|
40
|
+
DeleteConversationData,
|
|
41
|
+
DeleteConversationErrors,
|
|
42
|
+
DeleteConversationResponses,
|
|
43
|
+
DeleteUserWalletData,
|
|
44
|
+
DeleteUserWalletErrors,
|
|
45
|
+
DeleteUserWalletResponses,
|
|
46
|
+
DeprecatedChatCompletionsData,
|
|
47
|
+
DeprecatedChatCompletionsErrors,
|
|
48
|
+
DeprecatedChatCompletionsResponses,
|
|
49
|
+
DeprecatedChatData,
|
|
50
|
+
DeprecatedChatErrors,
|
|
51
|
+
DeprecatedChatResponses,
|
|
52
|
+
DeprecatedClearSessionData,
|
|
53
|
+
DeprecatedClearSessionErrors,
|
|
54
|
+
DeprecatedClearSessionResponses,
|
|
55
|
+
DeprecatedCreateSessionData,
|
|
56
|
+
DeprecatedCreateSessionErrors,
|
|
57
|
+
DeprecatedCreateSessionResponses,
|
|
58
|
+
DeprecatedDeleteSessionData,
|
|
59
|
+
DeprecatedDeleteSessionErrors,
|
|
60
|
+
DeprecatedDeleteSessionResponses,
|
|
61
|
+
DeprecatedExecuteData,
|
|
62
|
+
DeprecatedExecuteErrors,
|
|
63
|
+
DeprecatedExecuteResponses,
|
|
64
|
+
DeprecatedGetSessionData,
|
|
65
|
+
DeprecatedGetSessionErrors,
|
|
66
|
+
DeprecatedGetSessionResponses,
|
|
67
|
+
DeprecatedGetSessionsData,
|
|
68
|
+
DeprecatedGetSessionsResponses,
|
|
69
|
+
DeprecatedUpdateSessionData,
|
|
70
|
+
DeprecatedUpdateSessionErrors,
|
|
71
|
+
DeprecatedUpdateSessionResponses,
|
|
72
|
+
FeedbackData,
|
|
73
|
+
FeedbackErrors,
|
|
74
|
+
FeedbackResponses,
|
|
75
|
+
GetAgentData,
|
|
76
|
+
GetAgentErrors,
|
|
77
|
+
GetAgentResponses,
|
|
78
|
+
GetAgentsData,
|
|
79
|
+
GetAgentsResponses,
|
|
80
|
+
GetAgentToolData,
|
|
81
|
+
GetAgentToolErrors,
|
|
82
|
+
GetAgentToolResponses,
|
|
83
|
+
GetAgentTriggerData,
|
|
84
|
+
GetAgentTriggerErrors,
|
|
85
|
+
GetAgentTriggerResponses,
|
|
86
|
+
GetAgentWalletData,
|
|
87
|
+
GetAgentWalletErrors,
|
|
88
|
+
GetAgentWalletResponses,
|
|
89
|
+
GetAgentWalletsData,
|
|
90
|
+
GetAgentWalletsErrors,
|
|
91
|
+
GetAgentWalletsResponses,
|
|
92
|
+
GetAuthDelegatePayloadData,
|
|
93
|
+
GetAuthDelegatePayloadErrors,
|
|
94
|
+
GetAuthDelegatePayloadResponses,
|
|
95
|
+
GetConversationData,
|
|
96
|
+
GetConversationErrors,
|
|
97
|
+
GetConversationResponses,
|
|
98
|
+
GetConversationsData,
|
|
99
|
+
GetConversationsErrors,
|
|
100
|
+
GetConversationsResponses,
|
|
101
|
+
GetModelsData,
|
|
102
|
+
GetModelsResponses,
|
|
103
|
+
GetRegistryAgentsData,
|
|
104
|
+
GetRegistryAgentsErrors,
|
|
105
|
+
GetRegistryAgentsResponses,
|
|
106
|
+
GetUserData,
|
|
107
|
+
GetUserResponses,
|
|
108
|
+
GetUserWalletData,
|
|
109
|
+
GetUserWalletErrors,
|
|
110
|
+
GetUserWalletResponses,
|
|
111
|
+
GetUserWalletsData,
|
|
112
|
+
GetUserWalletsResponses,
|
|
113
|
+
UpdateAgentData,
|
|
114
|
+
UpdateAgentErrors,
|
|
115
|
+
UpdateAgentResponses,
|
|
116
|
+
UpdateAgentToolData,
|
|
117
|
+
UpdateAgentToolErrors,
|
|
118
|
+
UpdateAgentToolResponses,
|
|
119
|
+
UpdateAgentTriggerData,
|
|
120
|
+
UpdateAgentTriggerErrors,
|
|
121
|
+
UpdateAgentTriggerResponses,
|
|
122
|
+
UpdateConversationData,
|
|
123
|
+
UpdateConversationErrors,
|
|
124
|
+
UpdateConversationMessageData,
|
|
125
|
+
UpdateConversationMessageErrors,
|
|
126
|
+
UpdateConversationMessageResponses,
|
|
127
|
+
UpdateConversationResponses,
|
|
128
|
+
UpdateUserWalletData,
|
|
129
|
+
UpdateUserWalletErrors,
|
|
130
|
+
UpdateUserWalletResponses,
|
|
131
|
+
VerifyAuthData,
|
|
132
|
+
VerifyAuthResponses,
|
|
133
|
+
} from "./types.gen.js";
|
|
134
|
+
|
|
135
|
+
export type Options<
|
|
136
|
+
TData extends TDataShape = TDataShape,
|
|
137
|
+
ThrowOnError extends boolean = boolean,
|
|
138
|
+
> = ClientOptions<TData, ThrowOnError> & {
|
|
139
|
+
/**
|
|
140
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
141
|
+
* individual options. This might be also useful if you want to implement a
|
|
142
|
+
* custom client.
|
|
143
|
+
*/
|
|
144
|
+
client?: Client;
|
|
145
|
+
/**
|
|
146
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
147
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
148
|
+
*/
|
|
149
|
+
meta?: Record<string, unknown>;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Get Session List
|
|
154
|
+
*/
|
|
155
|
+
export const deprecatedGetSessions = <ThrowOnError extends boolean = false>(
|
|
156
|
+
options?: Options<DeprecatedGetSessionsData, ThrowOnError>,
|
|
157
|
+
) => {
|
|
158
|
+
return (options?.client ?? _heyApiClient).get<
|
|
159
|
+
DeprecatedGetSessionsResponses,
|
|
160
|
+
unknown,
|
|
161
|
+
ThrowOnError
|
|
162
|
+
>({
|
|
163
|
+
security: [
|
|
164
|
+
{
|
|
165
|
+
name: "x-secret-key",
|
|
166
|
+
type: "apiKey",
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
url: "/session/list",
|
|
170
|
+
...options,
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Delete Session
|
|
176
|
+
*/
|
|
177
|
+
export const deprecatedDeleteSession = <ThrowOnError extends boolean = false>(
|
|
178
|
+
options: Options<DeprecatedDeleteSessionData, ThrowOnError>,
|
|
179
|
+
) => {
|
|
180
|
+
return (options.client ?? _heyApiClient).delete<
|
|
181
|
+
DeprecatedDeleteSessionResponses,
|
|
182
|
+
DeprecatedDeleteSessionErrors,
|
|
183
|
+
ThrowOnError
|
|
184
|
+
>({
|
|
185
|
+
security: [
|
|
186
|
+
{
|
|
187
|
+
name: "x-secret-key",
|
|
188
|
+
type: "apiKey",
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
url: "/session/{session_id}",
|
|
192
|
+
...options,
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Get Session
|
|
198
|
+
*/
|
|
199
|
+
export const deprecatedGetSession = <ThrowOnError extends boolean = false>(
|
|
200
|
+
options: Options<DeprecatedGetSessionData, ThrowOnError>,
|
|
201
|
+
) => {
|
|
202
|
+
return (options.client ?? _heyApiClient).get<
|
|
203
|
+
DeprecatedGetSessionResponses,
|
|
204
|
+
DeprecatedGetSessionErrors,
|
|
205
|
+
ThrowOnError
|
|
206
|
+
>({
|
|
207
|
+
security: [
|
|
208
|
+
{
|
|
209
|
+
name: "x-secret-key",
|
|
210
|
+
type: "apiKey",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
url: "/session/{session_id}",
|
|
214
|
+
...options,
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Update Session
|
|
220
|
+
*/
|
|
221
|
+
export const deprecatedUpdateSession = <ThrowOnError extends boolean = false>(
|
|
222
|
+
options: Options<DeprecatedUpdateSessionData, ThrowOnError>,
|
|
223
|
+
) => {
|
|
224
|
+
return (options.client ?? _heyApiClient).put<
|
|
225
|
+
DeprecatedUpdateSessionResponses,
|
|
226
|
+
DeprecatedUpdateSessionErrors,
|
|
227
|
+
ThrowOnError
|
|
228
|
+
>({
|
|
229
|
+
security: [
|
|
230
|
+
{
|
|
231
|
+
name: "x-secret-key",
|
|
232
|
+
type: "apiKey",
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
url: "/session/{session_id}",
|
|
236
|
+
...options,
|
|
237
|
+
headers: {
|
|
238
|
+
"Content-Type": "application/json",
|
|
239
|
+
...options.headers,
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Create Session
|
|
246
|
+
*/
|
|
247
|
+
export const deprecatedCreateSession = <ThrowOnError extends boolean = false>(
|
|
248
|
+
options: Options<DeprecatedCreateSessionData, ThrowOnError>,
|
|
249
|
+
) => {
|
|
250
|
+
return (options.client ?? _heyApiClient).post<
|
|
251
|
+
DeprecatedCreateSessionResponses,
|
|
252
|
+
DeprecatedCreateSessionErrors,
|
|
253
|
+
ThrowOnError
|
|
254
|
+
>({
|
|
255
|
+
security: [
|
|
256
|
+
{
|
|
257
|
+
name: "x-secret-key",
|
|
258
|
+
type: "apiKey",
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
url: "/session",
|
|
262
|
+
...options,
|
|
263
|
+
headers: {
|
|
264
|
+
"Content-Type": "application/json",
|
|
265
|
+
...options.headers,
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Clear Session
|
|
272
|
+
*/
|
|
273
|
+
export const deprecatedClearSession = <ThrowOnError extends boolean = false>(
|
|
274
|
+
options: Options<DeprecatedClearSessionData, ThrowOnError>,
|
|
275
|
+
) => {
|
|
276
|
+
return (options.client ?? _heyApiClient).post<
|
|
277
|
+
DeprecatedClearSessionResponses,
|
|
278
|
+
DeprecatedClearSessionErrors,
|
|
279
|
+
ThrowOnError
|
|
280
|
+
>({
|
|
281
|
+
security: [
|
|
282
|
+
{
|
|
283
|
+
name: "x-secret-key",
|
|
284
|
+
type: "apiKey",
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
url: "/session/{session_id}/clear",
|
|
288
|
+
...options,
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Chat
|
|
294
|
+
* Process a chat message and return the response
|
|
295
|
+
*/
|
|
296
|
+
export const deprecatedChat = <ThrowOnError extends boolean = false>(
|
|
297
|
+
options: Options<DeprecatedChatData, ThrowOnError>,
|
|
298
|
+
) => {
|
|
299
|
+
return (options.client ?? _heyApiClient).post<
|
|
300
|
+
DeprecatedChatResponses,
|
|
301
|
+
DeprecatedChatErrors,
|
|
302
|
+
ThrowOnError
|
|
303
|
+
>({
|
|
304
|
+
security: [
|
|
305
|
+
{
|
|
306
|
+
name: "x-secret-key",
|
|
307
|
+
type: "apiKey",
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
url: "/chat",
|
|
311
|
+
...options,
|
|
312
|
+
headers: {
|
|
313
|
+
"Content-Type": "application/json",
|
|
314
|
+
...options.headers,
|
|
315
|
+
},
|
|
316
|
+
});
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Chat Completions
|
|
321
|
+
* Process a chat message and return the response
|
|
322
|
+
*/
|
|
323
|
+
export const deprecatedChatCompletions = <ThrowOnError extends boolean = false>(
|
|
324
|
+
options: Options<DeprecatedChatCompletionsData, ThrowOnError>,
|
|
325
|
+
) => {
|
|
326
|
+
return (options.client ?? _heyApiClient).post<
|
|
327
|
+
DeprecatedChatCompletionsResponses,
|
|
328
|
+
DeprecatedChatCompletionsErrors,
|
|
329
|
+
ThrowOnError
|
|
330
|
+
>({
|
|
331
|
+
security: [
|
|
332
|
+
{
|
|
333
|
+
name: "x-secret-key",
|
|
334
|
+
type: "apiKey",
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
url: "/chat/completions",
|
|
338
|
+
...options,
|
|
339
|
+
headers: {
|
|
340
|
+
"Content-Type": "application/json",
|
|
341
|
+
...options.headers,
|
|
342
|
+
},
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Execute
|
|
348
|
+
* Process an execute request and return the response
|
|
349
|
+
*/
|
|
350
|
+
export const deprecatedExecute = <ThrowOnError extends boolean = false>(
|
|
351
|
+
options: Options<DeprecatedExecuteData, ThrowOnError>,
|
|
352
|
+
) => {
|
|
353
|
+
return (options.client ?? _heyApiClient).post<
|
|
354
|
+
DeprecatedExecuteResponses,
|
|
355
|
+
DeprecatedExecuteErrors,
|
|
356
|
+
ThrowOnError
|
|
357
|
+
>({
|
|
358
|
+
security: [
|
|
359
|
+
{
|
|
360
|
+
name: "x-secret-key",
|
|
361
|
+
type: "apiKey",
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
url: "/execute",
|
|
365
|
+
...options,
|
|
366
|
+
headers: {
|
|
367
|
+
"Content-Type": "application/json",
|
|
368
|
+
...options.headers,
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Feedback
|
|
375
|
+
* Process a feedback request and return the response
|
|
376
|
+
*/
|
|
377
|
+
export const feedback = <ThrowOnError extends boolean = false>(
|
|
378
|
+
options: Options<FeedbackData, ThrowOnError>,
|
|
379
|
+
) => {
|
|
380
|
+
return (options.client ?? _heyApiClient).post<
|
|
381
|
+
FeedbackResponses,
|
|
382
|
+
FeedbackErrors,
|
|
383
|
+
ThrowOnError
|
|
384
|
+
>({
|
|
385
|
+
security: [
|
|
386
|
+
{
|
|
387
|
+
name: "x-secret-key",
|
|
388
|
+
type: "apiKey",
|
|
389
|
+
},
|
|
390
|
+
],
|
|
391
|
+
url: "/feedback",
|
|
392
|
+
...options,
|
|
393
|
+
headers: {
|
|
394
|
+
"Content-Type": "application/json",
|
|
395
|
+
...options.headers,
|
|
396
|
+
},
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Get Models
|
|
402
|
+
* Get all models
|
|
403
|
+
*/
|
|
404
|
+
export const getModels = <ThrowOnError extends boolean = false>(
|
|
405
|
+
options?: Options<GetModelsData, ThrowOnError>,
|
|
406
|
+
) => {
|
|
407
|
+
return (options?.client ?? _heyApiClient).get<
|
|
408
|
+
GetModelsResponses,
|
|
409
|
+
unknown,
|
|
410
|
+
ThrowOnError
|
|
411
|
+
>({
|
|
412
|
+
security: [
|
|
413
|
+
{
|
|
414
|
+
name: "x-secret-key",
|
|
415
|
+
type: "apiKey",
|
|
416
|
+
},
|
|
417
|
+
],
|
|
418
|
+
url: "/models",
|
|
419
|
+
...options,
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Get Delegate Payload
|
|
425
|
+
* Get a delegate payload
|
|
426
|
+
*/
|
|
427
|
+
export const getAuthDelegatePayload = <ThrowOnError extends boolean = false>(
|
|
428
|
+
options: Options<GetAuthDelegatePayloadData, ThrowOnError>,
|
|
429
|
+
) => {
|
|
430
|
+
return (options.client ?? _heyApiClient).post<
|
|
431
|
+
GetAuthDelegatePayloadResponses,
|
|
432
|
+
GetAuthDelegatePayloadErrors,
|
|
433
|
+
ThrowOnError
|
|
434
|
+
>({
|
|
435
|
+
security: [
|
|
436
|
+
{
|
|
437
|
+
name: "x-secret-key",
|
|
438
|
+
type: "apiKey",
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
url: "/auth/delegate/payload",
|
|
442
|
+
...options,
|
|
443
|
+
headers: {
|
|
444
|
+
"Content-Type": "application/json",
|
|
445
|
+
...options.headers,
|
|
446
|
+
},
|
|
447
|
+
});
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Login Delegate
|
|
452
|
+
* Login with SIWE
|
|
453
|
+
*/
|
|
454
|
+
export const authDelegateLogin = <ThrowOnError extends boolean = false>(
|
|
455
|
+
options: Options<AuthDelegateLoginData, ThrowOnError>,
|
|
456
|
+
) => {
|
|
457
|
+
return (options.client ?? _heyApiClient).post<
|
|
458
|
+
AuthDelegateLoginResponses,
|
|
459
|
+
AuthDelegateLoginErrors,
|
|
460
|
+
ThrowOnError
|
|
461
|
+
>({
|
|
462
|
+
security: [
|
|
463
|
+
{
|
|
464
|
+
name: "x-secret-key",
|
|
465
|
+
type: "apiKey",
|
|
466
|
+
},
|
|
467
|
+
],
|
|
468
|
+
url: "/auth/delegate/login",
|
|
469
|
+
...options,
|
|
470
|
+
headers: {
|
|
471
|
+
"Content-Type": "application/json",
|
|
472
|
+
...options.headers,
|
|
473
|
+
},
|
|
474
|
+
});
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Verify Auth
|
|
479
|
+
* Verify a delegate payload
|
|
480
|
+
*/
|
|
481
|
+
export const verifyAuth = <ThrowOnError extends boolean = false>(
|
|
482
|
+
options?: Options<VerifyAuthData, ThrowOnError>,
|
|
483
|
+
) => {
|
|
484
|
+
return (options?.client ?? _heyApiClient).get<
|
|
485
|
+
VerifyAuthResponses,
|
|
486
|
+
unknown,
|
|
487
|
+
ThrowOnError
|
|
488
|
+
>({
|
|
489
|
+
security: [
|
|
490
|
+
{
|
|
491
|
+
name: "x-secret-key",
|
|
492
|
+
type: "apiKey",
|
|
493
|
+
},
|
|
494
|
+
],
|
|
495
|
+
url: "/auth/verify",
|
|
496
|
+
...options,
|
|
497
|
+
});
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Get User
|
|
502
|
+
* Get the current user
|
|
503
|
+
*/
|
|
504
|
+
export const getUser = <ThrowOnError extends boolean = false>(
|
|
505
|
+
options?: Options<GetUserData, ThrowOnError>,
|
|
506
|
+
) => {
|
|
507
|
+
return (options?.client ?? _heyApiClient).get<
|
|
508
|
+
GetUserResponses,
|
|
509
|
+
unknown,
|
|
510
|
+
ThrowOnError
|
|
511
|
+
>({
|
|
512
|
+
security: [
|
|
513
|
+
{
|
|
514
|
+
name: "x-secret-key",
|
|
515
|
+
type: "apiKey",
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
url: "/user",
|
|
519
|
+
...options,
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Get User Wallets
|
|
525
|
+
* Get all user wallets
|
|
526
|
+
*/
|
|
527
|
+
export const getUserWallets = <ThrowOnError extends boolean = false>(
|
|
528
|
+
options?: Options<GetUserWalletsData, ThrowOnError>,
|
|
529
|
+
) => {
|
|
530
|
+
return (options?.client ?? _heyApiClient).get<
|
|
531
|
+
GetUserWalletsResponses,
|
|
532
|
+
unknown,
|
|
533
|
+
ThrowOnError
|
|
534
|
+
>({
|
|
535
|
+
security: [
|
|
536
|
+
{
|
|
537
|
+
name: "x-secret-key",
|
|
538
|
+
type: "apiKey",
|
|
539
|
+
},
|
|
540
|
+
],
|
|
541
|
+
url: "/user/wallets",
|
|
542
|
+
...options,
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Delete User Wallet
|
|
548
|
+
* Delete a user wallet
|
|
549
|
+
*/
|
|
550
|
+
export const deleteUserWallet = <ThrowOnError extends boolean = false>(
|
|
551
|
+
options: Options<DeleteUserWalletData, ThrowOnError>,
|
|
552
|
+
) => {
|
|
553
|
+
return (options.client ?? _heyApiClient).delete<
|
|
554
|
+
DeleteUserWalletResponses,
|
|
555
|
+
DeleteUserWalletErrors,
|
|
556
|
+
ThrowOnError
|
|
557
|
+
>({
|
|
558
|
+
security: [
|
|
559
|
+
{
|
|
560
|
+
name: "x-secret-key",
|
|
561
|
+
type: "apiKey",
|
|
562
|
+
},
|
|
563
|
+
],
|
|
564
|
+
url: "/user/wallet/{wallet_id}",
|
|
565
|
+
...options,
|
|
566
|
+
});
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Get User Wallet
|
|
571
|
+
* Get a user wallet
|
|
572
|
+
*/
|
|
573
|
+
export const getUserWallet = <ThrowOnError extends boolean = false>(
|
|
574
|
+
options: Options<GetUserWalletData, ThrowOnError>,
|
|
575
|
+
) => {
|
|
576
|
+
return (options.client ?? _heyApiClient).get<
|
|
577
|
+
GetUserWalletResponses,
|
|
578
|
+
GetUserWalletErrors,
|
|
579
|
+
ThrowOnError
|
|
580
|
+
>({
|
|
581
|
+
security: [
|
|
582
|
+
{
|
|
583
|
+
name: "x-secret-key",
|
|
584
|
+
type: "apiKey",
|
|
585
|
+
},
|
|
586
|
+
],
|
|
587
|
+
url: "/user/wallet/{wallet_id}",
|
|
588
|
+
...options,
|
|
589
|
+
});
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Put User Wallet
|
|
594
|
+
* Update a user wallet
|
|
595
|
+
*/
|
|
596
|
+
export const updateUserWallet = <ThrowOnError extends boolean = false>(
|
|
597
|
+
options: Options<UpdateUserWalletData, ThrowOnError>,
|
|
598
|
+
) => {
|
|
599
|
+
return (options.client ?? _heyApiClient).put<
|
|
600
|
+
UpdateUserWalletResponses,
|
|
601
|
+
UpdateUserWalletErrors,
|
|
602
|
+
ThrowOnError
|
|
603
|
+
>({
|
|
604
|
+
security: [
|
|
605
|
+
{
|
|
606
|
+
name: "x-secret-key",
|
|
607
|
+
type: "apiKey",
|
|
608
|
+
},
|
|
609
|
+
],
|
|
610
|
+
url: "/user/wallet/{wallet_id}",
|
|
611
|
+
...options,
|
|
612
|
+
headers: {
|
|
613
|
+
"Content-Type": "application/json",
|
|
614
|
+
...options.headers,
|
|
615
|
+
},
|
|
616
|
+
});
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Post User Wallet
|
|
621
|
+
* Create a user wallet
|
|
622
|
+
*/
|
|
623
|
+
export const createUserWallet = <ThrowOnError extends boolean = false>(
|
|
624
|
+
options: Options<CreateUserWalletData, ThrowOnError>,
|
|
625
|
+
) => {
|
|
626
|
+
return (options.client ?? _heyApiClient).post<
|
|
627
|
+
CreateUserWalletResponses,
|
|
628
|
+
CreateUserWalletErrors,
|
|
629
|
+
ThrowOnError
|
|
630
|
+
>({
|
|
631
|
+
security: [
|
|
632
|
+
{
|
|
633
|
+
name: "x-secret-key",
|
|
634
|
+
type: "apiKey",
|
|
635
|
+
},
|
|
636
|
+
],
|
|
637
|
+
url: "/user/wallet",
|
|
638
|
+
...options,
|
|
639
|
+
headers: {
|
|
640
|
+
"Content-Type": "application/json",
|
|
641
|
+
...options.headers,
|
|
642
|
+
},
|
|
643
|
+
});
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Get Agents
|
|
648
|
+
* Get all agents
|
|
649
|
+
*/
|
|
650
|
+
export const getAgents = <ThrowOnError extends boolean = false>(
|
|
651
|
+
options?: Options<GetAgentsData, ThrowOnError>,
|
|
652
|
+
) => {
|
|
653
|
+
return (options?.client ?? _heyApiClient).get<
|
|
654
|
+
GetAgentsResponses,
|
|
655
|
+
unknown,
|
|
656
|
+
ThrowOnError
|
|
657
|
+
>({
|
|
658
|
+
security: [
|
|
659
|
+
{
|
|
660
|
+
name: "x-secret-key",
|
|
661
|
+
type: "apiKey",
|
|
662
|
+
},
|
|
663
|
+
],
|
|
664
|
+
url: "/agents",
|
|
665
|
+
...options,
|
|
666
|
+
});
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Delete Agent
|
|
671
|
+
* Delete an agent
|
|
672
|
+
*/
|
|
673
|
+
export const deleteAgent = <ThrowOnError extends boolean = false>(
|
|
674
|
+
options: Options<DeleteAgentData, ThrowOnError>,
|
|
675
|
+
) => {
|
|
676
|
+
return (options.client ?? _heyApiClient).delete<
|
|
677
|
+
DeleteAgentResponses,
|
|
678
|
+
DeleteAgentErrors,
|
|
679
|
+
ThrowOnError
|
|
680
|
+
>({
|
|
681
|
+
security: [
|
|
682
|
+
{
|
|
683
|
+
name: "x-secret-key",
|
|
684
|
+
type: "apiKey",
|
|
685
|
+
},
|
|
686
|
+
],
|
|
687
|
+
url: "/agent/{agent_id}",
|
|
688
|
+
...options,
|
|
689
|
+
});
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Get Agent
|
|
694
|
+
* Get an agent
|
|
695
|
+
*/
|
|
696
|
+
export const getAgent = <ThrowOnError extends boolean = false>(
|
|
697
|
+
options: Options<GetAgentData, ThrowOnError>,
|
|
698
|
+
) => {
|
|
699
|
+
return (options.client ?? _heyApiClient).get<
|
|
700
|
+
GetAgentResponses,
|
|
701
|
+
GetAgentErrors,
|
|
702
|
+
ThrowOnError
|
|
703
|
+
>({
|
|
704
|
+
security: [
|
|
705
|
+
{
|
|
706
|
+
name: "x-secret-key",
|
|
707
|
+
type: "apiKey",
|
|
708
|
+
},
|
|
709
|
+
],
|
|
710
|
+
url: "/agent/{agent_id}",
|
|
711
|
+
...options,
|
|
712
|
+
});
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Update Agent
|
|
717
|
+
* Update an agent
|
|
718
|
+
*/
|
|
719
|
+
export const updateAgent = <ThrowOnError extends boolean = false>(
|
|
720
|
+
options: Options<UpdateAgentData, ThrowOnError>,
|
|
721
|
+
) => {
|
|
722
|
+
return (options.client ?? _heyApiClient).put<
|
|
723
|
+
UpdateAgentResponses,
|
|
724
|
+
UpdateAgentErrors,
|
|
725
|
+
ThrowOnError
|
|
726
|
+
>({
|
|
727
|
+
security: [
|
|
728
|
+
{
|
|
729
|
+
name: "x-secret-key",
|
|
730
|
+
type: "apiKey",
|
|
731
|
+
},
|
|
732
|
+
],
|
|
733
|
+
url: "/agent/{agent_id}",
|
|
734
|
+
...options,
|
|
735
|
+
headers: {
|
|
736
|
+
"Content-Type": "application/json",
|
|
737
|
+
...options.headers,
|
|
738
|
+
},
|
|
739
|
+
});
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Create Agent
|
|
744
|
+
* Create an agent
|
|
745
|
+
*/
|
|
746
|
+
export const createAgent = <ThrowOnError extends boolean = false>(
|
|
747
|
+
options: Options<CreateAgentData, ThrowOnError>,
|
|
748
|
+
) => {
|
|
749
|
+
return (options.client ?? _heyApiClient).post<
|
|
750
|
+
CreateAgentResponses,
|
|
751
|
+
CreateAgentErrors,
|
|
752
|
+
ThrowOnError
|
|
753
|
+
>({
|
|
754
|
+
security: [
|
|
755
|
+
{
|
|
756
|
+
name: "x-secret-key",
|
|
757
|
+
type: "apiKey",
|
|
758
|
+
},
|
|
759
|
+
],
|
|
760
|
+
url: "/agent",
|
|
761
|
+
...options,
|
|
762
|
+
headers: {
|
|
763
|
+
"Content-Type": "application/json",
|
|
764
|
+
...options.headers,
|
|
765
|
+
},
|
|
766
|
+
});
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Delete Agent Trigger
|
|
771
|
+
* Delete an agent trigger
|
|
772
|
+
*/
|
|
773
|
+
export const deleteAgentTrigger = <ThrowOnError extends boolean = false>(
|
|
774
|
+
options: Options<DeleteAgentTriggerData, ThrowOnError>,
|
|
775
|
+
) => {
|
|
776
|
+
return (options.client ?? _heyApiClient).delete<
|
|
777
|
+
DeleteAgentTriggerResponses,
|
|
778
|
+
DeleteAgentTriggerErrors,
|
|
779
|
+
ThrowOnError
|
|
780
|
+
>({
|
|
781
|
+
security: [
|
|
782
|
+
{
|
|
783
|
+
name: "x-secret-key",
|
|
784
|
+
type: "apiKey",
|
|
785
|
+
},
|
|
786
|
+
],
|
|
787
|
+
url: "/agent/{agent_id}/trigger/{trigger_id}",
|
|
788
|
+
...options,
|
|
789
|
+
});
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Get Agent Trigger
|
|
794
|
+
* Get an agent trigger
|
|
795
|
+
*/
|
|
796
|
+
export const getAgentTrigger = <ThrowOnError extends boolean = false>(
|
|
797
|
+
options: Options<GetAgentTriggerData, ThrowOnError>,
|
|
798
|
+
) => {
|
|
799
|
+
return (options.client ?? _heyApiClient).get<
|
|
800
|
+
GetAgentTriggerResponses,
|
|
801
|
+
GetAgentTriggerErrors,
|
|
802
|
+
ThrowOnError
|
|
803
|
+
>({
|
|
804
|
+
security: [
|
|
805
|
+
{
|
|
806
|
+
name: "x-secret-key",
|
|
807
|
+
type: "apiKey",
|
|
808
|
+
},
|
|
809
|
+
],
|
|
810
|
+
url: "/agent/{agent_id}/trigger/{trigger_id}",
|
|
811
|
+
...options,
|
|
812
|
+
});
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Update Agent Trigger
|
|
817
|
+
* Update an agent trigger
|
|
818
|
+
*/
|
|
819
|
+
export const updateAgentTrigger = <ThrowOnError extends boolean = false>(
|
|
820
|
+
options: Options<UpdateAgentTriggerData, ThrowOnError>,
|
|
821
|
+
) => {
|
|
822
|
+
return (options.client ?? _heyApiClient).put<
|
|
823
|
+
UpdateAgentTriggerResponses,
|
|
824
|
+
UpdateAgentTriggerErrors,
|
|
825
|
+
ThrowOnError
|
|
826
|
+
>({
|
|
827
|
+
security: [
|
|
828
|
+
{
|
|
829
|
+
name: "x-secret-key",
|
|
830
|
+
type: "apiKey",
|
|
831
|
+
},
|
|
832
|
+
],
|
|
833
|
+
url: "/agent/{agent_id}/trigger/{trigger_id}",
|
|
834
|
+
...options,
|
|
835
|
+
headers: {
|
|
836
|
+
"Content-Type": "application/json",
|
|
837
|
+
...options.headers,
|
|
838
|
+
},
|
|
839
|
+
});
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Create Agent Trigger
|
|
844
|
+
* Create an agent trigger
|
|
845
|
+
*/
|
|
846
|
+
export const createAgentTrigger = <ThrowOnError extends boolean = false>(
|
|
847
|
+
options: Options<CreateAgentTriggerData, ThrowOnError>,
|
|
848
|
+
) => {
|
|
849
|
+
return (options.client ?? _heyApiClient).post<
|
|
850
|
+
CreateAgentTriggerResponses,
|
|
851
|
+
CreateAgentTriggerErrors,
|
|
852
|
+
ThrowOnError
|
|
853
|
+
>({
|
|
854
|
+
security: [
|
|
855
|
+
{
|
|
856
|
+
name: "x-secret-key",
|
|
857
|
+
type: "apiKey",
|
|
858
|
+
},
|
|
859
|
+
],
|
|
860
|
+
url: "/agent/{agent_id}/trigger",
|
|
861
|
+
...options,
|
|
862
|
+
headers: {
|
|
863
|
+
"Content-Type": "application/json",
|
|
864
|
+
...options.headers,
|
|
865
|
+
},
|
|
866
|
+
});
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Delete Agent Tool
|
|
871
|
+
* Delete an agent tool
|
|
872
|
+
*/
|
|
873
|
+
export const deleteAgentTool = <ThrowOnError extends boolean = false>(
|
|
874
|
+
options: Options<DeleteAgentToolData, ThrowOnError>,
|
|
875
|
+
) => {
|
|
876
|
+
return (options.client ?? _heyApiClient).delete<
|
|
877
|
+
DeleteAgentToolResponses,
|
|
878
|
+
DeleteAgentToolErrors,
|
|
879
|
+
ThrowOnError
|
|
880
|
+
>({
|
|
881
|
+
security: [
|
|
882
|
+
{
|
|
883
|
+
name: "x-secret-key",
|
|
884
|
+
type: "apiKey",
|
|
885
|
+
},
|
|
886
|
+
],
|
|
887
|
+
url: "/agent/{agent_id}/tool/{tool_id}",
|
|
888
|
+
...options,
|
|
889
|
+
});
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Get Agent Tool
|
|
894
|
+
* Get an agent tool
|
|
895
|
+
*/
|
|
896
|
+
export const getAgentTool = <ThrowOnError extends boolean = false>(
|
|
897
|
+
options: Options<GetAgentToolData, ThrowOnError>,
|
|
898
|
+
) => {
|
|
899
|
+
return (options.client ?? _heyApiClient).get<
|
|
900
|
+
GetAgentToolResponses,
|
|
901
|
+
GetAgentToolErrors,
|
|
902
|
+
ThrowOnError
|
|
903
|
+
>({
|
|
904
|
+
security: [
|
|
905
|
+
{
|
|
906
|
+
name: "x-secret-key",
|
|
907
|
+
type: "apiKey",
|
|
908
|
+
},
|
|
909
|
+
],
|
|
910
|
+
url: "/agent/{agent_id}/tool/{tool_id}",
|
|
911
|
+
...options,
|
|
912
|
+
});
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Update Agent Tool
|
|
917
|
+
* Update an agent tool
|
|
918
|
+
*/
|
|
919
|
+
export const updateAgentTool = <ThrowOnError extends boolean = false>(
|
|
920
|
+
options: Options<UpdateAgentToolData, ThrowOnError>,
|
|
921
|
+
) => {
|
|
922
|
+
return (options.client ?? _heyApiClient).put<
|
|
923
|
+
UpdateAgentToolResponses,
|
|
924
|
+
UpdateAgentToolErrors,
|
|
925
|
+
ThrowOnError
|
|
926
|
+
>({
|
|
927
|
+
security: [
|
|
928
|
+
{
|
|
929
|
+
name: "x-secret-key",
|
|
930
|
+
type: "apiKey",
|
|
931
|
+
},
|
|
932
|
+
],
|
|
933
|
+
url: "/agent/{agent_id}/tool/{tool_id}",
|
|
934
|
+
...options,
|
|
935
|
+
headers: {
|
|
936
|
+
"Content-Type": "application/json",
|
|
937
|
+
...options.headers,
|
|
938
|
+
},
|
|
939
|
+
});
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Create Agent Tool
|
|
944
|
+
* Create an agent tool
|
|
945
|
+
*/
|
|
946
|
+
export const createAgentTool = <ThrowOnError extends boolean = false>(
|
|
947
|
+
options: Options<CreateAgentToolData, ThrowOnError>,
|
|
948
|
+
) => {
|
|
949
|
+
return (options.client ?? _heyApiClient).post<
|
|
950
|
+
CreateAgentToolResponses,
|
|
951
|
+
CreateAgentToolErrors,
|
|
952
|
+
ThrowOnError
|
|
953
|
+
>({
|
|
954
|
+
security: [
|
|
955
|
+
{
|
|
956
|
+
name: "x-secret-key",
|
|
957
|
+
type: "apiKey",
|
|
958
|
+
},
|
|
959
|
+
],
|
|
960
|
+
url: "/agent/{agent_id}/tool",
|
|
961
|
+
...options,
|
|
962
|
+
headers: {
|
|
963
|
+
"Content-Type": "application/json",
|
|
964
|
+
...options.headers,
|
|
965
|
+
},
|
|
966
|
+
});
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* Get Agent Wallets
|
|
971
|
+
* Get all agent wallets
|
|
972
|
+
*/
|
|
973
|
+
export const getAgentWallets = <ThrowOnError extends boolean = false>(
|
|
974
|
+
options: Options<GetAgentWalletsData, ThrowOnError>,
|
|
975
|
+
) => {
|
|
976
|
+
return (options.client ?? _heyApiClient).get<
|
|
977
|
+
GetAgentWalletsResponses,
|
|
978
|
+
GetAgentWalletsErrors,
|
|
979
|
+
ThrowOnError
|
|
980
|
+
>({
|
|
981
|
+
security: [
|
|
982
|
+
{
|
|
983
|
+
name: "x-secret-key",
|
|
984
|
+
type: "apiKey",
|
|
985
|
+
},
|
|
986
|
+
],
|
|
987
|
+
url: "/agent/{agent_id}/wallets",
|
|
988
|
+
...options,
|
|
989
|
+
});
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Get Agent Wallet
|
|
994
|
+
* Get an agent wallet
|
|
995
|
+
*/
|
|
996
|
+
export const getAgentWallet = <ThrowOnError extends boolean = false>(
|
|
997
|
+
options: Options<GetAgentWalletData, ThrowOnError>,
|
|
998
|
+
) => {
|
|
999
|
+
return (options.client ?? _heyApiClient).get<
|
|
1000
|
+
GetAgentWalletResponses,
|
|
1001
|
+
GetAgentWalletErrors,
|
|
1002
|
+
ThrowOnError
|
|
1003
|
+
>({
|
|
1004
|
+
security: [
|
|
1005
|
+
{
|
|
1006
|
+
name: "x-secret-key",
|
|
1007
|
+
type: "apiKey",
|
|
1008
|
+
},
|
|
1009
|
+
],
|
|
1010
|
+
url: "/agent/{agent_id}/wallet/{wallet_id}",
|
|
1011
|
+
...options,
|
|
1012
|
+
});
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Get Conversations
|
|
1017
|
+
* Get all conversations
|
|
1018
|
+
*/
|
|
1019
|
+
export const getConversations = <ThrowOnError extends boolean = false>(
|
|
1020
|
+
options?: Options<GetConversationsData, ThrowOnError>,
|
|
1021
|
+
) => {
|
|
1022
|
+
return (options?.client ?? _heyApiClient).get<
|
|
1023
|
+
GetConversationsResponses,
|
|
1024
|
+
GetConversationsErrors,
|
|
1025
|
+
ThrowOnError
|
|
1026
|
+
>({
|
|
1027
|
+
security: [
|
|
1028
|
+
{
|
|
1029
|
+
name: "x-secret-key",
|
|
1030
|
+
type: "apiKey",
|
|
1031
|
+
},
|
|
1032
|
+
],
|
|
1033
|
+
url: "/conversations",
|
|
1034
|
+
...options,
|
|
1035
|
+
});
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* Delete Conversation
|
|
1040
|
+
* Delete a conversation
|
|
1041
|
+
*/
|
|
1042
|
+
export const deleteConversation = <ThrowOnError extends boolean = false>(
|
|
1043
|
+
options: Options<DeleteConversationData, ThrowOnError>,
|
|
1044
|
+
) => {
|
|
1045
|
+
return (options.client ?? _heyApiClient).delete<
|
|
1046
|
+
DeleteConversationResponses,
|
|
1047
|
+
DeleteConversationErrors,
|
|
1048
|
+
ThrowOnError
|
|
1049
|
+
>({
|
|
1050
|
+
security: [
|
|
1051
|
+
{
|
|
1052
|
+
name: "x-secret-key",
|
|
1053
|
+
type: "apiKey",
|
|
1054
|
+
},
|
|
1055
|
+
],
|
|
1056
|
+
url: "/conversation/{conversation_id}",
|
|
1057
|
+
...options,
|
|
1058
|
+
});
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Get Conversation
|
|
1063
|
+
* Get a conversation
|
|
1064
|
+
*/
|
|
1065
|
+
export const getConversation = <ThrowOnError extends boolean = false>(
|
|
1066
|
+
options: Options<GetConversationData, ThrowOnError>,
|
|
1067
|
+
) => {
|
|
1068
|
+
return (options.client ?? _heyApiClient).get<
|
|
1069
|
+
GetConversationResponses,
|
|
1070
|
+
GetConversationErrors,
|
|
1071
|
+
ThrowOnError
|
|
1072
|
+
>({
|
|
1073
|
+
security: [
|
|
1074
|
+
{
|
|
1075
|
+
name: "x-secret-key",
|
|
1076
|
+
type: "apiKey",
|
|
1077
|
+
},
|
|
1078
|
+
],
|
|
1079
|
+
url: "/conversation/{conversation_id}",
|
|
1080
|
+
...options,
|
|
1081
|
+
});
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Update Conversation
|
|
1086
|
+
* Update a conversation
|
|
1087
|
+
*/
|
|
1088
|
+
export const updateConversation = <ThrowOnError extends boolean = false>(
|
|
1089
|
+
options: Options<UpdateConversationData, ThrowOnError>,
|
|
1090
|
+
) => {
|
|
1091
|
+
return (options.client ?? _heyApiClient).put<
|
|
1092
|
+
UpdateConversationResponses,
|
|
1093
|
+
UpdateConversationErrors,
|
|
1094
|
+
ThrowOnError
|
|
1095
|
+
>({
|
|
1096
|
+
security: [
|
|
1097
|
+
{
|
|
1098
|
+
name: "x-secret-key",
|
|
1099
|
+
type: "apiKey",
|
|
1100
|
+
},
|
|
1101
|
+
],
|
|
1102
|
+
url: "/conversation/{conversation_id}",
|
|
1103
|
+
...options,
|
|
1104
|
+
headers: {
|
|
1105
|
+
"Content-Type": "application/json",
|
|
1106
|
+
...options.headers,
|
|
1107
|
+
},
|
|
1108
|
+
});
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Create Conversation
|
|
1113
|
+
* Create a conversation
|
|
1114
|
+
*/
|
|
1115
|
+
export const createConversation = <ThrowOnError extends boolean = false>(
|
|
1116
|
+
options: Options<CreateConversationData, ThrowOnError>,
|
|
1117
|
+
) => {
|
|
1118
|
+
return (options.client ?? _heyApiClient).post<
|
|
1119
|
+
CreateConversationResponses,
|
|
1120
|
+
CreateConversationErrors,
|
|
1121
|
+
ThrowOnError
|
|
1122
|
+
>({
|
|
1123
|
+
security: [
|
|
1124
|
+
{
|
|
1125
|
+
name: "x-secret-key",
|
|
1126
|
+
type: "apiKey",
|
|
1127
|
+
},
|
|
1128
|
+
],
|
|
1129
|
+
url: "/conversation",
|
|
1130
|
+
...options,
|
|
1131
|
+
headers: {
|
|
1132
|
+
"Content-Type": "application/json",
|
|
1133
|
+
...options.headers,
|
|
1134
|
+
},
|
|
1135
|
+
});
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Create Conversation Message
|
|
1140
|
+
* Create a message for a conversation
|
|
1141
|
+
*/
|
|
1142
|
+
export const createConversationMessage = <ThrowOnError extends boolean = false>(
|
|
1143
|
+
options: Options<CreateConversationMessageData, ThrowOnError>,
|
|
1144
|
+
) => {
|
|
1145
|
+
return (options.client ?? _heyApiClient).post<
|
|
1146
|
+
CreateConversationMessageResponses,
|
|
1147
|
+
CreateConversationMessageErrors,
|
|
1148
|
+
ThrowOnError
|
|
1149
|
+
>({
|
|
1150
|
+
security: [
|
|
1151
|
+
{
|
|
1152
|
+
name: "x-secret-key",
|
|
1153
|
+
type: "apiKey",
|
|
1154
|
+
},
|
|
1155
|
+
],
|
|
1156
|
+
url: "/conversation/{conversation_id}/message",
|
|
1157
|
+
...options,
|
|
1158
|
+
headers: {
|
|
1159
|
+
"Content-Type": "application/json",
|
|
1160
|
+
...options.headers,
|
|
1161
|
+
},
|
|
1162
|
+
});
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* Update Conversation Message
|
|
1167
|
+
* Update a message for a conversation
|
|
1168
|
+
*/
|
|
1169
|
+
export const updateConversationMessage = <ThrowOnError extends boolean = false>(
|
|
1170
|
+
options: Options<UpdateConversationMessageData, ThrowOnError>,
|
|
1171
|
+
) => {
|
|
1172
|
+
return (options.client ?? _heyApiClient).put<
|
|
1173
|
+
UpdateConversationMessageResponses,
|
|
1174
|
+
UpdateConversationMessageErrors,
|
|
1175
|
+
ThrowOnError
|
|
1176
|
+
>({
|
|
1177
|
+
security: [
|
|
1178
|
+
{
|
|
1179
|
+
name: "x-secret-key",
|
|
1180
|
+
type: "apiKey",
|
|
1181
|
+
},
|
|
1182
|
+
],
|
|
1183
|
+
url: "/conversation/{conversation_id}/message/{message_id}",
|
|
1184
|
+
...options,
|
|
1185
|
+
headers: {
|
|
1186
|
+
"Content-Type": "application/json",
|
|
1187
|
+
...options.headers,
|
|
1188
|
+
},
|
|
1189
|
+
});
|
|
1190
|
+
};
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* Get Registry Agents
|
|
1194
|
+
* Get all agents from the registry
|
|
1195
|
+
*/
|
|
1196
|
+
export const getRegistryAgents = <ThrowOnError extends boolean = false>(
|
|
1197
|
+
options?: Options<GetRegistryAgentsData, ThrowOnError>,
|
|
1198
|
+
) => {
|
|
1199
|
+
return (options?.client ?? _heyApiClient).get<
|
|
1200
|
+
GetRegistryAgentsResponses,
|
|
1201
|
+
GetRegistryAgentsErrors,
|
|
1202
|
+
ThrowOnError
|
|
1203
|
+
>({
|
|
1204
|
+
security: [
|
|
1205
|
+
{
|
|
1206
|
+
name: "x-secret-key",
|
|
1207
|
+
type: "apiKey",
|
|
1208
|
+
},
|
|
1209
|
+
],
|
|
1210
|
+
url: "/registry/agents",
|
|
1211
|
+
...options,
|
|
1212
|
+
});
|
|
1213
|
+
};
|