@tambo-ai/typescript-sdk 0.90.0 → 0.91.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/migration-config.json +8 -0
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.mts +1 -1
  11. package/resources/index.d.mts.map +1 -1
  12. package/resources/index.d.ts +1 -1
  13. package/resources/index.d.ts.map +1 -1
  14. package/resources/index.js.map +1 -1
  15. package/resources/index.mjs.map +1 -1
  16. package/resources/threads/index.d.mts +1 -1
  17. package/resources/threads/index.d.mts.map +1 -1
  18. package/resources/threads/index.d.ts +1 -1
  19. package/resources/threads/index.d.ts.map +1 -1
  20. package/resources/threads/index.js.map +1 -1
  21. package/resources/threads/index.mjs.map +1 -1
  22. package/resources/threads/messages.d.mts +10 -1
  23. package/resources/threads/messages.d.mts.map +1 -1
  24. package/resources/threads/messages.d.ts +10 -1
  25. package/resources/threads/messages.d.ts.map +1 -1
  26. package/resources/threads/messages.js +2 -2
  27. package/resources/threads/messages.js.map +1 -1
  28. package/resources/threads/messages.mjs +2 -2
  29. package/resources/threads/messages.mjs.map +1 -1
  30. package/resources/threads/runs.d.mts +23 -3
  31. package/resources/threads/runs.d.mts.map +1 -1
  32. package/resources/threads/runs.d.ts +23 -3
  33. package/resources/threads/runs.d.ts.map +1 -1
  34. package/resources/threads/runs.js +5 -2
  35. package/resources/threads/runs.js.map +1 -1
  36. package/resources/threads/runs.mjs +5 -2
  37. package/resources/threads/runs.mjs.map +1 -1
  38. package/resources/threads/state.d.mts +5 -0
  39. package/resources/threads/state.d.mts.map +1 -1
  40. package/resources/threads/state.d.ts +5 -0
  41. package/resources/threads/state.d.ts.map +1 -1
  42. package/resources/threads/threads.d.mts +37 -3
  43. package/resources/threads/threads.d.mts.map +1 -1
  44. package/resources/threads/threads.d.ts +37 -3
  45. package/resources/threads/threads.d.ts.map +1 -1
  46. package/resources/threads/threads.js +3 -1
  47. package/resources/threads/threads.js.map +1 -1
  48. package/resources/threads/threads.mjs +3 -1
  49. package/resources/threads/threads.mjs.map +1 -1
  50. package/src/client.ts +2 -0
  51. package/src/resources/index.ts +1 -0
  52. package/src/resources/threads/index.ts +1 -0
  53. package/src/resources/threads/messages.ts +14 -3
  54. package/src/resources/threads/runs.ts +32 -5
  55. package/src/resources/threads/state.ts +6 -0
  56. package/src/resources/threads/threads.ts +50 -2
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
@@ -99,8 +99,14 @@ export class Threads extends APIResource {
99
99
  * await client.threads.delete('thr_abc123xyz');
100
100
  * ```
101
101
  */
102
- delete(threadID: string, options?: RequestOptions): APIPromise<void> {
102
+ delete(
103
+ threadID: string,
104
+ params: ThreadDeleteParams | null | undefined = {},
105
+ options?: RequestOptions,
106
+ ): APIPromise<void> {
107
+ const { userKey } = params ?? {};
103
108
  return this._client.delete(path`/v1/threads/${threadID}`, {
109
+ query: { userKey },
104
110
  ...options,
105
111
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
106
112
  });
@@ -262,6 +268,11 @@ export interface ThreadCreateResponse {
262
268
  */
263
269
  metadata?: unknown;
264
270
 
271
+ /**
272
+ * Thread name (auto-generated or user-set)
273
+ */
274
+ name?: string;
275
+
265
276
  /**
266
277
  * Tool call IDs awaiting client-side results. If non-empty, next run must provide
267
278
  * tool_result content with previousRunId set.
@@ -332,6 +343,11 @@ export interface ThreadRetrieveResponse {
332
343
  */
333
344
  metadata?: unknown;
334
345
 
346
+ /**
347
+ * Thread name (auto-generated or user-set)
348
+ */
349
+ name?: string;
350
+
335
351
  /**
336
352
  * Tool call IDs awaiting client-side results. If non-empty, next run must provide
337
353
  * tool_result content with previousRunId set.
@@ -456,6 +472,11 @@ export namespace ThreadListResponse {
456
472
  */
457
473
  metadata?: unknown;
458
474
 
475
+ /**
476
+ * Thread name (auto-generated or user-set)
477
+ */
478
+ name?: string;
479
+
459
480
  /**
460
481
  * Tool call IDs awaiting client-side results. If non-empty, next run must provide
461
482
  * tool_result content with previousRunId set.
@@ -478,7 +499,7 @@ export interface ThreadCreateParams {
478
499
  /**
479
500
  * Initial messages to seed the thread with
480
501
  */
481
- initialMessages?: Array<RunsAPI.InputMessage>;
502
+ initialMessages?: Array<ThreadCreateParams.InitialMessage>;
482
503
 
483
504
  /**
484
505
  * Additional metadata to attach to the thread
@@ -491,6 +512,25 @@ export interface ThreadCreateParams {
491
512
  userKey?: string;
492
513
  }
493
514
 
515
+ export namespace ThreadCreateParams {
516
+ export interface InitialMessage {
517
+ /**
518
+ * Content blocks (text or resource)
519
+ */
520
+ content: Array<ThreadsAPI.TextContent | ThreadsAPI.ResourceContent>;
521
+
522
+ /**
523
+ * Message role - 'user', 'system', or 'assistant' for initial messages
524
+ */
525
+ role: 'user' | 'system' | 'assistant';
526
+
527
+ /**
528
+ * Additional metadata to attach to the message
529
+ */
530
+ metadata?: unknown;
531
+ }
532
+ }
533
+
494
534
  export interface ThreadRetrieveParams {
495
535
  /**
496
536
  * Optional user key for thread organization
@@ -515,6 +555,13 @@ export interface ThreadListParams {
515
555
  userKey?: string;
516
556
  }
517
557
 
558
+ export interface ThreadDeleteParams {
559
+ /**
560
+ * Identifier for a user in your system. Required if no bearer token is provided.
561
+ */
562
+ userKey?: string;
563
+ }
564
+
518
565
  Threads.State = State;
519
566
  Threads.Messages = Messages;
520
567
  Threads.Runs = Runs;
@@ -534,6 +581,7 @@ export declare namespace Threads {
534
581
  type ThreadCreateParams as ThreadCreateParams,
535
582
  type ThreadRetrieveParams as ThreadRetrieveParams,
536
583
  type ThreadListParams as ThreadListParams,
584
+ type ThreadDeleteParams as ThreadDeleteParams,
537
585
  };
538
586
 
539
587
  export {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.90.0'; // x-release-please-version
1
+ export const VERSION = '0.91.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.90.0";
1
+ export declare const VERSION = "0.91.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.90.0";
1
+ export declare const VERSION = "0.91.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.90.0'; // x-release-please-version
4
+ exports.VERSION = '0.91.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.90.0'; // x-release-please-version
1
+ export const VERSION = '0.91.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map