blanche-client-sdk 0.1.3 → 0.2.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/FILES +20 -0
- package/README.md +14 -2
- package/dist/apis/TelegramLinksApi.d.ts +48 -0
- package/dist/apis/TelegramLinksApi.js +213 -0
- package/dist/apis/UsersApi.d.ts +3 -3
- package/dist/apis/UsersApi.js +1 -1
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/ApiV1ProfileGet200Response.d.ts +18 -0
- package/dist/models/ApiV1ProfileGet200Response.js +12 -0
- package/dist/models/ApiV1TelegramLinksConsumePost200Response.d.ts +32 -0
- package/dist/models/ApiV1TelegramLinksConsumePost200Response.js +51 -0
- package/dist/models/ApiV1TelegramLinksConsumePost422Response.d.ts +34 -0
- package/dist/models/ApiV1TelegramLinksConsumePost422Response.js +51 -0
- package/dist/models/ApiV1TelegramLinksConsumePostRequest.d.ts +62 -0
- package/dist/models/ApiV1TelegramLinksConsumePostRequest.js +63 -0
- package/dist/models/ApiV1TelegramLinksPost201Response.d.ts +38 -0
- package/dist/models/ApiV1TelegramLinksPost201Response.js +55 -0
- package/dist/models/ApiV1TelegramLinksTokenGet200Response.d.ts +57 -0
- package/dist/models/ApiV1TelegramLinksTokenGet200Response.js +66 -0
- package/dist/models/ApiV1TelegramLinksTokenGet200ResponseTelegram.d.ts +56 -0
- package/dist/models/ApiV1TelegramLinksTokenGet200ResponseTelegram.js +57 -0
- package/dist/models/ApiV1TelegramLinksTokenGet404Response.d.ts +32 -0
- package/dist/models/ApiV1TelegramLinksTokenGet404Response.js +51 -0
- package/dist/models/ApiV1UsersIdPatch200Response.d.ts +12 -0
- package/dist/models/ApiV1UsersIdPatch200Response.js +8 -0
- package/dist/models/ApiV1UsersIdPatch422Response.d.ts +34 -0
- package/dist/models/ApiV1UsersIdPatch422Response.js +51 -0
- package/dist/models/ApiV1UsersIdPatchRequestUser.d.ts +12 -0
- package/dist/models/ApiV1UsersIdPatchRequestUser.js +4 -0
- package/dist/models/ApiV1UsersPost201Response.d.ts +56 -0
- package/dist/models/ApiV1UsersPost201Response.js +67 -0
- package/dist/models/ApiV1UsersPost422Response.d.ts +4 -2
- package/dist/models/ApiV1UsersPostRequestUser.d.ts +12 -0
- package/dist/models/ApiV1UsersPostRequestUser.js +8 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/docs/ApiV1ProfileGet200Response.md +6 -0
- package/docs/ApiV1TelegramLinksConsumePost200Response.md +34 -0
- package/docs/ApiV1TelegramLinksConsumePost422Response.md +34 -0
- package/docs/ApiV1TelegramLinksConsumePostRequest.md +44 -0
- package/docs/ApiV1TelegramLinksPost201Response.md +36 -0
- package/docs/ApiV1TelegramLinksTokenGet200Response.md +42 -0
- package/docs/ApiV1TelegramLinksTokenGet200ResponseTelegram.md +42 -0
- package/docs/ApiV1TelegramLinksTokenGet404Response.md +34 -0
- package/docs/ApiV1UsersIdPatch200Response.md +4 -0
- package/docs/ApiV1UsersIdPatch422Response.md +34 -0
- package/docs/ApiV1UsersIdPatchRequestUser.md +4 -0
- package/docs/ApiV1UsersPost201Response.md +42 -0
- package/docs/ApiV1UsersPost422Response.md +2 -2
- package/docs/ApiV1UsersPostRequestUser.md +4 -0
- package/docs/TelegramLinksApi.md +201 -0
- package/docs/UsersApi.md +2 -2
- package/package.json +1 -1
- package/src/apis/TelegramLinksApi.ts +154 -0
- package/src/apis/UsersApi.ts +9 -3
- package/src/apis/index.ts +1 -0
- package/src/models/ApiV1ProfileGet200Response.ts +27 -0
- package/src/models/ApiV1TelegramLinksConsumePost200Response.ts +66 -0
- package/src/models/ApiV1TelegramLinksConsumePost422Response.ts +66 -0
- package/src/models/ApiV1TelegramLinksConsumePostRequest.ts +107 -0
- package/src/models/ApiV1TelegramLinksPost201Response.ts +75 -0
- package/src/models/ApiV1TelegramLinksTokenGet200Response.ts +109 -0
- package/src/models/ApiV1TelegramLinksTokenGet200ResponseTelegram.ts +97 -0
- package/src/models/ApiV1TelegramLinksTokenGet404Response.ts +66 -0
- package/src/models/ApiV1UsersIdPatch200Response.ts +18 -0
- package/src/models/ApiV1UsersIdPatch422Response.ts +66 -0
- package/src/models/ApiV1UsersIdPatchRequestUser.ts +16 -0
- package/src/models/ApiV1UsersPost201Response.ts +102 -0
- package/src/models/ApiV1UsersPost422Response.ts +2 -2
- package/src/models/ApiV1UsersPostRequestUser.ts +18 -0
- package/src/models/index.ts +9 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`errors` | Array<string>
|
|
9
|
+
`errors` | { [key: string]: Array<string>; }
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ import type { ApiV1UsersPost422Response } from 'blanche-client-sdk'
|
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
|
-
"errors": ["
|
|
18
|
+
"errors": {"email":["can't be blank"],"first_name":["can't be blank"]},
|
|
19
19
|
} satisfies ApiV1UsersPost422Response
|
|
20
20
|
|
|
21
21
|
console.log(example)
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
+
`firstName` | string
|
|
10
|
+
`lastName` | string
|
|
9
11
|
`email` | string
|
|
10
12
|
`password` | string
|
|
11
13
|
`timezone` | string
|
|
@@ -17,6 +19,8 @@ import type { ApiV1UsersPostRequestUser } from 'blanche-client-sdk'
|
|
|
17
19
|
|
|
18
20
|
// TODO: Update the object below with actual values
|
|
19
21
|
const example = {
|
|
22
|
+
"firstName": Test,
|
|
23
|
+
"lastName": User,
|
|
20
24
|
"email": user@example.com,
|
|
21
25
|
"password": password123,
|
|
22
26
|
"timezone": UTC,
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# TelegramLinksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:3000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**apiV1TelegramLinksConsumePost**](TelegramLinksApi.md#apiv1telegramlinksconsumepostoperation) | **POST** /api/v1/telegram_links/consume | Consume telegram link |
|
|
8
|
+
| [**apiV1TelegramLinksPost**](TelegramLinksApi.md#apiv1telegramlinkspost) | **POST** /api/v1/telegram_links | Create telegram link |
|
|
9
|
+
| [**apiV1TelegramLinksTokenGet**](TelegramLinksApi.md#apiv1telegramlinkstokenget) | **GET** /api/v1/telegram_links/{token} | Get telegram link status |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## apiV1TelegramLinksConsumePost
|
|
14
|
+
|
|
15
|
+
> ApiV1TelegramLinksConsumePost200Response apiV1TelegramLinksConsumePost(apiV1TelegramLinksConsumePostRequest)
|
|
16
|
+
|
|
17
|
+
Consume telegram link
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
Configuration,
|
|
24
|
+
TelegramLinksApi,
|
|
25
|
+
} from 'blanche-client-sdk';
|
|
26
|
+
import type { ApiV1TelegramLinksConsumePostOperationRequest } from 'blanche-client-sdk';
|
|
27
|
+
|
|
28
|
+
async function example() {
|
|
29
|
+
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
30
|
+
const api = new TelegramLinksApi();
|
|
31
|
+
|
|
32
|
+
const body = {
|
|
33
|
+
// ApiV1TelegramLinksConsumePostRequest (optional)
|
|
34
|
+
apiV1TelegramLinksConsumePostRequest: ...,
|
|
35
|
+
} satisfies ApiV1TelegramLinksConsumePostOperationRequest;
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
const data = await api.apiV1TelegramLinksConsumePost(body);
|
|
39
|
+
console.log(data);
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error(error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Run the test
|
|
46
|
+
example().catch(console.error);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Parameters
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
| Name | Type | Description | Notes |
|
|
53
|
+
|------------- | ------------- | ------------- | -------------|
|
|
54
|
+
| **apiV1TelegramLinksConsumePostRequest** | [ApiV1TelegramLinksConsumePostRequest](ApiV1TelegramLinksConsumePostRequest.md) | | [Optional] |
|
|
55
|
+
|
|
56
|
+
### Return type
|
|
57
|
+
|
|
58
|
+
[**ApiV1TelegramLinksConsumePost200Response**](ApiV1TelegramLinksConsumePost200Response.md)
|
|
59
|
+
|
|
60
|
+
### Authorization
|
|
61
|
+
|
|
62
|
+
No authorization required
|
|
63
|
+
|
|
64
|
+
### HTTP request headers
|
|
65
|
+
|
|
66
|
+
- **Content-Type**: `application/json`
|
|
67
|
+
- **Accept**: `application/json`
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### HTTP response details
|
|
71
|
+
| Status code | Description | Response headers |
|
|
72
|
+
|-------------|-------------|------------------|
|
|
73
|
+
| **200** | linked | - |
|
|
74
|
+
| **422** | invalid request | - |
|
|
75
|
+
|
|
76
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## apiV1TelegramLinksPost
|
|
80
|
+
|
|
81
|
+
> ApiV1TelegramLinksPost201Response apiV1TelegramLinksPost()
|
|
82
|
+
|
|
83
|
+
Create telegram link
|
|
84
|
+
|
|
85
|
+
### Example
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import {
|
|
89
|
+
Configuration,
|
|
90
|
+
TelegramLinksApi,
|
|
91
|
+
} from 'blanche-client-sdk';
|
|
92
|
+
import type { ApiV1TelegramLinksPostRequest } from 'blanche-client-sdk';
|
|
93
|
+
|
|
94
|
+
async function example() {
|
|
95
|
+
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
96
|
+
const api = new TelegramLinksApi();
|
|
97
|
+
|
|
98
|
+
try {
|
|
99
|
+
const data = await api.apiV1TelegramLinksPost();
|
|
100
|
+
console.log(data);
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error(error);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Run the test
|
|
107
|
+
example().catch(console.error);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Parameters
|
|
111
|
+
|
|
112
|
+
This endpoint does not need any parameter.
|
|
113
|
+
|
|
114
|
+
### Return type
|
|
115
|
+
|
|
116
|
+
[**ApiV1TelegramLinksPost201Response**](ApiV1TelegramLinksPost201Response.md)
|
|
117
|
+
|
|
118
|
+
### Authorization
|
|
119
|
+
|
|
120
|
+
No authorization required
|
|
121
|
+
|
|
122
|
+
### HTTP request headers
|
|
123
|
+
|
|
124
|
+
- **Content-Type**: Not defined
|
|
125
|
+
- **Accept**: `application/json`
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### HTTP response details
|
|
129
|
+
| Status code | Description | Response headers |
|
|
130
|
+
|-------------|-------------|------------------|
|
|
131
|
+
| **201** | link created | - |
|
|
132
|
+
| **401** | unauthorized | - |
|
|
133
|
+
|
|
134
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## apiV1TelegramLinksTokenGet
|
|
138
|
+
|
|
139
|
+
> ApiV1TelegramLinksTokenGet200Response apiV1TelegramLinksTokenGet(token)
|
|
140
|
+
|
|
141
|
+
Get telegram link status
|
|
142
|
+
|
|
143
|
+
### Example
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
import {
|
|
147
|
+
Configuration,
|
|
148
|
+
TelegramLinksApi,
|
|
149
|
+
} from 'blanche-client-sdk';
|
|
150
|
+
import type { ApiV1TelegramLinksTokenGetRequest } from 'blanche-client-sdk';
|
|
151
|
+
|
|
152
|
+
async function example() {
|
|
153
|
+
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
154
|
+
const api = new TelegramLinksApi();
|
|
155
|
+
|
|
156
|
+
const body = {
|
|
157
|
+
// string | Telegram link token
|
|
158
|
+
token: token_example,
|
|
159
|
+
} satisfies ApiV1TelegramLinksTokenGetRequest;
|
|
160
|
+
|
|
161
|
+
try {
|
|
162
|
+
const data = await api.apiV1TelegramLinksTokenGet(body);
|
|
163
|
+
console.log(data);
|
|
164
|
+
} catch (error) {
|
|
165
|
+
console.error(error);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Run the test
|
|
170
|
+
example().catch(console.error);
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Parameters
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
| Name | Type | Description | Notes |
|
|
177
|
+
|------------- | ------------- | ------------- | -------------|
|
|
178
|
+
| **token** | `string` | Telegram link token | [Defaults to `undefined`] |
|
|
179
|
+
|
|
180
|
+
### Return type
|
|
181
|
+
|
|
182
|
+
[**ApiV1TelegramLinksTokenGet200Response**](ApiV1TelegramLinksTokenGet200Response.md)
|
|
183
|
+
|
|
184
|
+
### Authorization
|
|
185
|
+
|
|
186
|
+
No authorization required
|
|
187
|
+
|
|
188
|
+
### HTTP request headers
|
|
189
|
+
|
|
190
|
+
- **Content-Type**: Not defined
|
|
191
|
+
- **Accept**: `application/json`
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### HTTP response details
|
|
195
|
+
| Status code | Description | Response headers |
|
|
196
|
+
|-------------|-------------|------------------|
|
|
197
|
+
| **200** | link status returned | - |
|
|
198
|
+
| **404** | not found | - |
|
|
199
|
+
|
|
200
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
201
|
+
|
package/docs/UsersApi.md
CHANGED
|
@@ -140,7 +140,7 @@ No authorization required
|
|
|
140
140
|
|
|
141
141
|
## apiV1UsersPost
|
|
142
142
|
|
|
143
|
-
>
|
|
143
|
+
> ApiV1UsersPost201Response apiV1UsersPost(apiV1UsersPostRequest)
|
|
144
144
|
|
|
145
145
|
Creates a user
|
|
146
146
|
|
|
@@ -183,7 +183,7 @@ example().catch(console.error);
|
|
|
183
183
|
|
|
184
184
|
### Return type
|
|
185
185
|
|
|
186
|
-
[**
|
|
186
|
+
[**ApiV1UsersPost201Response**](ApiV1UsersPost201Response.md)
|
|
187
187
|
|
|
188
188
|
### Authorization
|
|
189
189
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
ApiV1ProfileGet401Response,
|
|
19
|
+
ApiV1TelegramLinksConsumePost200Response,
|
|
20
|
+
ApiV1TelegramLinksConsumePost422Response,
|
|
21
|
+
ApiV1TelegramLinksConsumePostRequest,
|
|
22
|
+
ApiV1TelegramLinksPost201Response,
|
|
23
|
+
ApiV1TelegramLinksTokenGet200Response,
|
|
24
|
+
ApiV1TelegramLinksTokenGet404Response,
|
|
25
|
+
} from '../models/index';
|
|
26
|
+
import {
|
|
27
|
+
ApiV1ProfileGet401ResponseFromJSON,
|
|
28
|
+
ApiV1ProfileGet401ResponseToJSON,
|
|
29
|
+
ApiV1TelegramLinksConsumePost200ResponseFromJSON,
|
|
30
|
+
ApiV1TelegramLinksConsumePost200ResponseToJSON,
|
|
31
|
+
ApiV1TelegramLinksConsumePost422ResponseFromJSON,
|
|
32
|
+
ApiV1TelegramLinksConsumePost422ResponseToJSON,
|
|
33
|
+
ApiV1TelegramLinksConsumePostRequestFromJSON,
|
|
34
|
+
ApiV1TelegramLinksConsumePostRequestToJSON,
|
|
35
|
+
ApiV1TelegramLinksPost201ResponseFromJSON,
|
|
36
|
+
ApiV1TelegramLinksPost201ResponseToJSON,
|
|
37
|
+
ApiV1TelegramLinksTokenGet200ResponseFromJSON,
|
|
38
|
+
ApiV1TelegramLinksTokenGet200ResponseToJSON,
|
|
39
|
+
ApiV1TelegramLinksTokenGet404ResponseFromJSON,
|
|
40
|
+
ApiV1TelegramLinksTokenGet404ResponseToJSON,
|
|
41
|
+
} from '../models/index';
|
|
42
|
+
|
|
43
|
+
export interface ApiV1TelegramLinksConsumePostOperationRequest {
|
|
44
|
+
apiV1TelegramLinksConsumePostRequest?: ApiV1TelegramLinksConsumePostRequest;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ApiV1TelegramLinksTokenGetRequest {
|
|
48
|
+
token: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
export class TelegramLinksApi extends runtime.BaseAPI {
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Consume telegram link
|
|
58
|
+
*/
|
|
59
|
+
async apiV1TelegramLinksConsumePostRaw(requestParameters: ApiV1TelegramLinksConsumePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksConsumePost200Response>> {
|
|
60
|
+
const queryParameters: any = {};
|
|
61
|
+
|
|
62
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
63
|
+
|
|
64
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
let urlPath = `/api/v1/telegram_links/consume`;
|
|
68
|
+
|
|
69
|
+
const response = await this.request({
|
|
70
|
+
path: urlPath,
|
|
71
|
+
method: 'POST',
|
|
72
|
+
headers: headerParameters,
|
|
73
|
+
query: queryParameters,
|
|
74
|
+
body: ApiV1TelegramLinksConsumePostRequestToJSON(requestParameters['apiV1TelegramLinksConsumePostRequest']),
|
|
75
|
+
}, initOverrides);
|
|
76
|
+
|
|
77
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TelegramLinksConsumePost200ResponseFromJSON(jsonValue));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Consume telegram link
|
|
82
|
+
*/
|
|
83
|
+
async apiV1TelegramLinksConsumePost(requestParameters: ApiV1TelegramLinksConsumePostOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TelegramLinksConsumePost200Response> {
|
|
84
|
+
const response = await this.apiV1TelegramLinksConsumePostRaw(requestParameters, initOverrides);
|
|
85
|
+
return await response.value();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Create telegram link
|
|
90
|
+
*/
|
|
91
|
+
async apiV1TelegramLinksPostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksPost201Response>> {
|
|
92
|
+
const queryParameters: any = {};
|
|
93
|
+
|
|
94
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
let urlPath = `/api/v1/telegram_links`;
|
|
98
|
+
|
|
99
|
+
const response = await this.request({
|
|
100
|
+
path: urlPath,
|
|
101
|
+
method: 'POST',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
}, initOverrides);
|
|
105
|
+
|
|
106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TelegramLinksPost201ResponseFromJSON(jsonValue));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Create telegram link
|
|
111
|
+
*/
|
|
112
|
+
async apiV1TelegramLinksPost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TelegramLinksPost201Response> {
|
|
113
|
+
const response = await this.apiV1TelegramLinksPostRaw(initOverrides);
|
|
114
|
+
return await response.value();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Get telegram link status
|
|
119
|
+
*/
|
|
120
|
+
async apiV1TelegramLinksTokenGetRaw(requestParameters: ApiV1TelegramLinksTokenGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1TelegramLinksTokenGet200Response>> {
|
|
121
|
+
if (requestParameters['token'] == null) {
|
|
122
|
+
throw new runtime.RequiredError(
|
|
123
|
+
'token',
|
|
124
|
+
'Required parameter "token" was null or undefined when calling apiV1TelegramLinksTokenGet().'
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const queryParameters: any = {};
|
|
129
|
+
|
|
130
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
let urlPath = `/api/v1/telegram_links/{token}`;
|
|
134
|
+
urlPath = urlPath.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters['token'])));
|
|
135
|
+
|
|
136
|
+
const response = await this.request({
|
|
137
|
+
path: urlPath,
|
|
138
|
+
method: 'GET',
|
|
139
|
+
headers: headerParameters,
|
|
140
|
+
query: queryParameters,
|
|
141
|
+
}, initOverrides);
|
|
142
|
+
|
|
143
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1TelegramLinksTokenGet200ResponseFromJSON(jsonValue));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Get telegram link status
|
|
148
|
+
*/
|
|
149
|
+
async apiV1TelegramLinksTokenGet(requestParameters: ApiV1TelegramLinksTokenGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TelegramLinksTokenGet200Response> {
|
|
150
|
+
const response = await this.apiV1TelegramLinksTokenGetRaw(requestParameters, initOverrides);
|
|
151
|
+
return await response.value();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
}
|
package/src/apis/UsersApi.ts
CHANGED
|
@@ -18,7 +18,9 @@ import type {
|
|
|
18
18
|
ApiV1ProfileGet200Response,
|
|
19
19
|
ApiV1ProfileGet401Response,
|
|
20
20
|
ApiV1UsersIdPatch200Response,
|
|
21
|
+
ApiV1UsersIdPatch422Response,
|
|
21
22
|
ApiV1UsersIdPatchRequest,
|
|
23
|
+
ApiV1UsersPost201Response,
|
|
22
24
|
ApiV1UsersPost422Response,
|
|
23
25
|
ApiV1UsersPostRequest,
|
|
24
26
|
} from '../models/index';
|
|
@@ -29,8 +31,12 @@ import {
|
|
|
29
31
|
ApiV1ProfileGet401ResponseToJSON,
|
|
30
32
|
ApiV1UsersIdPatch200ResponseFromJSON,
|
|
31
33
|
ApiV1UsersIdPatch200ResponseToJSON,
|
|
34
|
+
ApiV1UsersIdPatch422ResponseFromJSON,
|
|
35
|
+
ApiV1UsersIdPatch422ResponseToJSON,
|
|
32
36
|
ApiV1UsersIdPatchRequestFromJSON,
|
|
33
37
|
ApiV1UsersIdPatchRequestToJSON,
|
|
38
|
+
ApiV1UsersPost201ResponseFromJSON,
|
|
39
|
+
ApiV1UsersPost201ResponseToJSON,
|
|
34
40
|
ApiV1UsersPost422ResponseFromJSON,
|
|
35
41
|
ApiV1UsersPost422ResponseToJSON,
|
|
36
42
|
ApiV1UsersPostRequestFromJSON,
|
|
@@ -123,7 +129,7 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
123
129
|
/**
|
|
124
130
|
* Creates a user
|
|
125
131
|
*/
|
|
126
|
-
async apiV1UsersPostRaw(requestParameters: ApiV1UsersPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
132
|
+
async apiV1UsersPostRaw(requestParameters: ApiV1UsersPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1UsersPost201Response>> {
|
|
127
133
|
const queryParameters: any = {};
|
|
128
134
|
|
|
129
135
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -141,13 +147,13 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
141
147
|
body: ApiV1UsersPostRequestToJSON(requestParameters['apiV1UsersPostRequest']),
|
|
142
148
|
}, initOverrides);
|
|
143
149
|
|
|
144
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
150
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiV1UsersPost201ResponseFromJSON(jsonValue));
|
|
145
151
|
}
|
|
146
152
|
|
|
147
153
|
/**
|
|
148
154
|
* Creates a user
|
|
149
155
|
*/
|
|
150
|
-
async apiV1UsersPost(requestParameters: ApiV1UsersPostOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
156
|
+
async apiV1UsersPost(requestParameters: ApiV1UsersPostOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1UsersPost201Response> {
|
|
151
157
|
const response = await this.apiV1UsersPostRaw(requestParameters, initOverrides);
|
|
152
158
|
return await response.value();
|
|
153
159
|
}
|
package/src/apis/index.ts
CHANGED
|
@@ -25,6 +25,18 @@ export interface ApiV1ProfileGet200Response {
|
|
|
25
25
|
* @memberof ApiV1ProfileGet200Response
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ApiV1ProfileGet200Response
|
|
32
|
+
*/
|
|
33
|
+
firstName: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ApiV1ProfileGet200Response
|
|
38
|
+
*/
|
|
39
|
+
lastName: string;
|
|
28
40
|
/**
|
|
29
41
|
*
|
|
30
42
|
* @type {string}
|
|
@@ -37,6 +49,12 @@ export interface ApiV1ProfileGet200Response {
|
|
|
37
49
|
* @memberof ApiV1ProfileGet200Response
|
|
38
50
|
*/
|
|
39
51
|
timezone: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof ApiV1ProfileGet200Response
|
|
56
|
+
*/
|
|
57
|
+
telegramConnected: boolean;
|
|
40
58
|
}
|
|
41
59
|
|
|
42
60
|
/**
|
|
@@ -44,8 +62,11 @@ export interface ApiV1ProfileGet200Response {
|
|
|
44
62
|
*/
|
|
45
63
|
export function instanceOfApiV1ProfileGet200Response(value: object): value is ApiV1ProfileGet200Response {
|
|
46
64
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
65
|
+
if (!('firstName' in value) || value['firstName'] === undefined) return false;
|
|
66
|
+
if (!('lastName' in value) || value['lastName'] === undefined) return false;
|
|
47
67
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
48
68
|
if (!('timezone' in value) || value['timezone'] === undefined) return false;
|
|
69
|
+
if (!('telegramConnected' in value) || value['telegramConnected'] === undefined) return false;
|
|
49
70
|
return true;
|
|
50
71
|
}
|
|
51
72
|
|
|
@@ -60,8 +81,11 @@ export function ApiV1ProfileGet200ResponseFromJSONTyped(json: any, ignoreDiscrim
|
|
|
60
81
|
return {
|
|
61
82
|
|
|
62
83
|
'id': json['id'],
|
|
84
|
+
'firstName': json['first_name'],
|
|
85
|
+
'lastName': json['last_name'],
|
|
63
86
|
'email': json['email'],
|
|
64
87
|
'timezone': json['timezone'],
|
|
88
|
+
'telegramConnected': json['telegram_connected'],
|
|
65
89
|
};
|
|
66
90
|
}
|
|
67
91
|
|
|
@@ -77,8 +101,11 @@ export function ApiV1ProfileGet200ResponseToJSONTyped(value?: ApiV1ProfileGet200
|
|
|
77
101
|
return {
|
|
78
102
|
|
|
79
103
|
'id': value['id'],
|
|
104
|
+
'first_name': value['firstName'],
|
|
105
|
+
'last_name': value['lastName'],
|
|
80
106
|
'email': value['email'],
|
|
81
107
|
'timezone': value['timezone'],
|
|
108
|
+
'telegram_connected': value['telegramConnected'],
|
|
82
109
|
};
|
|
83
110
|
}
|
|
84
111
|
|
|
@@ -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 ApiV1TelegramLinksConsumePost200Response
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiV1TelegramLinksConsumePost200Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ApiV1TelegramLinksConsumePost200Response
|
|
26
|
+
*/
|
|
27
|
+
status: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ApiV1TelegramLinksConsumePost200Response interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfApiV1TelegramLinksConsumePost200Response(value: object): value is ApiV1TelegramLinksConsumePost200Response {
|
|
34
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ApiV1TelegramLinksConsumePost200ResponseFromJSON(json: any): ApiV1TelegramLinksConsumePost200Response {
|
|
39
|
+
return ApiV1TelegramLinksConsumePost200ResponseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ApiV1TelegramLinksConsumePost200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiV1TelegramLinksConsumePost200Response {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'status': json['status'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ApiV1TelegramLinksConsumePost200ResponseToJSON(json: any): ApiV1TelegramLinksConsumePost200Response {
|
|
53
|
+
return ApiV1TelegramLinksConsumePost200ResponseToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ApiV1TelegramLinksConsumePost200ResponseToJSONTyped(value?: ApiV1TelegramLinksConsumePost200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'status': value['status'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -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 ApiV1TelegramLinksConsumePost422Response
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiV1TelegramLinksConsumePost422Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {{ [key: string]: Array<string>; }}
|
|
25
|
+
* @memberof ApiV1TelegramLinksConsumePost422Response
|
|
26
|
+
*/
|
|
27
|
+
errors: { [key: string]: Array<string>; };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ApiV1TelegramLinksConsumePost422Response interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfApiV1TelegramLinksConsumePost422Response(value: object): value is ApiV1TelegramLinksConsumePost422Response {
|
|
34
|
+
if (!('errors' in value) || value['errors'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ApiV1TelegramLinksConsumePost422ResponseFromJSON(json: any): ApiV1TelegramLinksConsumePost422Response {
|
|
39
|
+
return ApiV1TelegramLinksConsumePost422ResponseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ApiV1TelegramLinksConsumePost422ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiV1TelegramLinksConsumePost422Response {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'errors': json['errors'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ApiV1TelegramLinksConsumePost422ResponseToJSON(json: any): ApiV1TelegramLinksConsumePost422Response {
|
|
53
|
+
return ApiV1TelegramLinksConsumePost422ResponseToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ApiV1TelegramLinksConsumePost422ResponseToJSONTyped(value?: ApiV1TelegramLinksConsumePost422Response | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'errors': value['errors'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|