@mx-space/api-client 1.16.1 → 1.18.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/controllers/ack.ts +1 -2
- package/controllers/activity.ts +1 -2
- package/controllers/aggregate.ts +1 -2
- package/controllers/ai.ts +12 -3
- package/controllers/base.ts +1 -2
- package/controllers/category.ts +4 -6
- package/controllers/comment.ts +1 -2
- package/controllers/link.ts +1 -3
- package/controllers/note.ts +5 -3
- package/controllers/page.ts +1 -2
- package/controllers/post.ts +1 -2
- package/controllers/project.ts +1 -3
- package/controllers/recently.ts +1 -2
- package/controllers/say.ts +1 -3
- package/controllers/search.ts +2 -3
- package/controllers/severless.ts +1 -2
- package/controllers/snippet.ts +1 -2
- package/controllers/subscribe.ts +1 -2
- package/controllers/topic.ts +1 -3
- package/controllers/user.ts +1 -2
- package/dist/adapter-B1dtiutp.d.cts +25 -0
- package/dist/adapter-CRsPadpS.d.mts +25 -0
- package/dist/adaptors/axios.cjs +53 -57
- package/dist/adaptors/axios.d.cts +5 -4
- package/dist/adaptors/axios.d.mts +7 -0
- package/dist/adaptors/axios.mjs +33 -0
- package/dist/adaptors/fetch.cjs +72 -108
- package/dist/adaptors/fetch.d.cts +4 -3
- package/dist/adaptors/fetch.d.mts +6 -0
- package/dist/adaptors/fetch.mjs +75 -0
- package/dist/adaptors/umi-request.cjs +32 -54
- package/dist/adaptors/umi-request.d.cts +5 -4
- package/dist/adaptors/umi-request.d.mts +7 -0
- package/dist/adaptors/umi-request.mjs +33 -0
- package/dist/index.cjs +1042 -1199
- package/dist/index.d.cts +1758 -1643
- package/dist/index.d.mts +2016 -0
- package/dist/index.mjs +1101 -0
- package/index.ts +0 -1
- package/interfaces/request.ts +3 -1
- package/mod-dts.mjs +15 -12
- package/models/aggregate.ts +0 -2
- package/models/ai.ts +9 -0
- package/models/comment.ts +1 -2
- package/models/note.ts +1 -1
- package/models/recently.ts +2 -0
- package/models/setting.ts +5 -0
- package/package.json +20 -20
- package/readme.md +3 -3
- package/tsconfig.json +11 -11
- package/{tsup.config.ts → tsdown.config.ts} +2 -2
- package/vitest.config.ts +0 -1
- package/.eslintcache +0 -1
- package/coverage/clover.xml +0 -591
- package/coverage/coverage-final.json +0 -5944
- package/coverage/lcov-report/adaptors/axios.ts.html +0 -201
- package/coverage/lcov-report/adaptors/index.html +0 -196
- package/coverage/lcov-report/adaptors/umi-request.ts.html +0 -186
- package/coverage/lcov-report/auto-bind.ts.html +0 -228
- package/coverage/lcov-report/base.css +0 -354
- package/coverage/lcov-report/block-navigation.js +0 -85
- package/coverage/lcov-report/controllers/aggregate.ts.html +0 -294
- package/coverage/lcov-report/controllers/base.ts.html +0 -183
- package/coverage/lcov-report/controllers/category.ts.html +0 -441
- package/coverage/lcov-report/controllers/comment.ts.html +0 -291
- package/coverage/lcov-report/controllers/index.html +0 -476
- package/coverage/lcov-report/controllers/index.ts.html +0 -297
- package/coverage/lcov-report/controllers/link.ts.html +0 -216
- package/coverage/lcov-report/controllers/note.ts.html +0 -375
- package/coverage/lcov-report/controllers/page.ts.html +0 -279
- package/coverage/lcov-report/controllers/post.ts.html +0 -369
- package/coverage/lcov-report/controllers/project.ts.html +0 -168
- package/coverage/lcov-report/controllers/recently.ts.html +0 -246
- package/coverage/lcov-report/controllers/say.ts.html +0 -207
- package/coverage/lcov-report/controllers/search.ts.html +0 -411
- package/coverage/lcov-report/controllers/severless.ts.html +0 -180
- package/coverage/lcov-report/controllers/snippet.ts.html +0 -195
- package/coverage/lcov-report/controllers/user.ts.html +0 -240
- package/coverage/lcov-report/core/attach-request.ts.html +0 -216
- package/coverage/lcov-report/core/client.ts.html +0 -786
- package/coverage/lcov-report/core/error.ts.html +0 -117
- package/coverage/lcov-report/core/index.html +0 -236
- package/coverage/lcov-report/core/index.ts.html +0 -93
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -276
- package/coverage/lcov-report/index.ts.html +0 -243
- package/coverage/lcov-report/models/aggregate.ts.html +0 -300
- package/coverage/lcov-report/models/category.ts.html +0 -162
- package/coverage/lcov-report/models/index.html +0 -196
- package/coverage/lcov-report/prettify.css +0 -101
- package/coverage/lcov-report/prettify.js +0 -1004
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -191
- package/coverage/lcov-report/utils/auto-bind.ts.html +0 -231
- package/coverage/lcov-report/utils/index.html +0 -216
- package/coverage/lcov-report/utils/index.ts.html +0 -246
- package/coverage/lcov-report/utils/path.ts.html +0 -105
- package/coverage/lcov.info +0 -1209
- package/dist/adapter-B8tKfr1O.d.cts +0 -23
- package/dist/adapter-B8tKfr1O.d.ts +0 -23
- package/dist/adaptors/axios.d.ts +0 -6
- package/dist/adaptors/axios.global.js +0 -14151
- package/dist/adaptors/axios.js +0 -33
- package/dist/adaptors/fetch.d.ts +0 -5
- package/dist/adaptors/fetch.global.js +0 -87
- package/dist/adaptors/fetch.js +0 -87
- package/dist/adaptors/umi-request.d.ts +0 -6
- package/dist/adaptors/umi-request.global.js +0 -7379
- package/dist/adaptors/umi-request.js +0 -33
- package/dist/index.d.ts +0 -1901
- package/dist/index.global.js +0 -1193
- package/dist/index.js +0 -1234
- package/esm/apps/core/src/modules/subscribe/subscribe.constant.d.ts +0 -12
- package/esm/apps/core/src/modules/subscribe/subscribe.constant.js +0 -16
- package/esm/apps/core/src/modules/subscribe/subscribe.constant.js.map +0 -1
- package/esm/packages/api-client/adaptors/axios.d.ts +0 -4
- package/esm/packages/api-client/adaptors/axios.js +0 -37
- package/esm/packages/api-client/adaptors/axios.js.map +0 -1
- package/esm/packages/api-client/adaptors/fetch.d.ts +0 -2
- package/esm/packages/api-client/adaptors/fetch.js +0 -95
- package/esm/packages/api-client/adaptors/fetch.js.map +0 -1
- package/esm/packages/api-client/adaptors/ky.d.ts +0 -23
- package/esm/packages/api-client/adaptors/ky.js +0 -62
- package/esm/packages/api-client/adaptors/ky.js.map +0 -1
- package/esm/packages/api-client/adaptors/umi-request.d.ts +0 -4
- package/esm/packages/api-client/adaptors/umi-request.js +0 -31
- package/esm/packages/api-client/adaptors/umi-request.js.map +0 -1
- package/esm/packages/api-client/controllers/aggregate.d.ts +0 -64
- package/esm/packages/api-client/controllers/aggregate.js +0 -46
- package/esm/packages/api-client/controllers/aggregate.js.map +0 -1
- package/esm/packages/api-client/controllers/base.d.ts +0 -43
- package/esm/packages/api-client/controllers/base.js +0 -27
- package/esm/packages/api-client/controllers/base.js.map +0 -1
- package/esm/packages/api-client/controllers/category.d.ts +0 -120
- package/esm/packages/api-client/controllers/category.js +0 -68
- package/esm/packages/api-client/controllers/category.js.map +0 -1
- package/esm/packages/api-client/controllers/comment.d.ts +0 -81
- package/esm/packages/api-client/controllers/comment.js +0 -47
- package/esm/packages/api-client/controllers/comment.js.map +0 -1
- package/esm/packages/api-client/controllers/index.d.ts +0 -19
- package/esm/packages/api-client/controllers/index.js +0 -60
- package/esm/packages/api-client/controllers/index.js.map +0 -1
- package/esm/packages/api-client/controllers/link.d.ts +0 -20
- package/esm/packages/api-client/controllers/link.js +0 -21
- package/esm/packages/api-client/controllers/link.js.map +0 -1
- package/esm/packages/api-client/controllers/note.d.ts +0 -103
- package/esm/packages/api-client/controllers/note.js +0 -68
- package/esm/packages/api-client/controllers/note.js.map +0 -1
- package/esm/packages/api-client/controllers/page.d.ts +0 -59
- package/esm/packages/api-client/controllers/page.js +0 -42
- package/esm/packages/api-client/controllers/page.js.map +0 -1
- package/esm/packages/api-client/controllers/post.d.ts +0 -72
- package/esm/packages/api-client/controllers/post.js +0 -52
- package/esm/packages/api-client/controllers/post.js.map +0 -1
- package/esm/packages/api-client/controllers/project.d.ts +0 -15
- package/esm/packages/api-client/controllers/project.js +0 -12
- package/esm/packages/api-client/controllers/project.js.map +0 -1
- package/esm/packages/api-client/controllers/recently.d.ts +0 -110
- package/esm/packages/api-client/controllers/recently.js +0 -49
- package/esm/packages/api-client/controllers/recently.js.map +0 -1
- package/esm/packages/api-client/controllers/say.d.ts +0 -37
- package/esm/packages/api-client/controllers/say.js +0 -21
- package/esm/packages/api-client/controllers/say.js.map +0 -1
- package/esm/packages/api-client/controllers/search.d.ts +0 -87
- package/esm/packages/api-client/controllers/search.js +0 -28
- package/esm/packages/api-client/controllers/search.js.map +0 -1
- package/esm/packages/api-client/controllers/severless.d.ts +0 -24
- package/esm/packages/api-client/controllers/severless.js +0 -16
- package/esm/packages/api-client/controllers/severless.js.map +0 -1
- package/esm/packages/api-client/controllers/snippet.d.ts +0 -24
- package/esm/packages/api-client/controllers/snippet.js +0 -19
- package/esm/packages/api-client/controllers/snippet.js.map +0 -1
- package/esm/packages/api-client/controllers/subscribe.d.ts +0 -64
- package/esm/packages/api-client/controllers/subscribe.js +0 -35
- package/esm/packages/api-client/controllers/subscribe.js.map +0 -1
- package/esm/packages/api-client/controllers/topic.d.ts +0 -26
- package/esm/packages/api-client/controllers/topic.js +0 -18
- package/esm/packages/api-client/controllers/topic.js.map +0 -1
- package/esm/packages/api-client/controllers/user.d.ts +0 -70
- package/esm/packages/api-client/controllers/user.js +0 -40
- package/esm/packages/api-client/controllers/user.js.map +0 -1
- package/esm/packages/api-client/core/attach-request.d.ts +0 -2
- package/esm/packages/api-client/core/attach-request.js +0 -36
- package/esm/packages/api-client/core/attach-request.js.map +0 -1
- package/esm/packages/api-client/core/client.d.ts +0 -29
- package/esm/packages/api-client/core/client.js +0 -193
- package/esm/packages/api-client/core/client.js.map +0 -1
- package/esm/packages/api-client/core/error.d.ts +0 -6
- package/esm/packages/api-client/core/error.js +0 -9
- package/esm/packages/api-client/core/error.js.map +0 -1
- package/esm/packages/api-client/core/index.d.ts +0 -2
- package/esm/packages/api-client/core/index.js +0 -3
- package/esm/packages/api-client/core/index.js.map +0 -1
- package/esm/packages/api-client/dtos/comment.d.ts +0 -8
- package/esm/packages/api-client/dtos/comment.js +0 -2
- package/esm/packages/api-client/dtos/comment.js.map +0 -1
- package/esm/packages/api-client/dtos/index.d.ts +0 -1
- package/esm/packages/api-client/dtos/index.js +0 -2
- package/esm/packages/api-client/dtos/index.js.map +0 -1
- package/esm/packages/api-client/index.d.ts +0 -8
- package/esm/packages/api-client/index.js +0 -9
- package/esm/packages/api-client/index.js.map +0 -1
- package/esm/packages/api-client/interfaces/adapter.d.ts +0 -14
- package/esm/packages/api-client/interfaces/adapter.js +0 -2
- package/esm/packages/api-client/interfaces/adapter.js.map +0 -1
- package/esm/packages/api-client/interfaces/client.d.ts +0 -13
- package/esm/packages/api-client/interfaces/client.js +0 -2
- package/esm/packages/api-client/interfaces/client.js.map +0 -1
- package/esm/packages/api-client/interfaces/controller.d.ts +0 -4
- package/esm/packages/api-client/interfaces/controller.js +0 -2
- package/esm/packages/api-client/interfaces/controller.js.map +0 -1
- package/esm/packages/api-client/interfaces/instance.d.ts +0 -7
- package/esm/packages/api-client/interfaces/instance.js +0 -2
- package/esm/packages/api-client/interfaces/instance.js.map +0 -1
- package/esm/packages/api-client/interfaces/options.d.ts +0 -1
- package/esm/packages/api-client/interfaces/options.js +0 -2
- package/esm/packages/api-client/interfaces/options.js.map +0 -1
- package/esm/packages/api-client/interfaces/params.d.ts +0 -4
- package/esm/packages/api-client/interfaces/params.js +0 -2
- package/esm/packages/api-client/interfaces/params.js.map +0 -1
- package/esm/packages/api-client/interfaces/request.d.ts +0 -44
- package/esm/packages/api-client/interfaces/request.js +0 -2
- package/esm/packages/api-client/interfaces/request.js.map +0 -1
- package/esm/packages/api-client/interfaces/types.d.ts +0 -2
- package/esm/packages/api-client/interfaces/types.js +0 -2
- package/esm/packages/api-client/interfaces/types.js.map +0 -1
- package/esm/packages/api-client/models/aggregate.d.ts +0 -67
- package/esm/packages/api-client/models/aggregate.js +0 -6
- package/esm/packages/api-client/models/aggregate.js.map +0 -1
- package/esm/packages/api-client/models/base.d.ts +0 -40
- package/esm/packages/api-client/models/base.js +0 -2
- package/esm/packages/api-client/models/base.js.map +0 -1
- package/esm/packages/api-client/models/category.d.ts +0 -22
- package/esm/packages/api-client/models/category.js +0 -6
- package/esm/packages/api-client/models/category.js.map +0 -1
- package/esm/packages/api-client/models/comment.d.ts +0 -39
- package/esm/packages/api-client/models/comment.js +0 -13
- package/esm/packages/api-client/models/comment.js.map +0 -1
- package/esm/packages/api-client/models/index.d.ts +0 -16
- package/esm/packages/api-client/models/index.js +0 -17
- package/esm/packages/api-client/models/index.js.map +0 -1
- package/esm/packages/api-client/models/link.d.ts +0 -22
- package/esm/packages/api-client/models/link.js +0 -14
- package/esm/packages/api-client/models/link.js.map +0 -1
- package/esm/packages/api-client/models/note.d.ts +0 -38
- package/esm/packages/api-client/models/note.js +0 -2
- package/esm/packages/api-client/models/note.js.map +0 -1
- package/esm/packages/api-client/models/page.d.ts +0 -14
- package/esm/packages/api-client/models/page.js +0 -7
- package/esm/packages/api-client/models/page.js.map +0 -1
- package/esm/packages/api-client/models/post.d.ts +0 -17
- package/esm/packages/api-client/models/post.js +0 -2
- package/esm/packages/api-client/models/post.js.map +0 -1
- package/esm/packages/api-client/models/project.d.ts +0 -11
- package/esm/packages/api-client/models/project.js +0 -2
- package/esm/packages/api-client/models/project.js.map +0 -1
- package/esm/packages/api-client/models/recently.d.ts +0 -20
- package/esm/packages/api-client/models/recently.js +0 -7
- package/esm/packages/api-client/models/recently.js.map +0 -1
- package/esm/packages/api-client/models/say.d.ts +0 -6
- package/esm/packages/api-client/models/say.js +0 -2
- package/esm/packages/api-client/models/say.js.map +0 -1
- package/esm/packages/api-client/models/setting.d.ts +0 -66
- package/esm/packages/api-client/models/setting.js +0 -2
- package/esm/packages/api-client/models/setting.js.map +0 -1
- package/esm/packages/api-client/models/snippet.d.ts +0 -18
- package/esm/packages/api-client/models/snippet.js +0 -8
- package/esm/packages/api-client/models/snippet.js.map +0 -1
- package/esm/packages/api-client/models/subscribe.d.ts +0 -3
- package/esm/packages/api-client/models/subscribe.js +0 -2
- package/esm/packages/api-client/models/subscribe.js.map +0 -1
- package/esm/packages/api-client/models/topic.d.ts +0 -8
- package/esm/packages/api-client/models/topic.js +0 -2
- package/esm/packages/api-client/models/topic.js.map +0 -1
- package/esm/packages/api-client/models/user.d.ts +0 -21
- package/esm/packages/api-client/models/user.js +0 -2
- package/esm/packages/api-client/models/user.js.map +0 -1
- package/esm/packages/api-client/tsup.config.d.ts +0 -2
- package/esm/packages/api-client/tsup.config.js +0 -14
- package/esm/packages/api-client/tsup.config.js.map +0 -1
- package/esm/packages/api-client/utils/auto-bind.d.ts +0 -4
- package/esm/packages/api-client/utils/auto-bind.js +0 -36
- package/esm/packages/api-client/utils/auto-bind.js.map +0 -1
- package/esm/packages/api-client/utils/camelcase-keys.d.ts +0 -6
- package/esm/packages/api-client/utils/camelcase-keys.js +0 -23
- package/esm/packages/api-client/utils/camelcase-keys.js.map +0 -1
- package/esm/packages/api-client/utils/index.d.ts +0 -5
- package/esm/packages/api-client/utils/index.js +0 -43
- package/esm/packages/api-client/utils/index.js.map +0 -1
- package/esm/packages/api-client/utils/path.d.ts +0 -1
- package/esm/packages/api-client/utils/path.js +0 -7
- package/esm/packages/api-client/utils/path.js.map +0 -1
- package/esm/packages/api-client/vitest.config.d.ts +0 -2
- package/esm/packages/api-client/vitest.config.js +0 -15
- package/esm/packages/api-client/vitest.config.js.map +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { RequestOptions } from './instance';
|
|
2
|
-
export type IAdaptorRequestResponseType<P> = Promise<Record<string, any> & {
|
|
3
|
-
data: P;
|
|
4
|
-
}>;
|
|
5
|
-
export type IRequestAdapter<T = any, Response = undefined> = Readonly<(Response extends undefined ? {} : {
|
|
6
|
-
responseWrapper: Response;
|
|
7
|
-
}) & {
|
|
8
|
-
default: T;
|
|
9
|
-
get: <P = unknown>(url: string, options?: Omit<RequestOptions, 'data'>) => IAdaptorRequestResponseType<P>;
|
|
10
|
-
post: <P = unknown>(url: string, options: Partial<RequestOptions>) => IAdaptorRequestResponseType<P>;
|
|
11
|
-
patch: <P = unknown>(url: string, options: Partial<RequestOptions>) => IAdaptorRequestResponseType<P>;
|
|
12
|
-
delete: <P = unknown>(url: string, options?: Omit<RequestOptions, 'data'>) => IAdaptorRequestResponseType<P>;
|
|
13
|
-
put: <P = unknown>(url: string, options: Partial<RequestOptions>) => IAdaptorRequestResponseType<P>;
|
|
14
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../interfaces/adapter.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IController } from './controller';
|
|
2
|
-
import type { Class } from './types';
|
|
3
|
-
interface IClientOptions {
|
|
4
|
-
controllers: Class<IController>[];
|
|
5
|
-
getCodeMessageFromException: <T = Error>(error: T) => {
|
|
6
|
-
message?: string | undefined | null;
|
|
7
|
-
code?: number | undefined | null;
|
|
8
|
-
};
|
|
9
|
-
customThrowResponseError: <T extends Error = Error>(err: any) => T;
|
|
10
|
-
transformResponse: <T = any>(data: any) => T;
|
|
11
|
-
}
|
|
12
|
-
export type ClientOptions = Partial<IClientOptions>;
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../interfaces/client.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../../interfaces/controller.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../../../interfaces/instance.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type SortOrder = 'asc' | 'desc';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../interfaces/options.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../../interfaces/params.ts"],"names":[],"mappings":""}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { RequestOptions } from './instance';
|
|
2
|
-
type NoStringIndex<T> = {
|
|
3
|
-
[K in keyof T as string extends K ? never : K]: T[K];
|
|
4
|
-
};
|
|
5
|
-
export type Method = 'get' | 'delete' | 'post' | 'put' | 'patch';
|
|
6
|
-
export interface IRequestHandler<ResponseWrapper> {
|
|
7
|
-
(path?: string | number): IRequestHandler<ResponseWrapper>;
|
|
8
|
-
get: <P = unknown>(options?: Omit<NoStringIndex<RequestOptions>, 'data'>) => RequestProxyResult<P, ResponseWrapper>;
|
|
9
|
-
post: <P = unknown>(options?: RequestOptions) => RequestProxyResult<P, ResponseWrapper>;
|
|
10
|
-
patch: <P = unknown>(options?: RequestOptions) => RequestProxyResult<P, ResponseWrapper>;
|
|
11
|
-
delete: <P = unknown>(options?: Omit<NoStringIndex<RequestOptions>, 'data'>) => RequestProxyResult<P, ResponseWrapper>;
|
|
12
|
-
put: <P = unknown>(options?: RequestOptions) => RequestProxyResult<P, ResponseWrapper>;
|
|
13
|
-
toString: (withBase?: boolean) => string;
|
|
14
|
-
valueOf: (withBase?: boolean) => string;
|
|
15
|
-
[key: string]: IRequestHandler<ResponseWrapper>;
|
|
16
|
-
}
|
|
17
|
-
export type RequestProxyResult<T, ResponseWrapper, R = ResponseWrapper extends unknown ? {
|
|
18
|
-
data: T;
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
} : ResponseWrapper extends {
|
|
21
|
-
data: T;
|
|
22
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, 'data'> & {
|
|
23
|
-
data: T;
|
|
24
|
-
}> = Promise<ResponseProxyExtraRaw<T, R, ResponseWrapper>>;
|
|
25
|
-
type CamelToSnake<T extends string, P extends string = ''> = string extends T ? string : T extends `${infer C0}${infer R}` ? CamelToSnake<R, `${P}${C0 extends Lowercase<C0> ? '' : '_'}${Lowercase<C0>}`> : P;
|
|
26
|
-
type CamelKeysToSnake<T> = {
|
|
27
|
-
[K in keyof T as CamelToSnake<Extract<K, string>>]: T[K];
|
|
28
|
-
};
|
|
29
|
-
type ResponseWrapperType<Response, RawData, T> = {
|
|
30
|
-
$raw: Response extends {
|
|
31
|
-
data: infer T;
|
|
32
|
-
} ? Response : Response extends unknown ? {
|
|
33
|
-
[i: string]: any;
|
|
34
|
-
data: RawData extends unknown ? CamelKeysToSnake<T> : RawData;
|
|
35
|
-
} : Response;
|
|
36
|
-
$request: {
|
|
37
|
-
path: string;
|
|
38
|
-
method: string;
|
|
39
|
-
[k: string]: string;
|
|
40
|
-
};
|
|
41
|
-
$serialized: T;
|
|
42
|
-
};
|
|
43
|
-
export type ResponseProxyExtraRaw<T, RawData = unknown, Response = unknown> = T extends object ? T & ResponseWrapperType<Response, RawData, T> : T extends unknown ? T & ResponseWrapperType<Response, RawData, T> : unknown;
|
|
44
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../interfaces/request.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../interfaces/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { CategoryModel } from './category';
|
|
2
|
-
import type { NoteModel } from './note';
|
|
3
|
-
import type { PageModel } from './page';
|
|
4
|
-
import type { PostModel } from './post';
|
|
5
|
-
import type { SayModel } from './say';
|
|
6
|
-
import type { SeoOptionModel } from './setting';
|
|
7
|
-
import type { UserModel } from './user';
|
|
8
|
-
export interface AggregateRoot {
|
|
9
|
-
user: UserModel;
|
|
10
|
-
seo: SeoOptionModel;
|
|
11
|
-
url: Url;
|
|
12
|
-
categories: CategoryModel[];
|
|
13
|
-
pageMeta: Pick<PageModel, 'title' | 'id' | 'slug' | 'order'>[] | null;
|
|
14
|
-
/**
|
|
15
|
-
* @available 4.2.2
|
|
16
|
-
*/
|
|
17
|
-
latestNoteId: {
|
|
18
|
-
id: string;
|
|
19
|
-
nid: number;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export interface AggregateRootWithTheme<Theme = unknown> extends AggregateRoot {
|
|
23
|
-
theme?: Theme;
|
|
24
|
-
}
|
|
25
|
-
export interface Url {
|
|
26
|
-
wsUrl: string;
|
|
27
|
-
serverUrl: string;
|
|
28
|
-
webUrl: string;
|
|
29
|
-
}
|
|
30
|
-
export interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {
|
|
31
|
-
}
|
|
32
|
-
export interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images'> {
|
|
33
|
-
}
|
|
34
|
-
export interface AggregateTop {
|
|
35
|
-
notes: AggregateTopNote[];
|
|
36
|
-
posts: AggregateTopPost[];
|
|
37
|
-
says: SayModel[];
|
|
38
|
-
}
|
|
39
|
-
export declare enum TimelineType {
|
|
40
|
-
Post = 0,
|
|
41
|
-
Note = 1
|
|
42
|
-
}
|
|
43
|
-
export interface TimelineData {
|
|
44
|
-
notes?: Pick<NoteModel, 'id' | 'nid' | 'title' | 'weather' | 'mood' | 'created' | 'modified' | 'hasMemory'>[];
|
|
45
|
-
posts?: (Pick<PostModel, 'id' | 'title' | 'slug' | 'created' | 'modified' | 'category'> & {
|
|
46
|
-
url: string;
|
|
47
|
-
})[];
|
|
48
|
-
}
|
|
49
|
-
export interface AggregateStat {
|
|
50
|
-
allComments: number;
|
|
51
|
-
categories: number;
|
|
52
|
-
comments: number;
|
|
53
|
-
linkApply: number;
|
|
54
|
-
links: number;
|
|
55
|
-
notes: number;
|
|
56
|
-
pages: number;
|
|
57
|
-
posts: number;
|
|
58
|
-
says: number;
|
|
59
|
-
recently: number;
|
|
60
|
-
unreadComments: number;
|
|
61
|
-
online: number;
|
|
62
|
-
todayMaxOnline: string;
|
|
63
|
-
todayOnlineTotal: string;
|
|
64
|
-
callTime: number;
|
|
65
|
-
uv: number;
|
|
66
|
-
todayIpAccessCount: number;
|
|
67
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate.js","sourceRoot":"","sources":["../../../../models/aggregate.ts"],"names":[],"mappings":"AA+CA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+CAAI,CAAA;IACJ,+CAAI,CAAA;AACN,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export interface Count {
|
|
2
|
-
read: number;
|
|
3
|
-
like: number;
|
|
4
|
-
}
|
|
5
|
-
export interface Image {
|
|
6
|
-
height: number;
|
|
7
|
-
width: number;
|
|
8
|
-
type: string;
|
|
9
|
-
accent?: string;
|
|
10
|
-
src: string;
|
|
11
|
-
}
|
|
12
|
-
export interface Pager {
|
|
13
|
-
total: number;
|
|
14
|
-
size: number;
|
|
15
|
-
currentPage: number;
|
|
16
|
-
totalPage: number;
|
|
17
|
-
hasPrevPage: boolean;
|
|
18
|
-
hasNextPage: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface PaginateResult<T> {
|
|
21
|
-
data: T[];
|
|
22
|
-
pagination: Pager;
|
|
23
|
-
}
|
|
24
|
-
export interface BaseModel {
|
|
25
|
-
created: string;
|
|
26
|
-
id: string;
|
|
27
|
-
}
|
|
28
|
-
export interface BaseCommentIndexModel extends BaseModel {
|
|
29
|
-
commentsIndex?: number;
|
|
30
|
-
allowComment: boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface TextBaseModel extends BaseCommentIndexModel {
|
|
33
|
-
title: string;
|
|
34
|
-
text: string;
|
|
35
|
-
images?: Image[];
|
|
36
|
-
modified: string | null;
|
|
37
|
-
}
|
|
38
|
-
export type ModelWithLiked<T> = T & {
|
|
39
|
-
liked: boolean;
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../models/base.ts"],"names":[],"mappings":""}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { BaseModel } from './base';
|
|
2
|
-
import type { PostModel } from './post';
|
|
3
|
-
export declare enum CategoryType {
|
|
4
|
-
Category = 0,
|
|
5
|
-
Tag = 1
|
|
6
|
-
}
|
|
7
|
-
export interface CategoryModel extends BaseModel {
|
|
8
|
-
type: CategoryType;
|
|
9
|
-
count: number;
|
|
10
|
-
slug: string;
|
|
11
|
-
name: string;
|
|
12
|
-
}
|
|
13
|
-
export type CategoryWithChildrenModel = CategoryModel & {
|
|
14
|
-
children: Pick<PostModel, 'id' | 'title' | 'slug' | 'modified' | 'created'>[];
|
|
15
|
-
};
|
|
16
|
-
export type CategoryEntries = {
|
|
17
|
-
entries: Record<string, CategoryWithChildrenModel>;
|
|
18
|
-
};
|
|
19
|
-
export interface TagModel {
|
|
20
|
-
count: number;
|
|
21
|
-
name: string;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../models/category.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,uDAAQ,CAAA;IACR,6CAAG,CAAA;AACL,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { BaseModel } from './base';
|
|
2
|
-
import type { CategoryModel } from './category';
|
|
3
|
-
export declare enum RefType {
|
|
4
|
-
Page = "Page",
|
|
5
|
-
Post = "Post",
|
|
6
|
-
Note = "Note"
|
|
7
|
-
}
|
|
8
|
-
export interface CommentModel extends BaseModel {
|
|
9
|
-
refType: RefType;
|
|
10
|
-
ref: string;
|
|
11
|
-
state: number;
|
|
12
|
-
commentsIndex: number;
|
|
13
|
-
author: string;
|
|
14
|
-
text: string;
|
|
15
|
-
mail?: string;
|
|
16
|
-
url?: string;
|
|
17
|
-
ip?: string;
|
|
18
|
-
agent?: string;
|
|
19
|
-
key: string;
|
|
20
|
-
pin?: boolean;
|
|
21
|
-
avatar: string;
|
|
22
|
-
parent?: CommentModel | string;
|
|
23
|
-
children: CommentModel[];
|
|
24
|
-
isWhispers?: boolean;
|
|
25
|
-
location?: string;
|
|
26
|
-
source?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface CommentRef {
|
|
29
|
-
id: string;
|
|
30
|
-
categoryId?: string;
|
|
31
|
-
slug: string;
|
|
32
|
-
title: string;
|
|
33
|
-
category?: CategoryModel;
|
|
34
|
-
}
|
|
35
|
-
export declare enum CommentState {
|
|
36
|
-
Unread = 0,
|
|
37
|
-
Read = 1,
|
|
38
|
-
Junk = 2
|
|
39
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export var RefType;
|
|
2
|
-
(function (RefType) {
|
|
3
|
-
RefType["Page"] = "Page";
|
|
4
|
-
RefType["Post"] = "Post";
|
|
5
|
-
RefType["Note"] = "Note";
|
|
6
|
-
})(RefType || (RefType = {}));
|
|
7
|
-
export var CommentState;
|
|
8
|
-
(function (CommentState) {
|
|
9
|
-
CommentState[CommentState["Unread"] = 0] = "Unread";
|
|
10
|
-
CommentState[CommentState["Read"] = 1] = "Read";
|
|
11
|
-
CommentState[CommentState["Junk"] = 2] = "Junk";
|
|
12
|
-
})(CommentState || (CommentState = {}));
|
|
13
|
-
//# sourceMappingURL=comment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../../models/comment.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,wBAAa,CAAA;IACb,wBAAa,CAAA;IACb,wBAAa,CAAA;AACf,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB;AAiCD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,+CAAI,CAAA;IACJ,+CAAI,CAAA;AACN,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from './aggregate';
|
|
2
|
-
export * from './base';
|
|
3
|
-
export * from './category';
|
|
4
|
-
export * from './comment';
|
|
5
|
-
export * from './link';
|
|
6
|
-
export * from './note';
|
|
7
|
-
export * from './page';
|
|
8
|
-
export * from './post';
|
|
9
|
-
export * from './project';
|
|
10
|
-
export * from './recently';
|
|
11
|
-
export * from './say';
|
|
12
|
-
export * from './setting';
|
|
13
|
-
export * from './snippet';
|
|
14
|
-
export * from './subscribe';
|
|
15
|
-
export * from './topic';
|
|
16
|
-
export * from './user';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './aggregate';
|
|
2
|
-
export * from './base';
|
|
3
|
-
export * from './category';
|
|
4
|
-
export * from './comment';
|
|
5
|
-
export * from './link';
|
|
6
|
-
export * from './note';
|
|
7
|
-
export * from './page';
|
|
8
|
-
export * from './post';
|
|
9
|
-
export * from './project';
|
|
10
|
-
export * from './recently';
|
|
11
|
-
export * from './say';
|
|
12
|
-
export * from './setting';
|
|
13
|
-
export * from './snippet';
|
|
14
|
-
export * from './subscribe';
|
|
15
|
-
export * from './topic';
|
|
16
|
-
export * from './user';
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { BaseModel } from './base';
|
|
2
|
-
export declare enum LinkType {
|
|
3
|
-
Friend = 0,
|
|
4
|
-
Collection = 1
|
|
5
|
-
}
|
|
6
|
-
export declare enum LinkState {
|
|
7
|
-
Pass = 0,
|
|
8
|
-
Audit = 1,
|
|
9
|
-
Outdate = 2,
|
|
10
|
-
Banned = 3,
|
|
11
|
-
Reject = 4
|
|
12
|
-
}
|
|
13
|
-
export interface LinkModel extends BaseModel {
|
|
14
|
-
name: string;
|
|
15
|
-
url: string;
|
|
16
|
-
avatar: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
type: LinkType;
|
|
19
|
-
state: LinkState;
|
|
20
|
-
hide: boolean;
|
|
21
|
-
email: string;
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export var LinkType;
|
|
2
|
-
(function (LinkType) {
|
|
3
|
-
LinkType[LinkType["Friend"] = 0] = "Friend";
|
|
4
|
-
LinkType[LinkType["Collection"] = 1] = "Collection";
|
|
5
|
-
})(LinkType || (LinkType = {}));
|
|
6
|
-
export var LinkState;
|
|
7
|
-
(function (LinkState) {
|
|
8
|
-
LinkState[LinkState["Pass"] = 0] = "Pass";
|
|
9
|
-
LinkState[LinkState["Audit"] = 1] = "Audit";
|
|
10
|
-
LinkState[LinkState["Outdate"] = 2] = "Outdate";
|
|
11
|
-
LinkState[LinkState["Banned"] = 3] = "Banned";
|
|
12
|
-
LinkState[LinkState["Reject"] = 4] = "Reject";
|
|
13
|
-
})(LinkState || (LinkState = {}));
|
|
14
|
-
//# sourceMappingURL=link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../models/link.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,2CAAM,CAAA;IACN,mDAAU,CAAA;AACZ,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,yCAAI,CAAA;IACJ,2CAAK,CAAA;IACL,+CAAO,CAAA;IACP,6CAAM,CAAA;IACN,6CAAM,CAAA;AACR,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ModelWithLiked, TextBaseModel } from './base';
|
|
2
|
-
import type { TopicModel } from './topic';
|
|
3
|
-
export interface NoteModel extends TextBaseModel {
|
|
4
|
-
hide: boolean;
|
|
5
|
-
count: {
|
|
6
|
-
read: number;
|
|
7
|
-
like: number;
|
|
8
|
-
};
|
|
9
|
-
mood?: string;
|
|
10
|
-
weather?: string;
|
|
11
|
-
hasMemory?: boolean;
|
|
12
|
-
secret?: Date;
|
|
13
|
-
password?: string | null;
|
|
14
|
-
nid: number;
|
|
15
|
-
music?: NoteMusicRecord[];
|
|
16
|
-
location?: string;
|
|
17
|
-
coordinates?: Coordinate;
|
|
18
|
-
topic?: TopicModel;
|
|
19
|
-
topicId?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface NoteMusicRecord {
|
|
22
|
-
type: string;
|
|
23
|
-
id: string;
|
|
24
|
-
}
|
|
25
|
-
export interface Coordinate {
|
|
26
|
-
latitude: number;
|
|
27
|
-
longitude: number;
|
|
28
|
-
}
|
|
29
|
-
export interface NoteWrappedPayload {
|
|
30
|
-
data: NoteModel;
|
|
31
|
-
next?: Partial<NoteModel>;
|
|
32
|
-
prev?: Partial<NoteModel>;
|
|
33
|
-
}
|
|
34
|
-
export interface NoteWrappedWithLikedPayload {
|
|
35
|
-
data: ModelWithLiked<NoteModel>;
|
|
36
|
-
next?: Partial<NoteModel>;
|
|
37
|
-
prev?: Partial<NoteModel>;
|
|
38
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../../../models/note.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { TextBaseModel } from './base';
|
|
2
|
-
export declare enum EnumPageType {
|
|
3
|
-
'md' = "md",
|
|
4
|
-
'html' = "html",
|
|
5
|
-
'frame' = "frame"
|
|
6
|
-
}
|
|
7
|
-
export interface PageModel extends TextBaseModel {
|
|
8
|
-
created: string;
|
|
9
|
-
slug: string;
|
|
10
|
-
subtitle?: string;
|
|
11
|
-
order?: number;
|
|
12
|
-
type?: EnumPageType;
|
|
13
|
-
options?: object;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../../models/page.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Count, Image, TextBaseModel } from './base';
|
|
2
|
-
import type { CategoryModel } from './category';
|
|
3
|
-
export interface PostModel extends TextBaseModel {
|
|
4
|
-
summary?: string;
|
|
5
|
-
copyright: boolean;
|
|
6
|
-
tags: string[];
|
|
7
|
-
count: Count;
|
|
8
|
-
text: string;
|
|
9
|
-
title: string;
|
|
10
|
-
slug: string;
|
|
11
|
-
categoryId: string;
|
|
12
|
-
images: Image[];
|
|
13
|
-
category: CategoryModel;
|
|
14
|
-
pin?: string | null;
|
|
15
|
-
pinOrder?: number;
|
|
16
|
-
related?: Pick<PostModel, 'id' | 'category' | 'categoryId' | 'created' | 'modified' | 'title' | 'slug' | 'summary'>[];
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../../models/post.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../models/project.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { BaseCommentIndexModel } from './base';
|
|
2
|
-
export declare enum RecentlyRefTypes {
|
|
3
|
-
Post = "Post",
|
|
4
|
-
Note = "Note",
|
|
5
|
-
Page = "Page"
|
|
6
|
-
}
|
|
7
|
-
export type RecentlyRefType = {
|
|
8
|
-
title: string;
|
|
9
|
-
url: string;
|
|
10
|
-
};
|
|
11
|
-
export interface RecentlyModel extends BaseCommentIndexModel {
|
|
12
|
-
content: string;
|
|
13
|
-
ref?: RecentlyRefType & {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
refId?: string;
|
|
17
|
-
refType?: RecentlyRefTypes;
|
|
18
|
-
up: number;
|
|
19
|
-
down: number;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recently.js","sourceRoot":"","sources":["../../../../models/recently.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;AACf,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
|