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
|
@@ -75,27 +75,40 @@ var TelegramLinksApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function TelegramLinksApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for apiV1TelegramLinksConsumePost without sending the request
|
|
80
|
+
*/
|
|
81
|
+
TelegramLinksApi.prototype.apiV1TelegramLinksConsumePostRequestOpts = function (requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, urlPath;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
queryParameters = {};
|
|
86
|
+
headerParameters = {};
|
|
87
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
88
|
+
urlPath = "/api/v1/telegram_links/consume";
|
|
89
|
+
return [2 /*return*/, {
|
|
90
|
+
path: urlPath,
|
|
91
|
+
method: 'POST',
|
|
92
|
+
headers: headerParameters,
|
|
93
|
+
query: queryParameters,
|
|
94
|
+
body: (0, index_1.ApiV1TelegramLinksConsumePostRequestToJSON)(requestParameters['apiV1TelegramLinksConsumePostRequest']),
|
|
95
|
+
}];
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
78
99
|
/**
|
|
79
100
|
* Consume telegram link
|
|
80
101
|
*/
|
|
81
102
|
TelegramLinksApi.prototype.apiV1TelegramLinksConsumePostRaw = function (requestParameters, initOverrides) {
|
|
82
103
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var
|
|
104
|
+
var requestOptions, response;
|
|
84
105
|
return __generator(this, function (_a) {
|
|
85
106
|
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
queryParameters = {};
|
|
88
|
-
headerParameters = {};
|
|
89
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
90
|
-
urlPath = "/api/v1/telegram_links/consume";
|
|
91
|
-
return [4 /*yield*/, this.request({
|
|
92
|
-
path: urlPath,
|
|
93
|
-
method: 'POST',
|
|
94
|
-
headers: headerParameters,
|
|
95
|
-
query: queryParameters,
|
|
96
|
-
body: (0, index_1.ApiV1TelegramLinksConsumePostRequestToJSON)(requestParameters['apiV1TelegramLinksConsumePostRequest']),
|
|
97
|
-
}, initOverrides)];
|
|
107
|
+
case 0: return [4 /*yield*/, this.apiV1TelegramLinksConsumePostRequestOpts(requestParameters)];
|
|
98
108
|
case 1:
|
|
109
|
+
requestOptions = _a.sent();
|
|
110
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
111
|
+
case 2:
|
|
99
112
|
response = _a.sent();
|
|
100
113
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TelegramLinksConsumePost200ResponseFromJSON)(jsonValue); })];
|
|
101
114
|
}
|
|
@@ -120,25 +133,38 @@ var TelegramLinksApi = /** @class */ (function (_super) {
|
|
|
120
133
|
});
|
|
121
134
|
});
|
|
122
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* Creates request options for apiV1TelegramLinksPost without sending the request
|
|
138
|
+
*/
|
|
139
|
+
TelegramLinksApi.prototype.apiV1TelegramLinksPostRequestOpts = function () {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
141
|
+
var queryParameters, headerParameters, urlPath;
|
|
142
|
+
return __generator(this, function (_a) {
|
|
143
|
+
queryParameters = {};
|
|
144
|
+
headerParameters = {};
|
|
145
|
+
urlPath = "/api/v1/telegram_links";
|
|
146
|
+
return [2 /*return*/, {
|
|
147
|
+
path: urlPath,
|
|
148
|
+
method: 'POST',
|
|
149
|
+
headers: headerParameters,
|
|
150
|
+
query: queryParameters,
|
|
151
|
+
}];
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
};
|
|
123
155
|
/**
|
|
124
156
|
* Create telegram link
|
|
125
157
|
*/
|
|
126
158
|
TelegramLinksApi.prototype.apiV1TelegramLinksPostRaw = function (initOverrides) {
|
|
127
159
|
return __awaiter(this, void 0, void 0, function () {
|
|
128
|
-
var
|
|
160
|
+
var requestOptions, response;
|
|
129
161
|
return __generator(this, function (_a) {
|
|
130
162
|
switch (_a.label) {
|
|
131
|
-
case 0:
|
|
132
|
-
queryParameters = {};
|
|
133
|
-
headerParameters = {};
|
|
134
|
-
urlPath = "/api/v1/telegram_links";
|
|
135
|
-
return [4 /*yield*/, this.request({
|
|
136
|
-
path: urlPath,
|
|
137
|
-
method: 'POST',
|
|
138
|
-
headers: headerParameters,
|
|
139
|
-
query: queryParameters,
|
|
140
|
-
}, initOverrides)];
|
|
163
|
+
case 0: return [4 /*yield*/, this.apiV1TelegramLinksPostRequestOpts()];
|
|
141
164
|
case 1:
|
|
165
|
+
requestOptions = _a.sent();
|
|
166
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
167
|
+
case 2:
|
|
142
168
|
response = _a.sent();
|
|
143
169
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TelegramLinksPost201ResponseFromJSON)(jsonValue); })];
|
|
144
170
|
}
|
|
@@ -162,29 +188,42 @@ var TelegramLinksApi = /** @class */ (function (_super) {
|
|
|
162
188
|
});
|
|
163
189
|
});
|
|
164
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* Creates request options for apiV1TelegramLinksTokenGet without sending the request
|
|
193
|
+
*/
|
|
194
|
+
TelegramLinksApi.prototype.apiV1TelegramLinksTokenGetRequestOpts = function (requestParameters) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
196
|
+
var queryParameters, headerParameters, urlPath;
|
|
197
|
+
return __generator(this, function (_a) {
|
|
198
|
+
if (requestParameters['token'] == null) {
|
|
199
|
+
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling apiV1TelegramLinksTokenGet().');
|
|
200
|
+
}
|
|
201
|
+
queryParameters = {};
|
|
202
|
+
headerParameters = {};
|
|
203
|
+
urlPath = "/api/v1/telegram_links/{token}";
|
|
204
|
+
urlPath = urlPath.replace("{".concat("token", "}"), encodeURIComponent(String(requestParameters['token'])));
|
|
205
|
+
return [2 /*return*/, {
|
|
206
|
+
path: urlPath,
|
|
207
|
+
method: 'GET',
|
|
208
|
+
headers: headerParameters,
|
|
209
|
+
query: queryParameters,
|
|
210
|
+
}];
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
};
|
|
165
214
|
/**
|
|
166
215
|
* Get telegram link status
|
|
167
216
|
*/
|
|
168
217
|
TelegramLinksApi.prototype.apiV1TelegramLinksTokenGetRaw = function (requestParameters, initOverrides) {
|
|
169
218
|
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
-
var
|
|
219
|
+
var requestOptions, response;
|
|
171
220
|
return __generator(this, function (_a) {
|
|
172
221
|
switch (_a.label) {
|
|
173
|
-
case 0:
|
|
174
|
-
if (requestParameters['token'] == null) {
|
|
175
|
-
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling apiV1TelegramLinksTokenGet().');
|
|
176
|
-
}
|
|
177
|
-
queryParameters = {};
|
|
178
|
-
headerParameters = {};
|
|
179
|
-
urlPath = "/api/v1/telegram_links/{token}";
|
|
180
|
-
urlPath = urlPath.replace("{".concat("token", "}"), encodeURIComponent(String(requestParameters['token'])));
|
|
181
|
-
return [4 /*yield*/, this.request({
|
|
182
|
-
path: urlPath,
|
|
183
|
-
method: 'GET',
|
|
184
|
-
headers: headerParameters,
|
|
185
|
-
query: queryParameters,
|
|
186
|
-
}, initOverrides)];
|
|
222
|
+
case 0: return [4 /*yield*/, this.apiV1TelegramLinksTokenGetRequestOpts(requestParameters)];
|
|
187
223
|
case 1:
|
|
224
|
+
requestOptions = _a.sent();
|
|
225
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
226
|
+
case 2:
|
|
188
227
|
response = _a.sent();
|
|
189
228
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TelegramLinksTokenGet200ResponseFromJSON)(jsonValue); })];
|
|
190
229
|
}
|
|
@@ -28,6 +28,10 @@ export interface ApiV1TemplatesPostOperationRequest {
|
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
30
|
export declare class TemplatesApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates request options for apiV1TemplatesGet without sending the request
|
|
33
|
+
*/
|
|
34
|
+
apiV1TemplatesGetRequestOpts(requestParameters: ApiV1TemplatesGetRequest): Promise<runtime.RequestOpts>;
|
|
31
35
|
/**
|
|
32
36
|
* List templates
|
|
33
37
|
*/
|
|
@@ -36,6 +40,10 @@ export declare class TemplatesApi extends runtime.BaseAPI {
|
|
|
36
40
|
* List templates
|
|
37
41
|
*/
|
|
38
42
|
apiV1TemplatesGet(requestParameters?: ApiV1TemplatesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TemplatesGet200Response>;
|
|
43
|
+
/**
|
|
44
|
+
* Creates request options for apiV1TemplatesIdGet without sending the request
|
|
45
|
+
*/
|
|
46
|
+
apiV1TemplatesIdGetRequestOpts(requestParameters: ApiV1TemplatesIdGetRequest): Promise<runtime.RequestOpts>;
|
|
39
47
|
/**
|
|
40
48
|
* Get template
|
|
41
49
|
*/
|
|
@@ -44,6 +52,10 @@ export declare class TemplatesApi extends runtime.BaseAPI {
|
|
|
44
52
|
* Get template
|
|
45
53
|
*/
|
|
46
54
|
apiV1TemplatesIdGet(requestParameters: ApiV1TemplatesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TemplatesIdGet200Response>;
|
|
55
|
+
/**
|
|
56
|
+
* Creates request options for apiV1TemplatesIdPatch without sending the request
|
|
57
|
+
*/
|
|
58
|
+
apiV1TemplatesIdPatchRequestOpts(requestParameters: ApiV1TemplatesIdPatchOperationRequest): Promise<runtime.RequestOpts>;
|
|
47
59
|
/**
|
|
48
60
|
* Update template
|
|
49
61
|
*/
|
|
@@ -52,6 +64,10 @@ export declare class TemplatesApi extends runtime.BaseAPI {
|
|
|
52
64
|
* Update template
|
|
53
65
|
*/
|
|
54
66
|
apiV1TemplatesIdPatch(requestParameters: ApiV1TemplatesIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TemplatesPost201Response>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates request options for apiV1TemplatesPost without sending the request
|
|
69
|
+
*/
|
|
70
|
+
apiV1TemplatesPostRequestOpts(requestParameters: ApiV1TemplatesPostOperationRequest): Promise<runtime.RequestOpts>;
|
|
55
71
|
/**
|
|
56
72
|
* Create template
|
|
57
73
|
*/
|
|
@@ -75,28 +75,41 @@ var TemplatesApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function TemplatesApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for apiV1TemplatesGet without sending the request
|
|
80
|
+
*/
|
|
81
|
+
TemplatesApi.prototype.apiV1TemplatesGetRequestOpts = function (requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, urlPath;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
queryParameters = {};
|
|
86
|
+
if (requestParameters['format'] != null) {
|
|
87
|
+
queryParameters['format'] = requestParameters['format'];
|
|
88
|
+
}
|
|
89
|
+
headerParameters = {};
|
|
90
|
+
urlPath = "/api/v1/templates";
|
|
91
|
+
return [2 /*return*/, {
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'GET',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
}];
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
};
|
|
78
100
|
/**
|
|
79
101
|
* List templates
|
|
80
102
|
*/
|
|
81
103
|
TemplatesApi.prototype.apiV1TemplatesGetRaw = function (requestParameters, initOverrides) {
|
|
82
104
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var
|
|
105
|
+
var requestOptions, response;
|
|
84
106
|
return __generator(this, function (_a) {
|
|
85
107
|
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
queryParameters = {};
|
|
88
|
-
if (requestParameters['format'] != null) {
|
|
89
|
-
queryParameters['format'] = requestParameters['format'];
|
|
90
|
-
}
|
|
91
|
-
headerParameters = {};
|
|
92
|
-
urlPath = "/api/v1/templates";
|
|
93
|
-
return [4 /*yield*/, this.request({
|
|
94
|
-
path: urlPath,
|
|
95
|
-
method: 'GET',
|
|
96
|
-
headers: headerParameters,
|
|
97
|
-
query: queryParameters,
|
|
98
|
-
}, initOverrides)];
|
|
108
|
+
case 0: return [4 /*yield*/, this.apiV1TemplatesGetRequestOpts(requestParameters)];
|
|
99
109
|
case 1:
|
|
110
|
+
requestOptions = _a.sent();
|
|
111
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
112
|
+
case 2:
|
|
100
113
|
response = _a.sent();
|
|
101
114
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesGet200ResponseFromJSON)(jsonValue); })];
|
|
102
115
|
}
|
|
@@ -121,29 +134,42 @@ var TemplatesApi = /** @class */ (function (_super) {
|
|
|
121
134
|
});
|
|
122
135
|
});
|
|
123
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* Creates request options for apiV1TemplatesIdGet without sending the request
|
|
139
|
+
*/
|
|
140
|
+
TemplatesApi.prototype.apiV1TemplatesIdGetRequestOpts = function (requestParameters) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
+
var queryParameters, headerParameters, urlPath;
|
|
143
|
+
return __generator(this, function (_a) {
|
|
144
|
+
if (requestParameters['id'] == null) {
|
|
145
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdGet().');
|
|
146
|
+
}
|
|
147
|
+
queryParameters = {};
|
|
148
|
+
headerParameters = {};
|
|
149
|
+
urlPath = "/api/v1/templates/{id}";
|
|
150
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
151
|
+
return [2 /*return*/, {
|
|
152
|
+
path: urlPath,
|
|
153
|
+
method: 'GET',
|
|
154
|
+
headers: headerParameters,
|
|
155
|
+
query: queryParameters,
|
|
156
|
+
}];
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
};
|
|
124
160
|
/**
|
|
125
161
|
* Get template
|
|
126
162
|
*/
|
|
127
163
|
TemplatesApi.prototype.apiV1TemplatesIdGetRaw = function (requestParameters, initOverrides) {
|
|
128
164
|
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
-
var
|
|
165
|
+
var requestOptions, response;
|
|
130
166
|
return __generator(this, function (_a) {
|
|
131
167
|
switch (_a.label) {
|
|
132
|
-
case 0:
|
|
133
|
-
if (requestParameters['id'] == null) {
|
|
134
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdGet().');
|
|
135
|
-
}
|
|
136
|
-
queryParameters = {};
|
|
137
|
-
headerParameters = {};
|
|
138
|
-
urlPath = "/api/v1/templates/{id}";
|
|
139
|
-
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
140
|
-
return [4 /*yield*/, this.request({
|
|
141
|
-
path: urlPath,
|
|
142
|
-
method: 'GET',
|
|
143
|
-
headers: headerParameters,
|
|
144
|
-
query: queryParameters,
|
|
145
|
-
}, initOverrides)];
|
|
168
|
+
case 0: return [4 /*yield*/, this.apiV1TemplatesIdGetRequestOpts(requestParameters)];
|
|
146
169
|
case 1:
|
|
170
|
+
requestOptions = _a.sent();
|
|
171
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
172
|
+
case 2:
|
|
147
173
|
response = _a.sent();
|
|
148
174
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesIdGet200ResponseFromJSON)(jsonValue); })];
|
|
149
175
|
}
|
|
@@ -167,31 +193,44 @@ var TemplatesApi = /** @class */ (function (_super) {
|
|
|
167
193
|
});
|
|
168
194
|
});
|
|
169
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Creates request options for apiV1TemplatesIdPatch without sending the request
|
|
198
|
+
*/
|
|
199
|
+
TemplatesApi.prototype.apiV1TemplatesIdPatchRequestOpts = function (requestParameters) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
201
|
+
var queryParameters, headerParameters, urlPath;
|
|
202
|
+
return __generator(this, function (_a) {
|
|
203
|
+
if (requestParameters['id'] == null) {
|
|
204
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdPatch().');
|
|
205
|
+
}
|
|
206
|
+
queryParameters = {};
|
|
207
|
+
headerParameters = {};
|
|
208
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
209
|
+
urlPath = "/api/v1/templates/{id}";
|
|
210
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
211
|
+
return [2 /*return*/, {
|
|
212
|
+
path: urlPath,
|
|
213
|
+
method: 'PATCH',
|
|
214
|
+
headers: headerParameters,
|
|
215
|
+
query: queryParameters,
|
|
216
|
+
body: (0, index_1.ApiV1TemplatesIdPatchRequestToJSON)(requestParameters['apiV1TemplatesIdPatchRequest']),
|
|
217
|
+
}];
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
};
|
|
170
221
|
/**
|
|
171
222
|
* Update template
|
|
172
223
|
*/
|
|
173
224
|
TemplatesApi.prototype.apiV1TemplatesIdPatchRaw = function (requestParameters, initOverrides) {
|
|
174
225
|
return __awaiter(this, void 0, void 0, function () {
|
|
175
|
-
var
|
|
226
|
+
var requestOptions, response;
|
|
176
227
|
return __generator(this, function (_a) {
|
|
177
228
|
switch (_a.label) {
|
|
178
|
-
case 0:
|
|
179
|
-
if (requestParameters['id'] == null) {
|
|
180
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdPatch().');
|
|
181
|
-
}
|
|
182
|
-
queryParameters = {};
|
|
183
|
-
headerParameters = {};
|
|
184
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
185
|
-
urlPath = "/api/v1/templates/{id}";
|
|
186
|
-
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
187
|
-
return [4 /*yield*/, this.request({
|
|
188
|
-
path: urlPath,
|
|
189
|
-
method: 'PATCH',
|
|
190
|
-
headers: headerParameters,
|
|
191
|
-
query: queryParameters,
|
|
192
|
-
body: (0, index_1.ApiV1TemplatesIdPatchRequestToJSON)(requestParameters['apiV1TemplatesIdPatchRequest']),
|
|
193
|
-
}, initOverrides)];
|
|
229
|
+
case 0: return [4 /*yield*/, this.apiV1TemplatesIdPatchRequestOpts(requestParameters)];
|
|
194
230
|
case 1:
|
|
231
|
+
requestOptions = _a.sent();
|
|
232
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
233
|
+
case 2:
|
|
195
234
|
response = _a.sent();
|
|
196
235
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesPost201ResponseFromJSON)(jsonValue); })];
|
|
197
236
|
}
|
|
@@ -215,27 +254,40 @@ var TemplatesApi = /** @class */ (function (_super) {
|
|
|
215
254
|
});
|
|
216
255
|
});
|
|
217
256
|
};
|
|
257
|
+
/**
|
|
258
|
+
* Creates request options for apiV1TemplatesPost without sending the request
|
|
259
|
+
*/
|
|
260
|
+
TemplatesApi.prototype.apiV1TemplatesPostRequestOpts = function (requestParameters) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
262
|
+
var queryParameters, headerParameters, urlPath;
|
|
263
|
+
return __generator(this, function (_a) {
|
|
264
|
+
queryParameters = {};
|
|
265
|
+
headerParameters = {};
|
|
266
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
267
|
+
urlPath = "/api/v1/templates";
|
|
268
|
+
return [2 /*return*/, {
|
|
269
|
+
path: urlPath,
|
|
270
|
+
method: 'POST',
|
|
271
|
+
headers: headerParameters,
|
|
272
|
+
query: queryParameters,
|
|
273
|
+
body: (0, index_1.ApiV1TemplatesPostRequestToJSON)(requestParameters['apiV1TemplatesPostRequest']),
|
|
274
|
+
}];
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
};
|
|
218
278
|
/**
|
|
219
279
|
* Create template
|
|
220
280
|
*/
|
|
221
281
|
TemplatesApi.prototype.apiV1TemplatesPostRaw = function (requestParameters, initOverrides) {
|
|
222
282
|
return __awaiter(this, void 0, void 0, function () {
|
|
223
|
-
var
|
|
283
|
+
var requestOptions, response;
|
|
224
284
|
return __generator(this, function (_a) {
|
|
225
285
|
switch (_a.label) {
|
|
226
|
-
case 0:
|
|
227
|
-
queryParameters = {};
|
|
228
|
-
headerParameters = {};
|
|
229
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
230
|
-
urlPath = "/api/v1/templates";
|
|
231
|
-
return [4 /*yield*/, this.request({
|
|
232
|
-
path: urlPath,
|
|
233
|
-
method: 'POST',
|
|
234
|
-
headers: headerParameters,
|
|
235
|
-
query: queryParameters,
|
|
236
|
-
body: (0, index_1.ApiV1TemplatesPostRequestToJSON)(requestParameters['apiV1TemplatesPostRequest']),
|
|
237
|
-
}, initOverrides)];
|
|
286
|
+
case 0: return [4 /*yield*/, this.apiV1TemplatesPostRequestOpts(requestParameters)];
|
|
238
287
|
case 1:
|
|
288
|
+
requestOptions = _a.sent();
|
|
289
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
290
|
+
case 2:
|
|
239
291
|
response = _a.sent();
|
|
240
292
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesPost201ResponseFromJSON)(jsonValue); })];
|
|
241
293
|
}
|
package/dist/apis/UsersApi.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export interface ApiV1UsersPostOperationRequest {
|
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
export declare class UsersApi extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Creates request options for apiV1ProfileGet without sending the request
|
|
27
|
+
*/
|
|
28
|
+
apiV1ProfileGetRequestOpts(): Promise<runtime.RequestOpts>;
|
|
25
29
|
/**
|
|
26
30
|
* Get current user profile
|
|
27
31
|
*/
|
|
@@ -30,6 +34,10 @@ export declare class UsersApi extends runtime.BaseAPI {
|
|
|
30
34
|
* Get current user profile
|
|
31
35
|
*/
|
|
32
36
|
apiV1ProfileGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1ProfileGet200Response>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates request options for apiV1UsersIdPatch without sending the request
|
|
39
|
+
*/
|
|
40
|
+
apiV1UsersIdPatchRequestOpts(requestParameters: ApiV1UsersIdPatchOperationRequest): Promise<runtime.RequestOpts>;
|
|
33
41
|
/**
|
|
34
42
|
* Updates a user
|
|
35
43
|
*/
|
|
@@ -38,6 +46,10 @@ export declare class UsersApi extends runtime.BaseAPI {
|
|
|
38
46
|
* Updates a user
|
|
39
47
|
*/
|
|
40
48
|
apiV1UsersIdPatch(requestParameters: ApiV1UsersIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1UsersIdPatch200Response>;
|
|
49
|
+
/**
|
|
50
|
+
* Creates request options for apiV1UsersPost without sending the request
|
|
51
|
+
*/
|
|
52
|
+
apiV1UsersPostRequestOpts(requestParameters: ApiV1UsersPostOperationRequest): Promise<runtime.RequestOpts>;
|
|
41
53
|
/**
|
|
42
54
|
* Creates a user
|
|
43
55
|
*/
|
package/dist/apis/UsersApi.js
CHANGED
|
@@ -75,25 +75,38 @@ var UsersApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function UsersApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for apiV1ProfileGet without sending the request
|
|
80
|
+
*/
|
|
81
|
+
UsersApi.prototype.apiV1ProfileGetRequestOpts = function () {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, urlPath;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
queryParameters = {};
|
|
86
|
+
headerParameters = {};
|
|
87
|
+
urlPath = "/api/v1/profile";
|
|
88
|
+
return [2 /*return*/, {
|
|
89
|
+
path: urlPath,
|
|
90
|
+
method: 'GET',
|
|
91
|
+
headers: headerParameters,
|
|
92
|
+
query: queryParameters,
|
|
93
|
+
}];
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
};
|
|
78
97
|
/**
|
|
79
98
|
* Get current user profile
|
|
80
99
|
*/
|
|
81
100
|
UsersApi.prototype.apiV1ProfileGetRaw = function (initOverrides) {
|
|
82
101
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var
|
|
102
|
+
var requestOptions, response;
|
|
84
103
|
return __generator(this, function (_a) {
|
|
85
104
|
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
queryParameters = {};
|
|
88
|
-
headerParameters = {};
|
|
89
|
-
urlPath = "/api/v1/profile";
|
|
90
|
-
return [4 /*yield*/, this.request({
|
|
91
|
-
path: urlPath,
|
|
92
|
-
method: 'GET',
|
|
93
|
-
headers: headerParameters,
|
|
94
|
-
query: queryParameters,
|
|
95
|
-
}, initOverrides)];
|
|
105
|
+
case 0: return [4 /*yield*/, this.apiV1ProfileGetRequestOpts()];
|
|
96
106
|
case 1:
|
|
107
|
+
requestOptions = _a.sent();
|
|
108
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
109
|
+
case 2:
|
|
97
110
|
response = _a.sent();
|
|
98
111
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1ProfileGet200ResponseFromJSON)(jsonValue); })];
|
|
99
112
|
}
|
|
@@ -117,31 +130,44 @@ var UsersApi = /** @class */ (function (_super) {
|
|
|
117
130
|
});
|
|
118
131
|
});
|
|
119
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* Creates request options for apiV1UsersIdPatch without sending the request
|
|
135
|
+
*/
|
|
136
|
+
UsersApi.prototype.apiV1UsersIdPatchRequestOpts = function (requestParameters) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
+
var queryParameters, headerParameters, urlPath;
|
|
139
|
+
return __generator(this, function (_a) {
|
|
140
|
+
if (requestParameters['id'] == null) {
|
|
141
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1UsersIdPatch().');
|
|
142
|
+
}
|
|
143
|
+
queryParameters = {};
|
|
144
|
+
headerParameters = {};
|
|
145
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
146
|
+
urlPath = "/api/v1/users/{id}";
|
|
147
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
148
|
+
return [2 /*return*/, {
|
|
149
|
+
path: urlPath,
|
|
150
|
+
method: 'PATCH',
|
|
151
|
+
headers: headerParameters,
|
|
152
|
+
query: queryParameters,
|
|
153
|
+
body: (0, index_1.ApiV1UsersIdPatchRequestToJSON)(requestParameters['apiV1UsersIdPatchRequest']),
|
|
154
|
+
}];
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
};
|
|
120
158
|
/**
|
|
121
159
|
* Updates a user
|
|
122
160
|
*/
|
|
123
161
|
UsersApi.prototype.apiV1UsersIdPatchRaw = function (requestParameters, initOverrides) {
|
|
124
162
|
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
-
var
|
|
163
|
+
var requestOptions, response;
|
|
126
164
|
return __generator(this, function (_a) {
|
|
127
165
|
switch (_a.label) {
|
|
128
|
-
case 0:
|
|
129
|
-
if (requestParameters['id'] == null) {
|
|
130
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1UsersIdPatch().');
|
|
131
|
-
}
|
|
132
|
-
queryParameters = {};
|
|
133
|
-
headerParameters = {};
|
|
134
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
135
|
-
urlPath = "/api/v1/users/{id}";
|
|
136
|
-
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
137
|
-
return [4 /*yield*/, this.request({
|
|
138
|
-
path: urlPath,
|
|
139
|
-
method: 'PATCH',
|
|
140
|
-
headers: headerParameters,
|
|
141
|
-
query: queryParameters,
|
|
142
|
-
body: (0, index_1.ApiV1UsersIdPatchRequestToJSON)(requestParameters['apiV1UsersIdPatchRequest']),
|
|
143
|
-
}, initOverrides)];
|
|
166
|
+
case 0: return [4 /*yield*/, this.apiV1UsersIdPatchRequestOpts(requestParameters)];
|
|
144
167
|
case 1:
|
|
168
|
+
requestOptions = _a.sent();
|
|
169
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
170
|
+
case 2:
|
|
145
171
|
response = _a.sent();
|
|
146
172
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1UsersIdPatch200ResponseFromJSON)(jsonValue); })];
|
|
147
173
|
}
|
|
@@ -165,27 +191,40 @@ var UsersApi = /** @class */ (function (_super) {
|
|
|
165
191
|
});
|
|
166
192
|
});
|
|
167
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* Creates request options for apiV1UsersPost without sending the request
|
|
196
|
+
*/
|
|
197
|
+
UsersApi.prototype.apiV1UsersPostRequestOpts = function (requestParameters) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
199
|
+
var queryParameters, headerParameters, urlPath;
|
|
200
|
+
return __generator(this, function (_a) {
|
|
201
|
+
queryParameters = {};
|
|
202
|
+
headerParameters = {};
|
|
203
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
204
|
+
urlPath = "/api/v1/users";
|
|
205
|
+
return [2 /*return*/, {
|
|
206
|
+
path: urlPath,
|
|
207
|
+
method: 'POST',
|
|
208
|
+
headers: headerParameters,
|
|
209
|
+
query: queryParameters,
|
|
210
|
+
body: (0, index_1.ApiV1UsersPostRequestToJSON)(requestParameters['apiV1UsersPostRequest']),
|
|
211
|
+
}];
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
};
|
|
168
215
|
/**
|
|
169
216
|
* Creates a user
|
|
170
217
|
*/
|
|
171
218
|
UsersApi.prototype.apiV1UsersPostRaw = function (requestParameters, initOverrides) {
|
|
172
219
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
|
-
var
|
|
220
|
+
var requestOptions, response;
|
|
174
221
|
return __generator(this, function (_a) {
|
|
175
222
|
switch (_a.label) {
|
|
176
|
-
case 0:
|
|
177
|
-
queryParameters = {};
|
|
178
|
-
headerParameters = {};
|
|
179
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
180
|
-
urlPath = "/api/v1/users";
|
|
181
|
-
return [4 /*yield*/, this.request({
|
|
182
|
-
path: urlPath,
|
|
183
|
-
method: 'POST',
|
|
184
|
-
headers: headerParameters,
|
|
185
|
-
query: queryParameters,
|
|
186
|
-
body: (0, index_1.ApiV1UsersPostRequestToJSON)(requestParameters['apiV1UsersPostRequest']),
|
|
187
|
-
}, initOverrides)];
|
|
223
|
+
case 0: return [4 /*yield*/, this.apiV1UsersPostRequestOpts(requestParameters)];
|
|
188
224
|
case 1:
|
|
225
|
+
requestOptions = _a.sent();
|
|
226
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
227
|
+
case 2:
|
|
189
228
|
response = _a.sent();
|
|
190
229
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1UsersPost201ResponseFromJSON)(jsonValue); })];
|
|
191
230
|
}
|
|
@@ -82,6 +82,12 @@ export interface ApiV1TemplatesGet200ResponseTemplatesInner {
|
|
|
82
82
|
* @memberof ApiV1TemplatesGet200ResponseTemplatesInner
|
|
83
83
|
*/
|
|
84
84
|
prompt?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof ApiV1TemplatesGet200ResponseTemplatesInner
|
|
89
|
+
*/
|
|
90
|
+
messageTemplate?: string | null;
|
|
85
91
|
}
|
|
86
92
|
/**
|
|
87
93
|
* Check if a given object implements the ApiV1TemplatesGet200ResponseTemplatesInner interface.
|
|
@@ -48,6 +48,7 @@ function ApiV1TemplatesGet200ResponseTemplatesInnerFromJSONTyped(json, ignoreDis
|
|
|
48
48
|
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
49
49
|
'schema': json['schema'],
|
|
50
50
|
'prompt': json['prompt'] == null ? undefined : json['prompt'],
|
|
51
|
+
'messageTemplate': json['message_template'] == null ? undefined : json['message_template'],
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
function ApiV1TemplatesGet200ResponseTemplatesInnerToJSON(json) {
|
|
@@ -70,5 +71,6 @@ function ApiV1TemplatesGet200ResponseTemplatesInnerToJSONTyped(value, ignoreDisc
|
|
|
70
71
|
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
71
72
|
'schema': value['schema'],
|
|
72
73
|
'prompt': value['prompt'],
|
|
74
|
+
'message_template': value['messageTemplate'],
|
|
73
75
|
};
|
|
74
76
|
}
|