atelino-sdk 1.0.1 → 1.0.3
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/dist/client.gen.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/sdk.gen.d.ts +41 -5
- package/dist/sdk.gen.js +66 -8
- package/dist/types.gen.d.ts +239 -47
- package/package.json +37 -37
package/dist/client.gen.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { createClient, createConfig } from './client/index.js';
|
|
3
|
-
export const client = createClient(createConfig({ baseUrl: 'https://localhost:8080/
|
|
3
|
+
export const client = createClient(createConfig({ baseUrl: 'https://localhost:8080/' }));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { AtelinoInternalDtoCreateHitokotoRequest,
|
|
1
|
+
export { deleteApiHitokotoById, getApiHitokoto, getApiHitokotoById, getApiHitokotoList, getApiUserById, type Options, postApiHitokoto, postAuthLogin, postAuthRegister } from './sdk.gen.js';
|
|
2
|
+
export type { AtelinoInternalDtoCreateHitokotoRequest, AtelinoInternalDtoHitokotoResponse, AtelinoInternalDtoLoginRequest, AtelinoInternalDtoRegisterRequest, AtelinoInternalDtoResponse, AtelinoInternalDtoTokenResponse, AtelinoInternalDtoUserResponse, ClientOptions, DeleteApiHitokotoByIdData, DeleteApiHitokotoByIdError, DeleteApiHitokotoByIdErrors, DeleteApiHitokotoByIdResponse, DeleteApiHitokotoByIdResponses, GetApiHitokotoByIdData, GetApiHitokotoByIdError, GetApiHitokotoByIdErrors, GetApiHitokotoByIdResponse, GetApiHitokotoByIdResponses, GetApiHitokotoData, GetApiHitokotoError, GetApiHitokotoErrors, GetApiHitokotoListData, GetApiHitokotoListError, GetApiHitokotoListErrors, GetApiHitokotoListResponse, GetApiHitokotoListResponses, GetApiHitokotoResponse, GetApiHitokotoResponses, GetApiUserByIdData, GetApiUserByIdError, GetApiUserByIdErrors, GetApiUserByIdResponse, GetApiUserByIdResponses, PostApiHitokotoData, PostApiHitokotoError, PostApiHitokotoErrors, PostApiHitokotoResponse, PostApiHitokotoResponses, PostAuthLoginData, PostAuthLoginError, PostAuthLoginErrors, PostAuthLoginResponse, PostAuthLoginResponses, PostAuthRegisterData, PostAuthRegisterError, PostAuthRegisterErrors, PostAuthRegisterResponse, PostAuthRegisterResponses } from './types.gen.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export {
|
|
2
|
+
export { deleteApiHitokotoById, getApiHitokoto, getApiHitokotoById, getApiHitokotoList, getApiUserById, postApiHitokoto, postAuthLogin, postAuthRegister } from './sdk.gen.js';
|
package/dist/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client/index.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DeleteApiHitokotoByIdData, DeleteApiHitokotoByIdErrors, DeleteApiHitokotoByIdResponses, GetApiHitokotoByIdData, GetApiHitokotoByIdErrors, GetApiHitokotoByIdResponses, GetApiHitokotoData, GetApiHitokotoErrors, GetApiHitokotoListData, GetApiHitokotoListErrors, GetApiHitokotoListResponses, GetApiHitokotoResponses, GetApiUserByIdData, GetApiUserByIdErrors, GetApiUserByIdResponses, PostApiHitokotoData, PostApiHitokotoErrors, PostApiHitokotoResponses, PostAuthLoginData, PostAuthLoginErrors, PostAuthLoginResponses, PostAuthRegisterData, PostAuthRegisterErrors, PostAuthRegisterResponses } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -13,15 +13,51 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
13
13
|
*/
|
|
14
14
|
meta?: Record<string, unknown>;
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* 随机获取一言
|
|
18
|
+
*
|
|
19
|
+
* 从数据库中随机获取一条一言记录。
|
|
20
|
+
*/
|
|
21
|
+
export declare const getApiHitokoto: <ThrowOnError extends boolean = false>(options?: Options<GetApiHitokotoData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<GetApiHitokotoResponses, GetApiHitokotoErrors, ThrowOnError, "fields">;
|
|
16
22
|
/**
|
|
17
23
|
* 添加一言
|
|
18
24
|
*
|
|
19
|
-
*
|
|
25
|
+
* 创建一条新的一言记录。
|
|
20
26
|
*/
|
|
21
|
-
export declare const
|
|
27
|
+
export declare const postApiHitokoto: <ThrowOnError extends boolean = false>(options: Options<PostApiHitokotoData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<PostApiHitokotoResponses, PostApiHitokotoErrors, ThrowOnError, "fields">;
|
|
28
|
+
/**
|
|
29
|
+
* 获取一言列表
|
|
30
|
+
*
|
|
31
|
+
* 从数据库中查询所有的一言记录。
|
|
32
|
+
*/
|
|
33
|
+
export declare const getApiHitokotoList: <ThrowOnError extends boolean = false>(options?: Options<GetApiHitokotoListData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<GetApiHitokotoListResponses, GetApiHitokotoListErrors, ThrowOnError, "fields">;
|
|
22
34
|
/**
|
|
23
35
|
* 删除一言
|
|
24
36
|
*
|
|
25
|
-
* 传入一言的 ID
|
|
37
|
+
* 传入一言的 ID,从数据库中删除对应的记录。
|
|
38
|
+
*/
|
|
39
|
+
export declare const deleteApiHitokotoById: <ThrowOnError extends boolean = false>(options: Options<DeleteApiHitokotoByIdData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<DeleteApiHitokotoByIdResponses, DeleteApiHitokotoByIdErrors, ThrowOnError, "fields">;
|
|
40
|
+
/**
|
|
41
|
+
* 获取一言
|
|
42
|
+
*
|
|
43
|
+
* 传入一言的 ID,从数据库中查询对应的记录。
|
|
44
|
+
*/
|
|
45
|
+
export declare const getApiHitokotoById: <ThrowOnError extends boolean = false>(options: Options<GetApiHitokotoByIdData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<GetApiHitokotoByIdResponses, GetApiHitokotoByIdErrors, ThrowOnError, "fields">;
|
|
46
|
+
/**
|
|
47
|
+
* 获取用户
|
|
48
|
+
*
|
|
49
|
+
* 传入用户的 ID,从数据库中查询指定的用户。
|
|
50
|
+
*/
|
|
51
|
+
export declare const getApiUserById: <ThrowOnError extends boolean = false>(options: Options<GetApiUserByIdData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<GetApiUserByIdResponses, GetApiUserByIdErrors, ThrowOnError, "fields">;
|
|
52
|
+
/**
|
|
53
|
+
* 用户登录
|
|
54
|
+
*
|
|
55
|
+
* 用户登录接口
|
|
56
|
+
*/
|
|
57
|
+
export declare const postAuthLogin: <ThrowOnError extends boolean = false>(options: Options<PostAuthLoginData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<PostAuthLoginResponses, PostAuthLoginErrors, ThrowOnError, "fields">;
|
|
58
|
+
/**
|
|
59
|
+
* 用户注册
|
|
60
|
+
*
|
|
61
|
+
* 用户注册接口
|
|
26
62
|
*/
|
|
27
|
-
export declare const
|
|
63
|
+
export declare const postAuthRegister: <ThrowOnError extends boolean = false>(options: Options<PostAuthRegisterData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<PostAuthRegisterResponses, PostAuthRegisterErrors, ThrowOnError, "fields">;
|
package/dist/sdk.gen.js
CHANGED
|
@@ -1,26 +1,84 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { client } from './client.gen.js';
|
|
3
|
+
/**
|
|
4
|
+
* 随机获取一言
|
|
5
|
+
*
|
|
6
|
+
* 从数据库中随机获取一条一言记录。
|
|
7
|
+
*/
|
|
8
|
+
export const getApiHitokoto = (options) => (options?.client ?? client).get({ url: '/api/hitokoto', ...options });
|
|
3
9
|
/**
|
|
4
10
|
* 添加一言
|
|
5
11
|
*
|
|
6
|
-
*
|
|
12
|
+
* 创建一条新的一言记录。
|
|
7
13
|
*/
|
|
8
|
-
export const
|
|
9
|
-
security: [{
|
|
10
|
-
url: '/hitokoto',
|
|
14
|
+
export const postApiHitokoto = (options) => (options.client ?? client).post({
|
|
15
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
16
|
+
url: '/api/hitokoto',
|
|
11
17
|
...options,
|
|
12
18
|
headers: {
|
|
13
19
|
'Content-Type': 'application/json',
|
|
14
20
|
...options.headers
|
|
15
21
|
}
|
|
16
22
|
});
|
|
23
|
+
/**
|
|
24
|
+
* 获取一言列表
|
|
25
|
+
*
|
|
26
|
+
* 从数据库中查询所有的一言记录。
|
|
27
|
+
*/
|
|
28
|
+
export const getApiHitokotoList = (options) => (options?.client ?? client).get({
|
|
29
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
30
|
+
url: '/api/hitokoto/list',
|
|
31
|
+
...options
|
|
32
|
+
});
|
|
17
33
|
/**
|
|
18
34
|
* 删除一言
|
|
19
35
|
*
|
|
20
|
-
* 传入一言的 ID
|
|
36
|
+
* 传入一言的 ID,从数据库中删除对应的记录。
|
|
21
37
|
*/
|
|
22
|
-
export const
|
|
23
|
-
security: [{
|
|
24
|
-
url: '/hitokoto/{id}',
|
|
38
|
+
export const deleteApiHitokotoById = (options) => (options.client ?? client).delete({
|
|
39
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
40
|
+
url: '/api/hitokoto/{id}',
|
|
25
41
|
...options
|
|
26
42
|
});
|
|
43
|
+
/**
|
|
44
|
+
* 获取一言
|
|
45
|
+
*
|
|
46
|
+
* 传入一言的 ID,从数据库中查询对应的记录。
|
|
47
|
+
*/
|
|
48
|
+
export const getApiHitokotoById = (options) => (options.client ?? client).get({
|
|
49
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
50
|
+
url: '/api/hitokoto/{id}',
|
|
51
|
+
...options
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* 获取用户
|
|
55
|
+
*
|
|
56
|
+
* 传入用户的 ID,从数据库中查询指定的用户。
|
|
57
|
+
*/
|
|
58
|
+
export const getApiUserById = (options) => (options.client ?? client).get({ url: '/api/user/{id}', ...options });
|
|
59
|
+
/**
|
|
60
|
+
* 用户登录
|
|
61
|
+
*
|
|
62
|
+
* 用户登录接口
|
|
63
|
+
*/
|
|
64
|
+
export const postAuthLogin = (options) => (options.client ?? client).post({
|
|
65
|
+
url: '/auth/login',
|
|
66
|
+
...options,
|
|
67
|
+
headers: {
|
|
68
|
+
'Content-Type': 'application/json',
|
|
69
|
+
...options.headers
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
/**
|
|
73
|
+
* 用户注册
|
|
74
|
+
*
|
|
75
|
+
* 用户注册接口
|
|
76
|
+
*/
|
|
77
|
+
export const postAuthRegister = (options) => (options.client ?? client).post({
|
|
78
|
+
url: '/auth/register',
|
|
79
|
+
...options,
|
|
80
|
+
headers: {
|
|
81
|
+
'Content-Type': 'application/json',
|
|
82
|
+
...options.headers
|
|
83
|
+
}
|
|
84
|
+
});
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -1,62 +1,131 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
|
-
baseUrl: 'https://localhost:8080/
|
|
2
|
+
baseUrl: 'https://localhost:8080/' | (string & {});
|
|
3
3
|
};
|
|
4
4
|
export type AtelinoInternalDtoCreateHitokotoRequest = {
|
|
5
5
|
content: string;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
8
|
-
|
|
7
|
+
export type AtelinoInternalDtoHitokotoResponse = {
|
|
8
|
+
content?: string;
|
|
9
|
+
created_at?: string;
|
|
10
|
+
id?: number;
|
|
11
|
+
};
|
|
12
|
+
export type AtelinoInternalDtoLoginRequest = {
|
|
13
|
+
email: string;
|
|
14
|
+
password: string;
|
|
15
|
+
};
|
|
16
|
+
export type AtelinoInternalDtoRegisterRequest = {
|
|
17
|
+
code: string;
|
|
18
|
+
email: string;
|
|
19
|
+
password: string;
|
|
20
|
+
username: string;
|
|
9
21
|
};
|
|
10
22
|
export type AtelinoInternalDtoResponse = {
|
|
11
23
|
code?: number;
|
|
12
24
|
data?: unknown;
|
|
13
25
|
message?: string;
|
|
14
26
|
};
|
|
15
|
-
export type
|
|
27
|
+
export type AtelinoInternalDtoTokenResponse = {
|
|
28
|
+
access_token?: string;
|
|
29
|
+
refresh_token?: string;
|
|
30
|
+
};
|
|
31
|
+
export type AtelinoInternalDtoUserResponse = {
|
|
32
|
+
created_at?: string;
|
|
33
|
+
email?: string;
|
|
34
|
+
id?: number;
|
|
35
|
+
role?: string;
|
|
36
|
+
username?: string;
|
|
37
|
+
};
|
|
38
|
+
export type GetApiHitokotoData = {
|
|
39
|
+
body?: never;
|
|
40
|
+
path?: never;
|
|
41
|
+
query?: never;
|
|
42
|
+
url: '/api/hitokoto';
|
|
43
|
+
};
|
|
44
|
+
export type GetApiHitokotoErrors = {
|
|
45
|
+
/**
|
|
46
|
+
* 没有找到对应的一言
|
|
47
|
+
*/
|
|
48
|
+
404: AtelinoInternalDtoResponse;
|
|
49
|
+
/**
|
|
50
|
+
* 数据库错误
|
|
51
|
+
*/
|
|
52
|
+
500: AtelinoInternalDtoResponse;
|
|
53
|
+
};
|
|
54
|
+
export type GetApiHitokotoError = GetApiHitokotoErrors[keyof GetApiHitokotoErrors];
|
|
55
|
+
export type GetApiHitokotoResponses = {
|
|
56
|
+
/**
|
|
57
|
+
* 请求成功
|
|
58
|
+
*/
|
|
59
|
+
200: AtelinoInternalDtoResponse & {
|
|
60
|
+
data?: AtelinoInternalDtoHitokotoResponse;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export type GetApiHitokotoResponse = GetApiHitokotoResponses[keyof GetApiHitokotoResponses];
|
|
64
|
+
export type PostApiHitokotoData = {
|
|
16
65
|
/**
|
|
17
66
|
* 一言内容
|
|
18
67
|
*/
|
|
19
68
|
body: AtelinoInternalDtoCreateHitokotoRequest;
|
|
20
69
|
path?: never;
|
|
21
70
|
query?: never;
|
|
22
|
-
url: '/hitokoto';
|
|
71
|
+
url: '/api/hitokoto';
|
|
23
72
|
};
|
|
24
|
-
export type
|
|
73
|
+
export type PostApiHitokotoErrors = {
|
|
25
74
|
/**
|
|
26
75
|
* 请求参数错误
|
|
27
76
|
*/
|
|
28
|
-
400: AtelinoInternalDtoResponse
|
|
29
|
-
code?: number;
|
|
30
|
-
message?: string;
|
|
31
|
-
};
|
|
77
|
+
400: AtelinoInternalDtoResponse;
|
|
32
78
|
/**
|
|
33
79
|
* 该一言已存在
|
|
34
80
|
*/
|
|
35
|
-
409: AtelinoInternalDtoResponse
|
|
36
|
-
code?: number;
|
|
37
|
-
message?: string;
|
|
38
|
-
};
|
|
81
|
+
409: AtelinoInternalDtoResponse;
|
|
39
82
|
/**
|
|
40
83
|
* 数据库错误
|
|
41
84
|
*/
|
|
42
|
-
500: AtelinoInternalDtoResponse
|
|
43
|
-
code?: number;
|
|
44
|
-
message?: string;
|
|
45
|
-
};
|
|
85
|
+
500: AtelinoInternalDtoResponse;
|
|
46
86
|
};
|
|
47
|
-
export type
|
|
48
|
-
export type
|
|
87
|
+
export type PostApiHitokotoError = PostApiHitokotoErrors[keyof PostApiHitokotoErrors];
|
|
88
|
+
export type PostApiHitokotoResponses = {
|
|
49
89
|
/**
|
|
50
90
|
* 添加成功
|
|
51
91
|
*/
|
|
52
92
|
200: AtelinoInternalDtoResponse & {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
93
|
+
data?: AtelinoInternalDtoHitokotoResponse;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export type PostApiHitokotoResponse = PostApiHitokotoResponses[keyof PostApiHitokotoResponses];
|
|
97
|
+
export type GetApiHitokotoListData = {
|
|
98
|
+
body?: never;
|
|
99
|
+
path?: never;
|
|
100
|
+
query?: {
|
|
101
|
+
/**
|
|
102
|
+
* 页数
|
|
103
|
+
*/
|
|
104
|
+
page?: number;
|
|
105
|
+
};
|
|
106
|
+
url: '/api/hitokoto/list';
|
|
107
|
+
};
|
|
108
|
+
export type GetApiHitokotoListErrors = {
|
|
109
|
+
/**
|
|
110
|
+
* 未授权
|
|
111
|
+
*/
|
|
112
|
+
401: AtelinoInternalDtoResponse;
|
|
113
|
+
/**
|
|
114
|
+
* 数据库错误
|
|
115
|
+
*/
|
|
116
|
+
500: AtelinoInternalDtoResponse;
|
|
117
|
+
};
|
|
118
|
+
export type GetApiHitokotoListError = GetApiHitokotoListErrors[keyof GetApiHitokotoListErrors];
|
|
119
|
+
export type GetApiHitokotoListResponses = {
|
|
120
|
+
/**
|
|
121
|
+
* 请求成功
|
|
122
|
+
*/
|
|
123
|
+
200: AtelinoInternalDtoResponse & {
|
|
124
|
+
data?: Array<AtelinoInternalDtoHitokotoResponse>;
|
|
56
125
|
};
|
|
57
126
|
};
|
|
58
|
-
export type
|
|
59
|
-
export type
|
|
127
|
+
export type GetApiHitokotoListResponse = GetApiHitokotoListResponses[keyof GetApiHitokotoListResponses];
|
|
128
|
+
export type DeleteApiHitokotoByIdData = {
|
|
60
129
|
body?: never;
|
|
61
130
|
path: {
|
|
62
131
|
/**
|
|
@@ -65,46 +134,169 @@ export type DeleteHitokotoByIdData = {
|
|
|
65
134
|
id: number;
|
|
66
135
|
};
|
|
67
136
|
query?: never;
|
|
68
|
-
url: '/hitokoto/{id}';
|
|
137
|
+
url: '/api/hitokoto/{id}';
|
|
69
138
|
};
|
|
70
|
-
export type
|
|
139
|
+
export type DeleteApiHitokotoByIdErrors = {
|
|
71
140
|
/**
|
|
72
141
|
* 请求参数错误
|
|
73
142
|
*/
|
|
74
|
-
400: AtelinoInternalDtoResponse
|
|
75
|
-
code?: number;
|
|
76
|
-
message?: string;
|
|
77
|
-
};
|
|
143
|
+
400: AtelinoInternalDtoResponse;
|
|
78
144
|
/**
|
|
79
145
|
* 未授权
|
|
80
146
|
*/
|
|
81
|
-
401: AtelinoInternalDtoResponse
|
|
82
|
-
code?: number;
|
|
83
|
-
message?: string;
|
|
84
|
-
};
|
|
147
|
+
401: AtelinoInternalDtoResponse;
|
|
85
148
|
/**
|
|
86
149
|
* 没有找到对应的一言
|
|
87
150
|
*/
|
|
88
|
-
404: AtelinoInternalDtoResponse
|
|
89
|
-
|
|
90
|
-
|
|
151
|
+
404: AtelinoInternalDtoResponse;
|
|
152
|
+
/**
|
|
153
|
+
* 数据库错误
|
|
154
|
+
*/
|
|
155
|
+
500: AtelinoInternalDtoResponse;
|
|
156
|
+
};
|
|
157
|
+
export type DeleteApiHitokotoByIdError = DeleteApiHitokotoByIdErrors[keyof DeleteApiHitokotoByIdErrors];
|
|
158
|
+
export type DeleteApiHitokotoByIdResponses = {
|
|
159
|
+
/**
|
|
160
|
+
* 删除成功
|
|
161
|
+
*/
|
|
162
|
+
200: AtelinoInternalDtoResponse;
|
|
163
|
+
};
|
|
164
|
+
export type DeleteApiHitokotoByIdResponse = DeleteApiHitokotoByIdResponses[keyof DeleteApiHitokotoByIdResponses];
|
|
165
|
+
export type GetApiHitokotoByIdData = {
|
|
166
|
+
body?: never;
|
|
167
|
+
path: {
|
|
168
|
+
/**
|
|
169
|
+
* 一言 ID
|
|
170
|
+
*/
|
|
171
|
+
id: number;
|
|
91
172
|
};
|
|
173
|
+
query?: never;
|
|
174
|
+
url: '/api/hitokoto/{id}';
|
|
175
|
+
};
|
|
176
|
+
export type GetApiHitokotoByIdErrors = {
|
|
177
|
+
/**
|
|
178
|
+
* 请求参数错误
|
|
179
|
+
*/
|
|
180
|
+
400: AtelinoInternalDtoResponse;
|
|
181
|
+
/**
|
|
182
|
+
* 未授权
|
|
183
|
+
*/
|
|
184
|
+
401: AtelinoInternalDtoResponse;
|
|
185
|
+
/**
|
|
186
|
+
* 没有找到对应的一言
|
|
187
|
+
*/
|
|
188
|
+
404: AtelinoInternalDtoResponse;
|
|
92
189
|
/**
|
|
93
190
|
* 数据库错误
|
|
94
191
|
*/
|
|
95
|
-
500: AtelinoInternalDtoResponse
|
|
96
|
-
|
|
97
|
-
|
|
192
|
+
500: AtelinoInternalDtoResponse;
|
|
193
|
+
};
|
|
194
|
+
export type GetApiHitokotoByIdError = GetApiHitokotoByIdErrors[keyof GetApiHitokotoByIdErrors];
|
|
195
|
+
export type GetApiHitokotoByIdResponses = {
|
|
196
|
+
/**
|
|
197
|
+
* 请求成功
|
|
198
|
+
*/
|
|
199
|
+
200: AtelinoInternalDtoResponse & {
|
|
200
|
+
data?: AtelinoInternalDtoHitokotoResponse;
|
|
98
201
|
};
|
|
99
202
|
};
|
|
100
|
-
export type
|
|
101
|
-
export type
|
|
203
|
+
export type GetApiHitokotoByIdResponse = GetApiHitokotoByIdResponses[keyof GetApiHitokotoByIdResponses];
|
|
204
|
+
export type GetApiUserByIdData = {
|
|
205
|
+
body?: never;
|
|
206
|
+
path: {
|
|
207
|
+
/**
|
|
208
|
+
* 用户 ID
|
|
209
|
+
*/
|
|
210
|
+
id: number;
|
|
211
|
+
};
|
|
212
|
+
query?: never;
|
|
213
|
+
url: '/api/user/{id}';
|
|
214
|
+
};
|
|
215
|
+
export type GetApiUserByIdErrors = {
|
|
102
216
|
/**
|
|
103
|
-
*
|
|
217
|
+
* 请求参数错误
|
|
218
|
+
*/
|
|
219
|
+
400: AtelinoInternalDtoResponse;
|
|
220
|
+
/**
|
|
221
|
+
* 未授权
|
|
222
|
+
*/
|
|
223
|
+
401: AtelinoInternalDtoResponse;
|
|
224
|
+
/**
|
|
225
|
+
* 查询失败
|
|
226
|
+
*/
|
|
227
|
+
500: AtelinoInternalDtoResponse;
|
|
228
|
+
};
|
|
229
|
+
export type GetApiUserByIdError = GetApiUserByIdErrors[keyof GetApiUserByIdErrors];
|
|
230
|
+
export type GetApiUserByIdResponses = {
|
|
231
|
+
/**
|
|
232
|
+
* 请求成功
|
|
233
|
+
*/
|
|
234
|
+
200: AtelinoInternalDtoResponse & {
|
|
235
|
+
data?: AtelinoInternalDtoUserResponse;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
export type GetApiUserByIdResponse = GetApiUserByIdResponses[keyof GetApiUserByIdResponses];
|
|
239
|
+
export type PostAuthLoginData = {
|
|
240
|
+
/**
|
|
241
|
+
* 登录请求体
|
|
242
|
+
*/
|
|
243
|
+
body: AtelinoInternalDtoLoginRequest;
|
|
244
|
+
path?: never;
|
|
245
|
+
query?: never;
|
|
246
|
+
url: '/auth/login';
|
|
247
|
+
};
|
|
248
|
+
export type PostAuthLoginErrors = {
|
|
249
|
+
/**
|
|
250
|
+
* 请求参数错误
|
|
251
|
+
*/
|
|
252
|
+
400: AtelinoInternalDtoResponse;
|
|
253
|
+
/**
|
|
254
|
+
* 用户名或密码错误
|
|
255
|
+
*/
|
|
256
|
+
401: AtelinoInternalDtoResponse;
|
|
257
|
+
/**
|
|
258
|
+
* 登录失败
|
|
259
|
+
*/
|
|
260
|
+
500: AtelinoInternalDtoResponse;
|
|
261
|
+
};
|
|
262
|
+
export type PostAuthLoginError = PostAuthLoginErrors[keyof PostAuthLoginErrors];
|
|
263
|
+
export type PostAuthLoginResponses = {
|
|
264
|
+
/**
|
|
265
|
+
* 登录成功
|
|
104
266
|
*/
|
|
105
267
|
200: AtelinoInternalDtoResponse & {
|
|
106
|
-
|
|
107
|
-
message?: string;
|
|
268
|
+
data?: AtelinoInternalDtoTokenResponse;
|
|
108
269
|
};
|
|
109
270
|
};
|
|
110
|
-
export type
|
|
271
|
+
export type PostAuthLoginResponse = PostAuthLoginResponses[keyof PostAuthLoginResponses];
|
|
272
|
+
export type PostAuthRegisterData = {
|
|
273
|
+
/**
|
|
274
|
+
* 注册请求体
|
|
275
|
+
*/
|
|
276
|
+
body: AtelinoInternalDtoRegisterRequest;
|
|
277
|
+
path?: never;
|
|
278
|
+
query?: never;
|
|
279
|
+
url: '/auth/register';
|
|
280
|
+
};
|
|
281
|
+
export type PostAuthRegisterErrors = {
|
|
282
|
+
/**
|
|
283
|
+
* 请求参数错误
|
|
284
|
+
*/
|
|
285
|
+
400: AtelinoInternalDtoResponse;
|
|
286
|
+
/**
|
|
287
|
+
* 该邮箱已注册
|
|
288
|
+
*/
|
|
289
|
+
409: AtelinoInternalDtoResponse;
|
|
290
|
+
/**
|
|
291
|
+
* 注册失败
|
|
292
|
+
*/
|
|
293
|
+
500: AtelinoInternalDtoResponse;
|
|
294
|
+
};
|
|
295
|
+
export type PostAuthRegisterError = PostAuthRegisterErrors[keyof PostAuthRegisterErrors];
|
|
296
|
+
export type PostAuthRegisterResponses = {
|
|
297
|
+
/**
|
|
298
|
+
* 注册成功
|
|
299
|
+
*/
|
|
300
|
+
200: AtelinoInternalDtoResponse;
|
|
301
|
+
};
|
|
302
|
+
export type PostAuthRegisterResponse = PostAuthRegisterResponses[keyof PostAuthRegisterResponses];
|
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "atelino-sdk",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"author": "BAIYI",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"types": "./dist/index.d.ts"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist/"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsc",
|
|
19
|
-
"dev": "tsc --watch",
|
|
20
|
-
"prepublishOnly": "npm run build",
|
|
21
|
-
"generate": "openapi-ts"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@hey-api/client-fetch": "^0.13.1",
|
|
25
|
-
"@hey-api/openapi-ts": "^0.97.1",
|
|
26
|
-
"@types/node": "^25.6.2",
|
|
27
|
-
"typescript": "^6.0.3"
|
|
28
|
-
},
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"registry": "https://registry.npmjs.org/"
|
|
31
|
-
},
|
|
32
|
-
"license": "MIT",
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "https://github.com/baiyibs/atelino-sdk.git"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "atelino-sdk",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"author": "BAIYI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"dev": "tsc --watch",
|
|
20
|
+
"prepublishOnly": "npm run build",
|
|
21
|
+
"generate": "openapi-ts"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@hey-api/client-fetch": "^0.13.1",
|
|
25
|
+
"@hey-api/openapi-ts": "^0.97.1",
|
|
26
|
+
"@types/node": "^25.6.2",
|
|
27
|
+
"typescript": "^6.0.3"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"registry": "https://registry.npmjs.org/"
|
|
31
|
+
},
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/baiyibs/atelino-sdk.git"
|
|
36
|
+
}
|
|
37
|
+
}
|