@breign/client 1.0.28 → 1.0.29
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.
- package/dist/apis/ConversationsApi.d.ts +49 -0
- package/dist/apis/ConversationsApi.js +93 -0
- package/dist/openapi.json +131 -0
- package/package.json +1 -1
|
@@ -11,10 +11,20 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { AttachmentCreateRequestUio, BodyWithMessageUio, ContextUio, FileAttachmentUio } from '../models/index';
|
|
14
|
+
export interface CreateCustomVariableRequest {
|
|
15
|
+
conversationId: string;
|
|
16
|
+
requestBody: {
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
14
20
|
export interface DeleteAttachmentRequest {
|
|
15
21
|
conversationId: string;
|
|
16
22
|
attachmentId: string;
|
|
17
23
|
}
|
|
24
|
+
export interface DeleteContextCustomVariableKeyRequest {
|
|
25
|
+
conversationId: string;
|
|
26
|
+
key: string;
|
|
27
|
+
}
|
|
18
28
|
export interface GetAttachmentRequest {
|
|
19
29
|
conversationId: string;
|
|
20
30
|
attachmentId: string;
|
|
@@ -22,6 +32,9 @@ export interface GetAttachmentRequest {
|
|
|
22
32
|
export interface GetContextRequest {
|
|
23
33
|
conversationId: string;
|
|
24
34
|
}
|
|
35
|
+
export interface GetContextCustomVariableRequest {
|
|
36
|
+
conversationId: string;
|
|
37
|
+
}
|
|
25
38
|
export interface UpdateAttachmentStatusRequest {
|
|
26
39
|
conversationId: string;
|
|
27
40
|
attachmentId: string;
|
|
@@ -34,6 +47,18 @@ export interface UploadAttachmentRequest {
|
|
|
34
47
|
*
|
|
35
48
|
*/
|
|
36
49
|
export declare class ConversationsApi extends runtime.BaseAPI {
|
|
50
|
+
/**
|
|
51
|
+
* Create a custom variable in the context of a specific conversation by its ID.
|
|
52
|
+
* Create a custom variable in the context of a conversation
|
|
53
|
+
*/
|
|
54
|
+
createCustomVariableRaw(requestParameters: CreateCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
55
|
+
/**
|
|
56
|
+
* Create a custom variable in the context of a specific conversation by its ID.
|
|
57
|
+
* Create a custom variable in the context of a conversation
|
|
58
|
+
*/
|
|
59
|
+
createCustomVariable(conversationId: string, requestBody: {
|
|
60
|
+
[key: string]: string;
|
|
61
|
+
}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
37
62
|
/**
|
|
38
63
|
* Remove a specific attachment by its ID from the context of a conversation.
|
|
39
64
|
* Delete an attachment from a conversation context
|
|
@@ -44,6 +69,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
|
|
|
44
69
|
* Delete an attachment from a conversation context
|
|
45
70
|
*/
|
|
46
71
|
deleteAttachment(conversationId: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Delete a custom variable key from the context of a specific conversation by its ID.
|
|
74
|
+
* Delete a custom variable key from the context of a conversation
|
|
75
|
+
*/
|
|
76
|
+
deleteContextCustomVariableKeyRaw(requestParameters: DeleteContextCustomVariableKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
77
|
+
/**
|
|
78
|
+
* Delete a custom variable key from the context of a specific conversation by its ID.
|
|
79
|
+
* Delete a custom variable key from the context of a conversation
|
|
80
|
+
*/
|
|
81
|
+
deleteContextCustomVariableKey(conversationId: string, key: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
47
82
|
/**
|
|
48
83
|
* Get a specific attachment by its ID from the context of a conversation.
|
|
49
84
|
* Retrieve an attachment from a conversation context
|
|
@@ -64,6 +99,20 @@ export declare class ConversationsApi extends runtime.BaseAPI {
|
|
|
64
99
|
* Get the context of a conversation
|
|
65
100
|
*/
|
|
66
101
|
getContext(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContextUio>;
|
|
102
|
+
/**
|
|
103
|
+
* Get a custom variable from the context of a specific conversation by its ID.
|
|
104
|
+
* Get a custom variable from the context of a conversation
|
|
105
|
+
*/
|
|
106
|
+
getContextCustomVariableRaw(requestParameters: GetContextCustomVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
107
|
+
[key: string]: string;
|
|
108
|
+
}>>;
|
|
109
|
+
/**
|
|
110
|
+
* Get a custom variable from the context of a specific conversation by its ID.
|
|
111
|
+
* Get a custom variable from the context of a conversation
|
|
112
|
+
*/
|
|
113
|
+
getContextCustomVariable(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
114
|
+
[key: string]: string;
|
|
115
|
+
}>;
|
|
67
116
|
/**
|
|
68
117
|
* Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
|
|
69
118
|
* Update the status of an uploaded attachment
|
|
@@ -53,6 +53,39 @@ const index_1 = require("../models/index");
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
class ConversationsApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Create a custom variable in the context of a specific conversation by its ID.
|
|
58
|
+
* Create a custom variable in the context of a conversation
|
|
59
|
+
*/
|
|
60
|
+
async createCustomVariableRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['conversationId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling createCustomVariable().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['requestBody'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling createCustomVariable().');
|
|
66
|
+
}
|
|
67
|
+
const queryParameters = {};
|
|
68
|
+
const headerParameters = {};
|
|
69
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
70
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
71
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
72
|
+
}
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/conversations/{conversationId}/context/custom`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
|
|
75
|
+
method: 'POST',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
body: requestParameters['requestBody'],
|
|
79
|
+
}, initOverrides);
|
|
80
|
+
return new runtime.VoidApiResponse(response);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Create a custom variable in the context of a specific conversation by its ID.
|
|
84
|
+
* Create a custom variable in the context of a conversation
|
|
85
|
+
*/
|
|
86
|
+
async createCustomVariable(conversationId, requestBody, initOverrides) {
|
|
87
|
+
await this.createCustomVariableRaw({ conversationId: conversationId, requestBody: requestBody }, initOverrides);
|
|
88
|
+
}
|
|
56
89
|
/**
|
|
57
90
|
* Remove a specific attachment by its ID from the context of a conversation.
|
|
58
91
|
* Delete an attachment from a conversation context
|
|
@@ -84,6 +117,37 @@ class ConversationsApi extends runtime.BaseAPI {
|
|
|
84
117
|
async deleteAttachment(conversationId, attachmentId, initOverrides) {
|
|
85
118
|
await this.deleteAttachmentRaw({ conversationId: conversationId, attachmentId: attachmentId }, initOverrides);
|
|
86
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Delete a custom variable key from the context of a specific conversation by its ID.
|
|
122
|
+
* Delete a custom variable key from the context of a conversation
|
|
123
|
+
*/
|
|
124
|
+
async deleteContextCustomVariableKeyRaw(requestParameters, initOverrides) {
|
|
125
|
+
if (requestParameters['conversationId'] == null) {
|
|
126
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling deleteContextCustomVariableKey().');
|
|
127
|
+
}
|
|
128
|
+
if (requestParameters['key'] == null) {
|
|
129
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling deleteContextCustomVariableKey().');
|
|
130
|
+
}
|
|
131
|
+
const queryParameters = {};
|
|
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/{conversationId}/context/custom/{key}`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
|
|
138
|
+
method: 'DELETE',
|
|
139
|
+
headers: headerParameters,
|
|
140
|
+
query: queryParameters,
|
|
141
|
+
}, initOverrides);
|
|
142
|
+
return new runtime.VoidApiResponse(response);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Delete a custom variable key from the context of a specific conversation by its ID.
|
|
146
|
+
* Delete a custom variable key from the context of a conversation
|
|
147
|
+
*/
|
|
148
|
+
async deleteContextCustomVariableKey(conversationId, key, initOverrides) {
|
|
149
|
+
await this.deleteContextCustomVariableKeyRaw({ conversationId: conversationId, key: key }, initOverrides);
|
|
150
|
+
}
|
|
87
151
|
/**
|
|
88
152
|
* Get a specific attachment by its ID from the context of a conversation.
|
|
89
153
|
* Retrieve an attachment from a conversation context
|
|
@@ -145,6 +209,35 @@ class ConversationsApi extends runtime.BaseAPI {
|
|
|
145
209
|
const response = await this.getContextRaw({ conversationId: conversationId }, initOverrides);
|
|
146
210
|
return await response.value();
|
|
147
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Get a custom variable from the context of a specific conversation by its ID.
|
|
214
|
+
* Get a custom variable from the context of a conversation
|
|
215
|
+
*/
|
|
216
|
+
async getContextCustomVariableRaw(requestParameters, initOverrides) {
|
|
217
|
+
if (requestParameters['conversationId'] == null) {
|
|
218
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getContextCustomVariable().');
|
|
219
|
+
}
|
|
220
|
+
const queryParameters = {};
|
|
221
|
+
const headerParameters = {};
|
|
222
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
223
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
224
|
+
}
|
|
225
|
+
const response = await this.request({
|
|
226
|
+
path: `/conversations/{conversationId}/context/custom`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
|
|
227
|
+
method: 'GET',
|
|
228
|
+
headers: headerParameters,
|
|
229
|
+
query: queryParameters,
|
|
230
|
+
}, initOverrides);
|
|
231
|
+
return new runtime.JSONApiResponse(response);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Get a custom variable from the context of a specific conversation by its ID.
|
|
235
|
+
* Get a custom variable from the context of a conversation
|
|
236
|
+
*/
|
|
237
|
+
async getContextCustomVariable(conversationId, initOverrides) {
|
|
238
|
+
const response = await this.getContextCustomVariableRaw({ conversationId: conversationId }, initOverrides);
|
|
239
|
+
return await response.value();
|
|
240
|
+
}
|
|
148
241
|
/**
|
|
149
242
|
* Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
|
|
150
243
|
* Update the status of an uploaded attachment
|
package/dist/openapi.json
CHANGED
|
@@ -2638,6 +2638,137 @@
|
|
|
2638
2638
|
"tags" : [ "contents" ]
|
|
2639
2639
|
}
|
|
2640
2640
|
},
|
|
2641
|
+
"/conversations/{conversationId}/context/custom/{key}" : {
|
|
2642
|
+
"delete" : {
|
|
2643
|
+
"description" : "Delete a custom variable key from the context of a specific conversation by its ID.",
|
|
2644
|
+
"operationId" : "deleteContextCustomVariableKey",
|
|
2645
|
+
"parameters" : [ {
|
|
2646
|
+
"description" : "The ID of the conversation",
|
|
2647
|
+
"in" : "path",
|
|
2648
|
+
"name" : "conversationId",
|
|
2649
|
+
"required" : true,
|
|
2650
|
+
"schema" : {
|
|
2651
|
+
"type" : "string"
|
|
2652
|
+
}
|
|
2653
|
+
}, {
|
|
2654
|
+
"description" : "Key of the custom variable to delete",
|
|
2655
|
+
"in" : "path",
|
|
2656
|
+
"name" : "key",
|
|
2657
|
+
"required" : true,
|
|
2658
|
+
"schema" : {
|
|
2659
|
+
"type" : "string"
|
|
2660
|
+
}
|
|
2661
|
+
} ],
|
|
2662
|
+
"responses" : {
|
|
2663
|
+
"200" : {
|
|
2664
|
+
"description" : "Successfully deleted the custom variable key from the context of the conversation."
|
|
2665
|
+
},
|
|
2666
|
+
"401" : {
|
|
2667
|
+
"description" : "Unauthorized"
|
|
2668
|
+
},
|
|
2669
|
+
"403" : {
|
|
2670
|
+
"description" : "Forbidden - User cannot access this conversation"
|
|
2671
|
+
},
|
|
2672
|
+
"404" : {
|
|
2673
|
+
"description" : "Conversation or Custom Variable Key not found"
|
|
2674
|
+
},
|
|
2675
|
+
"500" : {
|
|
2676
|
+
"description" : "Server error"
|
|
2677
|
+
}
|
|
2678
|
+
},
|
|
2679
|
+
"summary" : "Delete a custom variable key from the context of a conversation",
|
|
2680
|
+
"tags" : [ "conversations" ]
|
|
2681
|
+
}
|
|
2682
|
+
},
|
|
2683
|
+
"/conversations/{conversationId}/context/custom" : {
|
|
2684
|
+
"get" : {
|
|
2685
|
+
"description" : "Get a custom variable from the context of a specific conversation by its ID.",
|
|
2686
|
+
"operationId" : "getContextCustomVariable",
|
|
2687
|
+
"parameters" : [ {
|
|
2688
|
+
"description" : "The ID of the conversation",
|
|
2689
|
+
"in" : "path",
|
|
2690
|
+
"name" : "conversationId",
|
|
2691
|
+
"required" : true,
|
|
2692
|
+
"schema" : {
|
|
2693
|
+
"type" : "string"
|
|
2694
|
+
}
|
|
2695
|
+
} ],
|
|
2696
|
+
"responses" : {
|
|
2697
|
+
"200" : {
|
|
2698
|
+
"content" : {
|
|
2699
|
+
"application/json" : {
|
|
2700
|
+
"schema" : {
|
|
2701
|
+
"additionalProperties" : {
|
|
2702
|
+
"type" : "string"
|
|
2703
|
+
},
|
|
2704
|
+
"type" : "object"
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
},
|
|
2708
|
+
"description" : "Successfully retrieved the custom variable from the context of the conversation."
|
|
2709
|
+
},
|
|
2710
|
+
"401" : {
|
|
2711
|
+
"description" : "Unauthorized"
|
|
2712
|
+
},
|
|
2713
|
+
"403" : {
|
|
2714
|
+
"description" : "Forbidden - User cannot access this conversation"
|
|
2715
|
+
},
|
|
2716
|
+
"404" : {
|
|
2717
|
+
"description" : "Conversation not found"
|
|
2718
|
+
},
|
|
2719
|
+
"500" : {
|
|
2720
|
+
"description" : "Server error"
|
|
2721
|
+
}
|
|
2722
|
+
},
|
|
2723
|
+
"summary" : "Get a custom variable from the context of a conversation",
|
|
2724
|
+
"tags" : [ "conversations" ]
|
|
2725
|
+
},
|
|
2726
|
+
"post" : {
|
|
2727
|
+
"description" : "Create a custom variable in the context of a specific conversation by its ID.",
|
|
2728
|
+
"operationId" : "createCustomVariable",
|
|
2729
|
+
"parameters" : [ {
|
|
2730
|
+
"description" : "The ID of the conversation",
|
|
2731
|
+
"in" : "path",
|
|
2732
|
+
"name" : "conversationId",
|
|
2733
|
+
"required" : true,
|
|
2734
|
+
"schema" : {
|
|
2735
|
+
"type" : "string"
|
|
2736
|
+
}
|
|
2737
|
+
} ],
|
|
2738
|
+
"requestBody" : {
|
|
2739
|
+
"content" : {
|
|
2740
|
+
"application/json" : {
|
|
2741
|
+
"schema" : {
|
|
2742
|
+
"additionalProperties" : {
|
|
2743
|
+
"type" : "string"
|
|
2744
|
+
},
|
|
2745
|
+
"type" : "object"
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
},
|
|
2749
|
+
"required" : true
|
|
2750
|
+
},
|
|
2751
|
+
"responses" : {
|
|
2752
|
+
"200" : {
|
|
2753
|
+
"description" : "Successfully created the custom variable in the context of the conversation."
|
|
2754
|
+
},
|
|
2755
|
+
"401" : {
|
|
2756
|
+
"description" : "Unauthorized"
|
|
2757
|
+
},
|
|
2758
|
+
"403" : {
|
|
2759
|
+
"description" : "Forbidden - User cannot access this conversation"
|
|
2760
|
+
},
|
|
2761
|
+
"404" : {
|
|
2762
|
+
"description" : "Conversation not found"
|
|
2763
|
+
},
|
|
2764
|
+
"500" : {
|
|
2765
|
+
"description" : "Server error"
|
|
2766
|
+
}
|
|
2767
|
+
},
|
|
2768
|
+
"summary" : "Create a custom variable in the context of a conversation",
|
|
2769
|
+
"tags" : [ "conversations" ]
|
|
2770
|
+
}
|
|
2771
|
+
},
|
|
2641
2772
|
"/conversations/{conversationId}/context" : {
|
|
2642
2773
|
"get" : {
|
|
2643
2774
|
"description" : "Retrieve the context of a specific conversation by its ID.",
|