@breign/client 1.0.34 → 1.0.36

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.
@@ -11,12 +11,18 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { AttachmentCreateRequestUio, BodyWithMessageUio, ContextUio, ConversationSummaryUio, FileAttachmentUio } from '../models/index';
14
+ export interface ArchiveConversationByIdRequest {
15
+ conversationId: string;
16
+ }
14
17
  export interface CreateCustomVariableRequest {
15
18
  conversationId: string;
16
19
  requestBody: {
17
20
  [key: string]: string;
18
21
  };
19
22
  }
23
+ export interface DeleteAllConversationsRequest {
24
+ organizationId: string;
25
+ }
20
26
  export interface DeleteAttachmentRequest {
21
27
  conversationId: string;
22
28
  attachmentId: string;
@@ -51,6 +57,16 @@ export interface UploadAttachmentRequest {
51
57
  *
52
58
  */
53
59
  export declare class ConversationsApi extends runtime.BaseAPI {
60
+ /**
61
+ * Archives a specific conversation by its ID.
62
+ * Archive a conversation.
63
+ */
64
+ archiveConversationByIdRaw(requestParameters: ArchiveConversationByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
65
+ /**
66
+ * Archives a specific conversation by its ID.
67
+ * Archive a conversation.
68
+ */
69
+ archiveConversationById(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
54
70
  /**
55
71
  * Create a custom variable in the context of a specific conversation by its ID.
56
72
  * Create a custom variable in the context of a conversation
@@ -63,6 +79,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
63
79
  createCustomVariable(conversationId: string, requestBody: {
64
80
  [key: string]: string;
65
81
  }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
82
+ /**
83
+ * Delete all conversations created by the authenticated user in the specified organization.
84
+ * Delete all conversations
85
+ */
86
+ deleteAllConversationsRaw(requestParameters: DeleteAllConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
87
+ /**
88
+ * Delete all conversations created by the authenticated user in the specified organization.
89
+ * Delete all conversations
90
+ */
91
+ deleteAllConversations(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
66
92
  /**
67
93
  * Remove a specific attachment by its ID from the context of a conversation.
68
94
  * Delete an attachment from a conversation context
@@ -53,6 +53,34 @@ const index_1 = require("../models/index");
53
53
  *
54
54
  */
55
55
  class ConversationsApi extends runtime.BaseAPI {
56
+ /**
57
+ * Archives a specific conversation by its ID.
58
+ * Archive a conversation.
59
+ */
60
+ async archiveConversationByIdRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['conversationId'] == null) {
62
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling archiveConversationById().');
63
+ }
64
+ const queryParameters = {};
65
+ const headerParameters = {};
66
+ if (this.configuration && this.configuration.apiKey) {
67
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
68
+ }
69
+ const response = await this.request({
70
+ path: `/conversations/{conversationId}`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
71
+ method: 'DELETE',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ }, initOverrides);
75
+ return new runtime.VoidApiResponse(response);
76
+ }
77
+ /**
78
+ * Archives a specific conversation by its ID.
79
+ * Archive a conversation.
80
+ */
81
+ async archiveConversationById(conversationId, initOverrides) {
82
+ await this.archiveConversationByIdRaw({ conversationId: conversationId }, initOverrides);
83
+ }
56
84
  /**
57
85
  * Create a custom variable in the context of a specific conversation by its ID.
58
86
  * Create a custom variable in the context of a conversation
@@ -86,6 +114,37 @@ class ConversationsApi extends runtime.BaseAPI {
86
114
  async createCustomVariable(conversationId, requestBody, initOverrides) {
87
115
  await this.createCustomVariableRaw({ conversationId: conversationId, requestBody: requestBody }, initOverrides);
88
116
  }
117
+ /**
118
+ * Delete all conversations created by the authenticated user in the specified organization.
119
+ * Delete all conversations
120
+ */
121
+ async deleteAllConversationsRaw(requestParameters, initOverrides) {
122
+ if (requestParameters['organizationId'] == null) {
123
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling deleteAllConversations().');
124
+ }
125
+ const queryParameters = {};
126
+ if (requestParameters['organizationId'] != null) {
127
+ queryParameters['organizationId'] = requestParameters['organizationId'];
128
+ }
129
+ const headerParameters = {};
130
+ if (this.configuration && this.configuration.apiKey) {
131
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
132
+ }
133
+ const response = await this.request({
134
+ path: `/conversations`,
135
+ method: 'DELETE',
136
+ headers: headerParameters,
137
+ query: queryParameters,
138
+ }, initOverrides);
139
+ return new runtime.VoidApiResponse(response);
140
+ }
141
+ /**
142
+ * Delete all conversations created by the authenticated user in the specified organization.
143
+ * Delete all conversations
144
+ */
145
+ async deleteAllConversations(organizationId, initOverrides) {
146
+ await this.deleteAllConversationsRaw({ organizationId: organizationId }, initOverrides);
147
+ }
89
148
  /**
90
149
  * Remove a specific attachment by its ID from the context of a conversation.
91
150
  * Delete an attachment from a conversation context
package/dist/openapi.json CHANGED
@@ -2831,6 +2831,32 @@
2831
2831
  }
2832
2832
  },
2833
2833
  "/conversations" : {
2834
+ "delete" : {
2835
+ "description" : "Delete all conversations created by the authenticated user in the specified organization.",
2836
+ "operationId" : "deleteAllConversations",
2837
+ "parameters" : [ {
2838
+ "description" : "Organization ID to delete conversations from",
2839
+ "in" : "query",
2840
+ "name" : "organizationId",
2841
+ "required" : true,
2842
+ "schema" : {
2843
+ "type" : "string"
2844
+ }
2845
+ } ],
2846
+ "responses" : {
2847
+ "204" : {
2848
+ "description" : "Successfully deleted all conversations."
2849
+ },
2850
+ "401" : {
2851
+ "description" : "Unauthorized"
2852
+ },
2853
+ "500" : {
2854
+ "description" : "Server error"
2855
+ }
2856
+ },
2857
+ "summary" : "Delete all conversations",
2858
+ "tags" : [ "conversations" ]
2859
+ },
2834
2860
  "get" : {
2835
2861
  "description" : "Retrieve a list of conversations for the authenticated user.",
2836
2862
  "operationId" : "getConversations",
@@ -5475,6 +5501,38 @@
5475
5501
  }
5476
5502
  },
5477
5503
  "/conversations/{conversationId}" : {
5504
+ "delete" : {
5505
+ "description" : "Archives a specific conversation by its ID.",
5506
+ "operationId" : "archiveConversationById",
5507
+ "parameters" : [ {
5508
+ "description" : "The ID of the conversation",
5509
+ "in" : "path",
5510
+ "name" : "conversationId",
5511
+ "required" : true,
5512
+ "schema" : {
5513
+ "type" : "string"
5514
+ }
5515
+ } ],
5516
+ "responses" : {
5517
+ "204" : {
5518
+ "description" : "Conversation archived successfully."
5519
+ },
5520
+ "401" : {
5521
+ "description" : "Unauthorized"
5522
+ },
5523
+ "403" : {
5524
+ "description" : "Forbidden - User cannot archive this conversation"
5525
+ },
5526
+ "404" : {
5527
+ "description" : "Conversation not found"
5528
+ },
5529
+ "500" : {
5530
+ "description" : "Server error"
5531
+ }
5532
+ },
5533
+ "summary" : "Archive a conversation.",
5534
+ "tags" : [ "conversations" ]
5535
+ },
5478
5536
  "get" : {
5479
5537
  "description" : "Retrieves details of a specific conversation including all messages",
5480
5538
  "operationId" : "getConversationById",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",