blanche-client-sdk 0.3.0 → 0.4.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 +16 -2
- package/README.md +24 -10
- package/dist/apis/RecordsApi.d.ts +65 -0
- package/dist/apis/RecordsApi.js +272 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/ApiV1RecordsGet200Response.d.ts +51 -0
- package/dist/models/ApiV1RecordsGet200Response.js +64 -0
- package/dist/models/ApiV1RecordsGet200ResponseRecordsInner.d.ts +56 -0
- package/dist/models/ApiV1RecordsGet200ResponseRecordsInner.js +67 -0
- package/dist/models/ApiV1RecordsIdDelete200Response.d.ts +32 -0
- package/dist/models/ApiV1RecordsIdDelete200Response.js +51 -0
- package/dist/models/ApiV1RecordsIdGet200Response.d.ts +62 -0
- package/dist/models/ApiV1RecordsIdGet200Response.js +71 -0
- package/dist/models/ApiV1RecordsIdPatch200Response.d.ts +50 -0
- package/dist/models/ApiV1RecordsIdPatch200Response.js +63 -0
- package/dist/models/ApiV1RecordsIdPatch422Response.d.ts +32 -0
- package/dist/models/ApiV1RecordsIdPatch422Response.js +51 -0
- package/dist/models/ApiV1RecordsIdPatchRequest.d.ts +32 -0
- package/dist/models/ApiV1RecordsIdPatchRequest.js +51 -0
- package/dist/models/index.d.ts +7 -1
- package/dist/models/index.js +7 -1
- package/docs/ApiV1RecordsGet200Response.md +40 -0
- package/docs/ApiV1RecordsGet200ResponseRecordsInner.md +42 -0
- package/docs/ApiV1RecordsIdDelete200Response.md +34 -0
- package/docs/ApiV1RecordsIdGet200Response.md +44 -0
- package/docs/ApiV1RecordsIdPatch200Response.md +40 -0
- package/docs/{ApiV1TemplatesPost422Response.md → ApiV1RecordsIdPatch422Response.md} +4 -4
- package/docs/ApiV1RecordsIdPatchRequest.md +34 -0
- package/docs/RecordsApi.md +282 -0
- package/package.json +1 -1
- package/src/apis/RecordsApi.ts +219 -0
- package/src/apis/TemplatesApi.ts +3 -3
- package/src/apis/index.ts +1 -0
- package/src/models/ApiV1RecordsGet200Response.ts +101 -0
- package/src/models/ApiV1RecordsGet200ResponseRecordsInner.ts +102 -0
- package/src/models/ApiV1RecordsIdDelete200Response.ts +66 -0
- package/src/models/ApiV1RecordsIdGet200Response.ts +111 -0
- package/src/models/ApiV1RecordsIdPatch200Response.ts +93 -0
- package/src/models/ApiV1RecordsIdPatch422Response.ts +66 -0
- package/src/models/ApiV1RecordsIdPatchRequest.ts +66 -0
- package/src/models/index.ts +7 -1
- package/dist/models/ApiV1TemplatesPost422Response.d.ts +0 -32
- package/dist/models/ApiV1TemplatesPost422Response.js +0 -51
- package/src/models/ApiV1TemplatesPost422Response.ts +0 -66
package/.openapi-generator/FILES
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
README.md
|
|
5
5
|
docs/ApiV1ProfileGet200Response.md
|
|
6
6
|
docs/ApiV1ProfileGet401Response.md
|
|
7
|
+
docs/ApiV1RecordsGet200Response.md
|
|
8
|
+
docs/ApiV1RecordsGet200ResponseRecordsInner.md
|
|
9
|
+
docs/ApiV1RecordsIdDelete200Response.md
|
|
10
|
+
docs/ApiV1RecordsIdGet200Response.md
|
|
11
|
+
docs/ApiV1RecordsIdPatch200Response.md
|
|
12
|
+
docs/ApiV1RecordsIdPatch422Response.md
|
|
13
|
+
docs/ApiV1RecordsIdPatchRequest.md
|
|
7
14
|
docs/ApiV1SessionsPost200Response.md
|
|
8
15
|
docs/ApiV1SessionsPost401Response.md
|
|
9
16
|
docs/ApiV1SessionsPostRequest.md
|
|
@@ -23,7 +30,6 @@ docs/ApiV1TemplatesIdGet404Response.md
|
|
|
23
30
|
docs/ApiV1TemplatesIdPatchRequest.md
|
|
24
31
|
docs/ApiV1TemplatesIdPatchRequestTemplate.md
|
|
25
32
|
docs/ApiV1TemplatesPost201Response.md
|
|
26
|
-
docs/ApiV1TemplatesPost422Response.md
|
|
27
33
|
docs/ApiV1TemplatesPostRequest.md
|
|
28
34
|
docs/ApiV1TemplatesPostRequestTemplate.md
|
|
29
35
|
docs/ApiV1UsersIdPatch200Response.md
|
|
@@ -34,11 +40,13 @@ docs/ApiV1UsersPost201Response.md
|
|
|
34
40
|
docs/ApiV1UsersPost422Response.md
|
|
35
41
|
docs/ApiV1UsersPostRequest.md
|
|
36
42
|
docs/ApiV1UsersPostRequestUser.md
|
|
43
|
+
docs/RecordsApi.md
|
|
37
44
|
docs/SessionsApi.md
|
|
38
45
|
docs/TelegramLinksApi.md
|
|
39
46
|
docs/TemplatesApi.md
|
|
40
47
|
docs/UsersApi.md
|
|
41
48
|
package.json
|
|
49
|
+
src/apis/RecordsApi.ts
|
|
42
50
|
src/apis/SessionsApi.ts
|
|
43
51
|
src/apis/TelegramLinksApi.ts
|
|
44
52
|
src/apis/TemplatesApi.ts
|
|
@@ -47,6 +55,13 @@ src/apis/index.ts
|
|
|
47
55
|
src/index.ts
|
|
48
56
|
src/models/ApiV1ProfileGet200Response.ts
|
|
49
57
|
src/models/ApiV1ProfileGet401Response.ts
|
|
58
|
+
src/models/ApiV1RecordsGet200Response.ts
|
|
59
|
+
src/models/ApiV1RecordsGet200ResponseRecordsInner.ts
|
|
60
|
+
src/models/ApiV1RecordsIdDelete200Response.ts
|
|
61
|
+
src/models/ApiV1RecordsIdGet200Response.ts
|
|
62
|
+
src/models/ApiV1RecordsIdPatch200Response.ts
|
|
63
|
+
src/models/ApiV1RecordsIdPatch422Response.ts
|
|
64
|
+
src/models/ApiV1RecordsIdPatchRequest.ts
|
|
50
65
|
src/models/ApiV1SessionsPost200Response.ts
|
|
51
66
|
src/models/ApiV1SessionsPost401Response.ts
|
|
52
67
|
src/models/ApiV1SessionsPostRequest.ts
|
|
@@ -66,7 +81,6 @@ src/models/ApiV1TemplatesIdGet404Response.ts
|
|
|
66
81
|
src/models/ApiV1TemplatesIdPatchRequest.ts
|
|
67
82
|
src/models/ApiV1TemplatesIdPatchRequestTemplate.ts
|
|
68
83
|
src/models/ApiV1TemplatesPost201Response.ts
|
|
69
|
-
src/models/ApiV1TemplatesPost422Response.ts
|
|
70
84
|
src/models/ApiV1TemplatesPostRequest.ts
|
|
71
85
|
src/models/ApiV1TemplatesPostRequestTemplate.ts
|
|
72
86
|
src/models/ApiV1UsersIdPatch200Response.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# blanche-client-sdk@0.
|
|
1
|
+
# blanche-client-sdk@0.4.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -16,21 +16,25 @@ Next, try it out.
|
|
|
16
16
|
```ts
|
|
17
17
|
import {
|
|
18
18
|
Configuration,
|
|
19
|
-
|
|
19
|
+
RecordsApi,
|
|
20
20
|
} from 'blanche-client-sdk';
|
|
21
|
-
import type {
|
|
21
|
+
import type { ApiV1RecordsGetRequest } from 'blanche-client-sdk';
|
|
22
22
|
|
|
23
23
|
async function example() {
|
|
24
24
|
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
25
|
-
const api = new
|
|
25
|
+
const api = new RecordsApi();
|
|
26
26
|
|
|
27
27
|
const body = {
|
|
28
|
-
// string
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
// string (optional)
|
|
29
|
+
template: template_example,
|
|
30
|
+
// number (optional)
|
|
31
|
+
limit: 56,
|
|
32
|
+
// number (optional)
|
|
33
|
+
offset: 56,
|
|
34
|
+
} satisfies ApiV1RecordsGetRequest;
|
|
31
35
|
|
|
32
36
|
try {
|
|
33
|
-
const data = await api.
|
|
37
|
+
const data = await api.apiV1RecordsGet(body);
|
|
34
38
|
console.log(data);
|
|
35
39
|
} catch (error) {
|
|
36
40
|
console.error(error);
|
|
@@ -50,6 +54,10 @@ All URIs are relative to *http://localhost:3000*
|
|
|
50
54
|
|
|
51
55
|
| Class | Method | HTTP request | Description
|
|
52
56
|
| ----- | ------ | ------------ | -------------
|
|
57
|
+
*RecordsApi* | [**apiV1RecordsGet**](docs/RecordsApi.md#apiv1recordsget) | **GET** /api/v1/records | List records
|
|
58
|
+
*RecordsApi* | [**apiV1RecordsIdDelete**](docs/RecordsApi.md#apiv1recordsiddelete) | **DELETE** /api/v1/records/{id} | Delete record
|
|
59
|
+
*RecordsApi* | [**apiV1RecordsIdGet**](docs/RecordsApi.md#apiv1recordsidget) | **GET** /api/v1/records/{id} | Get record
|
|
60
|
+
*RecordsApi* | [**apiV1RecordsIdPatch**](docs/RecordsApi.md#apiv1recordsidpatchoperation) | **PATCH** /api/v1/records/{id} | Update record
|
|
53
61
|
*SessionsApi* | [**apiV1SessionsDelete**](docs/SessionsApi.md#apiv1sessionsdelete) | **DELETE** /api/v1/sessions | Logout user and invalidate refresh token
|
|
54
62
|
*SessionsApi* | [**apiV1SessionsPost**](docs/SessionsApi.md#apiv1sessionspostoperation) | **POST** /api/v1/sessions | Authenticate user and return tokens
|
|
55
63
|
*SessionsApi* | [**apiV1SessionsRefreshPost**](docs/SessionsApi.md#apiv1sessionsrefreshpost) | **POST** /api/v1/sessions/refresh | Refresh tokens using a valid refresh token
|
|
@@ -69,6 +77,13 @@ All URIs are relative to *http://localhost:3000*
|
|
|
69
77
|
|
|
70
78
|
- [ApiV1ProfileGet200Response](docs/ApiV1ProfileGet200Response.md)
|
|
71
79
|
- [ApiV1ProfileGet401Response](docs/ApiV1ProfileGet401Response.md)
|
|
80
|
+
- [ApiV1RecordsGet200Response](docs/ApiV1RecordsGet200Response.md)
|
|
81
|
+
- [ApiV1RecordsGet200ResponseRecordsInner](docs/ApiV1RecordsGet200ResponseRecordsInner.md)
|
|
82
|
+
- [ApiV1RecordsIdDelete200Response](docs/ApiV1RecordsIdDelete200Response.md)
|
|
83
|
+
- [ApiV1RecordsIdGet200Response](docs/ApiV1RecordsIdGet200Response.md)
|
|
84
|
+
- [ApiV1RecordsIdPatch200Response](docs/ApiV1RecordsIdPatch200Response.md)
|
|
85
|
+
- [ApiV1RecordsIdPatch422Response](docs/ApiV1RecordsIdPatch422Response.md)
|
|
86
|
+
- [ApiV1RecordsIdPatchRequest](docs/ApiV1RecordsIdPatchRequest.md)
|
|
72
87
|
- [ApiV1SessionsPost200Response](docs/ApiV1SessionsPost200Response.md)
|
|
73
88
|
- [ApiV1SessionsPost401Response](docs/ApiV1SessionsPost401Response.md)
|
|
74
89
|
- [ApiV1SessionsPostRequest](docs/ApiV1SessionsPostRequest.md)
|
|
@@ -88,7 +103,6 @@ All URIs are relative to *http://localhost:3000*
|
|
|
88
103
|
- [ApiV1TemplatesIdPatchRequest](docs/ApiV1TemplatesIdPatchRequest.md)
|
|
89
104
|
- [ApiV1TemplatesIdPatchRequestTemplate](docs/ApiV1TemplatesIdPatchRequestTemplate.md)
|
|
90
105
|
- [ApiV1TemplatesPost201Response](docs/ApiV1TemplatesPost201Response.md)
|
|
91
|
-
- [ApiV1TemplatesPost422Response](docs/ApiV1TemplatesPost422Response.md)
|
|
92
106
|
- [ApiV1TemplatesPostRequest](docs/ApiV1TemplatesPostRequest.md)
|
|
93
107
|
- [ApiV1TemplatesPostRequestTemplate](docs/ApiV1TemplatesPostRequestTemplate.md)
|
|
94
108
|
- [ApiV1UsersIdPatch200Response](docs/ApiV1UsersIdPatch200Response.md)
|
|
@@ -112,7 +126,7 @@ and is automatically generated by the
|
|
|
112
126
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
113
127
|
|
|
114
128
|
- API version: `v1`
|
|
115
|
-
- Package version: `0.
|
|
129
|
+
- Package version: `0.4.0`
|
|
116
130
|
- Generator version: `7.19.0`
|
|
117
131
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
118
132
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blanche API
|
|
3
|
+
* AI-powered life tracking system API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ApiV1RecordsGet200Response, ApiV1RecordsIdDelete200Response, ApiV1RecordsIdGet200Response, ApiV1RecordsIdPatch200Response, ApiV1RecordsIdPatchRequest } from '../models/index';
|
|
14
|
+
export interface ApiV1RecordsGetRequest {
|
|
15
|
+
template?: string;
|
|
16
|
+
limit?: number;
|
|
17
|
+
offset?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ApiV1RecordsIdDeleteRequest {
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ApiV1RecordsIdGetRequest {
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ApiV1RecordsIdPatchOperationRequest {
|
|
26
|
+
id: string;
|
|
27
|
+
apiV1RecordsIdPatchRequest?: ApiV1RecordsIdPatchRequest;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export declare class RecordsApi extends runtime.BaseAPI {
|
|
33
|
+
/**
|
|
34
|
+
* List records
|
|
35
|
+
*/
|
|
36
|
+
apiV1RecordsGetRaw(requestParameters: ApiV1RecordsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsGet200Response>>;
|
|
37
|
+
/**
|
|
38
|
+
* List records
|
|
39
|
+
*/
|
|
40
|
+
apiV1RecordsGet(requestParameters?: ApiV1RecordsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsGet200Response>;
|
|
41
|
+
/**
|
|
42
|
+
* Delete record
|
|
43
|
+
*/
|
|
44
|
+
apiV1RecordsIdDeleteRaw(requestParameters: ApiV1RecordsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdDelete200Response>>;
|
|
45
|
+
/**
|
|
46
|
+
* Delete record
|
|
47
|
+
*/
|
|
48
|
+
apiV1RecordsIdDelete(requestParameters: ApiV1RecordsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdDelete200Response>;
|
|
49
|
+
/**
|
|
50
|
+
* Get record
|
|
51
|
+
*/
|
|
52
|
+
apiV1RecordsIdGetRaw(requestParameters: ApiV1RecordsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdGet200Response>>;
|
|
53
|
+
/**
|
|
54
|
+
* Get record
|
|
55
|
+
*/
|
|
56
|
+
apiV1RecordsIdGet(requestParameters: ApiV1RecordsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdGet200Response>;
|
|
57
|
+
/**
|
|
58
|
+
* Update record
|
|
59
|
+
*/
|
|
60
|
+
apiV1RecordsIdPatchRaw(requestParameters: ApiV1RecordsIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdPatch200Response>>;
|
|
61
|
+
/**
|
|
62
|
+
* Update record
|
|
63
|
+
*/
|
|
64
|
+
apiV1RecordsIdPatch(requestParameters: ApiV1RecordsIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdPatch200Response>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Blanche API
|
|
6
|
+
* AI-powered life tracking system API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.RecordsApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var RecordsApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(RecordsApi, _super);
|
|
75
|
+
function RecordsApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* List records
|
|
80
|
+
*/
|
|
81
|
+
RecordsApi.prototype.apiV1RecordsGetRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
queryParameters = {};
|
|
88
|
+
if (requestParameters['template'] != null) {
|
|
89
|
+
queryParameters['template'] = requestParameters['template'];
|
|
90
|
+
}
|
|
91
|
+
if (requestParameters['limit'] != null) {
|
|
92
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
93
|
+
}
|
|
94
|
+
if (requestParameters['offset'] != null) {
|
|
95
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
96
|
+
}
|
|
97
|
+
headerParameters = {};
|
|
98
|
+
urlPath = "/api/v1/records";
|
|
99
|
+
return [4 /*yield*/, this.request({
|
|
100
|
+
path: urlPath,
|
|
101
|
+
method: 'GET',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
}, initOverrides)];
|
|
105
|
+
case 1:
|
|
106
|
+
response = _a.sent();
|
|
107
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsGet200ResponseFromJSON)(jsonValue); })];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* List records
|
|
114
|
+
*/
|
|
115
|
+
RecordsApi.prototype.apiV1RecordsGet = function () {
|
|
116
|
+
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
117
|
+
var response;
|
|
118
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
119
|
+
return __generator(this, function (_a) {
|
|
120
|
+
switch (_a.label) {
|
|
121
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsGetRaw(requestParameters, initOverrides)];
|
|
122
|
+
case 1:
|
|
123
|
+
response = _a.sent();
|
|
124
|
+
return [4 /*yield*/, response.value()];
|
|
125
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Delete record
|
|
132
|
+
*/
|
|
133
|
+
RecordsApi.prototype.apiV1RecordsIdDeleteRaw = function (requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
135
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
136
|
+
return __generator(this, function (_a) {
|
|
137
|
+
switch (_a.label) {
|
|
138
|
+
case 0:
|
|
139
|
+
if (requestParameters['id'] == null) {
|
|
140
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1RecordsIdDelete().');
|
|
141
|
+
}
|
|
142
|
+
queryParameters = {};
|
|
143
|
+
headerParameters = {};
|
|
144
|
+
urlPath = "/api/v1/records/{id}";
|
|
145
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
146
|
+
return [4 /*yield*/, this.request({
|
|
147
|
+
path: urlPath,
|
|
148
|
+
method: 'DELETE',
|
|
149
|
+
headers: headerParameters,
|
|
150
|
+
query: queryParameters,
|
|
151
|
+
}, initOverrides)];
|
|
152
|
+
case 1:
|
|
153
|
+
response = _a.sent();
|
|
154
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsIdDelete200ResponseFromJSON)(jsonValue); })];
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Delete record
|
|
161
|
+
*/
|
|
162
|
+
RecordsApi.prototype.apiV1RecordsIdDelete = function (requestParameters, initOverrides) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
164
|
+
var response;
|
|
165
|
+
return __generator(this, function (_a) {
|
|
166
|
+
switch (_a.label) {
|
|
167
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdDeleteRaw(requestParameters, initOverrides)];
|
|
168
|
+
case 1:
|
|
169
|
+
response = _a.sent();
|
|
170
|
+
return [4 /*yield*/, response.value()];
|
|
171
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Get record
|
|
178
|
+
*/
|
|
179
|
+
RecordsApi.prototype.apiV1RecordsIdGetRaw = function (requestParameters, initOverrides) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
181
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
182
|
+
return __generator(this, function (_a) {
|
|
183
|
+
switch (_a.label) {
|
|
184
|
+
case 0:
|
|
185
|
+
if (requestParameters['id'] == null) {
|
|
186
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1RecordsIdGet().');
|
|
187
|
+
}
|
|
188
|
+
queryParameters = {};
|
|
189
|
+
headerParameters = {};
|
|
190
|
+
urlPath = "/api/v1/records/{id}";
|
|
191
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
192
|
+
return [4 /*yield*/, this.request({
|
|
193
|
+
path: urlPath,
|
|
194
|
+
method: 'GET',
|
|
195
|
+
headers: headerParameters,
|
|
196
|
+
query: queryParameters,
|
|
197
|
+
}, initOverrides)];
|
|
198
|
+
case 1:
|
|
199
|
+
response = _a.sent();
|
|
200
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsIdGet200ResponseFromJSON)(jsonValue); })];
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Get record
|
|
207
|
+
*/
|
|
208
|
+
RecordsApi.prototype.apiV1RecordsIdGet = function (requestParameters, initOverrides) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
+
var response;
|
|
211
|
+
return __generator(this, function (_a) {
|
|
212
|
+
switch (_a.label) {
|
|
213
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdGetRaw(requestParameters, initOverrides)];
|
|
214
|
+
case 1:
|
|
215
|
+
response = _a.sent();
|
|
216
|
+
return [4 /*yield*/, response.value()];
|
|
217
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Update record
|
|
224
|
+
*/
|
|
225
|
+
RecordsApi.prototype.apiV1RecordsIdPatchRaw = function (requestParameters, initOverrides) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
227
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
228
|
+
return __generator(this, function (_a) {
|
|
229
|
+
switch (_a.label) {
|
|
230
|
+
case 0:
|
|
231
|
+
if (requestParameters['id'] == null) {
|
|
232
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1RecordsIdPatch().');
|
|
233
|
+
}
|
|
234
|
+
queryParameters = {};
|
|
235
|
+
headerParameters = {};
|
|
236
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
237
|
+
urlPath = "/api/v1/records/{id}";
|
|
238
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
239
|
+
return [4 /*yield*/, this.request({
|
|
240
|
+
path: urlPath,
|
|
241
|
+
method: 'PATCH',
|
|
242
|
+
headers: headerParameters,
|
|
243
|
+
query: queryParameters,
|
|
244
|
+
body: (0, index_1.ApiV1RecordsIdPatchRequestToJSON)(requestParameters['apiV1RecordsIdPatchRequest']),
|
|
245
|
+
}, initOverrides)];
|
|
246
|
+
case 1:
|
|
247
|
+
response = _a.sent();
|
|
248
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsIdPatch200ResponseFromJSON)(jsonValue); })];
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Update record
|
|
255
|
+
*/
|
|
256
|
+
RecordsApi.prototype.apiV1RecordsIdPatch = function (requestParameters, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
258
|
+
var response;
|
|
259
|
+
return __generator(this, function (_a) {
|
|
260
|
+
switch (_a.label) {
|
|
261
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdPatchRaw(requestParameters, initOverrides)];
|
|
262
|
+
case 1:
|
|
263
|
+
response = _a.sent();
|
|
264
|
+
return [4 /*yield*/, response.value()];
|
|
265
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
return RecordsApi;
|
|
271
|
+
}(runtime.BaseAPI));
|
|
272
|
+
exports.RecordsApi = RecordsApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./RecordsApi"), exports);
|
|
19
20
|
__exportStar(require("./SessionsApi"), exports);
|
|
20
21
|
__exportStar(require("./TelegramLinksApi"), exports);
|
|
21
22
|
__exportStar(require("./TemplatesApi"), exports);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blanche API
|
|
3
|
+
* AI-powered life tracking system API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ApiV1RecordsGet200ResponseRecordsInner } from './ApiV1RecordsGet200ResponseRecordsInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ApiV1RecordsGet200Response
|
|
17
|
+
*/
|
|
18
|
+
export interface ApiV1RecordsGet200Response {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<ApiV1RecordsGet200ResponseRecordsInner>}
|
|
22
|
+
* @memberof ApiV1RecordsGet200Response
|
|
23
|
+
*/
|
|
24
|
+
records: Array<ApiV1RecordsGet200ResponseRecordsInner>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof ApiV1RecordsGet200Response
|
|
29
|
+
*/
|
|
30
|
+
total: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof ApiV1RecordsGet200Response
|
|
35
|
+
*/
|
|
36
|
+
limit: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof ApiV1RecordsGet200Response
|
|
41
|
+
*/
|
|
42
|
+
offset: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the ApiV1RecordsGet200Response interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfApiV1RecordsGet200Response(value: object): value is ApiV1RecordsGet200Response;
|
|
48
|
+
export declare function ApiV1RecordsGet200ResponseFromJSON(json: any): ApiV1RecordsGet200Response;
|
|
49
|
+
export declare function ApiV1RecordsGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiV1RecordsGet200Response;
|
|
50
|
+
export declare function ApiV1RecordsGet200ResponseToJSON(json: any): ApiV1RecordsGet200Response;
|
|
51
|
+
export declare function ApiV1RecordsGet200ResponseToJSONTyped(value?: ApiV1RecordsGet200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Blanche API
|
|
6
|
+
* AI-powered life tracking system API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfApiV1RecordsGet200Response = instanceOfApiV1RecordsGet200Response;
|
|
17
|
+
exports.ApiV1RecordsGet200ResponseFromJSON = ApiV1RecordsGet200ResponseFromJSON;
|
|
18
|
+
exports.ApiV1RecordsGet200ResponseFromJSONTyped = ApiV1RecordsGet200ResponseFromJSONTyped;
|
|
19
|
+
exports.ApiV1RecordsGet200ResponseToJSON = ApiV1RecordsGet200ResponseToJSON;
|
|
20
|
+
exports.ApiV1RecordsGet200ResponseToJSONTyped = ApiV1RecordsGet200ResponseToJSONTyped;
|
|
21
|
+
var ApiV1RecordsGet200ResponseRecordsInner_1 = require("./ApiV1RecordsGet200ResponseRecordsInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ApiV1RecordsGet200Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfApiV1RecordsGet200Response(value) {
|
|
26
|
+
if (!('records' in value) || value['records'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('limit' in value) || value['limit'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('offset' in value) || value['offset'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
function ApiV1RecordsGet200ResponseFromJSON(json) {
|
|
37
|
+
return ApiV1RecordsGet200ResponseFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function ApiV1RecordsGet200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'records': (json['records'].map(ApiV1RecordsGet200ResponseRecordsInner_1.ApiV1RecordsGet200ResponseRecordsInnerFromJSON)),
|
|
45
|
+
'total': json['total'],
|
|
46
|
+
'limit': json['limit'],
|
|
47
|
+
'offset': json['offset'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function ApiV1RecordsGet200ResponseToJSON(json) {
|
|
51
|
+
return ApiV1RecordsGet200ResponseToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function ApiV1RecordsGet200ResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
54
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'records': (value['records'].map(ApiV1RecordsGet200ResponseRecordsInner_1.ApiV1RecordsGet200ResponseRecordsInnerToJSON)),
|
|
60
|
+
'total': value['total'],
|
|
61
|
+
'limit': value['limit'],
|
|
62
|
+
'offset': value['offset'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blanche API
|
|
3
|
+
* AI-powered life tracking system API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ApiV1RecordsGet200ResponseRecordsInner
|
|
16
|
+
*/
|
|
17
|
+
export interface ApiV1RecordsGet200ResponseRecordsInner {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ApiV1RecordsGet200ResponseRecordsInner
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ApiV1RecordsGet200ResponseRecordsInner
|
|
28
|
+
*/
|
|
29
|
+
template: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {object}
|
|
33
|
+
* @memberof ApiV1RecordsGet200ResponseRecordsInner
|
|
34
|
+
*/
|
|
35
|
+
data: object;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof ApiV1RecordsGet200ResponseRecordsInner
|
|
40
|
+
*/
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof ApiV1RecordsGet200ResponseRecordsInner
|
|
46
|
+
*/
|
|
47
|
+
updatedAt: Date;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the ApiV1RecordsGet200ResponseRecordsInner interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfApiV1RecordsGet200ResponseRecordsInner(value: object): value is ApiV1RecordsGet200ResponseRecordsInner;
|
|
53
|
+
export declare function ApiV1RecordsGet200ResponseRecordsInnerFromJSON(json: any): ApiV1RecordsGet200ResponseRecordsInner;
|
|
54
|
+
export declare function ApiV1RecordsGet200ResponseRecordsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiV1RecordsGet200ResponseRecordsInner;
|
|
55
|
+
export declare function ApiV1RecordsGet200ResponseRecordsInnerToJSON(json: any): ApiV1RecordsGet200ResponseRecordsInner;
|
|
56
|
+
export declare function ApiV1RecordsGet200ResponseRecordsInnerToJSONTyped(value?: ApiV1RecordsGet200ResponseRecordsInner | null, ignoreDiscriminator?: boolean): any;
|