@@ -24,19 +24,22 @@ export class Conversations extends APIResource {
24
24
/**
25
25
* Create a conversation.
26
26
*/
27
- create ( body : ConversationCreateParams , options ?: RequestOptions ) : APIPromise < Conversation > {
27
+ create (
28
+ body : ConversationCreateParams | null | undefined = { } ,
29
+ options ?: RequestOptions ,
30
+ ) : APIPromise < Conversation > {
28
31
return this . _client . post ( '/conversations' , { body, ...options } ) ;
29
32
}
30
33
31
34
/**
32
- * Get a conversation with the given ID.
35
+ * Get a conversation
33
36
*/
34
37
retrieve ( conversationID : string , options ?: RequestOptions ) : APIPromise < Conversation > {
35
38
return this . _client . get ( path `/conversations/${ conversationID } ` , options ) ;
36
39
}
37
40
38
41
/**
39
- * Update a conversation's metadata with the given ID.
42
+ * Update a conversation
40
43
*/
41
44
update (
42
45
conversationID : string ,
@@ -47,7 +50,7 @@ export class Conversations extends APIResource {
47
50
}
48
51
49
52
/**
50
- * Delete a conversation with the given ID .
53
+ * Delete a conversation. Items in the conversation will not be deleted .
51
54
*/
52
55
delete ( conversationID : string , options ?: RequestOptions ) : APIPromise < ConversationDeletedResource > {
53
56
return this . _client . delete ( path `/conversations/${ conversationID } ` , options ) ;
@@ -233,11 +236,12 @@ export interface ConversationUpdateParams {
233
236
/**
234
237
* Set of 16 key-value pairs that can be attached to an object. This can be useful
235
238
* for storing additional information about the object in a structured format, and
236
- * querying for objects via API or the dashboard. Keys are strings with a maximum
237
- * length of 64 characters. Values are strings with a maximum length of 512
238
- * characters.
239
+ * querying for objects via API or the dashboard.
240
+ *
241
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
242
+ * a maximum length of 512 characters.
239
243
*/
240
- metadata : { [ key : string ] : string } ;
244
+ metadata : Shared . Metadata | null ;
241
245
}
242
246
243
247
Conversations . Items = Items ;
0 commit comments