blanche-client-sdk 0.4.0 → 0.5.0
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/.openapi-generator/VERSION +1 -1
- package/README.md +3 -3
- package/dist/apis/RecordsApi.d.ts +16 -0
- package/dist/apis/RecordsApi.js +119 -67
- package/dist/apis/SessionsApi.d.ts +12 -0
- package/dist/apis/SessionsApi.js +86 -47
- package/dist/apis/TelegramLinksApi.d.ts +12 -0
- package/dist/apis/TelegramLinksApi.js +78 -39
- package/dist/apis/TemplatesApi.d.ts +16 -0
- package/dist/apis/TemplatesApi.js +111 -59
- package/dist/apis/UsersApi.d.ts +12 -0
- package/dist/apis/UsersApi.js +80 -41
- package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.d.ts +6 -0
- package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.js +2 -0
- package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.d.ts +6 -0
- package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.js +2 -0
- package/docs/ApiV1TemplatesGet200ResponseTemplatesInner.md +2 -0
- package/docs/ApiV1TemplatesIdGet200ResponseSchemasInner.md +2 -0
- package/package.json +1 -1
- package/src/apis/RecordsApi.ts +48 -16
- package/src/apis/SessionsApi.ts +36 -12
- package/src/apis/TelegramLinksApi.ts +36 -12
- package/src/apis/TemplatesApi.ts +48 -16
- package/src/apis/UsersApi.ts +36 -12
- package/src/models/ApiV1TemplatesGet200ResponseTemplatesInner.ts +8 -0
- package/src/models/ApiV1TemplatesIdGet200ResponseSchemasInner.ts +8 -0
package/src/apis/UsersApi.ts
CHANGED
|
@@ -58,9 +58,9 @@ export interface ApiV1UsersPostOperationRequest {
|
|
|
58
58
|
export class UsersApi extends runtime.BaseAPI {
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Creates request options for apiV1ProfileGet without sending the request
|
|
62
62
|
*/
|
|
63
|
-
async
|
|
63
|
+
async apiV1ProfileGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
64
64
|
const queryParameters: any = {};
|
|
65
65
|
|
|
66
66
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -68,12 +68,20 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
68
68
|
|
|
69
69
|
let urlPath = `/api/v1/profile`;
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
return {
|
|
72
72
|
path: urlPath,
|
|
73
73
|
method: 'GET',
|
|
74
74
|
headers: headerParameters,
|
|
75
75
|
query: queryParameters,
|
|
76
|
-
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Get current user profile
|
|
81
|
+
*/
|
|
82
|
+
async apiV1ProfileGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1ProfileGet200Response>> {
|
|
83
|
+
const requestOptions = await this.apiV1ProfileGetRequestOpts();
|
|
84
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
77
85
|
|
|
78
86
|
return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1ProfileGet200ResponseFromJSON(jsonValue));
|
|
79
87
|
}
|
|
@@ -87,9 +95,9 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
87
95
|
}
|
|
88
96
|
|
|
89
97
|
/**
|
|
90
|
-
*
|
|
98
|
+
* Creates request options for apiV1UsersIdPatch without sending the request
|
|
91
99
|
*/
|
|
92
|
-
async
|
|
100
|
+
async apiV1UsersIdPatchRequestOpts(requestParameters: ApiV1UsersIdPatchOperationRequest): Promise<runtime.RequestOpts> {
|
|
93
101
|
if (requestParameters['id'] == null) {
|
|
94
102
|
throw new runtime.RequiredError(
|
|
95
103
|
'id',
|
|
@@ -107,13 +115,21 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
107
115
|
let urlPath = `/api/v1/users/{id}`;
|
|
108
116
|
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
109
117
|
|
|
110
|
-
|
|
118
|
+
return {
|
|
111
119
|
path: urlPath,
|
|
112
120
|
method: 'PATCH',
|
|
113
121
|
headers: headerParameters,
|
|
114
122
|
query: queryParameters,
|
|
115
123
|
body: ApiV1UsersIdPatchRequestToJSON(requestParameters['apiV1UsersIdPatchRequest']),
|
|
116
|
-
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Updates a user
|
|
129
|
+
*/
|
|
130
|
+
async apiV1UsersIdPatchRaw(requestParameters: ApiV1UsersIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1UsersIdPatch200Response>> {
|
|
131
|
+
const requestOptions = await this.apiV1UsersIdPatchRequestOpts(requestParameters);
|
|
132
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
117
133
|
|
|
118
134
|
return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1UsersIdPatch200ResponseFromJSON(jsonValue));
|
|
119
135
|
}
|
|
@@ -127,9 +143,9 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
127
143
|
}
|
|
128
144
|
|
|
129
145
|
/**
|
|
130
|
-
* Creates
|
|
146
|
+
* Creates request options for apiV1UsersPost without sending the request
|
|
131
147
|
*/
|
|
132
|
-
async
|
|
148
|
+
async apiV1UsersPostRequestOpts(requestParameters: ApiV1UsersPostOperationRequest): Promise<runtime.RequestOpts> {
|
|
133
149
|
const queryParameters: any = {};
|
|
134
150
|
|
|
135
151
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -139,13 +155,21 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
139
155
|
|
|
140
156
|
let urlPath = `/api/v1/users`;
|
|
141
157
|
|
|
142
|
-
|
|
158
|
+
return {
|
|
143
159
|
path: urlPath,
|
|
144
160
|
method: 'POST',
|
|
145
161
|
headers: headerParameters,
|
|
146
162
|
query: queryParameters,
|
|
147
163
|
body: ApiV1UsersPostRequestToJSON(requestParameters['apiV1UsersPostRequest']),
|
|
148
|
-
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Creates a user
|
|
169
|
+
*/
|
|
170
|
+
async apiV1UsersPostRaw(requestParameters: ApiV1UsersPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1UsersPost201Response>> {
|
|
171
|
+
const requestOptions = await this.apiV1UsersPostRequestOpts(requestParameters);
|
|
172
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
149
173
|
|
|
150
174
|
return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1UsersPost201ResponseFromJSON(jsonValue));
|
|
151
175
|
}
|
|
@@ -93,6 +93,12 @@ export interface ApiV1TemplatesGet200ResponseTemplatesInner {
|
|
|
93
93
|
* @memberof ApiV1TemplatesGet200ResponseTemplatesInner
|
|
94
94
|
*/
|
|
95
95
|
prompt?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof ApiV1TemplatesGet200ResponseTemplatesInner
|
|
100
|
+
*/
|
|
101
|
+
messageTemplate?: string | null;
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/**
|
|
@@ -125,6 +131,7 @@ export function ApiV1TemplatesGet200ResponseTemplatesInnerFromJSONTyped(json: an
|
|
|
125
131
|
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
126
132
|
'schema': json['schema'],
|
|
127
133
|
'prompt': json['prompt'] == null ? undefined : json['prompt'],
|
|
134
|
+
'messageTemplate': json['message_template'] == null ? undefined : json['message_template'],
|
|
128
135
|
};
|
|
129
136
|
}
|
|
130
137
|
|
|
@@ -150,6 +157,7 @@ export function ApiV1TemplatesGet200ResponseTemplatesInnerToJSONTyped(value?: Ap
|
|
|
150
157
|
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
151
158
|
'schema': value['schema'],
|
|
152
159
|
'prompt': value['prompt'],
|
|
160
|
+
'message_template': value['messageTemplate'],
|
|
153
161
|
};
|
|
154
162
|
}
|
|
155
163
|
|
|
@@ -43,6 +43,12 @@ export interface ApiV1TemplatesIdGet200ResponseSchemasInner {
|
|
|
43
43
|
* @memberof ApiV1TemplatesIdGet200ResponseSchemasInner
|
|
44
44
|
*/
|
|
45
45
|
systemPrompt?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ApiV1TemplatesIdGet200ResponseSchemasInner
|
|
50
|
+
*/
|
|
51
|
+
messageTemplate?: string | null;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {boolean}
|
|
@@ -83,6 +89,7 @@ export function ApiV1TemplatesIdGet200ResponseSchemasInnerFromJSONTyped(json: an
|
|
|
83
89
|
'version': json['version'],
|
|
84
90
|
'jsonSchema': json['json_schema'],
|
|
85
91
|
'systemPrompt': json['system_prompt'] == null ? undefined : json['system_prompt'],
|
|
92
|
+
'messageTemplate': json['message_template'] == null ? undefined : json['message_template'],
|
|
86
93
|
'active': json['active'],
|
|
87
94
|
'createdAt': (new Date(json['created_at'])),
|
|
88
95
|
};
|
|
@@ -103,6 +110,7 @@ export function ApiV1TemplatesIdGet200ResponseSchemasInnerToJSONTyped(value?: Ap
|
|
|
103
110
|
'version': value['version'],
|
|
104
111
|
'json_schema': value['jsonSchema'],
|
|
105
112
|
'system_prompt': value['systemPrompt'],
|
|
113
|
+
'message_template': value['messageTemplate'],
|
|
106
114
|
'active': value['active'],
|
|
107
115
|
'created_at': value['createdAt'].toISOString(),
|
|
108
116
|
};
|