@breign/client 1.0.35 → 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.
@@ -20,6 +20,9 @@ export interface CreateCustomVariableRequest {
20
20
  [key: string]: string;
21
21
  };
22
22
  }
23
+ export interface DeleteAllConversationsRequest {
24
+ organizationId: string;
25
+ }
23
26
  export interface DeleteAttachmentRequest {
24
27
  conversationId: string;
25
28
  attachmentId: string;
@@ -76,6 +79,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
76
79
  createCustomVariable(conversationId: string, requestBody: {
77
80
  [key: string]: string;
78
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>;
79
92
  /**
80
93
  * Remove a specific attachment by its ID from the context of a conversation.
81
94
  * Delete an attachment from a conversation context
@@ -114,6 +114,37 @@ class ConversationsApi extends runtime.BaseAPI {
114
114
  async createCustomVariable(conversationId, requestBody, initOverrides) {
115
115
  await this.createCustomVariableRaw({ conversationId: conversationId, requestBody: requestBody }, initOverrides);
116
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
+ }
117
148
  /**
118
149
  * Remove a specific attachment by its ID from the context of a conversation.
119
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",