@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
package/dist/index.global.js
DELETED
|
@@ -1,1193 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(() => {
|
|
3
|
-
// utils/index.ts
|
|
4
|
-
var isPlainObject = (obj) => isObject(obj) && Object.prototype.toString.call(obj) === "[object Object]" && Object.getPrototypeOf(obj) === Object.prototype;
|
|
5
|
-
var sortOrderToNumber = (order) => {
|
|
6
|
-
return {
|
|
7
|
-
asc: 1,
|
|
8
|
-
desc: -1
|
|
9
|
-
}[order] || 1;
|
|
10
|
-
};
|
|
11
|
-
var isObject = (obj) => obj && typeof obj === "object";
|
|
12
|
-
var destructureData = (payload) => {
|
|
13
|
-
if (typeof payload !== "object") {
|
|
14
|
-
return payload;
|
|
15
|
-
}
|
|
16
|
-
if (payload === null) {
|
|
17
|
-
return payload;
|
|
18
|
-
}
|
|
19
|
-
const data = payload.data;
|
|
20
|
-
const dataIsPlainObject = isPlainObject(data);
|
|
21
|
-
if (dataIsPlainObject && Object.keys(payload).length === 1) {
|
|
22
|
-
const d = Object.assign({}, data);
|
|
23
|
-
attachRawFromOneToAnthor(payload, d);
|
|
24
|
-
return d;
|
|
25
|
-
}
|
|
26
|
-
return payload;
|
|
27
|
-
};
|
|
28
|
-
var attachRawFromOneToAnthor = (from, to) => {
|
|
29
|
-
if (!from || !isObject(to)) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
;
|
|
33
|
-
["$raw", "$request", "$serialized"].forEach((key) => {
|
|
34
|
-
from[key] && Object.defineProperty(to, key, {
|
|
35
|
-
get() {
|
|
36
|
-
return from[key];
|
|
37
|
-
},
|
|
38
|
-
enumerable: false
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// utils/camelcase-keys.ts
|
|
44
|
-
var camelcaseKeys = (obj) => {
|
|
45
|
-
if (Array.isArray(obj)) {
|
|
46
|
-
return obj.map((x) => camelcaseKeys(x));
|
|
47
|
-
}
|
|
48
|
-
if (isPlainObject(obj)) {
|
|
49
|
-
return Object.keys(obj).reduce((result, key) => {
|
|
50
|
-
const nextKey = isMongoId(key) ? key : camelcase(key);
|
|
51
|
-
result[nextKey] = camelcaseKeys(obj[key]);
|
|
52
|
-
return result;
|
|
53
|
-
}, {});
|
|
54
|
-
}
|
|
55
|
-
return obj;
|
|
56
|
-
};
|
|
57
|
-
function camelcase(str) {
|
|
58
|
-
return str.replace(/^_+/, "").replaceAll(/([_-][a-z])/gi, ($1) => {
|
|
59
|
-
return $1.toUpperCase().replace("-", "").replace("_", "");
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
var isMongoId = (id) => id.length === 24 && /^[\dA-Fa-f]{24}$/.test(id);
|
|
63
|
-
|
|
64
|
-
// utils/path.ts
|
|
65
|
-
var resolveFullPath = (endpoint, path) => {
|
|
66
|
-
if (!path.startsWith("/")) {
|
|
67
|
-
path = `/${path}`;
|
|
68
|
-
}
|
|
69
|
-
return `${endpoint}${path}`;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// utils/auto-bind.ts
|
|
73
|
-
var getAllProperties = (object) => {
|
|
74
|
-
const properties = /* @__PURE__ */ new Set();
|
|
75
|
-
do {
|
|
76
|
-
for (const key of Reflect.ownKeys(object)) {
|
|
77
|
-
properties.add([object, key]);
|
|
78
|
-
}
|
|
79
|
-
} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
|
|
80
|
-
return properties;
|
|
81
|
-
};
|
|
82
|
-
function autoBind(self, { include, exclude } = {}) {
|
|
83
|
-
const filter = (key) => {
|
|
84
|
-
const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
|
|
85
|
-
if (include) {
|
|
86
|
-
return include.some(match);
|
|
87
|
-
}
|
|
88
|
-
if (exclude) {
|
|
89
|
-
return !exclude.some(match);
|
|
90
|
-
}
|
|
91
|
-
return true;
|
|
92
|
-
};
|
|
93
|
-
for (const [object, key] of getAllProperties(self.constructor.prototype)) {
|
|
94
|
-
if (key === "constructor" || !filter(key)) {
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
|
|
98
|
-
if (descriptor && typeof descriptor.value === "function") {
|
|
99
|
-
self[key] = self[key].bind(self);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return self;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// controllers/ack.ts
|
|
106
|
-
var AckController = class {
|
|
107
|
-
constructor(client) {
|
|
108
|
-
this.client = client;
|
|
109
|
-
this.base = "ack";
|
|
110
|
-
this.name = "ack";
|
|
111
|
-
autoBind(this);
|
|
112
|
-
}
|
|
113
|
-
get proxy() {
|
|
114
|
-
return this.client.proxy(this.base);
|
|
115
|
-
}
|
|
116
|
-
read(type, id) {
|
|
117
|
-
return this.proxy.post({
|
|
118
|
-
data: {
|
|
119
|
-
type: "read",
|
|
120
|
-
payload: {
|
|
121
|
-
type,
|
|
122
|
-
id
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
// controllers/activity.ts
|
|
130
|
-
var ActivityController = class {
|
|
131
|
-
constructor(client) {
|
|
132
|
-
this.client = client;
|
|
133
|
-
this.base = "activity";
|
|
134
|
-
this.name = "activity";
|
|
135
|
-
autoBind(this);
|
|
136
|
-
}
|
|
137
|
-
get proxy() {
|
|
138
|
-
return this.client.proxy(this.base);
|
|
139
|
-
}
|
|
140
|
-
likeIt(type, id) {
|
|
141
|
-
return this.proxy.like.post({
|
|
142
|
-
data: {
|
|
143
|
-
type: type.toLowerCase(),
|
|
144
|
-
id
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
*
|
|
150
|
-
* @support core >= 5.0.0
|
|
151
|
-
*/
|
|
152
|
-
getPresence(roomName) {
|
|
153
|
-
return this.proxy.presence.get({
|
|
154
|
-
params: {
|
|
155
|
-
room_name: roomName
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
*
|
|
161
|
-
* @support core >= 5.0.0
|
|
162
|
-
*/
|
|
163
|
-
updatePresence({
|
|
164
|
-
identity,
|
|
165
|
-
position,
|
|
166
|
-
roomName,
|
|
167
|
-
sid,
|
|
168
|
-
ts,
|
|
169
|
-
displayName,
|
|
170
|
-
readerId
|
|
171
|
-
}) {
|
|
172
|
-
return this.proxy.presence.update.post({
|
|
173
|
-
data: {
|
|
174
|
-
identity,
|
|
175
|
-
position,
|
|
176
|
-
ts: ts || Date.now(),
|
|
177
|
-
roomName,
|
|
178
|
-
sid,
|
|
179
|
-
readerId,
|
|
180
|
-
displayName
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
async getRoomsInfo() {
|
|
185
|
-
return this.proxy.rooms.get();
|
|
186
|
-
}
|
|
187
|
-
async getRecentActivities() {
|
|
188
|
-
return this.proxy.recent.get();
|
|
189
|
-
}
|
|
190
|
-
async getLastYearPublication() {
|
|
191
|
-
return this.proxy(`last-year`).publication.get();
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// controllers/aggregate.ts
|
|
196
|
-
var AggregateController = class {
|
|
197
|
-
constructor(client) {
|
|
198
|
-
this.client = client;
|
|
199
|
-
this.base = "aggregate";
|
|
200
|
-
this.name = "aggregate";
|
|
201
|
-
autoBind(this);
|
|
202
|
-
}
|
|
203
|
-
get proxy() {
|
|
204
|
-
return this.client.proxy(this.base);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* 获取聚合数据
|
|
208
|
-
*/
|
|
209
|
-
getAggregateData(theme) {
|
|
210
|
-
return this.proxy.get({
|
|
211
|
-
params: {
|
|
212
|
-
theme
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* 获取最新发布的内容
|
|
218
|
-
*/
|
|
219
|
-
getTop(size = 5) {
|
|
220
|
-
return this.proxy.top.get({ params: { size } });
|
|
221
|
-
}
|
|
222
|
-
getTimeline(options) {
|
|
223
|
-
const { sort, type, year } = options || {};
|
|
224
|
-
return this.proxy.timeline.get({
|
|
225
|
-
params: {
|
|
226
|
-
sort: sort && sortOrderToNumber(sort),
|
|
227
|
-
type,
|
|
228
|
-
year
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* 获取聚合数据统计
|
|
234
|
-
*/
|
|
235
|
-
getStat() {
|
|
236
|
-
return this.proxy.stat.get();
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
// controllers/ai.ts
|
|
241
|
-
var AIController = class {
|
|
242
|
-
constructor(client) {
|
|
243
|
-
this.client = client;
|
|
244
|
-
this.base = "ai";
|
|
245
|
-
this.name = "ai";
|
|
246
|
-
autoBind(this);
|
|
247
|
-
}
|
|
248
|
-
get proxy() {
|
|
249
|
-
return this.client.proxy(this.base);
|
|
250
|
-
}
|
|
251
|
-
async getSummary({
|
|
252
|
-
articleId,
|
|
253
|
-
lang = "zh-CN",
|
|
254
|
-
onlyDb
|
|
255
|
-
}) {
|
|
256
|
-
return this.proxy.summaries.article(articleId).get({
|
|
257
|
-
params: {
|
|
258
|
-
lang,
|
|
259
|
-
onlyDb
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
async generateSummary(articleId, lang = "zh-CN", token = "") {
|
|
264
|
-
return this.proxy.summaries.generate.post({
|
|
265
|
-
params: {
|
|
266
|
-
token
|
|
267
|
-
},
|
|
268
|
-
data: {
|
|
269
|
-
lang,
|
|
270
|
-
refId: articleId
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
// core/error.ts
|
|
277
|
-
var RequestError = class extends Error {
|
|
278
|
-
constructor(message, status, path, raw) {
|
|
279
|
-
super(message);
|
|
280
|
-
this.status = status;
|
|
281
|
-
this.path = path;
|
|
282
|
-
this.raw = raw;
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
// models/category.ts
|
|
287
|
-
var CategoryType = /* @__PURE__ */ ((CategoryType2) => {
|
|
288
|
-
CategoryType2[CategoryType2["Category"] = 0] = "Category";
|
|
289
|
-
CategoryType2[CategoryType2["Tag"] = 1] = "Tag";
|
|
290
|
-
return CategoryType2;
|
|
291
|
-
})(CategoryType || {});
|
|
292
|
-
|
|
293
|
-
// controllers/category.ts
|
|
294
|
-
var CategoryController = class {
|
|
295
|
-
constructor(client) {
|
|
296
|
-
this.client = client;
|
|
297
|
-
this.name = "category";
|
|
298
|
-
this.base = "categories";
|
|
299
|
-
autoBind(this);
|
|
300
|
-
}
|
|
301
|
-
get proxy() {
|
|
302
|
-
return this.client.proxy(this.base);
|
|
303
|
-
}
|
|
304
|
-
getAllCategories() {
|
|
305
|
-
return this.proxy.get({
|
|
306
|
-
params: {
|
|
307
|
-
type: 0 /* Category */
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
getAllTags() {
|
|
312
|
-
return this.proxy.get({
|
|
313
|
-
params: {
|
|
314
|
-
type: 1 /* Tag */
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
async getCategoryDetail(ids) {
|
|
319
|
-
if (typeof ids === "string") {
|
|
320
|
-
const data = await this.proxy.get({
|
|
321
|
-
params: {
|
|
322
|
-
ids
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
const result = Object.values(data.entries)[0];
|
|
326
|
-
attachRawFromOneToAnthor(data, result);
|
|
327
|
-
return result;
|
|
328
|
-
} else if (Array.isArray(ids)) {
|
|
329
|
-
const data = await this.proxy.get({
|
|
330
|
-
params: {
|
|
331
|
-
ids: ids.join(",")
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
const entries = data?.entries;
|
|
335
|
-
if (!entries) {
|
|
336
|
-
throw new RequestError(
|
|
337
|
-
"data structure error",
|
|
338
|
-
500,
|
|
339
|
-
data.$request.path,
|
|
340
|
-
data
|
|
341
|
-
);
|
|
342
|
-
}
|
|
343
|
-
const map = new Map(
|
|
344
|
-
Object.entries(entries).map(([id, value]) => [id.toLowerCase(), value])
|
|
345
|
-
);
|
|
346
|
-
attachRawFromOneToAnthor(data, map);
|
|
347
|
-
return map;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
async getCategoryByIdOrSlug(idOrSlug) {
|
|
351
|
-
const res = await this.proxy(idOrSlug).get();
|
|
352
|
-
return destructureData(res);
|
|
353
|
-
}
|
|
354
|
-
async getTagByName(name) {
|
|
355
|
-
const res = await this.proxy(name).get({
|
|
356
|
-
params: {
|
|
357
|
-
tag: 1
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
return res;
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
// controllers/comment.ts
|
|
365
|
-
var CommentController = class {
|
|
366
|
-
constructor(client) {
|
|
367
|
-
this.client = client;
|
|
368
|
-
this.base = "comments";
|
|
369
|
-
this.name = "comment";
|
|
370
|
-
autoBind(this);
|
|
371
|
-
}
|
|
372
|
-
get proxy() {
|
|
373
|
-
return this.client.proxy(this.base);
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* 根据 comment id 获取评论,包括子评论
|
|
377
|
-
*/
|
|
378
|
-
getById(id) {
|
|
379
|
-
return this.proxy(id).get();
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* 获取文章的评论列表
|
|
383
|
-
* @param refId 文章 Id
|
|
384
|
-
*/
|
|
385
|
-
getByRefId(refId, pagination = {}) {
|
|
386
|
-
const { page, size } = pagination;
|
|
387
|
-
return this.proxy.ref(refId).get({
|
|
388
|
-
params: { page: page || 1, size: size || 10 }
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* 评论
|
|
393
|
-
*/
|
|
394
|
-
comment(refId, data) {
|
|
395
|
-
return this.proxy(refId).post({
|
|
396
|
-
data
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* 回复评论
|
|
401
|
-
*/
|
|
402
|
-
reply(commentId, data) {
|
|
403
|
-
return this.proxy.reply(commentId).post({
|
|
404
|
-
data
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
// controllers/base.ts
|
|
410
|
-
var BaseCrudController = class {
|
|
411
|
-
constructor(client) {
|
|
412
|
-
this.client = client;
|
|
413
|
-
autoBind(this);
|
|
414
|
-
}
|
|
415
|
-
get proxy() {
|
|
416
|
-
return this.client.proxy(this.base);
|
|
417
|
-
}
|
|
418
|
-
getById(id) {
|
|
419
|
-
return this.proxy(id).get();
|
|
420
|
-
}
|
|
421
|
-
getAll() {
|
|
422
|
-
return this.proxy.all.get();
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* 带分页的查询
|
|
426
|
-
* @param page
|
|
427
|
-
* @param perPage
|
|
428
|
-
*/
|
|
429
|
-
getAllPaginated(page, perPage, sortOption) {
|
|
430
|
-
return this.proxy.get({
|
|
431
|
-
params: { page, size: perPage, ...sortOption }
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
|
|
436
|
-
// controllers/link.ts
|
|
437
|
-
var LinkController = class extends BaseCrudController {
|
|
438
|
-
constructor(client) {
|
|
439
|
-
super(client);
|
|
440
|
-
this.client = client;
|
|
441
|
-
this.name = ["link", "friend"];
|
|
442
|
-
this.base = "links";
|
|
443
|
-
autoBind(this);
|
|
444
|
-
}
|
|
445
|
-
// 是否可以申请友链
|
|
446
|
-
async canApplyLink() {
|
|
447
|
-
const { can } = await this.proxy.audit.get();
|
|
448
|
-
return can;
|
|
449
|
-
}
|
|
450
|
-
// 申请友链
|
|
451
|
-
async applyLink(data) {
|
|
452
|
-
return await this.proxy.audit.post({ data });
|
|
453
|
-
}
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
// controllers/note.ts
|
|
457
|
-
var NoteController = class {
|
|
458
|
-
constructor(client) {
|
|
459
|
-
this.client = client;
|
|
460
|
-
this.base = "notes";
|
|
461
|
-
this.name = "note";
|
|
462
|
-
autoBind(this);
|
|
463
|
-
}
|
|
464
|
-
get proxy() {
|
|
465
|
-
return this.client.proxy(this.base);
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* 最新日记
|
|
469
|
-
*/
|
|
470
|
-
getLatest() {
|
|
471
|
-
return this.proxy.latest.get();
|
|
472
|
-
}
|
|
473
|
-
getNoteById(...rest) {
|
|
474
|
-
const [id, password = void 0, singleResult = false] = rest;
|
|
475
|
-
if (typeof id === "number") {
|
|
476
|
-
return this.proxy.nid(id.toString()).get({
|
|
477
|
-
params: { password, single: singleResult ? "1" : void 0 }
|
|
478
|
-
});
|
|
479
|
-
} else {
|
|
480
|
-
return this.proxy(id).get();
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* 日记列表分页
|
|
485
|
-
*/
|
|
486
|
-
getList(page = 1, perPage = 10, options = {}) {
|
|
487
|
-
const { select, sortBy, sortOrder, year } = options;
|
|
488
|
-
return this.proxy.get({
|
|
489
|
-
params: {
|
|
490
|
-
page,
|
|
491
|
-
size: perPage,
|
|
492
|
-
select: select?.join(" "),
|
|
493
|
-
sortBy,
|
|
494
|
-
sortOrder,
|
|
495
|
-
year
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* 获取当前日记的上下各 n / 2 篇日记
|
|
501
|
-
*/
|
|
502
|
-
getMiddleList(id, size = 5) {
|
|
503
|
-
return this.proxy.list(id).get({
|
|
504
|
-
params: { size }
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* 获取专栏内的所有日记
|
|
509
|
-
*/
|
|
510
|
-
getNoteByTopicId(topicId, page = 1, size = 10, sortOptions = {}) {
|
|
511
|
-
return this.proxy.topics(topicId).get({
|
|
512
|
-
params: { page, size, ...sortOptions }
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
// controllers/page.ts
|
|
518
|
-
var PageController = class {
|
|
519
|
-
constructor(client) {
|
|
520
|
-
this.client = client;
|
|
521
|
-
this.base = "pages";
|
|
522
|
-
this.name = "page";
|
|
523
|
-
autoBind(this);
|
|
524
|
-
}
|
|
525
|
-
get proxy() {
|
|
526
|
-
return this.client.proxy(this.base);
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* 页面列表
|
|
530
|
-
*/
|
|
531
|
-
getList(page = 1, perPage = 10, options = {}) {
|
|
532
|
-
const { select, sortBy, sortOrder } = options;
|
|
533
|
-
return this.proxy.get({
|
|
534
|
-
params: {
|
|
535
|
-
page,
|
|
536
|
-
size: perPage,
|
|
537
|
-
select: select?.join(" "),
|
|
538
|
-
sortBy,
|
|
539
|
-
sortOrder
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* 页面详情
|
|
545
|
-
*/
|
|
546
|
-
getById(id) {
|
|
547
|
-
return this.proxy(id).get();
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* 根据路径获取页面
|
|
551
|
-
* @param slug 路径
|
|
552
|
-
* @returns
|
|
553
|
-
*/
|
|
554
|
-
getBySlug(slug) {
|
|
555
|
-
return this.proxy.slug(slug).get({});
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
// controllers/post.ts
|
|
560
|
-
var PostController = class {
|
|
561
|
-
constructor(client) {
|
|
562
|
-
this.client = client;
|
|
563
|
-
this.base = "posts";
|
|
564
|
-
this.name = "post";
|
|
565
|
-
autoBind(this);
|
|
566
|
-
}
|
|
567
|
-
get proxy() {
|
|
568
|
-
return this.client.proxy(this.base);
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* 获取文章列表分页
|
|
572
|
-
* @param page
|
|
573
|
-
* @param perPage
|
|
574
|
-
* @returns
|
|
575
|
-
*/
|
|
576
|
-
getList(page = 1, perPage = 10, options = {}) {
|
|
577
|
-
const { select, sortBy, sortOrder, year, truncate } = options;
|
|
578
|
-
return this.proxy.get({
|
|
579
|
-
params: {
|
|
580
|
-
page,
|
|
581
|
-
size: perPage,
|
|
582
|
-
select: select?.join(" "),
|
|
583
|
-
sortBy,
|
|
584
|
-
sortOrder,
|
|
585
|
-
year,
|
|
586
|
-
truncate
|
|
587
|
-
}
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
getPost(idOrCategoryName, slug) {
|
|
591
|
-
if (arguments.length == 1) {
|
|
592
|
-
return this.proxy(idOrCategoryName).get();
|
|
593
|
-
} else {
|
|
594
|
-
return this.proxy(idOrCategoryName)(slug).get();
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
/**
|
|
598
|
-
* 获取最新的文章
|
|
599
|
-
*/
|
|
600
|
-
getLatest() {
|
|
601
|
-
return this.proxy.latest.get();
|
|
602
|
-
}
|
|
603
|
-
getFullUrl(slug) {
|
|
604
|
-
return this.proxy("get-url")(slug).get();
|
|
605
|
-
}
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
// controllers/project.ts
|
|
609
|
-
var ProjectController = class extends BaseCrudController {
|
|
610
|
-
constructor(client) {
|
|
611
|
-
super(client);
|
|
612
|
-
this.client = client;
|
|
613
|
-
this.base = "projects";
|
|
614
|
-
this.name = "project";
|
|
615
|
-
autoBind(this);
|
|
616
|
-
}
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
// controllers/recently.ts
|
|
620
|
-
var RecentlyAttitudeResultEnum = /* @__PURE__ */ ((RecentlyAttitudeResultEnum2) => {
|
|
621
|
-
RecentlyAttitudeResultEnum2[RecentlyAttitudeResultEnum2["Inc"] = 1] = "Inc";
|
|
622
|
-
RecentlyAttitudeResultEnum2[RecentlyAttitudeResultEnum2["Dec"] = -1] = "Dec";
|
|
623
|
-
return RecentlyAttitudeResultEnum2;
|
|
624
|
-
})(RecentlyAttitudeResultEnum || {});
|
|
625
|
-
var RecentlyAttitudeEnum = /* @__PURE__ */ ((RecentlyAttitudeEnum2) => {
|
|
626
|
-
RecentlyAttitudeEnum2[RecentlyAttitudeEnum2["Up"] = 0] = "Up";
|
|
627
|
-
RecentlyAttitudeEnum2[RecentlyAttitudeEnum2["Down"] = 1] = "Down";
|
|
628
|
-
return RecentlyAttitudeEnum2;
|
|
629
|
-
})(RecentlyAttitudeEnum || {});
|
|
630
|
-
var RecentlyController = class {
|
|
631
|
-
constructor(client) {
|
|
632
|
-
this.client = client;
|
|
633
|
-
this.base = "recently";
|
|
634
|
-
this.name = ["recently", "shorthand"];
|
|
635
|
-
autoBind(this);
|
|
636
|
-
}
|
|
637
|
-
get proxy() {
|
|
638
|
-
return this.client.proxy(this.base);
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* 获取最新一条
|
|
642
|
-
*/
|
|
643
|
-
getLatestOne() {
|
|
644
|
-
return this.proxy.latest.get();
|
|
645
|
-
}
|
|
646
|
-
getAll() {
|
|
647
|
-
return this.proxy.all.get();
|
|
648
|
-
}
|
|
649
|
-
getList({
|
|
650
|
-
before,
|
|
651
|
-
after,
|
|
652
|
-
size
|
|
653
|
-
} = {}) {
|
|
654
|
-
return this.proxy.get({
|
|
655
|
-
params: {
|
|
656
|
-
before,
|
|
657
|
-
after,
|
|
658
|
-
size
|
|
659
|
-
}
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
getById(id) {
|
|
663
|
-
return this.proxy(id).get();
|
|
664
|
-
}
|
|
665
|
-
/** 表态:点赞,点踩 */
|
|
666
|
-
attitude(id, attitude) {
|
|
667
|
-
return this.proxy.attitude(id).get({
|
|
668
|
-
params: {
|
|
669
|
-
attitude
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
// controllers/say.ts
|
|
676
|
-
var SayController = class extends BaseCrudController {
|
|
677
|
-
constructor(client) {
|
|
678
|
-
super(client);
|
|
679
|
-
this.client = client;
|
|
680
|
-
this.base = "says";
|
|
681
|
-
this.name = "say";
|
|
682
|
-
autoBind(this);
|
|
683
|
-
}
|
|
684
|
-
get proxy() {
|
|
685
|
-
return this.client.proxy(this.base);
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
* 获取随机一条
|
|
689
|
-
*/
|
|
690
|
-
getRandom() {
|
|
691
|
-
return this.proxy.random.get();
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
|
|
695
|
-
// controllers/search.ts
|
|
696
|
-
var SearchController = class {
|
|
697
|
-
constructor(client) {
|
|
698
|
-
this.client = client;
|
|
699
|
-
this.base = "search";
|
|
700
|
-
this.name = "search";
|
|
701
|
-
autoBind(this);
|
|
702
|
-
}
|
|
703
|
-
get proxy() {
|
|
704
|
-
return this.client.proxy(this.base);
|
|
705
|
-
}
|
|
706
|
-
search(type, keyword, options = {}) {
|
|
707
|
-
return this.proxy(type).get({
|
|
708
|
-
params: { keyword, ...options }
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
/**
|
|
712
|
-
* 从 algolya 搜索
|
|
713
|
-
* https://www.algolia.com/doc/api-reference/api-methods/search/
|
|
714
|
-
* @param keyword
|
|
715
|
-
* @param options
|
|
716
|
-
* @returns
|
|
717
|
-
*/
|
|
718
|
-
searchByAlgolia(keyword, options) {
|
|
719
|
-
return this.proxy("algolia").get({ params: { keyword, ...options } });
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
// controllers/severless.ts
|
|
724
|
-
var ServerlessController = class {
|
|
725
|
-
constructor(client) {
|
|
726
|
-
this.client = client;
|
|
727
|
-
this.base = "serverless";
|
|
728
|
-
this.name = "serverless";
|
|
729
|
-
autoBind(this);
|
|
730
|
-
}
|
|
731
|
-
get proxy() {
|
|
732
|
-
return this.client.proxy(this.base);
|
|
733
|
-
}
|
|
734
|
-
getByReferenceAndName(reference, name) {
|
|
735
|
-
return this.proxy(reference)(name).get();
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
|
|
739
|
-
// controllers/snippet.ts
|
|
740
|
-
var SnippetController = class {
|
|
741
|
-
constructor(client) {
|
|
742
|
-
this.client = client;
|
|
743
|
-
this.base = "snippets";
|
|
744
|
-
this.name = "snippet";
|
|
745
|
-
autoBind(this);
|
|
746
|
-
}
|
|
747
|
-
get proxy() {
|
|
748
|
-
return this.client.proxy(this.base);
|
|
749
|
-
}
|
|
750
|
-
// getById(id: string) {
|
|
751
|
-
// return this.proxy(id).get<Omit<SnippetModel, 'data'>>()
|
|
752
|
-
// }
|
|
753
|
-
getByReferenceAndName(reference, name) {
|
|
754
|
-
return this.proxy(reference)(name).get();
|
|
755
|
-
}
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
// controllers/subscribe.ts
|
|
759
|
-
var SubscribeController = class {
|
|
760
|
-
constructor(client) {
|
|
761
|
-
this.client = client;
|
|
762
|
-
this.base = "subscribe";
|
|
763
|
-
this.name = "subscribe";
|
|
764
|
-
autoBind(this);
|
|
765
|
-
}
|
|
766
|
-
get proxy() {
|
|
767
|
-
return this.client.proxy(this.base);
|
|
768
|
-
}
|
|
769
|
-
/**
|
|
770
|
-
* 检查开启状态
|
|
771
|
-
*/
|
|
772
|
-
check() {
|
|
773
|
-
return this.proxy.status.get();
|
|
774
|
-
}
|
|
775
|
-
subscribe(email, types) {
|
|
776
|
-
return this.proxy.post({
|
|
777
|
-
data: {
|
|
778
|
-
email,
|
|
779
|
-
types
|
|
780
|
-
}
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
unsubscribe(email, cancelToken) {
|
|
784
|
-
return this.proxy.unsubscribe.get({
|
|
785
|
-
params: {
|
|
786
|
-
email,
|
|
787
|
-
cancelToken
|
|
788
|
-
}
|
|
789
|
-
});
|
|
790
|
-
}
|
|
791
|
-
};
|
|
792
|
-
|
|
793
|
-
// controllers/topic.ts
|
|
794
|
-
var TopicController = class extends BaseCrudController {
|
|
795
|
-
constructor(client) {
|
|
796
|
-
super(client);
|
|
797
|
-
this.client = client;
|
|
798
|
-
this.base = "topics";
|
|
799
|
-
this.name = "topic";
|
|
800
|
-
autoBind(this);
|
|
801
|
-
}
|
|
802
|
-
get proxy() {
|
|
803
|
-
return this.client.proxy(this.base);
|
|
804
|
-
}
|
|
805
|
-
getTopicBySlug(slug) {
|
|
806
|
-
return this.proxy.slug(slug).get();
|
|
807
|
-
}
|
|
808
|
-
};
|
|
809
|
-
|
|
810
|
-
// controllers/user.ts
|
|
811
|
-
var UserController = class {
|
|
812
|
-
constructor(client) {
|
|
813
|
-
this.client = client;
|
|
814
|
-
this.base = "master";
|
|
815
|
-
this.name = ["user", "master"];
|
|
816
|
-
autoBind(this);
|
|
817
|
-
}
|
|
818
|
-
get proxy() {
|
|
819
|
-
return this.client.proxy(this.base);
|
|
820
|
-
}
|
|
821
|
-
getMasterInfo() {
|
|
822
|
-
return this.proxy.get();
|
|
823
|
-
}
|
|
824
|
-
login(username, password) {
|
|
825
|
-
return this.proxy.login.post({
|
|
826
|
-
data: {
|
|
827
|
-
username,
|
|
828
|
-
password
|
|
829
|
-
}
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
loginWithToken(token) {
|
|
833
|
-
return this.proxy.login.put({
|
|
834
|
-
params: token ? {
|
|
835
|
-
token: `bearer ${token.replace(/^bearer\s/i, "")}`
|
|
836
|
-
} : void 0
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
checkTokenValid(token) {
|
|
840
|
-
return this.proxy.check_logged.get({
|
|
841
|
-
params: {
|
|
842
|
-
token: `bearer ${token.replace(/^bearer\s/i, "")}`
|
|
843
|
-
}
|
|
844
|
-
});
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
// controllers/index.ts
|
|
849
|
-
var allControllers = [
|
|
850
|
-
AckController,
|
|
851
|
-
ActivityController,
|
|
852
|
-
AggregateController,
|
|
853
|
-
AIController,
|
|
854
|
-
CategoryController,
|
|
855
|
-
CommentController,
|
|
856
|
-
LinkController,
|
|
857
|
-
NoteController,
|
|
858
|
-
PageController,
|
|
859
|
-
PostController,
|
|
860
|
-
ProjectController,
|
|
861
|
-
RecentlyController,
|
|
862
|
-
SayController,
|
|
863
|
-
SearchController,
|
|
864
|
-
ServerlessController,
|
|
865
|
-
SnippetController,
|
|
866
|
-
SubscribeController,
|
|
867
|
-
TopicController,
|
|
868
|
-
UserController
|
|
869
|
-
];
|
|
870
|
-
var allControllerNames = [
|
|
871
|
-
"ai",
|
|
872
|
-
"ack",
|
|
873
|
-
"activity",
|
|
874
|
-
"aggregate",
|
|
875
|
-
"category",
|
|
876
|
-
"comment",
|
|
877
|
-
"link",
|
|
878
|
-
"note",
|
|
879
|
-
"page",
|
|
880
|
-
"post",
|
|
881
|
-
"project",
|
|
882
|
-
"topic",
|
|
883
|
-
"recently",
|
|
884
|
-
"say",
|
|
885
|
-
"search",
|
|
886
|
-
"snippet",
|
|
887
|
-
"serverless",
|
|
888
|
-
"subscribe",
|
|
889
|
-
"user",
|
|
890
|
-
// alias,
|
|
891
|
-
"friend",
|
|
892
|
-
"master",
|
|
893
|
-
"shorthand"
|
|
894
|
-
];
|
|
895
|
-
|
|
896
|
-
// core/attach-request.ts
|
|
897
|
-
function attachRequestMethod(target) {
|
|
898
|
-
Object.defineProperty(target, "$$get", {
|
|
899
|
-
value(url, options) {
|
|
900
|
-
const { params = {}, ...rest } = options;
|
|
901
|
-
const qs = handleSearchParams(params);
|
|
902
|
-
return target.instance.get(`${url}${qs ? `${`?${qs}`}` : ""}`, rest);
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
["put", "post", "patch", "delete"].forEach((method) => {
|
|
906
|
-
Object.defineProperty(target, `$$${method}`, {
|
|
907
|
-
value(path, options) {
|
|
908
|
-
return target.instance[method](path, options);
|
|
909
|
-
}
|
|
910
|
-
});
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
function handleSearchParams(obj) {
|
|
914
|
-
if (!obj && typeof obj !== "object") {
|
|
915
|
-
throw new TypeError("params must be object.");
|
|
916
|
-
}
|
|
917
|
-
if (obj instanceof URLSearchParams) {
|
|
918
|
-
return obj.toString();
|
|
919
|
-
}
|
|
920
|
-
const search = new URLSearchParams();
|
|
921
|
-
Object.entries(obj).forEach(([k, v]) => {
|
|
922
|
-
if (typeof v === "undefined" || Object.prototype.toString.call(v) === "[object Null]") {
|
|
923
|
-
return;
|
|
924
|
-
}
|
|
925
|
-
search.set(k, v);
|
|
926
|
-
});
|
|
927
|
-
return search.toString();
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
// core/client.ts
|
|
931
|
-
var methodPrefix = "_$";
|
|
932
|
-
var HTTPClient = class {
|
|
933
|
-
constructor(_endpoint, _adaptor, options = {}) {
|
|
934
|
-
this._endpoint = _endpoint;
|
|
935
|
-
this._adaptor = _adaptor;
|
|
936
|
-
this.options = options;
|
|
937
|
-
this._endpoint = _endpoint.replace(/\/*$/, "");
|
|
938
|
-
this._proxy = this.buildRoute(this)();
|
|
939
|
-
options.transformResponse || (options.transformResponse = (data) => camelcaseKeys(data));
|
|
940
|
-
options.getDataFromResponse || (options.getDataFromResponse = (res) => res.data);
|
|
941
|
-
this.initGetClient();
|
|
942
|
-
attachRequestMethod(this);
|
|
943
|
-
}
|
|
944
|
-
initGetClient() {
|
|
945
|
-
for (const name of allControllerNames) {
|
|
946
|
-
Object.defineProperty(this, name, {
|
|
947
|
-
get() {
|
|
948
|
-
const client = Reflect.get(this, `${methodPrefix}${name}`);
|
|
949
|
-
if (!client) {
|
|
950
|
-
throw new ReferenceError(
|
|
951
|
-
`${name.charAt(0).toUpperCase() + name.slice(1)} Client not inject yet, please inject with client.injectClients(...)`
|
|
952
|
-
);
|
|
953
|
-
}
|
|
954
|
-
return client;
|
|
955
|
-
},
|
|
956
|
-
configurable: false,
|
|
957
|
-
enumerable: false
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
injectControllers(Controller, ...rest) {
|
|
962
|
-
Controller = Array.isArray(Controller) ? Controller : [Controller, ...rest];
|
|
963
|
-
for (const Client of Controller) {
|
|
964
|
-
const cl = new Client(this);
|
|
965
|
-
if (Array.isArray(cl.name)) {
|
|
966
|
-
for (const name of cl.name) {
|
|
967
|
-
attach.call(this, name, cl);
|
|
968
|
-
}
|
|
969
|
-
} else {
|
|
970
|
-
attach.call(this, cl.name, cl);
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
function attach(name, cl) {
|
|
974
|
-
Object.defineProperty(this, `${methodPrefix}${name.toLowerCase()}`, {
|
|
975
|
-
get() {
|
|
976
|
-
return cl;
|
|
977
|
-
},
|
|
978
|
-
enumerable: false,
|
|
979
|
-
configurable: false
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
get endpoint() {
|
|
984
|
-
return this._endpoint;
|
|
985
|
-
}
|
|
986
|
-
get instance() {
|
|
987
|
-
return this._adaptor;
|
|
988
|
-
}
|
|
989
|
-
request(options) {
|
|
990
|
-
return this[`$$${String(options.method || "get").toLowerCase()}`](
|
|
991
|
-
options.url,
|
|
992
|
-
options
|
|
993
|
-
);
|
|
994
|
-
}
|
|
995
|
-
get proxy() {
|
|
996
|
-
return this._proxy;
|
|
997
|
-
}
|
|
998
|
-
buildRoute(manager) {
|
|
999
|
-
const noop = () => {
|
|
1000
|
-
};
|
|
1001
|
-
const methods = ["get", "post", "delete", "patch", "put"];
|
|
1002
|
-
const reflectors = [
|
|
1003
|
-
"toString",
|
|
1004
|
-
"valueOf",
|
|
1005
|
-
"inspect",
|
|
1006
|
-
"constructor",
|
|
1007
|
-
Symbol.toPrimitive
|
|
1008
|
-
];
|
|
1009
|
-
const that = this;
|
|
1010
|
-
return () => {
|
|
1011
|
-
const route = [""];
|
|
1012
|
-
const handler = {
|
|
1013
|
-
get(target, name) {
|
|
1014
|
-
if (reflectors.includes(name))
|
|
1015
|
-
return (withBase) => {
|
|
1016
|
-
if (withBase) {
|
|
1017
|
-
const path = resolveFullPath(that.endpoint, route.join("/"));
|
|
1018
|
-
route.length = 0;
|
|
1019
|
-
return path;
|
|
1020
|
-
} else {
|
|
1021
|
-
const path = route.join("/");
|
|
1022
|
-
route.length = 0;
|
|
1023
|
-
return path.startsWith("/") ? path : `/${path}`;
|
|
1024
|
-
}
|
|
1025
|
-
};
|
|
1026
|
-
if (methods.includes(name)) {
|
|
1027
|
-
return async (options) => {
|
|
1028
|
-
const url = resolveFullPath(that.endpoint, route.join("/"));
|
|
1029
|
-
route.length = 0;
|
|
1030
|
-
let res;
|
|
1031
|
-
try {
|
|
1032
|
-
res = await manager.request({
|
|
1033
|
-
method: name,
|
|
1034
|
-
...options,
|
|
1035
|
-
url
|
|
1036
|
-
});
|
|
1037
|
-
} catch (error) {
|
|
1038
|
-
let message = error.message;
|
|
1039
|
-
let code = error.code || error.status || error.statusCode || error.response?.status || error.response?.statusCode || error.response?.code || 500;
|
|
1040
|
-
if (that.options.getCodeMessageFromException) {
|
|
1041
|
-
const errorInfo = that.options.getCodeMessageFromException(error);
|
|
1042
|
-
message = errorInfo.message || message;
|
|
1043
|
-
code = errorInfo.code || code;
|
|
1044
|
-
}
|
|
1045
|
-
throw that.options.customThrowResponseError ? that.options.customThrowResponseError(error) : new RequestError(message, code, url, error);
|
|
1046
|
-
}
|
|
1047
|
-
const data = that.options.getDataFromResponse(res);
|
|
1048
|
-
if (!data) {
|
|
1049
|
-
return null;
|
|
1050
|
-
}
|
|
1051
|
-
const cameledObject = (Array.isArray(data) || isPlainObject(data)) && that.options.transformResponse ? that.options.transformResponse(data) : data;
|
|
1052
|
-
let nextObject = cameledObject;
|
|
1053
|
-
if (cameledObject && typeof cameledObject === "object") {
|
|
1054
|
-
nextObject = Array.isArray(cameledObject) ? [...cameledObject] : { ...cameledObject };
|
|
1055
|
-
Object.defineProperty(nextObject, "$raw", {
|
|
1056
|
-
get() {
|
|
1057
|
-
return res;
|
|
1058
|
-
},
|
|
1059
|
-
enumerable: false,
|
|
1060
|
-
configurable: false
|
|
1061
|
-
});
|
|
1062
|
-
Object.defineProperty(nextObject, "$request", {
|
|
1063
|
-
get() {
|
|
1064
|
-
return {
|
|
1065
|
-
url,
|
|
1066
|
-
method: name,
|
|
1067
|
-
options
|
|
1068
|
-
};
|
|
1069
|
-
},
|
|
1070
|
-
enumerable: false
|
|
1071
|
-
});
|
|
1072
|
-
Object.defineProperty(nextObject, "$serialized", {
|
|
1073
|
-
get() {
|
|
1074
|
-
return cameledObject;
|
|
1075
|
-
}
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
return nextObject;
|
|
1079
|
-
};
|
|
1080
|
-
}
|
|
1081
|
-
route.push(name);
|
|
1082
|
-
return new Proxy(noop, handler);
|
|
1083
|
-
},
|
|
1084
|
-
// @ts-ignore
|
|
1085
|
-
apply(target, _, args) {
|
|
1086
|
-
route.push(...args.filter((x) => x !== null));
|
|
1087
|
-
return new Proxy(noop, handler);
|
|
1088
|
-
}
|
|
1089
|
-
};
|
|
1090
|
-
return new Proxy(noop, handler);
|
|
1091
|
-
};
|
|
1092
|
-
}
|
|
1093
|
-
};
|
|
1094
|
-
function createClient(adapter) {
|
|
1095
|
-
return (endpoint, options) => {
|
|
1096
|
-
const client = new HTTPClient(
|
|
1097
|
-
endpoint,
|
|
1098
|
-
adapter,
|
|
1099
|
-
options
|
|
1100
|
-
);
|
|
1101
|
-
const { controllers } = options || {};
|
|
1102
|
-
if (controllers) {
|
|
1103
|
-
client.injectControllers(controllers);
|
|
1104
|
-
}
|
|
1105
|
-
return client;
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
// models/aggregate.ts
|
|
1110
|
-
var TimelineType = /* @__PURE__ */ ((TimelineType2) => {
|
|
1111
|
-
TimelineType2[TimelineType2["Post"] = 0] = "Post";
|
|
1112
|
-
TimelineType2[TimelineType2["Note"] = 1] = "Note";
|
|
1113
|
-
return TimelineType2;
|
|
1114
|
-
})(TimelineType || {});
|
|
1115
|
-
|
|
1116
|
-
// ../../apps/core/src/constants/db.constant.ts
|
|
1117
|
-
var POST_COLLECTION_NAME = "posts";
|
|
1118
|
-
var NOTE_COLLECTION_NAME = "notes";
|
|
1119
|
-
var PAGE_COLLECTION_NAME = "pages";
|
|
1120
|
-
var RECENTLY_COLLECTION_NAME = "recentlies";
|
|
1121
|
-
var CollectionRefTypes = /* @__PURE__ */ ((CollectionRefTypes2) => {
|
|
1122
|
-
CollectionRefTypes2[CollectionRefTypes2["Post"] = POST_COLLECTION_NAME] = "Post";
|
|
1123
|
-
CollectionRefTypes2[CollectionRefTypes2["Note"] = NOTE_COLLECTION_NAME] = "Note";
|
|
1124
|
-
CollectionRefTypes2[CollectionRefTypes2["Page"] = PAGE_COLLECTION_NAME] = "Page";
|
|
1125
|
-
CollectionRefTypes2[CollectionRefTypes2["Recently"] = RECENTLY_COLLECTION_NAME] = "Recently";
|
|
1126
|
-
return CollectionRefTypes2;
|
|
1127
|
-
})(CollectionRefTypes || {});
|
|
1128
|
-
|
|
1129
|
-
// models/comment.ts
|
|
1130
|
-
var CommentState = /* @__PURE__ */ ((CommentState2) => {
|
|
1131
|
-
CommentState2[CommentState2["Unread"] = 0] = "Unread";
|
|
1132
|
-
CommentState2[CommentState2["Read"] = 1] = "Read";
|
|
1133
|
-
CommentState2[CommentState2["Junk"] = 2] = "Junk";
|
|
1134
|
-
return CommentState2;
|
|
1135
|
-
})(CommentState || {});
|
|
1136
|
-
|
|
1137
|
-
// models/link.ts
|
|
1138
|
-
var LinkType = /* @__PURE__ */ ((LinkType2) => {
|
|
1139
|
-
LinkType2[LinkType2["Friend"] = 0] = "Friend";
|
|
1140
|
-
LinkType2[LinkType2["Collection"] = 1] = "Collection";
|
|
1141
|
-
return LinkType2;
|
|
1142
|
-
})(LinkType || {});
|
|
1143
|
-
var LinkState = /* @__PURE__ */ ((LinkState2) => {
|
|
1144
|
-
LinkState2[LinkState2["Pass"] = 0] = "Pass";
|
|
1145
|
-
LinkState2[LinkState2["Audit"] = 1] = "Audit";
|
|
1146
|
-
LinkState2[LinkState2["Outdate"] = 2] = "Outdate";
|
|
1147
|
-
LinkState2[LinkState2["Banned"] = 3] = "Banned";
|
|
1148
|
-
LinkState2[LinkState2["Reject"] = 4] = "Reject";
|
|
1149
|
-
return LinkState2;
|
|
1150
|
-
})(LinkState || {});
|
|
1151
|
-
|
|
1152
|
-
// models/page.ts
|
|
1153
|
-
var EnumPageType = /* @__PURE__ */ ((EnumPageType2) => {
|
|
1154
|
-
EnumPageType2["md"] = "md";
|
|
1155
|
-
EnumPageType2["html"] = "html";
|
|
1156
|
-
EnumPageType2["frame"] = "frame";
|
|
1157
|
-
return EnumPageType2;
|
|
1158
|
-
})(EnumPageType || {});
|
|
1159
|
-
|
|
1160
|
-
// models/recently.ts
|
|
1161
|
-
var RecentlyRefTypes = /* @__PURE__ */ ((RecentlyRefTypes2) => {
|
|
1162
|
-
RecentlyRefTypes2["Post"] = "Post";
|
|
1163
|
-
RecentlyRefTypes2["Note"] = "Note";
|
|
1164
|
-
RecentlyRefTypes2["Page"] = "Page";
|
|
1165
|
-
return RecentlyRefTypes2;
|
|
1166
|
-
})(RecentlyRefTypes || {});
|
|
1167
|
-
|
|
1168
|
-
// models/snippet.ts
|
|
1169
|
-
var SnippetType = /* @__PURE__ */ ((SnippetType2) => {
|
|
1170
|
-
SnippetType2["JSON"] = "json";
|
|
1171
|
-
SnippetType2["Function"] = "function";
|
|
1172
|
-
SnippetType2["Text"] = "text";
|
|
1173
|
-
SnippetType2["YAML"] = "yaml";
|
|
1174
|
-
return SnippetType2;
|
|
1175
|
-
})(SnippetType || {});
|
|
1176
|
-
|
|
1177
|
-
// ../../apps/core/src/modules/subscribe/subscribe.constant.ts
|
|
1178
|
-
var SubscribePostCreateBit = Math.trunc(1);
|
|
1179
|
-
var SubscribeNoteCreateBit = 1 << 1;
|
|
1180
|
-
var SubscribeSayCreateBit = 1 << 2;
|
|
1181
|
-
var SubscribeRecentCreateBit = 1 << 3;
|
|
1182
|
-
var SubscribeAllBit = SubscribePostCreateBit | SubscribeNoteCreateBit | SubscribeSayCreateBit | SubscribeRecentCreateBit;
|
|
1183
|
-
var SubscribeTypeToBitMap = {
|
|
1184
|
-
post_c: SubscribePostCreateBit,
|
|
1185
|
-
note_c: SubscribeNoteCreateBit,
|
|
1186
|
-
say_c: SubscribeSayCreateBit,
|
|
1187
|
-
recently_c: SubscribeRecentCreateBit,
|
|
1188
|
-
all: SubscribeAllBit
|
|
1189
|
-
};
|
|
1190
|
-
|
|
1191
|
-
// index.ts
|
|
1192
|
-
var api_client_default = createClient;
|
|
1193
|
-
})();
|