@tambo-ai/typescript-sdk 0.86.0 → 0.87.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 +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/threads/index.d.mts +1 -1
- package/resources/threads/index.d.mts.map +1 -1
- package/resources/threads/index.d.ts +1 -1
- package/resources/threads/index.d.ts.map +1 -1
- package/resources/threads/index.js.map +1 -1
- package/resources/threads/index.mjs.map +1 -1
- package/resources/threads/runs.d.mts +12 -4
- package/resources/threads/runs.d.mts.map +1 -1
- package/resources/threads/runs.d.ts +12 -4
- package/resources/threads/runs.d.ts.map +1 -1
- package/resources/threads/state.d.mts +24 -38
- package/resources/threads/state.d.mts.map +1 -1
- package/resources/threads/state.d.ts +24 -38
- package/resources/threads/state.d.ts.map +1 -1
- package/resources/threads/state.js +1 -4
- package/resources/threads/state.js.map +1 -1
- package/resources/threads/state.mjs +1 -4
- package/resources/threads/state.mjs.map +1 -1
- package/resources/threads/threads.d.mts +28 -22
- package/resources/threads/threads.d.mts.map +1 -1
- package/resources/threads/threads.d.ts +28 -22
- package/resources/threads/threads.d.ts.map +1 -1
- package/resources/threads/threads.js +3 -3
- package/resources/threads/threads.js.map +1 -1
- package/resources/threads/threads.mjs +3 -3
- package/resources/threads/threads.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/threads/index.ts +1 -0
- package/src/resources/threads/runs.ts +15 -5
- package/src/resources/threads/state.ts +27 -41
- package/src/resources/threads/threads.ts +38 -26
- 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
|
@@ -14,10 +14,7 @@ export class State extends APIResource {
|
|
|
14
14
|
* ```ts
|
|
15
15
|
* const response = await client.threads.state.updateState(
|
|
16
16
|
* 'comp_xyz789abc',
|
|
17
|
-
* {
|
|
18
|
-
* threadId: 'thr_abc123xyz',
|
|
19
|
-
* state: { foo: 'bar' },
|
|
20
|
-
* },
|
|
17
|
+
* { threadId: 'thr_abc123xyz' },
|
|
21
18
|
* );
|
|
22
19
|
* ```
|
|
23
20
|
*/
|
|
@@ -41,55 +38,44 @@ export interface StateUpdateStateResponse {
|
|
|
41
38
|
state: unknown;
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
export
|
|
41
|
+
export interface StateUpdateStateParams {
|
|
42
|
+
/**
|
|
43
|
+
* Path param: Thread ID
|
|
44
|
+
*/
|
|
45
|
+
threadId: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Body param: JSON Patch operations to apply to current state
|
|
49
|
+
*/
|
|
50
|
+
patch?: Array<StateUpdateStateParams.Patch>;
|
|
45
51
|
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Body param: Full replacement state object
|
|
54
|
+
*/
|
|
55
|
+
state?: unknown;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export namespace StateUpdateStateParams {
|
|
59
|
+
export interface Patch {
|
|
48
60
|
/**
|
|
49
|
-
*
|
|
61
|
+
* Operation type
|
|
50
62
|
*/
|
|
51
|
-
|
|
63
|
+
op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
|
|
52
64
|
|
|
53
65
|
/**
|
|
54
|
-
*
|
|
66
|
+
* JSON Pointer path to the target location
|
|
55
67
|
*/
|
|
56
|
-
|
|
57
|
-
}
|
|
68
|
+
path: string;
|
|
58
69
|
|
|
59
|
-
export interface Variant1 {
|
|
60
70
|
/**
|
|
61
|
-
*
|
|
71
|
+
* Source path for move and copy operations
|
|
62
72
|
*/
|
|
63
|
-
|
|
73
|
+
from?: string;
|
|
64
74
|
|
|
65
75
|
/**
|
|
66
|
-
*
|
|
76
|
+
* Value to add, replace, or test (required for add, replace, test)
|
|
67
77
|
*/
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export namespace Variant1 {
|
|
72
|
-
export interface Patch {
|
|
73
|
-
/**
|
|
74
|
-
* Operation type
|
|
75
|
-
*/
|
|
76
|
-
op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* JSON Pointer path to the target location
|
|
80
|
-
*/
|
|
81
|
-
path: string;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Source path for move and copy operations
|
|
85
|
-
*/
|
|
86
|
-
from?: string;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Value to add, replace, or test (required for add, replace, test)
|
|
90
|
-
*/
|
|
91
|
-
value?: unknown;
|
|
92
|
-
}
|
|
78
|
+
value?: unknown;
|
|
93
79
|
}
|
|
94
80
|
}
|
|
95
81
|
|
|
@@ -58,13 +58,17 @@ export class Threads extends APIResource {
|
|
|
58
58
|
* );
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
|
-
retrieve(
|
|
62
|
-
|
|
61
|
+
retrieve(
|
|
62
|
+
threadID: string,
|
|
63
|
+
query: ThreadRetrieveParams | null | undefined = {},
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): APIPromise<ThreadRetrieveResponse> {
|
|
66
|
+
return this._client.get(path`/v1/threads/${threadID}`, { query, ...options });
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
/**
|
|
66
70
|
* List all threads for the authenticated project. Supports cursor-based pagination
|
|
67
|
-
* and filtering by
|
|
71
|
+
* and filtering by user key.
|
|
68
72
|
*
|
|
69
73
|
* @example
|
|
70
74
|
* ```ts
|
|
@@ -223,11 +227,6 @@ export interface ThreadCreateResponse {
|
|
|
223
227
|
*/
|
|
224
228
|
updatedAt: string;
|
|
225
229
|
|
|
226
|
-
/**
|
|
227
|
-
* Optional context key for thread organization
|
|
228
|
-
*/
|
|
229
|
-
contextKey?: string;
|
|
230
|
-
|
|
231
230
|
/**
|
|
232
231
|
* ID of the currently active run (when not idle)
|
|
233
232
|
*/
|
|
@@ -264,6 +263,11 @@ export interface ThreadCreateResponse {
|
|
|
264
263
|
* Human-readable status message (e.g., 'Fetching weather data...')
|
|
265
264
|
*/
|
|
266
265
|
statusMessage?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Optional user key for thread organization
|
|
269
|
+
*/
|
|
270
|
+
userKey?: string;
|
|
267
271
|
}
|
|
268
272
|
|
|
269
273
|
export interface ThreadRetrieveResponse {
|
|
@@ -293,11 +297,6 @@ export interface ThreadRetrieveResponse {
|
|
|
293
297
|
*/
|
|
294
298
|
updatedAt: string;
|
|
295
299
|
|
|
296
|
-
/**
|
|
297
|
-
* Optional context key for thread organization
|
|
298
|
-
*/
|
|
299
|
-
contextKey?: string;
|
|
300
|
-
|
|
301
300
|
/**
|
|
302
301
|
* ID of the currently active run (when not idle)
|
|
303
302
|
*/
|
|
@@ -334,6 +333,11 @@ export interface ThreadRetrieveResponse {
|
|
|
334
333
|
* Human-readable status message (e.g., 'Fetching weather data...')
|
|
335
334
|
*/
|
|
336
335
|
statusMessage?: string;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Optional user key for thread organization
|
|
339
|
+
*/
|
|
340
|
+
userKey?: string;
|
|
337
341
|
}
|
|
338
342
|
|
|
339
343
|
export namespace ThreadRetrieveResponse {
|
|
@@ -411,11 +415,6 @@ export namespace ThreadListResponse {
|
|
|
411
415
|
*/
|
|
412
416
|
updatedAt: string;
|
|
413
417
|
|
|
414
|
-
/**
|
|
415
|
-
* Optional context key for thread organization
|
|
416
|
-
*/
|
|
417
|
-
contextKey?: string;
|
|
418
|
-
|
|
419
418
|
/**
|
|
420
419
|
* ID of the currently active run (when not idle)
|
|
421
420
|
*/
|
|
@@ -452,15 +451,15 @@ export namespace ThreadListResponse {
|
|
|
452
451
|
* Human-readable status message (e.g., 'Fetching weather data...')
|
|
453
452
|
*/
|
|
454
453
|
statusMessage?: string;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Optional user key for thread organization
|
|
457
|
+
*/
|
|
458
|
+
userKey?: string;
|
|
455
459
|
}
|
|
456
460
|
}
|
|
457
461
|
|
|
458
462
|
export interface ThreadCreateParams {
|
|
459
|
-
/**
|
|
460
|
-
* Optional context key for thread organization
|
|
461
|
-
*/
|
|
462
|
-
contextKey?: string;
|
|
463
|
-
|
|
464
463
|
/**
|
|
465
464
|
* Initial messages to seed the thread with
|
|
466
465
|
*/
|
|
@@ -470,14 +469,21 @@ export interface ThreadCreateParams {
|
|
|
470
469
|
* Additional metadata to attach to the thread
|
|
471
470
|
*/
|
|
472
471
|
metadata?: unknown;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Optional user key for thread organization
|
|
475
|
+
*/
|
|
476
|
+
userKey?: string;
|
|
473
477
|
}
|
|
474
478
|
|
|
475
|
-
export interface
|
|
479
|
+
export interface ThreadRetrieveParams {
|
|
476
480
|
/**
|
|
477
|
-
*
|
|
481
|
+
* Optional user key for thread organization
|
|
478
482
|
*/
|
|
479
|
-
|
|
483
|
+
userKey?: string;
|
|
484
|
+
}
|
|
480
485
|
|
|
486
|
+
export interface ThreadListParams {
|
|
481
487
|
/**
|
|
482
488
|
* Cursor for pagination
|
|
483
489
|
*/
|
|
@@ -487,6 +493,11 @@ export interface ThreadListParams {
|
|
|
487
493
|
* Maximum number of threads to return
|
|
488
494
|
*/
|
|
489
495
|
limit?: string;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Filter by user key
|
|
499
|
+
*/
|
|
500
|
+
userKey?: string;
|
|
490
501
|
}
|
|
491
502
|
|
|
492
503
|
Threads.State = State;
|
|
@@ -505,6 +516,7 @@ export declare namespace Threads {
|
|
|
505
516
|
type ThreadRetrieveResponse as ThreadRetrieveResponse,
|
|
506
517
|
type ThreadListResponse as ThreadListResponse,
|
|
507
518
|
type ThreadCreateParams as ThreadCreateParams,
|
|
519
|
+
type ThreadRetrieveParams as ThreadRetrieveParams,
|
|
508
520
|
type ThreadListParams as ThreadListParams,
|
|
509
521
|
};
|
|
510
522
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.87.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.87.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.87.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.87.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|