@opensecret/react 1.5.2 → 1.5.4

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
@@ -87,6 +87,7 @@ declare namespace api {
87
87
  updateConversation,
88
88
  deleteConversation,
89
89
  deleteConversations,
90
+ batchDeleteConversations,
90
91
  addConversationItems,
91
92
  listConversationItems,
92
93
  listConversations,
@@ -138,6 +139,9 @@ declare namespace api {
138
139
  ConversationsListResponse,
139
140
  ConversationDeleteResponse,
140
141
  ConversationsDeleteResponse,
142
+ BatchDeleteConversationsRequest,
143
+ BatchDeleteItemResult,
144
+ BatchDeleteConversationsResponse,
141
145
  ResponsesCancelResponse,
142
146
  ResponsesDeleteResponse,
143
147
  ResponsesCreateRequest,
@@ -280,6 +284,51 @@ declare function authenticate(attestationDocumentBase64: string, trustedRootCert
280
284
 
281
285
  declare const AWS_ROOT_CERT_DER: Uint8Array;
282
286
 
287
+ /**
288
+ * Batch deletes multiple conversations by their IDs
289
+ * @param ids - Array of conversation UUIDs to delete
290
+ * @returns A promise resolving to per-item deletion results
291
+ * @throws {Error} If:
292
+ * - The user is not authenticated
293
+ * - The request fails
294
+ *
295
+ * @description
296
+ * This function deletes multiple conversations in a single request.
297
+ * Returns per-item results so callers can handle partial failures.
298
+ *
299
+ * @example
300
+ * ```typescript
301
+ * const result = await batchDeleteConversations([
302
+ * "550e8400-e29b-41d4-a716-446655440000",
303
+ * "550e8400-e29b-41d4-a716-446655440001"
304
+ * ]);
305
+ * for (const item of result.data) {
306
+ * if (item.deleted) {
307
+ * console.log(`Conversation ${item.id} deleted`);
308
+ * } else {
309
+ * console.log(`Failed to delete ${item.id}: ${item.error}`);
310
+ * }
311
+ * }
312
+ * ```
313
+ */
314
+ declare function batchDeleteConversations(ids: string[]): Promise<BatchDeleteConversationsResponse>;
315
+
316
+ export declare type BatchDeleteConversationsRequest = {
317
+ ids: string[];
318
+ };
319
+
320
+ export declare type BatchDeleteConversationsResponse = {
321
+ object: "list";
322
+ data: BatchDeleteItemResult[];
323
+ };
324
+
325
+ export declare type BatchDeleteItemResult = {
326
+ id: string;
327
+ object: "conversation.deleted";
328
+ deleted: boolean;
329
+ error?: "not_found" | "delete_failed";
330
+ };
331
+
283
332
  /**
284
333
  * Cancels an in-progress response
285
334
  * @param responseId - The UUID of the response to cancel
@@ -560,6 +609,7 @@ declare function createResponse(request: ResponsesCreateRequest): Promise<any>;
560
609
 
561
610
  export declare interface CustomFetchOptions {
562
611
  apiKey?: string;
612
+ apiUrl?: string;
563
613
  }
564
614
 
565
615
  /**
@@ -2054,6 +2104,12 @@ export declare type OpenSecretContextType = {
2054
2104
  * @returns A promise resolving to deletion confirmation
2055
2105
  */
2056
2106
  deleteConversations: typeof api.deleteConversations;
2107
+ /**
2108
+ * Batch deletes multiple conversations by their IDs
2109
+ * @param ids - Array of conversation UUIDs to delete
2110
+ * @returns A promise resolving to per-item deletion results
2111
+ */
2112
+ batchDeleteConversations: typeof api.batchDeleteConversations;
2057
2113
  /**
2058
2114
  * Creates a new instruction
2059
2115
  * @param request - The instruction creation parameters