blanche-client-sdk 0.3.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.
Files changed (65) hide show
  1. package/.openapi-generator/FILES +16 -2
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +25 -11
  4. package/dist/apis/RecordsApi.d.ts +81 -0
  5. package/dist/apis/RecordsApi.js +324 -0
  6. package/dist/apis/SessionsApi.d.ts +12 -0
  7. package/dist/apis/SessionsApi.js +86 -47
  8. package/dist/apis/TelegramLinksApi.d.ts +12 -0
  9. package/dist/apis/TelegramLinksApi.js +78 -39
  10. package/dist/apis/TemplatesApi.d.ts +16 -0
  11. package/dist/apis/TemplatesApi.js +111 -59
  12. package/dist/apis/UsersApi.d.ts +12 -0
  13. package/dist/apis/UsersApi.js +80 -41
  14. package/dist/apis/index.d.ts +1 -0
  15. package/dist/apis/index.js +1 -0
  16. package/dist/models/ApiV1RecordsGet200Response.d.ts +51 -0
  17. package/dist/models/ApiV1RecordsGet200Response.js +64 -0
  18. package/dist/models/ApiV1RecordsGet200ResponseRecordsInner.d.ts +56 -0
  19. package/dist/models/ApiV1RecordsGet200ResponseRecordsInner.js +67 -0
  20. package/dist/models/ApiV1RecordsIdDelete200Response.d.ts +32 -0
  21. package/dist/models/ApiV1RecordsIdDelete200Response.js +51 -0
  22. package/dist/models/ApiV1RecordsIdGet200Response.d.ts +62 -0
  23. package/dist/models/ApiV1RecordsIdGet200Response.js +71 -0
  24. package/dist/models/ApiV1RecordsIdPatch200Response.d.ts +50 -0
  25. package/dist/models/ApiV1RecordsIdPatch200Response.js +63 -0
  26. package/dist/models/ApiV1RecordsIdPatch422Response.d.ts +32 -0
  27. package/dist/models/ApiV1RecordsIdPatch422Response.js +51 -0
  28. package/dist/models/ApiV1RecordsIdPatchRequest.d.ts +32 -0
  29. package/dist/models/ApiV1RecordsIdPatchRequest.js +51 -0
  30. package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.d.ts +6 -0
  31. package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.js +2 -0
  32. package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.d.ts +6 -0
  33. package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.js +2 -0
  34. package/dist/models/index.d.ts +7 -1
  35. package/dist/models/index.js +7 -1
  36. package/docs/ApiV1RecordsGet200Response.md +40 -0
  37. package/docs/ApiV1RecordsGet200ResponseRecordsInner.md +42 -0
  38. package/docs/ApiV1RecordsIdDelete200Response.md +34 -0
  39. package/docs/ApiV1RecordsIdGet200Response.md +44 -0
  40. package/docs/ApiV1RecordsIdPatch200Response.md +40 -0
  41. package/docs/{ApiV1TemplatesPost422Response.md → ApiV1RecordsIdPatch422Response.md} +4 -4
  42. package/docs/ApiV1RecordsIdPatchRequest.md +34 -0
  43. package/docs/ApiV1TemplatesGet200ResponseTemplatesInner.md +2 -0
  44. package/docs/ApiV1TemplatesIdGet200ResponseSchemasInner.md +2 -0
  45. package/docs/RecordsApi.md +282 -0
  46. package/package.json +1 -1
  47. package/src/apis/RecordsApi.ts +251 -0
  48. package/src/apis/SessionsApi.ts +36 -12
  49. package/src/apis/TelegramLinksApi.ts +36 -12
  50. package/src/apis/TemplatesApi.ts +51 -19
  51. package/src/apis/UsersApi.ts +36 -12
  52. package/src/apis/index.ts +1 -0
  53. package/src/models/ApiV1RecordsGet200Response.ts +101 -0
  54. package/src/models/ApiV1RecordsGet200ResponseRecordsInner.ts +102 -0
  55. package/src/models/ApiV1RecordsIdDelete200Response.ts +66 -0
  56. package/src/models/ApiV1RecordsIdGet200Response.ts +111 -0
  57. package/src/models/ApiV1RecordsIdPatch200Response.ts +93 -0
  58. package/src/models/ApiV1RecordsIdPatch422Response.ts +66 -0
  59. package/src/models/ApiV1RecordsIdPatchRequest.ts +66 -0
  60. package/src/models/ApiV1TemplatesGet200ResponseTemplatesInner.ts +8 -0
  61. package/src/models/ApiV1TemplatesIdGet200ResponseSchemasInner.ts +8 -0
  62. package/src/models/index.ts +7 -1
  63. package/dist/models/ApiV1TemplatesPost422Response.d.ts +0 -32
  64. package/dist/models/ApiV1TemplatesPost422Response.js +0 -51
  65. package/src/models/ApiV1TemplatesPost422Response.ts +0 -66
@@ -10,6 +10,7 @@ Name | Type
10
10
  `version` | number
11
11
  `jsonSchema` | object
12
12
  `systemPrompt` | string
13
+ `messageTemplate` | string
13
14
  `active` | boolean
14
15
  `createdAt` | Date
15
16
 
@@ -24,6 +25,7 @@ const example = {
24
25
  "version": null,
25
26
  "jsonSchema": null,
26
27
  "systemPrompt": null,
28
+ "messageTemplate": null,
27
29
  "active": null,
28
30
  "createdAt": null,
29
31
  } satisfies ApiV1TemplatesIdGet200ResponseSchemasInner
@@ -0,0 +1,282 @@
1
+ # RecordsApi
2
+
3
+ All URIs are relative to *http://localhost:3000*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**apiV1RecordsGet**](RecordsApi.md#apiv1recordsget) | **GET** /api/v1/records | List records |
8
+ | [**apiV1RecordsIdDelete**](RecordsApi.md#apiv1recordsiddelete) | **DELETE** /api/v1/records/{id} | Delete record |
9
+ | [**apiV1RecordsIdGet**](RecordsApi.md#apiv1recordsidget) | **GET** /api/v1/records/{id} | Get record |
10
+ | [**apiV1RecordsIdPatch**](RecordsApi.md#apiv1recordsidpatchoperation) | **PATCH** /api/v1/records/{id} | Update record |
11
+
12
+
13
+
14
+ ## apiV1RecordsGet
15
+
16
+ > ApiV1RecordsGet200Response apiV1RecordsGet(template, limit, offset)
17
+
18
+ List records
19
+
20
+ ### Example
21
+
22
+ ```ts
23
+ import {
24
+ Configuration,
25
+ RecordsApi,
26
+ } from 'blanche-client-sdk';
27
+ import type { ApiV1RecordsGetRequest } from 'blanche-client-sdk';
28
+
29
+ async function example() {
30
+ console.log("🚀 Testing blanche-client-sdk SDK...");
31
+ const api = new RecordsApi();
32
+
33
+ const body = {
34
+ // string (optional)
35
+ template: template_example,
36
+ // number (optional)
37
+ limit: 56,
38
+ // number (optional)
39
+ offset: 56,
40
+ } satisfies ApiV1RecordsGetRequest;
41
+
42
+ try {
43
+ const data = await api.apiV1RecordsGet(body);
44
+ console.log(data);
45
+ } catch (error) {
46
+ console.error(error);
47
+ }
48
+ }
49
+
50
+ // Run the test
51
+ example().catch(console.error);
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+
57
+ | Name | Type | Description | Notes |
58
+ |------------- | ------------- | ------------- | -------------|
59
+ | **template** | `string` | | [Optional] [Defaults to `undefined`] |
60
+ | **limit** | `number` | | [Optional] [Defaults to `undefined`] |
61
+ | **offset** | `number` | | [Optional] [Defaults to `undefined`] |
62
+
63
+ ### Return type
64
+
65
+ [**ApiV1RecordsGet200Response**](ApiV1RecordsGet200Response.md)
66
+
67
+ ### Authorization
68
+
69
+ No authorization required
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: Not defined
74
+ - **Accept**: `application/json`
75
+
76
+
77
+ ### HTTP response details
78
+ | Status code | Description | Response headers |
79
+ |-------------|-------------|------------------|
80
+ | **200** | records returned | - |
81
+
82
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
83
+
84
+
85
+ ## apiV1RecordsIdDelete
86
+
87
+ > ApiV1RecordsIdDelete200Response apiV1RecordsIdDelete(id)
88
+
89
+ Delete record
90
+
91
+ ### Example
92
+
93
+ ```ts
94
+ import {
95
+ Configuration,
96
+ RecordsApi,
97
+ } from 'blanche-client-sdk';
98
+ import type { ApiV1RecordsIdDeleteRequest } from 'blanche-client-sdk';
99
+
100
+ async function example() {
101
+ console.log("🚀 Testing blanche-client-sdk SDK...");
102
+ const api = new RecordsApi();
103
+
104
+ const body = {
105
+ // string
106
+ id: id_example,
107
+ } satisfies ApiV1RecordsIdDeleteRequest;
108
+
109
+ try {
110
+ const data = await api.apiV1RecordsIdDelete(body);
111
+ console.log(data);
112
+ } catch (error) {
113
+ console.error(error);
114
+ }
115
+ }
116
+
117
+ // Run the test
118
+ example().catch(console.error);
119
+ ```
120
+
121
+ ### Parameters
122
+
123
+
124
+ | Name | Type | Description | Notes |
125
+ |------------- | ------------- | ------------- | -------------|
126
+ | **id** | `string` | | [Defaults to `undefined`] |
127
+
128
+ ### Return type
129
+
130
+ [**ApiV1RecordsIdDelete200Response**](ApiV1RecordsIdDelete200Response.md)
131
+
132
+ ### Authorization
133
+
134
+ No authorization required
135
+
136
+ ### HTTP request headers
137
+
138
+ - **Content-Type**: Not defined
139
+ - **Accept**: `application/json`
140
+
141
+
142
+ ### HTTP response details
143
+ | Status code | Description | Response headers |
144
+ |-------------|-------------|------------------|
145
+ | **200** | record deleted | - |
146
+
147
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
148
+
149
+
150
+ ## apiV1RecordsIdGet
151
+
152
+ > ApiV1RecordsIdGet200Response apiV1RecordsIdGet(id)
153
+
154
+ Get record
155
+
156
+ ### Example
157
+
158
+ ```ts
159
+ import {
160
+ Configuration,
161
+ RecordsApi,
162
+ } from 'blanche-client-sdk';
163
+ import type { ApiV1RecordsIdGetRequest } from 'blanche-client-sdk';
164
+
165
+ async function example() {
166
+ console.log("🚀 Testing blanche-client-sdk SDK...");
167
+ const api = new RecordsApi();
168
+
169
+ const body = {
170
+ // string
171
+ id: id_example,
172
+ } satisfies ApiV1RecordsIdGetRequest;
173
+
174
+ try {
175
+ const data = await api.apiV1RecordsIdGet(body);
176
+ console.log(data);
177
+ } catch (error) {
178
+ console.error(error);
179
+ }
180
+ }
181
+
182
+ // Run the test
183
+ example().catch(console.error);
184
+ ```
185
+
186
+ ### Parameters
187
+
188
+
189
+ | Name | Type | Description | Notes |
190
+ |------------- | ------------- | ------------- | -------------|
191
+ | **id** | `string` | | [Defaults to `undefined`] |
192
+
193
+ ### Return type
194
+
195
+ [**ApiV1RecordsIdGet200Response**](ApiV1RecordsIdGet200Response.md)
196
+
197
+ ### Authorization
198
+
199
+ No authorization required
200
+
201
+ ### HTTP request headers
202
+
203
+ - **Content-Type**: Not defined
204
+ - **Accept**: `application/json`
205
+
206
+
207
+ ### HTTP response details
208
+ | Status code | Description | Response headers |
209
+ |-------------|-------------|------------------|
210
+ | **200** | record returned | - |
211
+
212
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
213
+
214
+
215
+ ## apiV1RecordsIdPatch
216
+
217
+ > ApiV1RecordsIdPatch200Response apiV1RecordsIdPatch(id, apiV1RecordsIdPatchRequest)
218
+
219
+ Update record
220
+
221
+ ### Example
222
+
223
+ ```ts
224
+ import {
225
+ Configuration,
226
+ RecordsApi,
227
+ } from 'blanche-client-sdk';
228
+ import type { ApiV1RecordsIdPatchOperationRequest } from 'blanche-client-sdk';
229
+
230
+ async function example() {
231
+ console.log("🚀 Testing blanche-client-sdk SDK...");
232
+ const api = new RecordsApi();
233
+
234
+ const body = {
235
+ // string
236
+ id: id_example,
237
+ // ApiV1RecordsIdPatchRequest (optional)
238
+ apiV1RecordsIdPatchRequest: ...,
239
+ } satisfies ApiV1RecordsIdPatchOperationRequest;
240
+
241
+ try {
242
+ const data = await api.apiV1RecordsIdPatch(body);
243
+ console.log(data);
244
+ } catch (error) {
245
+ console.error(error);
246
+ }
247
+ }
248
+
249
+ // Run the test
250
+ example().catch(console.error);
251
+ ```
252
+
253
+ ### Parameters
254
+
255
+
256
+ | Name | Type | Description | Notes |
257
+ |------------- | ------------- | ------------- | -------------|
258
+ | **id** | `string` | | [Defaults to `undefined`] |
259
+ | **apiV1RecordsIdPatchRequest** | [ApiV1RecordsIdPatchRequest](ApiV1RecordsIdPatchRequest.md) | | [Optional] |
260
+
261
+ ### Return type
262
+
263
+ [**ApiV1RecordsIdPatch200Response**](ApiV1RecordsIdPatch200Response.md)
264
+
265
+ ### Authorization
266
+
267
+ No authorization required
268
+
269
+ ### HTTP request headers
270
+
271
+ - **Content-Type**: `application/json`
272
+ - **Accept**: `application/json`
273
+
274
+
275
+ ### HTTP response details
276
+ | Status code | Description | Response headers |
277
+ |-------------|-------------|------------------|
278
+ | **200** | record updated | - |
279
+ | **422** | invalid request | - |
280
+
281
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
282
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blanche-client-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "OpenAPI client for blanche-client-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,251 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Blanche API
5
+ * AI-powered life tracking system API
6
+ *
7
+ * The version of the OpenAPI document: v1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ApiV1RecordsGet200Response,
19
+ ApiV1RecordsIdDelete200Response,
20
+ ApiV1RecordsIdGet200Response,
21
+ ApiV1RecordsIdPatch200Response,
22
+ ApiV1RecordsIdPatch422Response,
23
+ ApiV1RecordsIdPatchRequest,
24
+ } from '../models/index';
25
+ import {
26
+ ApiV1RecordsGet200ResponseFromJSON,
27
+ ApiV1RecordsGet200ResponseToJSON,
28
+ ApiV1RecordsIdDelete200ResponseFromJSON,
29
+ ApiV1RecordsIdDelete200ResponseToJSON,
30
+ ApiV1RecordsIdGet200ResponseFromJSON,
31
+ ApiV1RecordsIdGet200ResponseToJSON,
32
+ ApiV1RecordsIdPatch200ResponseFromJSON,
33
+ ApiV1RecordsIdPatch200ResponseToJSON,
34
+ ApiV1RecordsIdPatch422ResponseFromJSON,
35
+ ApiV1RecordsIdPatch422ResponseToJSON,
36
+ ApiV1RecordsIdPatchRequestFromJSON,
37
+ ApiV1RecordsIdPatchRequestToJSON,
38
+ } from '../models/index';
39
+
40
+ export interface ApiV1RecordsGetRequest {
41
+ template?: string;
42
+ limit?: number;
43
+ offset?: number;
44
+ }
45
+
46
+ export interface ApiV1RecordsIdDeleteRequest {
47
+ id: string;
48
+ }
49
+
50
+ export interface ApiV1RecordsIdGetRequest {
51
+ id: string;
52
+ }
53
+
54
+ export interface ApiV1RecordsIdPatchOperationRequest {
55
+ id: string;
56
+ apiV1RecordsIdPatchRequest?: ApiV1RecordsIdPatchRequest;
57
+ }
58
+
59
+ /**
60
+ *
61
+ */
62
+ export class RecordsApi extends runtime.BaseAPI {
63
+
64
+ /**
65
+ * Creates request options for apiV1RecordsGet without sending the request
66
+ */
67
+ async apiV1RecordsGetRequestOpts(requestParameters: ApiV1RecordsGetRequest): Promise<runtime.RequestOpts> {
68
+ const queryParameters: any = {};
69
+
70
+ if (requestParameters['template'] != null) {
71
+ queryParameters['template'] = requestParameters['template'];
72
+ }
73
+
74
+ if (requestParameters['limit'] != null) {
75
+ queryParameters['limit'] = requestParameters['limit'];
76
+ }
77
+
78
+ if (requestParameters['offset'] != null) {
79
+ queryParameters['offset'] = requestParameters['offset'];
80
+ }
81
+
82
+ const headerParameters: runtime.HTTPHeaders = {};
83
+
84
+
85
+ let urlPath = `/api/v1/records`;
86
+
87
+ return {
88
+ path: urlPath,
89
+ method: 'GET',
90
+ headers: headerParameters,
91
+ query: queryParameters,
92
+ };
93
+ }
94
+
95
+ /**
96
+ * List records
97
+ */
98
+ async apiV1RecordsGetRaw(requestParameters: ApiV1RecordsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsGet200Response>> {
99
+ const requestOptions = await this.apiV1RecordsGetRequestOpts(requestParameters);
100
+ const response = await this.request(requestOptions, initOverrides);
101
+
102
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1RecordsGet200ResponseFromJSON(jsonValue));
103
+ }
104
+
105
+ /**
106
+ * List records
107
+ */
108
+ async apiV1RecordsGet(requestParameters: ApiV1RecordsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsGet200Response> {
109
+ const response = await this.apiV1RecordsGetRaw(requestParameters, initOverrides);
110
+ return await response.value();
111
+ }
112
+
113
+ /**
114
+ * Creates request options for apiV1RecordsIdDelete without sending the request
115
+ */
116
+ async apiV1RecordsIdDeleteRequestOpts(requestParameters: ApiV1RecordsIdDeleteRequest): Promise<runtime.RequestOpts> {
117
+ if (requestParameters['id'] == null) {
118
+ throw new runtime.RequiredError(
119
+ 'id',
120
+ 'Required parameter "id" was null or undefined when calling apiV1RecordsIdDelete().'
121
+ );
122
+ }
123
+
124
+ const queryParameters: any = {};
125
+
126
+ const headerParameters: runtime.HTTPHeaders = {};
127
+
128
+
129
+ let urlPath = `/api/v1/records/{id}`;
130
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
131
+
132
+ return {
133
+ path: urlPath,
134
+ method: 'DELETE',
135
+ headers: headerParameters,
136
+ query: queryParameters,
137
+ };
138
+ }
139
+
140
+ /**
141
+ * Delete record
142
+ */
143
+ async apiV1RecordsIdDeleteRaw(requestParameters: ApiV1RecordsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdDelete200Response>> {
144
+ const requestOptions = await this.apiV1RecordsIdDeleteRequestOpts(requestParameters);
145
+ const response = await this.request(requestOptions, initOverrides);
146
+
147
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1RecordsIdDelete200ResponseFromJSON(jsonValue));
148
+ }
149
+
150
+ /**
151
+ * Delete record
152
+ */
153
+ async apiV1RecordsIdDelete(requestParameters: ApiV1RecordsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdDelete200Response> {
154
+ const response = await this.apiV1RecordsIdDeleteRaw(requestParameters, initOverrides);
155
+ return await response.value();
156
+ }
157
+
158
+ /**
159
+ * Creates request options for apiV1RecordsIdGet without sending the request
160
+ */
161
+ async apiV1RecordsIdGetRequestOpts(requestParameters: ApiV1RecordsIdGetRequest): Promise<runtime.RequestOpts> {
162
+ if (requestParameters['id'] == null) {
163
+ throw new runtime.RequiredError(
164
+ 'id',
165
+ 'Required parameter "id" was null or undefined when calling apiV1RecordsIdGet().'
166
+ );
167
+ }
168
+
169
+ const queryParameters: any = {};
170
+
171
+ const headerParameters: runtime.HTTPHeaders = {};
172
+
173
+
174
+ let urlPath = `/api/v1/records/{id}`;
175
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
176
+
177
+ return {
178
+ path: urlPath,
179
+ method: 'GET',
180
+ headers: headerParameters,
181
+ query: queryParameters,
182
+ };
183
+ }
184
+
185
+ /**
186
+ * Get record
187
+ */
188
+ async apiV1RecordsIdGetRaw(requestParameters: ApiV1RecordsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdGet200Response>> {
189
+ const requestOptions = await this.apiV1RecordsIdGetRequestOpts(requestParameters);
190
+ const response = await this.request(requestOptions, initOverrides);
191
+
192
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1RecordsIdGet200ResponseFromJSON(jsonValue));
193
+ }
194
+
195
+ /**
196
+ * Get record
197
+ */
198
+ async apiV1RecordsIdGet(requestParameters: ApiV1RecordsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdGet200Response> {
199
+ const response = await this.apiV1RecordsIdGetRaw(requestParameters, initOverrides);
200
+ return await response.value();
201
+ }
202
+
203
+ /**
204
+ * Creates request options for apiV1RecordsIdPatch without sending the request
205
+ */
206
+ async apiV1RecordsIdPatchRequestOpts(requestParameters: ApiV1RecordsIdPatchOperationRequest): Promise<runtime.RequestOpts> {
207
+ if (requestParameters['id'] == null) {
208
+ throw new runtime.RequiredError(
209
+ 'id',
210
+ 'Required parameter "id" was null or undefined when calling apiV1RecordsIdPatch().'
211
+ );
212
+ }
213
+
214
+ const queryParameters: any = {};
215
+
216
+ const headerParameters: runtime.HTTPHeaders = {};
217
+
218
+ headerParameters['Content-Type'] = 'application/json';
219
+
220
+
221
+ let urlPath = `/api/v1/records/{id}`;
222
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
223
+
224
+ return {
225
+ path: urlPath,
226
+ method: 'PATCH',
227
+ headers: headerParameters,
228
+ query: queryParameters,
229
+ body: ApiV1RecordsIdPatchRequestToJSON(requestParameters['apiV1RecordsIdPatchRequest']),
230
+ };
231
+ }
232
+
233
+ /**
234
+ * Update record
235
+ */
236
+ async apiV1RecordsIdPatchRaw(requestParameters: ApiV1RecordsIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdPatch200Response>> {
237
+ const requestOptions = await this.apiV1RecordsIdPatchRequestOpts(requestParameters);
238
+ const response = await this.request(requestOptions, initOverrides);
239
+
240
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1RecordsIdPatch200ResponseFromJSON(jsonValue));
241
+ }
242
+
243
+ /**
244
+ * Update record
245
+ */
246
+ async apiV1RecordsIdPatch(requestParameters: ApiV1RecordsIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdPatch200Response> {
247
+ const response = await this.apiV1RecordsIdPatchRaw(requestParameters, initOverrides);
248
+ return await response.value();
249
+ }
250
+
251
+ }
@@ -46,9 +46,9 @@ export interface ApiV1SessionsRefreshPostRequest {
46
46
  export class SessionsApi extends runtime.BaseAPI {
47
47
 
48
48
  /**
49
- * Logout user and invalidate refresh token
49
+ * Creates request options for apiV1SessionsDelete without sending the request
50
50
  */
51
- async apiV1SessionsDeleteRaw(requestParameters: ApiV1SessionsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
51
+ async apiV1SessionsDeleteRequestOpts(requestParameters: ApiV1SessionsDeleteRequest): Promise<runtime.RequestOpts> {
52
52
  if (requestParameters['xRefreshToken'] == null) {
53
53
  throw new runtime.RequiredError(
54
54
  'xRefreshToken',
@@ -67,12 +67,20 @@ export class SessionsApi extends runtime.BaseAPI {
67
67
 
68
68
  let urlPath = `/api/v1/sessions`;
69
69
 
70
- const response = await this.request({
70
+ return {
71
71
  path: urlPath,
72
72
  method: 'DELETE',
73
73
  headers: headerParameters,
74
74
  query: queryParameters,
75
- }, initOverrides);
75
+ };
76
+ }
77
+
78
+ /**
79
+ * Logout user and invalidate refresh token
80
+ */
81
+ async apiV1SessionsDeleteRaw(requestParameters: ApiV1SessionsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
82
+ const requestOptions = await this.apiV1SessionsDeleteRequestOpts(requestParameters);
83
+ const response = await this.request(requestOptions, initOverrides);
76
84
 
77
85
  return new runtime.VoidApiResponse(response);
78
86
  }
@@ -85,9 +93,9 @@ export class SessionsApi extends runtime.BaseAPI {
85
93
  }
86
94
 
87
95
  /**
88
- * Authenticate user and return tokens
96
+ * Creates request options for apiV1SessionsPost without sending the request
89
97
  */
90
- async apiV1SessionsPostRaw(requestParameters: ApiV1SessionsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1SessionsPost200Response>> {
98
+ async apiV1SessionsPostRequestOpts(requestParameters: ApiV1SessionsPostOperationRequest): Promise<runtime.RequestOpts> {
91
99
  const queryParameters: any = {};
92
100
 
93
101
  const headerParameters: runtime.HTTPHeaders = {};
@@ -97,13 +105,21 @@ export class SessionsApi extends runtime.BaseAPI {
97
105
 
98
106
  let urlPath = `/api/v1/sessions`;
99
107
 
100
- const response = await this.request({
108
+ return {
101
109
  path: urlPath,
102
110
  method: 'POST',
103
111
  headers: headerParameters,
104
112
  query: queryParameters,
105
113
  body: ApiV1SessionsPostRequestToJSON(requestParameters['apiV1SessionsPostRequest']),
106
- }, initOverrides);
114
+ };
115
+ }
116
+
117
+ /**
118
+ * Authenticate user and return tokens
119
+ */
120
+ async apiV1SessionsPostRaw(requestParameters: ApiV1SessionsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1SessionsPost200Response>> {
121
+ const requestOptions = await this.apiV1SessionsPostRequestOpts(requestParameters);
122
+ const response = await this.request(requestOptions, initOverrides);
107
123
 
108
124
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1SessionsPost200ResponseFromJSON(jsonValue));
109
125
  }
@@ -117,9 +133,9 @@ export class SessionsApi extends runtime.BaseAPI {
117
133
  }
118
134
 
119
135
  /**
120
- * Refresh tokens using a valid refresh token
136
+ * Creates request options for apiV1SessionsRefreshPost without sending the request
121
137
  */
122
- async apiV1SessionsRefreshPostRaw(requestParameters: ApiV1SessionsRefreshPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1SessionsPost200Response>> {
138
+ async apiV1SessionsRefreshPostRequestOpts(requestParameters: ApiV1SessionsRefreshPostRequest): Promise<runtime.RequestOpts> {
123
139
  if (requestParameters['xRefreshToken'] == null) {
124
140
  throw new runtime.RequiredError(
125
141
  'xRefreshToken',
@@ -138,12 +154,20 @@ export class SessionsApi extends runtime.BaseAPI {
138
154
 
139
155
  let urlPath = `/api/v1/sessions/refresh`;
140
156
 
141
- const response = await this.request({
157
+ return {
142
158
  path: urlPath,
143
159
  method: 'POST',
144
160
  headers: headerParameters,
145
161
  query: queryParameters,
146
- }, initOverrides);
162
+ };
163
+ }
164
+
165
+ /**
166
+ * Refresh tokens using a valid refresh token
167
+ */
168
+ async apiV1SessionsRefreshPostRaw(requestParameters: ApiV1SessionsRefreshPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1SessionsPost200Response>> {
169
+ const requestOptions = await this.apiV1SessionsRefreshPostRequestOpts(requestParameters);
170
+ const response = await this.request(requestOptions, initOverrides);
147
171
 
148
172
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1SessionsPost200ResponseFromJSON(jsonValue));
149
173
  }