@breign/client 1.0.34 → 1.0.35

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,6 +11,9 @@
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: {
@@ -51,6 +54,16 @@ export interface UploadAttachmentRequest {
51
54
  *
52
55
  */
53
56
  export declare class ConversationsApi extends runtime.BaseAPI {
57
+ /**
58
+ * Archives a specific conversation by its ID.
59
+ * Archive a conversation.
60
+ */
61
+ archiveConversationByIdRaw(requestParameters: ArchiveConversationByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
62
+ /**
63
+ * Archives a specific conversation by its ID.
64
+ * Archive a conversation.
65
+ */
66
+ archiveConversationById(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
54
67
  /**
55
68
  * Create a custom variable in the context of a specific conversation by its ID.
56
69
  * Create a custom variable in the context of a conversation
@@ -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
package/dist/openapi.json CHANGED
@@ -5475,6 +5475,38 @@
5475
5475
  }
5476
5476
  },
5477
5477
  "/conversations/{conversationId}" : {
5478
+ "delete" : {
5479
+ "description" : "Archives a specific conversation by its ID.",
5480
+ "operationId" : "archiveConversationById",
5481
+ "parameters" : [ {
5482
+ "description" : "The ID of the conversation",
5483
+ "in" : "path",
5484
+ "name" : "conversationId",
5485
+ "required" : true,
5486
+ "schema" : {
5487
+ "type" : "string"
5488
+ }
5489
+ } ],
5490
+ "responses" : {
5491
+ "204" : {
5492
+ "description" : "Conversation archived successfully."
5493
+ },
5494
+ "401" : {
5495
+ "description" : "Unauthorized"
5496
+ },
5497
+ "403" : {
5498
+ "description" : "Forbidden - User cannot archive this conversation"
5499
+ },
5500
+ "404" : {
5501
+ "description" : "Conversation not found"
5502
+ },
5503
+ "500" : {
5504
+ "description" : "Server error"
5505
+ }
5506
+ },
5507
+ "summary" : "Archive a conversation.",
5508
+ "tags" : [ "conversations" ]
5509
+ },
5478
5510
  "get" : {
5479
5511
  "description" : "Retrieves details of a specific conversation including all messages",
5480
5512
  "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.35",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",