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.
- package/.openapi-generator/FILES +16 -2
- package/.openapi-generator/VERSION +1 -1
- package/README.md +25 -11
- package/dist/apis/RecordsApi.d.ts +81 -0
- package/dist/apis/RecordsApi.js +324 -0
- package/dist/apis/SessionsApi.d.ts +12 -0
- package/dist/apis/SessionsApi.js +86 -47
- package/dist/apis/TelegramLinksApi.d.ts +12 -0
- package/dist/apis/TelegramLinksApi.js +78 -39
- package/dist/apis/TemplatesApi.d.ts +16 -0
- package/dist/apis/TemplatesApi.js +111 -59
- package/dist/apis/UsersApi.d.ts +12 -0
- package/dist/apis/UsersApi.js +80 -41
- package/dist/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/ApiV1TemplatesGet200ResponseTemplatesInner.d.ts +6 -0
- package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.js +2 -0
- package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.d.ts +6 -0
- package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.js +2 -0
- package/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/ApiV1TemplatesGet200ResponseTemplatesInner.md +2 -0
- package/docs/ApiV1TemplatesIdGet200ResponseSchemasInner.md +2 -0
- package/docs/RecordsApi.md +282 -0
- package/package.json +1 -1
- package/src/apis/RecordsApi.ts +251 -0
- package/src/apis/SessionsApi.ts +36 -12
- package/src/apis/TelegramLinksApi.ts +36 -12
- package/src/apis/TemplatesApi.ts +51 -19
- package/src/apis/UsersApi.ts +36 -12
- 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/ApiV1TemplatesGet200ResponseTemplatesInner.ts +8 -0
- package/src/models/ApiV1TemplatesIdGet200ResponseSchemasInner.ts +8 -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.20.0
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# blanche-client-sdk@0.
|
|
1
|
+
# blanche-client-sdk@0.5.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,8 +126,8 @@ 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.
|
|
116
|
-
- Generator version: `7.
|
|
129
|
+
- Package version: `0.5.0`
|
|
130
|
+
- Generator version: `7.20.0`
|
|
117
131
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
118
132
|
|
|
119
133
|
The generated npm module supports the following:
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
* Creates request options for apiV1RecordsGet without sending the request
|
|
35
|
+
*/
|
|
36
|
+
apiV1RecordsGetRequestOpts(requestParameters: ApiV1RecordsGetRequest): Promise<runtime.RequestOpts>;
|
|
37
|
+
/**
|
|
38
|
+
* List records
|
|
39
|
+
*/
|
|
40
|
+
apiV1RecordsGetRaw(requestParameters: ApiV1RecordsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsGet200Response>>;
|
|
41
|
+
/**
|
|
42
|
+
* List records
|
|
43
|
+
*/
|
|
44
|
+
apiV1RecordsGet(requestParameters?: ApiV1RecordsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsGet200Response>;
|
|
45
|
+
/**
|
|
46
|
+
* Creates request options for apiV1RecordsIdDelete without sending the request
|
|
47
|
+
*/
|
|
48
|
+
apiV1RecordsIdDeleteRequestOpts(requestParameters: ApiV1RecordsIdDeleteRequest): Promise<runtime.RequestOpts>;
|
|
49
|
+
/**
|
|
50
|
+
* Delete record
|
|
51
|
+
*/
|
|
52
|
+
apiV1RecordsIdDeleteRaw(requestParameters: ApiV1RecordsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdDelete200Response>>;
|
|
53
|
+
/**
|
|
54
|
+
* Delete record
|
|
55
|
+
*/
|
|
56
|
+
apiV1RecordsIdDelete(requestParameters: ApiV1RecordsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdDelete200Response>;
|
|
57
|
+
/**
|
|
58
|
+
* Creates request options for apiV1RecordsIdGet without sending the request
|
|
59
|
+
*/
|
|
60
|
+
apiV1RecordsIdGetRequestOpts(requestParameters: ApiV1RecordsIdGetRequest): Promise<runtime.RequestOpts>;
|
|
61
|
+
/**
|
|
62
|
+
* Get record
|
|
63
|
+
*/
|
|
64
|
+
apiV1RecordsIdGetRaw(requestParameters: ApiV1RecordsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdGet200Response>>;
|
|
65
|
+
/**
|
|
66
|
+
* Get record
|
|
67
|
+
*/
|
|
68
|
+
apiV1RecordsIdGet(requestParameters: ApiV1RecordsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdGet200Response>;
|
|
69
|
+
/**
|
|
70
|
+
* Creates request options for apiV1RecordsIdPatch without sending the request
|
|
71
|
+
*/
|
|
72
|
+
apiV1RecordsIdPatchRequestOpts(requestParameters: ApiV1RecordsIdPatchOperationRequest): Promise<runtime.RequestOpts>;
|
|
73
|
+
/**
|
|
74
|
+
* Update record
|
|
75
|
+
*/
|
|
76
|
+
apiV1RecordsIdPatchRaw(requestParameters: ApiV1RecordsIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiV1RecordsIdPatch200Response>>;
|
|
77
|
+
/**
|
|
78
|
+
* Update record
|
|
79
|
+
*/
|
|
80
|
+
apiV1RecordsIdPatch(requestParameters: ApiV1RecordsIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1RecordsIdPatch200Response>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
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
|
+
* Creates request options for apiV1RecordsGet without sending the request
|
|
80
|
+
*/
|
|
81
|
+
RecordsApi.prototype.apiV1RecordsGetRequestOpts = function (requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, urlPath;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
queryParameters = {};
|
|
86
|
+
if (requestParameters['template'] != null) {
|
|
87
|
+
queryParameters['template'] = requestParameters['template'];
|
|
88
|
+
}
|
|
89
|
+
if (requestParameters['limit'] != null) {
|
|
90
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
91
|
+
}
|
|
92
|
+
if (requestParameters['offset'] != null) {
|
|
93
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
94
|
+
}
|
|
95
|
+
headerParameters = {};
|
|
96
|
+
urlPath = "/api/v1/records";
|
|
97
|
+
return [2 /*return*/, {
|
|
98
|
+
path: urlPath,
|
|
99
|
+
method: 'GET',
|
|
100
|
+
headers: headerParameters,
|
|
101
|
+
query: queryParameters,
|
|
102
|
+
}];
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* List records
|
|
108
|
+
*/
|
|
109
|
+
RecordsApi.prototype.apiV1RecordsGetRaw = function (requestParameters, initOverrides) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
111
|
+
var requestOptions, response;
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsGetRequestOpts(requestParameters)];
|
|
115
|
+
case 1:
|
|
116
|
+
requestOptions = _a.sent();
|
|
117
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
118
|
+
case 2:
|
|
119
|
+
response = _a.sent();
|
|
120
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsGet200ResponseFromJSON)(jsonValue); })];
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* List records
|
|
127
|
+
*/
|
|
128
|
+
RecordsApi.prototype.apiV1RecordsGet = function () {
|
|
129
|
+
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
130
|
+
var response;
|
|
131
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
132
|
+
return __generator(this, function (_a) {
|
|
133
|
+
switch (_a.label) {
|
|
134
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsGetRaw(requestParameters, initOverrides)];
|
|
135
|
+
case 1:
|
|
136
|
+
response = _a.sent();
|
|
137
|
+
return [4 /*yield*/, response.value()];
|
|
138
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Creates request options for apiV1RecordsIdDelete without sending the request
|
|
145
|
+
*/
|
|
146
|
+
RecordsApi.prototype.apiV1RecordsIdDeleteRequestOpts = function (requestParameters) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
148
|
+
var queryParameters, headerParameters, urlPath;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
if (requestParameters['id'] == null) {
|
|
151
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1RecordsIdDelete().');
|
|
152
|
+
}
|
|
153
|
+
queryParameters = {};
|
|
154
|
+
headerParameters = {};
|
|
155
|
+
urlPath = "/api/v1/records/{id}";
|
|
156
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
157
|
+
return [2 /*return*/, {
|
|
158
|
+
path: urlPath,
|
|
159
|
+
method: 'DELETE',
|
|
160
|
+
headers: headerParameters,
|
|
161
|
+
query: queryParameters,
|
|
162
|
+
}];
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Delete record
|
|
168
|
+
*/
|
|
169
|
+
RecordsApi.prototype.apiV1RecordsIdDeleteRaw = function (requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
171
|
+
var requestOptions, response;
|
|
172
|
+
return __generator(this, function (_a) {
|
|
173
|
+
switch (_a.label) {
|
|
174
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdDeleteRequestOpts(requestParameters)];
|
|
175
|
+
case 1:
|
|
176
|
+
requestOptions = _a.sent();
|
|
177
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
178
|
+
case 2:
|
|
179
|
+
response = _a.sent();
|
|
180
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsIdDelete200ResponseFromJSON)(jsonValue); })];
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Delete record
|
|
187
|
+
*/
|
|
188
|
+
RecordsApi.prototype.apiV1RecordsIdDelete = function (requestParameters, initOverrides) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
190
|
+
var response;
|
|
191
|
+
return __generator(this, function (_a) {
|
|
192
|
+
switch (_a.label) {
|
|
193
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdDeleteRaw(requestParameters, initOverrides)];
|
|
194
|
+
case 1:
|
|
195
|
+
response = _a.sent();
|
|
196
|
+
return [4 /*yield*/, response.value()];
|
|
197
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Creates request options for apiV1RecordsIdGet without sending the request
|
|
204
|
+
*/
|
|
205
|
+
RecordsApi.prototype.apiV1RecordsIdGetRequestOpts = function (requestParameters) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
207
|
+
var queryParameters, headerParameters, urlPath;
|
|
208
|
+
return __generator(this, function (_a) {
|
|
209
|
+
if (requestParameters['id'] == null) {
|
|
210
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1RecordsIdGet().');
|
|
211
|
+
}
|
|
212
|
+
queryParameters = {};
|
|
213
|
+
headerParameters = {};
|
|
214
|
+
urlPath = "/api/v1/records/{id}";
|
|
215
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
216
|
+
return [2 /*return*/, {
|
|
217
|
+
path: urlPath,
|
|
218
|
+
method: 'GET',
|
|
219
|
+
headers: headerParameters,
|
|
220
|
+
query: queryParameters,
|
|
221
|
+
}];
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Get record
|
|
227
|
+
*/
|
|
228
|
+
RecordsApi.prototype.apiV1RecordsIdGetRaw = function (requestParameters, initOverrides) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
230
|
+
var requestOptions, response;
|
|
231
|
+
return __generator(this, function (_a) {
|
|
232
|
+
switch (_a.label) {
|
|
233
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdGetRequestOpts(requestParameters)];
|
|
234
|
+
case 1:
|
|
235
|
+
requestOptions = _a.sent();
|
|
236
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
237
|
+
case 2:
|
|
238
|
+
response = _a.sent();
|
|
239
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsIdGet200ResponseFromJSON)(jsonValue); })];
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Get record
|
|
246
|
+
*/
|
|
247
|
+
RecordsApi.prototype.apiV1RecordsIdGet = function (requestParameters, initOverrides) {
|
|
248
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
249
|
+
var response;
|
|
250
|
+
return __generator(this, function (_a) {
|
|
251
|
+
switch (_a.label) {
|
|
252
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdGetRaw(requestParameters, initOverrides)];
|
|
253
|
+
case 1:
|
|
254
|
+
response = _a.sent();
|
|
255
|
+
return [4 /*yield*/, response.value()];
|
|
256
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Creates request options for apiV1RecordsIdPatch without sending the request
|
|
263
|
+
*/
|
|
264
|
+
RecordsApi.prototype.apiV1RecordsIdPatchRequestOpts = function (requestParameters) {
|
|
265
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
266
|
+
var queryParameters, headerParameters, urlPath;
|
|
267
|
+
return __generator(this, function (_a) {
|
|
268
|
+
if (requestParameters['id'] == null) {
|
|
269
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1RecordsIdPatch().');
|
|
270
|
+
}
|
|
271
|
+
queryParameters = {};
|
|
272
|
+
headerParameters = {};
|
|
273
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
274
|
+
urlPath = "/api/v1/records/{id}";
|
|
275
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
276
|
+
return [2 /*return*/, {
|
|
277
|
+
path: urlPath,
|
|
278
|
+
method: 'PATCH',
|
|
279
|
+
headers: headerParameters,
|
|
280
|
+
query: queryParameters,
|
|
281
|
+
body: (0, index_1.ApiV1RecordsIdPatchRequestToJSON)(requestParameters['apiV1RecordsIdPatchRequest']),
|
|
282
|
+
}];
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Update record
|
|
288
|
+
*/
|
|
289
|
+
RecordsApi.prototype.apiV1RecordsIdPatchRaw = function (requestParameters, initOverrides) {
|
|
290
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
291
|
+
var requestOptions, response;
|
|
292
|
+
return __generator(this, function (_a) {
|
|
293
|
+
switch (_a.label) {
|
|
294
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdPatchRequestOpts(requestParameters)];
|
|
295
|
+
case 1:
|
|
296
|
+
requestOptions = _a.sent();
|
|
297
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
298
|
+
case 2:
|
|
299
|
+
response = _a.sent();
|
|
300
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1RecordsIdPatch200ResponseFromJSON)(jsonValue); })];
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Update record
|
|
307
|
+
*/
|
|
308
|
+
RecordsApi.prototype.apiV1RecordsIdPatch = function (requestParameters, initOverrides) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
310
|
+
var response;
|
|
311
|
+
return __generator(this, function (_a) {
|
|
312
|
+
switch (_a.label) {
|
|
313
|
+
case 0: return [4 /*yield*/, this.apiV1RecordsIdPatchRaw(requestParameters, initOverrides)];
|
|
314
|
+
case 1:
|
|
315
|
+
response = _a.sent();
|
|
316
|
+
return [4 /*yield*/, response.value()];
|
|
317
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
};
|
|
322
|
+
return RecordsApi;
|
|
323
|
+
}(runtime.BaseAPI));
|
|
324
|
+
exports.RecordsApi = RecordsApi;
|
|
@@ -24,6 +24,10 @@ export interface ApiV1SessionsRefreshPostRequest {
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
export declare class SessionsApi extends runtime.BaseAPI {
|
|
27
|
+
/**
|
|
28
|
+
* Creates request options for apiV1SessionsDelete without sending the request
|
|
29
|
+
*/
|
|
30
|
+
apiV1SessionsDeleteRequestOpts(requestParameters: ApiV1SessionsDeleteRequest): Promise<runtime.RequestOpts>;
|
|
27
31
|
/**
|
|
28
32
|
* Logout user and invalidate refresh token
|
|
29
33
|
*/
|
|
@@ -32,6 +36,10 @@ export declare class SessionsApi extends runtime.BaseAPI {
|
|
|
32
36
|
* Logout user and invalidate refresh token
|
|
33
37
|
*/
|
|
34
38
|
apiV1SessionsDelete(requestParameters: ApiV1SessionsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Creates request options for apiV1SessionsPost without sending the request
|
|
41
|
+
*/
|
|
42
|
+
apiV1SessionsPostRequestOpts(requestParameters: ApiV1SessionsPostOperationRequest): Promise<runtime.RequestOpts>;
|
|
35
43
|
/**
|
|
36
44
|
* Authenticate user and return tokens
|
|
37
45
|
*/
|
|
@@ -40,6 +48,10 @@ export declare class SessionsApi extends runtime.BaseAPI {
|
|
|
40
48
|
* Authenticate user and return tokens
|
|
41
49
|
*/
|
|
42
50
|
apiV1SessionsPost(requestParameters?: ApiV1SessionsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1SessionsPost200Response>;
|
|
51
|
+
/**
|
|
52
|
+
* Creates request options for apiV1SessionsRefreshPost without sending the request
|
|
53
|
+
*/
|
|
54
|
+
apiV1SessionsRefreshPostRequestOpts(requestParameters: ApiV1SessionsRefreshPostRequest): Promise<runtime.RequestOpts>;
|
|
43
55
|
/**
|
|
44
56
|
* Refresh tokens using a valid refresh token
|
|
45
57
|
*/
|