@opensecret/react 1.5.0 → 1.5.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/dist/index.d.ts CHANGED
@@ -85,6 +85,7 @@ declare namespace api {
85
85
  getConversation,
86
86
  updateConversation,
87
87
  deleteConversation,
88
+ deleteConversations,
88
89
  addConversationItems,
89
90
  listConversationItems,
90
91
  listConversations,
@@ -135,6 +136,7 @@ declare namespace api {
135
136
  ConversationItemsResponse,
136
137
  ConversationsListResponse,
137
138
  ConversationDeleteResponse,
139
+ ConversationsDeleteResponse,
138
140
  ResponsesCancelResponse,
139
141
  ResponsesDeleteResponse,
140
142
  ResponsesCreateRequest,
@@ -425,6 +427,11 @@ export declare type ConversationItemsResponse = {
425
427
  has_more: boolean;
426
428
  };
427
429
 
430
+ export declare type ConversationsDeleteResponse = {
431
+ object: "list.deleted";
432
+ deleted: boolean;
433
+ };
434
+
428
435
  export declare type ConversationsListResponse = {
429
436
  object: "list";
430
437
  data: Conversation[];
@@ -645,6 +652,27 @@ export declare function deleteApiKey(name: string): Promise<void>;
645
652
  */
646
653
  declare function deleteConversation(conversationId: string): Promise<ConversationDeleteResponse>;
647
654
 
655
+ /**
656
+ * Deletes all conversations
657
+ * @returns A promise resolving to deletion confirmation
658
+ * @throws {Error} If:
659
+ * - The user is not authenticated
660
+ * - The request fails
661
+ *
662
+ * @description
663
+ * This function permanently deletes all conversations and their associated items.
664
+ * This action cannot be undone.
665
+ *
666
+ * @example
667
+ * ```typescript
668
+ * const result = await deleteConversations();
669
+ * if (result.deleted) {
670
+ * console.log("All conversations deleted successfully");
671
+ * }
672
+ * ```
673
+ */
674
+ declare function deleteConversations(): Promise<ConversationsDeleteResponse>;
675
+
648
676
  /**
649
677
  * Deletes an instruction permanently
650
678
  * @param instructionId - The UUID of the instruction to delete
@@ -2012,6 +2040,11 @@ export declare type OpenSecretContextType = {
2012
2040
  after?: string;
2013
2041
  before?: string;
2014
2042
  }) => Promise<api.ConversationsListResponse>;
2043
+ /**
2044
+ * Deletes all conversations
2045
+ * @returns A promise resolving to deletion confirmation
2046
+ */
2047
+ deleteConversations: typeof api.deleteConversations;
2015
2048
  /**
2016
2049
  * Creates a new instruction
2017
2050
  * @param request - The instruction creation parameters
@@ -2809,7 +2842,7 @@ export declare type ResponsesRetrieveResponse = {
2809
2842
  };
2810
2843
  total_tokens: number;
2811
2844
  };
2812
- output?: string;
2845
+ output?: string | any[];
2813
2846
  };
2814
2847
 
2815
2848
  declare function setApiUrl(url: string): void;