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
@@ -54,9 +54,9 @@ export interface ApiV1TelegramLinksTokenGetRequest {
54
54
  export class TelegramLinksApi extends runtime.BaseAPI {
55
55
 
56
56
  /**
57
- * Consume telegram link
57
+ * Creates request options for apiV1TelegramLinksConsumePost without sending the request
58
58
  */
59
- async apiV1TelegramLinksConsumePostRaw(requestParameters: ApiV1TelegramLinksConsumePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksConsumePost200Response>> {
59
+ async apiV1TelegramLinksConsumePostRequestOpts(requestParameters: ApiV1TelegramLinksConsumePostOperationRequest): Promise<runtime.RequestOpts> {
60
60
  const queryParameters: any = {};
61
61
 
62
62
  const headerParameters: runtime.HTTPHeaders = {};
@@ -66,13 +66,21 @@ export class TelegramLinksApi extends runtime.BaseAPI {
66
66
 
67
67
  let urlPath = `/api/v1/telegram_links/consume`;
68
68
 
69
- const response = await this.request({
69
+ return {
70
70
  path: urlPath,
71
71
  method: 'POST',
72
72
  headers: headerParameters,
73
73
  query: queryParameters,
74
74
  body: ApiV1TelegramLinksConsumePostRequestToJSON(requestParameters['apiV1TelegramLinksConsumePostRequest']),
75
- }, initOverrides);
75
+ };
76
+ }
77
+
78
+ /**
79
+ * Consume telegram link
80
+ */
81
+ async apiV1TelegramLinksConsumePostRaw(requestParameters: ApiV1TelegramLinksConsumePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksConsumePost200Response>> {
82
+ const requestOptions = await this.apiV1TelegramLinksConsumePostRequestOpts(requestParameters);
83
+ const response = await this.request(requestOptions, initOverrides);
76
84
 
77
85
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TelegramLinksConsumePost200ResponseFromJSON(jsonValue));
78
86
  }
@@ -86,9 +94,9 @@ export class TelegramLinksApi extends runtime.BaseAPI {
86
94
  }
87
95
 
88
96
  /**
89
- * Create telegram link
97
+ * Creates request options for apiV1TelegramLinksPost without sending the request
90
98
  */
91
- async apiV1TelegramLinksPostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksPost201Response>> {
99
+ async apiV1TelegramLinksPostRequestOpts(): Promise<runtime.RequestOpts> {
92
100
  const queryParameters: any = {};
93
101
 
94
102
  const headerParameters: runtime.HTTPHeaders = {};
@@ -96,12 +104,20 @@ export class TelegramLinksApi extends runtime.BaseAPI {
96
104
 
97
105
  let urlPath = `/api/v1/telegram_links`;
98
106
 
99
- const response = await this.request({
107
+ return {
100
108
  path: urlPath,
101
109
  method: 'POST',
102
110
  headers: headerParameters,
103
111
  query: queryParameters,
104
- }, initOverrides);
112
+ };
113
+ }
114
+
115
+ /**
116
+ * Create telegram link
117
+ */
118
+ async apiV1TelegramLinksPostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksPost201Response>> {
119
+ const requestOptions = await this.apiV1TelegramLinksPostRequestOpts();
120
+ const response = await this.request(requestOptions, initOverrides);
105
121
 
106
122
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TelegramLinksPost201ResponseFromJSON(jsonValue));
107
123
  }
@@ -115,9 +131,9 @@ export class TelegramLinksApi extends runtime.BaseAPI {
115
131
  }
116
132
 
117
133
  /**
118
- * Get telegram link status
134
+ * Creates request options for apiV1TelegramLinksTokenGet without sending the request
119
135
  */
120
- async apiV1TelegramLinksTokenGetRaw(requestParameters: ApiV1TelegramLinksTokenGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksTokenGet200Response>> {
136
+ async apiV1TelegramLinksTokenGetRequestOpts(requestParameters: ApiV1TelegramLinksTokenGetRequest): Promise<runtime.RequestOpts> {
121
137
  if (requestParameters['token'] == null) {
122
138
  throw new runtime.RequiredError(
123
139
  'token',
@@ -133,12 +149,20 @@ export class TelegramLinksApi extends runtime.BaseAPI {
133
149
  let urlPath = `/api/v1/telegram_links/{token}`;
134
150
  urlPath = urlPath.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters['token'])));
135
151
 
136
- const response = await this.request({
152
+ return {
137
153
  path: urlPath,
138
154
  method: 'GET',
139
155
  headers: headerParameters,
140
156
  query: queryParameters,
141
- }, initOverrides);
157
+ };
158
+ }
159
+
160
+ /**
161
+ * Get telegram link status
162
+ */
163
+ async apiV1TelegramLinksTokenGetRaw(requestParameters: ApiV1TelegramLinksTokenGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksTokenGet200Response>> {
164
+ const requestOptions = await this.apiV1TelegramLinksTokenGetRequestOpts(requestParameters);
165
+ const response = await this.request(requestOptions, initOverrides);
142
166
 
143
167
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TelegramLinksTokenGet200ResponseFromJSON(jsonValue));
144
168
  }
@@ -15,15 +15,17 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ ApiV1RecordsIdPatch422Response,
18
19
  ApiV1TemplatesGet200Response,
19
20
  ApiV1TemplatesIdGet200Response,
20
21
  ApiV1TemplatesIdGet404Response,
21
22
  ApiV1TemplatesIdPatchRequest,
22
23
  ApiV1TemplatesPost201Response,
23
- ApiV1TemplatesPost422Response,
24
24
  ApiV1TemplatesPostRequest,
25
25
  } from '../models/index';
26
26
  import {
27
+ ApiV1RecordsIdPatch422ResponseFromJSON,
28
+ ApiV1RecordsIdPatch422ResponseToJSON,
27
29
  ApiV1TemplatesGet200ResponseFromJSON,
28
30
  ApiV1TemplatesGet200ResponseToJSON,
29
31
  ApiV1TemplatesIdGet200ResponseFromJSON,
@@ -34,8 +36,6 @@ import {
34
36
  ApiV1TemplatesIdPatchRequestToJSON,
35
37
  ApiV1TemplatesPost201ResponseFromJSON,
36
38
  ApiV1TemplatesPost201ResponseToJSON,
37
- ApiV1TemplatesPost422ResponseFromJSON,
38
- ApiV1TemplatesPost422ResponseToJSON,
39
39
  ApiV1TemplatesPostRequestFromJSON,
40
40
  ApiV1TemplatesPostRequestToJSON,
41
41
  } from '../models/index';
@@ -63,9 +63,9 @@ export interface ApiV1TemplatesPostOperationRequest {
63
63
  export class TemplatesApi extends runtime.BaseAPI {
64
64
 
65
65
  /**
66
- * List templates
66
+ * Creates request options for apiV1TemplatesGet without sending the request
67
67
  */
68
- async apiV1TemplatesGetRaw(requestParameters: ApiV1TemplatesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesGet200Response>> {
68
+ async apiV1TemplatesGetRequestOpts(requestParameters: ApiV1TemplatesGetRequest): Promise<runtime.RequestOpts> {
69
69
  const queryParameters: any = {};
70
70
 
71
71
  if (requestParameters['format'] != null) {
@@ -77,12 +77,20 @@ export class TemplatesApi extends runtime.BaseAPI {
77
77
 
78
78
  let urlPath = `/api/v1/templates`;
79
79
 
80
- const response = await this.request({
80
+ return {
81
81
  path: urlPath,
82
82
  method: 'GET',
83
83
  headers: headerParameters,
84
84
  query: queryParameters,
85
- }, initOverrides);
85
+ };
86
+ }
87
+
88
+ /**
89
+ * List templates
90
+ */
91
+ async apiV1TemplatesGetRaw(requestParameters: ApiV1TemplatesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesGet200Response>> {
92
+ const requestOptions = await this.apiV1TemplatesGetRequestOpts(requestParameters);
93
+ const response = await this.request(requestOptions, initOverrides);
86
94
 
87
95
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TemplatesGet200ResponseFromJSON(jsonValue));
88
96
  }
@@ -96,9 +104,9 @@ export class TemplatesApi extends runtime.BaseAPI {
96
104
  }
97
105
 
98
106
  /**
99
- * Get template
107
+ * Creates request options for apiV1TemplatesIdGet without sending the request
100
108
  */
101
- async apiV1TemplatesIdGetRaw(requestParameters: ApiV1TemplatesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesIdGet200Response>> {
109
+ async apiV1TemplatesIdGetRequestOpts(requestParameters: ApiV1TemplatesIdGetRequest): Promise<runtime.RequestOpts> {
102
110
  if (requestParameters['id'] == null) {
103
111
  throw new runtime.RequiredError(
104
112
  'id',
@@ -114,12 +122,20 @@ export class TemplatesApi extends runtime.BaseAPI {
114
122
  let urlPath = `/api/v1/templates/{id}`;
115
123
  urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
116
124
 
117
- const response = await this.request({
125
+ return {
118
126
  path: urlPath,
119
127
  method: 'GET',
120
128
  headers: headerParameters,
121
129
  query: queryParameters,
122
- }, initOverrides);
130
+ };
131
+ }
132
+
133
+ /**
134
+ * Get template
135
+ */
136
+ async apiV1TemplatesIdGetRaw(requestParameters: ApiV1TemplatesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesIdGet200Response>> {
137
+ const requestOptions = await this.apiV1TemplatesIdGetRequestOpts(requestParameters);
138
+ const response = await this.request(requestOptions, initOverrides);
123
139
 
124
140
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TemplatesIdGet200ResponseFromJSON(jsonValue));
125
141
  }
@@ -133,9 +149,9 @@ export class TemplatesApi extends runtime.BaseAPI {
133
149
  }
134
150
 
135
151
  /**
136
- * Update template
152
+ * Creates request options for apiV1TemplatesIdPatch without sending the request
137
153
  */
138
- async apiV1TemplatesIdPatchRaw(requestParameters: ApiV1TemplatesIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesPost201Response>> {
154
+ async apiV1TemplatesIdPatchRequestOpts(requestParameters: ApiV1TemplatesIdPatchOperationRequest): Promise<runtime.RequestOpts> {
139
155
  if (requestParameters['id'] == null) {
140
156
  throw new runtime.RequiredError(
141
157
  'id',
@@ -153,13 +169,21 @@ export class TemplatesApi extends runtime.BaseAPI {
153
169
  let urlPath = `/api/v1/templates/{id}`;
154
170
  urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
155
171
 
156
- const response = await this.request({
172
+ return {
157
173
  path: urlPath,
158
174
  method: 'PATCH',
159
175
  headers: headerParameters,
160
176
  query: queryParameters,
161
177
  body: ApiV1TemplatesIdPatchRequestToJSON(requestParameters['apiV1TemplatesIdPatchRequest']),
162
- }, initOverrides);
178
+ };
179
+ }
180
+
181
+ /**
182
+ * Update template
183
+ */
184
+ async apiV1TemplatesIdPatchRaw(requestParameters: ApiV1TemplatesIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesPost201Response>> {
185
+ const requestOptions = await this.apiV1TemplatesIdPatchRequestOpts(requestParameters);
186
+ const response = await this.request(requestOptions, initOverrides);
163
187
 
164
188
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TemplatesPost201ResponseFromJSON(jsonValue));
165
189
  }
@@ -173,9 +197,9 @@ export class TemplatesApi extends runtime.BaseAPI {
173
197
  }
174
198
 
175
199
  /**
176
- * Create template
200
+ * Creates request options for apiV1TemplatesPost without sending the request
177
201
  */
178
- async apiV1TemplatesPostRaw(requestParameters: ApiV1TemplatesPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesPost201Response>> {
202
+ async apiV1TemplatesPostRequestOpts(requestParameters: ApiV1TemplatesPostOperationRequest): Promise<runtime.RequestOpts> {
179
203
  const queryParameters: any = {};
180
204
 
181
205
  const headerParameters: runtime.HTTPHeaders = {};
@@ -185,13 +209,21 @@ export class TemplatesApi extends runtime.BaseAPI {
185
209
 
186
210
  let urlPath = `/api/v1/templates`;
187
211
 
188
- const response = await this.request({
212
+ return {
189
213
  path: urlPath,
190
214
  method: 'POST',
191
215
  headers: headerParameters,
192
216
  query: queryParameters,
193
217
  body: ApiV1TemplatesPostRequestToJSON(requestParameters['apiV1TemplatesPostRequest']),
194
- }, initOverrides);
218
+ };
219
+ }
220
+
221
+ /**
222
+ * Create template
223
+ */
224
+ async apiV1TemplatesPostRaw(requestParameters: ApiV1TemplatesPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TemplatesPost201Response>> {
225
+ const requestOptions = await this.apiV1TemplatesPostRequestOpts(requestParameters);
226
+ const response = await this.request(requestOptions, initOverrides);
195
227
 
196
228
  return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TemplatesPost201ResponseFromJSON(jsonValue));
197
229
  }
@@ -58,9 +58,9 @@ export interface ApiV1UsersPostOperationRequest {
58
58
  export class UsersApi extends runtime.BaseAPI {
59
59
 
60
60
  /**
61
- * Get current user profile
61
+ * Creates request options for apiV1ProfileGet without sending the request
62
62
  */
63
- async apiV1ProfileGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1ProfileGet200Response>> {
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
- const response = await this.request({
71
+ return {
72
72
  path: urlPath,
73
73
  method: 'GET',
74
74
  headers: headerParameters,
75
75
  query: queryParameters,
76
- }, initOverrides);
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
- * Updates a user
98
+ * Creates request options for apiV1UsersIdPatch without sending the request
91
99
  */
92
- async apiV1UsersIdPatchRaw(requestParameters: ApiV1UsersIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1UsersIdPatch200Response>> {
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
- const response = await this.request({
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
- }, initOverrides);
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 a user
146
+ * Creates request options for apiV1UsersPost without sending the request
131
147
  */
132
- async apiV1UsersPostRaw(requestParameters: ApiV1UsersPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1UsersPost201Response>> {
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
- const response = await this.request({
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
- }, initOverrides);
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
  }
package/src/apis/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './RecordsApi';
3
4
  export * from './SessionsApi';
4
5
  export * from './TelegramLinksApi';
5
6
  export * from './TemplatesApi';
@@ -0,0 +1,101 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { ApiV1RecordsGet200ResponseRecordsInner } from './ApiV1RecordsGet200ResponseRecordsInner';
17
+ import {
18
+ ApiV1RecordsGet200ResponseRecordsInnerFromJSON,
19
+ ApiV1RecordsGet200ResponseRecordsInnerFromJSONTyped,
20
+ ApiV1RecordsGet200ResponseRecordsInnerToJSON,
21
+ ApiV1RecordsGet200ResponseRecordsInnerToJSONTyped,
22
+ } from './ApiV1RecordsGet200ResponseRecordsInner';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ApiV1RecordsGet200Response
28
+ */
29
+ export interface ApiV1RecordsGet200Response {
30
+ /**
31
+ *
32
+ * @type {Array<ApiV1RecordsGet200ResponseRecordsInner>}
33
+ * @memberof ApiV1RecordsGet200Response
34
+ */
35
+ records: Array<ApiV1RecordsGet200ResponseRecordsInner>;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof ApiV1RecordsGet200Response
40
+ */
41
+ total: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof ApiV1RecordsGet200Response
46
+ */
47
+ limit: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof ApiV1RecordsGet200Response
52
+ */
53
+ offset: number;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the ApiV1RecordsGet200Response interface.
58
+ */
59
+ export function instanceOfApiV1RecordsGet200Response(value: object): value is ApiV1RecordsGet200Response {
60
+ if (!('records' in value) || value['records'] === undefined) return false;
61
+ if (!('total' in value) || value['total'] === undefined) return false;
62
+ if (!('limit' in value) || value['limit'] === undefined) return false;
63
+ if (!('offset' in value) || value['offset'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function ApiV1RecordsGet200ResponseFromJSON(json: any): ApiV1RecordsGet200Response {
68
+ return ApiV1RecordsGet200ResponseFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function ApiV1RecordsGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiV1RecordsGet200Response {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'records': ((json['records'] as Array<any>).map(ApiV1RecordsGet200ResponseRecordsInnerFromJSON)),
78
+ 'total': json['total'],
79
+ 'limit': json['limit'],
80
+ 'offset': json['offset'],
81
+ };
82
+ }
83
+
84
+ export function ApiV1RecordsGet200ResponseToJSON(json: any): ApiV1RecordsGet200Response {
85
+ return ApiV1RecordsGet200ResponseToJSONTyped(json, false);
86
+ }
87
+
88
+ export function ApiV1RecordsGet200ResponseToJSONTyped(value?: ApiV1RecordsGet200Response | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'records': ((value['records'] as Array<any>).map(ApiV1RecordsGet200ResponseRecordsInnerToJSON)),
96
+ 'total': value['total'],
97
+ 'limit': value['limit'],
98
+ 'offset': value['offset'],
99
+ };
100
+ }
101
+
@@ -0,0 +1,102 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ApiV1RecordsGet200ResponseRecordsInner
20
+ */
21
+ export interface ApiV1RecordsGet200ResponseRecordsInner {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ApiV1RecordsGet200ResponseRecordsInner
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ApiV1RecordsGet200ResponseRecordsInner
32
+ */
33
+ template: string;
34
+ /**
35
+ *
36
+ * @type {object}
37
+ * @memberof ApiV1RecordsGet200ResponseRecordsInner
38
+ */
39
+ data: object;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof ApiV1RecordsGet200ResponseRecordsInner
44
+ */
45
+ createdAt: Date;
46
+ /**
47
+ *
48
+ * @type {Date}
49
+ * @memberof ApiV1RecordsGet200ResponseRecordsInner
50
+ */
51
+ updatedAt: Date;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the ApiV1RecordsGet200ResponseRecordsInner interface.
56
+ */
57
+ export function instanceOfApiV1RecordsGet200ResponseRecordsInner(value: object): value is ApiV1RecordsGet200ResponseRecordsInner {
58
+ if (!('id' in value) || value['id'] === undefined) return false;
59
+ if (!('template' in value) || value['template'] === undefined) return false;
60
+ if (!('data' in value) || value['data'] === undefined) return false;
61
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
62
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function ApiV1RecordsGet200ResponseRecordsInnerFromJSON(json: any): ApiV1RecordsGet200ResponseRecordsInner {
67
+ return ApiV1RecordsGet200ResponseRecordsInnerFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function ApiV1RecordsGet200ResponseRecordsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiV1RecordsGet200ResponseRecordsInner {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'id': json['id'],
77
+ 'template': json['template'],
78
+ 'data': json['data'],
79
+ 'createdAt': (new Date(json['created_at'])),
80
+ 'updatedAt': (new Date(json['updated_at'])),
81
+ };
82
+ }
83
+
84
+ export function ApiV1RecordsGet200ResponseRecordsInnerToJSON(json: any): ApiV1RecordsGet200ResponseRecordsInner {
85
+ return ApiV1RecordsGet200ResponseRecordsInnerToJSONTyped(json, false);
86
+ }
87
+
88
+ export function ApiV1RecordsGet200ResponseRecordsInnerToJSONTyped(value?: ApiV1RecordsGet200ResponseRecordsInner | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'id': value['id'],
96
+ 'template': value['template'],
97
+ 'data': value['data'],
98
+ 'created_at': value['createdAt'].toISOString(),
99
+ 'updated_at': value['updatedAt'].toISOString(),
100
+ };
101
+ }
102
+
@@ -0,0 +1,66 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ApiV1RecordsIdDelete200Response
20
+ */
21
+ export interface ApiV1RecordsIdDelete200Response {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ApiV1RecordsIdDelete200Response
26
+ */
27
+ message: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ApiV1RecordsIdDelete200Response interface.
32
+ */
33
+ export function instanceOfApiV1RecordsIdDelete200Response(value: object): value is ApiV1RecordsIdDelete200Response {
34
+ if (!('message' in value) || value['message'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function ApiV1RecordsIdDelete200ResponseFromJSON(json: any): ApiV1RecordsIdDelete200Response {
39
+ return ApiV1RecordsIdDelete200ResponseFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function ApiV1RecordsIdDelete200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiV1RecordsIdDelete200Response {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'message': json['message'],
49
+ };
50
+ }
51
+
52
+ export function ApiV1RecordsIdDelete200ResponseToJSON(json: any): ApiV1RecordsIdDelete200Response {
53
+ return ApiV1RecordsIdDelete200ResponseToJSONTyped(json, false);
54
+ }
55
+
56
+ export function ApiV1RecordsIdDelete200ResponseToJSONTyped(value?: ApiV1RecordsIdDelete200Response | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'message': value['message'],
64
+ };
65
+ }
66
+