@tambo-ai/typescript-sdk 0.47.0 → 0.49.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 +28 -0
- package/README.md +2 -5
- package/package.json +1 -1
- package/resources/beta/projects/api-key.d.ts +17 -0
- package/resources/beta/projects/api-key.d.ts.map +1 -1
- package/resources/beta/projects/api-key.js +17 -0
- package/resources/beta/projects/api-key.js.map +1 -1
- package/resources/beta/projects/api-key.mjs +17 -0
- package/resources/beta/projects/api-key.mjs.map +1 -1
- package/resources/beta/projects/projects.d.ts +18 -0
- package/resources/beta/projects/projects.d.ts.map +1 -1
- package/resources/beta/projects/projects.js +18 -0
- package/resources/beta/projects/projects.js.map +1 -1
- package/resources/beta/projects/projects.mjs +18 -0
- package/resources/beta/projects/projects.mjs.map +1 -1
- package/resources/beta/projects/provider-key.d.ts +17 -0
- package/resources/beta/projects/provider-key.d.ts.map +1 -1
- package/resources/beta/projects/provider-key.js +17 -0
- package/resources/beta/projects/provider-key.js.map +1 -1
- package/resources/beta/projects/provider-key.mjs +17 -0
- package/resources/beta/projects/provider-key.mjs.map +1 -1
- package/resources/beta/registry.d.ts +8 -0
- package/resources/beta/registry.d.ts.map +1 -1
- package/resources/beta/registry.js +8 -0
- package/resources/beta/registry.js.map +1 -1
- package/resources/beta/registry.mjs +8 -0
- package/resources/beta/registry.mjs.map +1 -1
- package/resources/beta/threads/messages.d.ts +37 -0
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js +29 -0
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs +29 -0
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/suggestions.d.ts +18 -0
- package/resources/beta/threads/suggestions.d.ts.map +1 -1
- package/resources/beta/threads/suggestions.js +18 -0
- package/resources/beta/threads/suggestions.js.map +1 -1
- package/resources/beta/threads/suggestions.mjs +18 -0
- package/resources/beta/threads/suggestions.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +69 -0
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +53 -0
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +53 -0
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/src/resources/beta/projects/api-key.ts +17 -0
- package/src/resources/beta/projects/projects.ts +18 -0
- package/src/resources/beta/projects/provider-key.ts +17 -0
- package/src/resources/beta/registry.ts +8 -0
- package/src/resources/beta/threads/messages.ts +38 -0
- package/src/resources/beta/threads/suggestions.ts +18 -0
- package/src/resources/beta/threads/threads.ts +74 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -29,18 +29,51 @@ export class Threads extends APIResource {
|
|
|
29
29
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
30
30
|
suggestions: SuggestionsAPI.Suggestions = new SuggestionsAPI.Suggestions(this._client);
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const thread = await client.beta.threads.create({
|
|
36
|
+
* projectId: 'projectId',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
32
40
|
create(body: ThreadCreateParams, options?: Core.RequestOptions): Core.APIPromise<Thread> {
|
|
33
41
|
return this._client.post('/threads', { body, ...options });
|
|
34
42
|
}
|
|
35
43
|
|
|
44
|
+
/**
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const thread = await client.beta.threads.retrieve('id');
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
36
50
|
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<ThreadRetrieveResponse> {
|
|
37
51
|
return this._client.get(`/threads/${id}`, options);
|
|
38
52
|
}
|
|
39
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const thread = await client.beta.threads.update('id', {
|
|
58
|
+
* projectId: 'projectId',
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
40
62
|
update(id: string, body: ThreadUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Thread> {
|
|
41
63
|
return this._client.put(`/threads/${id}`, { body, ...options });
|
|
42
64
|
}
|
|
43
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* // Automatically fetches more pages as needed.
|
|
70
|
+
* for await (const thread of client.beta.threads.list(
|
|
71
|
+
* 'projectId',
|
|
72
|
+
* )) {
|
|
73
|
+
* // ...
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
44
77
|
list(
|
|
45
78
|
projectId: string,
|
|
46
79
|
query?: ThreadListParams,
|
|
@@ -61,6 +94,12 @@ export class Threads extends APIResource {
|
|
|
61
94
|
});
|
|
62
95
|
}
|
|
63
96
|
|
|
97
|
+
/**
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* await client.beta.threads.delete('id');
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
64
103
|
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
65
104
|
return this._client.delete(`/threads/${id}`, {
|
|
66
105
|
...options,
|
|
@@ -68,10 +107,35 @@ export class Threads extends APIResource {
|
|
|
68
107
|
});
|
|
69
108
|
}
|
|
70
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const response = await client.beta.threads.advance({
|
|
114
|
+
* messageToAppend: {
|
|
115
|
+
* content: [{ type: 'text' }],
|
|
116
|
+
* role: 'user',
|
|
117
|
+
* },
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
71
121
|
advance(body: ThreadAdvanceParams, options?: Core.RequestOptions): Core.APIPromise<ThreadAdvanceResponse> {
|
|
72
122
|
return this._client.post('/threads/advance', { body, ...options });
|
|
73
123
|
}
|
|
74
124
|
|
|
125
|
+
/**
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* const response = await client.beta.threads.advanceById(
|
|
129
|
+
* 'id',
|
|
130
|
+
* {
|
|
131
|
+
* messageToAppend: {
|
|
132
|
+
* content: [{ type: 'text' }],
|
|
133
|
+
* role: 'user',
|
|
134
|
+
* },
|
|
135
|
+
* },
|
|
136
|
+
* );
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
75
139
|
advanceById(
|
|
76
140
|
id: string,
|
|
77
141
|
body: ThreadAdvanceByIDParams,
|
|
@@ -165,6 +229,8 @@ export interface ThreadMessage {
|
|
|
165
229
|
|
|
166
230
|
component?: ComponentDecisionV2;
|
|
167
231
|
|
|
232
|
+
error?: string;
|
|
233
|
+
|
|
168
234
|
metadata?: Record<string, unknown>;
|
|
169
235
|
|
|
170
236
|
tool_call_id?: string;
|
|
@@ -283,6 +349,8 @@ export interface ThreadAdvanceParams {
|
|
|
283
349
|
clientTools?: Array<Shared.ComponentContextToolMetadata>;
|
|
284
350
|
|
|
285
351
|
contextKey?: string;
|
|
352
|
+
|
|
353
|
+
forceToolChoice?: string;
|
|
286
354
|
}
|
|
287
355
|
|
|
288
356
|
export namespace ThreadAdvanceParams {
|
|
@@ -300,6 +368,8 @@ export namespace ThreadAdvanceParams {
|
|
|
300
368
|
*/
|
|
301
369
|
componentState?: Record<string, unknown>;
|
|
302
370
|
|
|
371
|
+
error?: string;
|
|
372
|
+
|
|
303
373
|
metadata?: Record<string, unknown>;
|
|
304
374
|
|
|
305
375
|
tool_call_id?: string;
|
|
@@ -323,6 +393,8 @@ export interface ThreadAdvanceByIDParams {
|
|
|
323
393
|
clientTools?: Array<Shared.ComponentContextToolMetadata>;
|
|
324
394
|
|
|
325
395
|
contextKey?: string;
|
|
396
|
+
|
|
397
|
+
forceToolChoice?: string;
|
|
326
398
|
}
|
|
327
399
|
|
|
328
400
|
export namespace ThreadAdvanceByIDParams {
|
|
@@ -340,6 +412,8 @@ export namespace ThreadAdvanceByIDParams {
|
|
|
340
412
|
*/
|
|
341
413
|
componentState?: Record<string, unknown>;
|
|
342
414
|
|
|
415
|
+
error?: string;
|
|
416
|
+
|
|
343
417
|
metadata?: Record<string, unknown>;
|
|
344
418
|
|
|
345
419
|
tool_call_id?: string;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.49.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.49.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.49.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|