@breign/client 1.0.35 → 1.0.37

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,10 @@ export interface CreateCustomVariableRequest {
20
20
  [key: string]: string;
21
21
  };
22
22
  }
23
+ export interface DeleteAllConversationsRequest {
24
+ organizationId: string;
25
+ providerSource?: DeleteAllConversationsProviderSourceEnum;
26
+ }
23
27
  export interface DeleteAttachmentRequest {
24
28
  conversationId: string;
25
29
  attachmentId: string;
@@ -76,6 +80,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
76
80
  createCustomVariable(conversationId: string, requestBody: {
77
81
  [key: string]: string;
78
82
  }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
83
+ /**
84
+ * Delete all conversations created by the authenticated user in the specified organization.
85
+ * Delete all conversations
86
+ */
87
+ deleteAllConversationsRaw(requestParameters: DeleteAllConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
88
+ /**
89
+ * Delete all conversations created by the authenticated user in the specified organization.
90
+ * Delete all conversations
91
+ */
92
+ deleteAllConversations(organizationId: string, providerSource?: DeleteAllConversationsProviderSourceEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
79
93
  /**
80
94
  * Remove a specific attachment by its ID from the context of a conversation.
81
95
  * Delete an attachment from a conversation context
@@ -161,6 +175,14 @@ export declare class ConversationsApi extends runtime.BaseAPI {
161
175
  */
162
176
  uploadAttachment(conversationId: string, attachmentCreateRequestUio: AttachmentCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
163
177
  }
178
+ /**
179
+ * @export
180
+ */
181
+ export declare const DeleteAllConversationsProviderSourceEnum: {
182
+ readonly External: "EXTERNAL";
183
+ readonly Internal: "INTERNAL";
184
+ };
185
+ export type DeleteAllConversationsProviderSourceEnum = typeof DeleteAllConversationsProviderSourceEnum[keyof typeof DeleteAllConversationsProviderSourceEnum];
164
186
  /**
165
187
  * @export
166
188
  */
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.GetConversationsProviderSourceEnum = exports.ConversationsApi = void 0;
49
+ exports.GetConversationsProviderSourceEnum = exports.DeleteAllConversationsProviderSourceEnum = exports.ConversationsApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
@@ -114,6 +114,40 @@ 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
+ if (requestParameters['providerSource'] != null) {
130
+ queryParameters['providerSource'] = requestParameters['providerSource'];
131
+ }
132
+ const headerParameters = {};
133
+ if (this.configuration && this.configuration.apiKey) {
134
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
135
+ }
136
+ const response = await this.request({
137
+ path: `/conversations`,
138
+ method: 'DELETE',
139
+ headers: headerParameters,
140
+ query: queryParameters,
141
+ }, initOverrides);
142
+ return new runtime.VoidApiResponse(response);
143
+ }
144
+ /**
145
+ * Delete all conversations created by the authenticated user in the specified organization.
146
+ * Delete all conversations
147
+ */
148
+ async deleteAllConversations(organizationId, providerSource, initOverrides) {
149
+ await this.deleteAllConversationsRaw({ organizationId: organizationId, providerSource: providerSource }, initOverrides);
150
+ }
117
151
  /**
118
152
  * Remove a specific attachment by its ID from the context of a conversation.
119
153
  * Delete an attachment from a conversation context
@@ -365,6 +399,13 @@ class ConversationsApi extends runtime.BaseAPI {
365
399
  }
366
400
  }
367
401
  exports.ConversationsApi = ConversationsApi;
402
+ /**
403
+ * @export
404
+ */
405
+ exports.DeleteAllConversationsProviderSourceEnum = {
406
+ External: 'EXTERNAL',
407
+ Internal: 'INTERNAL'
408
+ };
368
409
  /**
369
410
  * @export
370
411
  */
package/dist/openapi.json CHANGED
@@ -2831,6 +2831,41 @@
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
+ "description" : "Filter conversations by provider source",
2847
+ "in" : "query",
2848
+ "name" : "providerSource",
2849
+ "required" : false,
2850
+ "schema" : {
2851
+ "enum" : [ "EXTERNAL", "INTERNAL" ],
2852
+ "type" : "string"
2853
+ }
2854
+ } ],
2855
+ "responses" : {
2856
+ "204" : {
2857
+ "description" : "Successfully deleted all conversations."
2858
+ },
2859
+ "401" : {
2860
+ "description" : "Unauthorized"
2861
+ },
2862
+ "500" : {
2863
+ "description" : "Server error"
2864
+ }
2865
+ },
2866
+ "summary" : "Delete all conversations",
2867
+ "tags" : [ "conversations" ]
2868
+ },
2834
2869
  "get" : {
2835
2870
  "description" : "Retrieve a list of conversations for the authenticated user.",
2836
2871
  "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.37",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",