@mx-space/api-client 1.3.5 → 1.4.1
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/.eslintcache +1 -1
- package/controllers/aggregate.ts +7 -7
- package/controllers/base.ts +4 -4
- package/controllers/category.ts +12 -11
- package/controllers/comment.ts +9 -9
- package/controllers/link.ts +4 -3
- package/controllers/note.ts +9 -9
- package/controllers/page.ts +8 -8
- package/controllers/post.ts +8 -8
- package/controllers/project.ts +4 -3
- package/controllers/recently.ts +6 -6
- package/controllers/say.ts +6 -5
- package/controllers/search.ts +9 -9
- package/controllers/severless.ts +5 -5
- package/controllers/snippet.ts +5 -5
- package/controllers/subscribe.ts +6 -6
- package/controllers/topic.ts +6 -5
- package/controllers/user.ts +6 -6
- package/coverage/clover.xml +591 -0
- package/coverage/coverage-final.json +5944 -0
- package/coverage/lcov-report/adaptors/axios.ts.html +201 -0
- package/coverage/lcov-report/adaptors/index.html +196 -0
- package/coverage/lcov-report/adaptors/umi-request.ts.html +186 -0
- package/coverage/lcov-report/auto-bind.ts.html +228 -0
- package/coverage/lcov-report/base.css +354 -0
- package/coverage/lcov-report/block-navigation.js +85 -0
- package/coverage/lcov-report/controllers/aggregate.ts.html +294 -0
- package/coverage/lcov-report/controllers/base.ts.html +183 -0
- package/coverage/lcov-report/controllers/category.ts.html +441 -0
- package/coverage/lcov-report/controllers/comment.ts.html +291 -0
- package/coverage/lcov-report/controllers/index.html +476 -0
- package/coverage/lcov-report/controllers/index.ts.html +297 -0
- package/coverage/lcov-report/controllers/link.ts.html +216 -0
- package/coverage/lcov-report/controllers/note.ts.html +375 -0
- package/coverage/lcov-report/controllers/page.ts.html +279 -0
- package/coverage/lcov-report/controllers/post.ts.html +369 -0
- package/coverage/lcov-report/controllers/project.ts.html +168 -0
- package/coverage/lcov-report/controllers/recently.ts.html +246 -0
- package/coverage/lcov-report/controllers/say.ts.html +207 -0
- package/coverage/lcov-report/controllers/search.ts.html +411 -0
- package/coverage/lcov-report/controllers/severless.ts.html +180 -0
- package/coverage/lcov-report/controllers/snippet.ts.html +195 -0
- package/coverage/lcov-report/controllers/user.ts.html +240 -0
- package/coverage/lcov-report/core/attach-request.ts.html +216 -0
- package/coverage/lcov-report/core/client.ts.html +786 -0
- package/coverage/lcov-report/core/error.ts.html +117 -0
- package/coverage/lcov-report/core/index.html +236 -0
- package/coverage/lcov-report/core/index.ts.html +93 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +276 -0
- package/coverage/lcov-report/index.ts.html +243 -0
- package/coverage/lcov-report/models/aggregate.ts.html +300 -0
- package/coverage/lcov-report/models/category.ts.html +162 -0
- package/coverage/lcov-report/models/index.html +196 -0
- package/coverage/lcov-report/prettify.css +101 -0
- package/coverage/lcov-report/prettify.js +1004 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +191 -0
- package/coverage/lcov-report/utils/auto-bind.ts.html +231 -0
- package/coverage/lcov-report/utils/index.html +216 -0
- package/coverage/lcov-report/utils/index.ts.html +246 -0
- package/coverage/lcov-report/utils/path.ts.html +105 -0
- package/coverage/lcov.info +1209 -0
- package/dist/adaptors/axios.d.ts +1 -1
- package/dist/adaptors/axios.global.js +146 -95
- package/dist/adaptors/ky.global.js +13 -12
- package/dist/adaptors/umi-request.d.ts +1 -1
- package/dist/adaptors/umi-request.global.js +22 -13
- package/dist/index.cjs +21 -13
- package/dist/index.d.ts +22 -193
- package/dist/index.global.js +21 -13
- package/dist/index.js +21 -13
- package/interfaces/adapter.ts +1 -1
- package/interfaces/client.ts +2 -2
- package/interfaces/request.ts +3 -1
- package/models/aggregate.ts +20 -9
- package/models/base.ts +0 -2
- package/models/category.ts +2 -2
- package/models/comment.ts +2 -2
- package/models/link.ts +1 -1
- package/models/note.ts +2 -2
- package/models/page.ts +1 -1
- package/models/post.ts +2 -2
- package/models/project.ts +1 -1
- package/models/recently.ts +1 -1
- package/models/say.ts +1 -1
- package/models/snippet.ts +1 -1
- package/models/subscribe.ts +1 -1
- package/models/topic.ts +1 -1
- package/models/user.ts +1 -1
- package/package.json +10 -23
- package/tsconfig.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
3
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/errors/HTTPError.js
|
|
4
4
|
var HTTPError = class extends Error {
|
|
5
5
|
constructor(response, request, options) {
|
|
6
6
|
const code = response.status || response.status === 0 ? response.status : "";
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
36
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/errors/TimeoutError.js
|
|
37
37
|
var TimeoutError = class extends Error {
|
|
38
38
|
constructor(request) {
|
|
39
39
|
super("Request timed out");
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
51
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/utils/is.js
|
|
52
52
|
var isObject = (value) => value !== null && typeof value === "object";
|
|
53
53
|
|
|
54
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
54
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/utils/merge.js
|
|
55
55
|
var validateAndMerge = (...sources) => {
|
|
56
56
|
for (const source of sources) {
|
|
57
57
|
if ((!isObject(source) || Array.isArray(source)) && typeof source !== "undefined") {
|
|
@@ -98,12 +98,13 @@
|
|
|
98
98
|
return returnValue;
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
101
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/core/constants.js
|
|
102
102
|
var supportsRequestStreams = (() => {
|
|
103
103
|
let duplexAccessed = false;
|
|
104
104
|
let hasContentType = false;
|
|
105
105
|
const supportsReadableStream = typeof globalThis.ReadableStream === "function";
|
|
106
|
-
|
|
106
|
+
const supportsRequest = typeof globalThis.Request === "function";
|
|
107
|
+
if (supportsReadableStream && supportsRequest) {
|
|
107
108
|
hasContentType = new globalThis.Request("https://a.com", {
|
|
108
109
|
body: new globalThis.ReadableStream(),
|
|
109
110
|
method: "POST",
|
|
@@ -132,7 +133,7 @@
|
|
|
132
133
|
var maxSafeTimeout = 2147483647;
|
|
133
134
|
var stop = Symbol("stop");
|
|
134
135
|
|
|
135
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
136
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/utils/normalize.js
|
|
136
137
|
var normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;
|
|
137
138
|
var retryMethods = ["get", "put", "head", "delete", "options", "trace"];
|
|
138
139
|
var retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];
|
|
@@ -165,7 +166,7 @@
|
|
|
165
166
|
};
|
|
166
167
|
};
|
|
167
168
|
|
|
168
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
169
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/utils/timeout.js
|
|
169
170
|
async function timeout(request, abortController, options) {
|
|
170
171
|
return new Promise((resolve, reject) => {
|
|
171
172
|
const timeoutId = setTimeout(() => {
|
|
@@ -180,7 +181,7 @@
|
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
183
|
|
|
183
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
184
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/errors/DOMException.js
|
|
184
185
|
var isDomExceptionSupported = Boolean(globalThis.DOMException);
|
|
185
186
|
function composeAbortError(signal) {
|
|
186
187
|
if (isDomExceptionSupported) {
|
|
@@ -191,7 +192,7 @@
|
|
|
191
192
|
return error;
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
195
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/utils/delay.js
|
|
195
196
|
async function delay(ms, { signal }) {
|
|
196
197
|
return new Promise((resolve, reject) => {
|
|
197
198
|
if (signal) {
|
|
@@ -212,7 +213,7 @@
|
|
|
212
213
|
});
|
|
213
214
|
}
|
|
214
215
|
|
|
215
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
216
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/core/Ky.js
|
|
216
217
|
var Ky = class {
|
|
217
218
|
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
|
218
219
|
static create(input, options) {
|
|
@@ -484,7 +485,7 @@
|
|
|
484
485
|
}
|
|
485
486
|
};
|
|
486
487
|
|
|
487
|
-
// ../../node_modules/.pnpm/ky@0.33.
|
|
488
|
+
// ../../node_modules/.pnpm/ky@0.33.3/node_modules/ky/distribution/index.js
|
|
488
489
|
var createInstance = (defaults) => {
|
|
489
490
|
const ky2 = (input, options) => Ky.create(input, validateAndMerge(defaults, options));
|
|
490
491
|
for (const method of requestMethods) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RequestMethod, RequestResponse } from 'umi-request';
|
|
2
1
|
import { I as IRequestAdapter } from '../adapter-be44aa1e.js';
|
|
2
|
+
import { RequestMethod, RequestResponse } from 'umi-request';
|
|
3
3
|
|
|
4
4
|
declare const umiAdaptor: IRequestAdapter<RequestMethod<true>, RequestResponse>;
|
|
5
5
|
|
|
@@ -177,9 +177,9 @@
|
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
// ../../node_modules/.pnpm/get-intrinsic@1.
|
|
180
|
+
// ../../node_modules/.pnpm/get-intrinsic@1.2.0/node_modules/get-intrinsic/index.js
|
|
181
181
|
var require_get_intrinsic = __commonJS({
|
|
182
|
-
"../../node_modules/.pnpm/get-intrinsic@1.
|
|
182
|
+
"../../node_modules/.pnpm/get-intrinsic@1.2.0/node_modules/get-intrinsic/index.js"(exports, module) {
|
|
183
183
|
"use strict";
|
|
184
184
|
var undefined2;
|
|
185
185
|
var $SyntaxError = SyntaxError;
|
|
@@ -232,6 +232,8 @@
|
|
|
232
232
|
"%AsyncIteratorPrototype%": needsEval,
|
|
233
233
|
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
234
234
|
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
235
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
236
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
235
237
|
"%Boolean%": Boolean,
|
|
236
238
|
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
237
239
|
"%Date%": Date,
|
|
@@ -287,6 +289,13 @@
|
|
|
287
289
|
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
288
290
|
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
|
|
289
291
|
};
|
|
292
|
+
try {
|
|
293
|
+
null.error;
|
|
294
|
+
} catch (e) {
|
|
295
|
+
errorProto = getProto(getProto(e));
|
|
296
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
297
|
+
}
|
|
298
|
+
var errorProto;
|
|
290
299
|
var doEval = function doEval2(name) {
|
|
291
300
|
var value;
|
|
292
301
|
if (name === "%AsyncFunction%") {
|
|
@@ -1160,9 +1169,9 @@
|
|
|
1160
1169
|
}
|
|
1161
1170
|
});
|
|
1162
1171
|
|
|
1163
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1172
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/formats.js
|
|
1164
1173
|
var require_formats = __commonJS({
|
|
1165
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1174
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/formats.js"(exports, module) {
|
|
1166
1175
|
"use strict";
|
|
1167
1176
|
var replace = String.prototype.replace;
|
|
1168
1177
|
var percentTwenties = /%20/g;
|
|
@@ -1186,9 +1195,9 @@
|
|
|
1186
1195
|
}
|
|
1187
1196
|
});
|
|
1188
1197
|
|
|
1189
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1198
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/utils.js
|
|
1190
1199
|
var require_utils = __commonJS({
|
|
1191
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1200
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/utils.js"(exports, module) {
|
|
1192
1201
|
"use strict";
|
|
1193
1202
|
var formats = require_formats();
|
|
1194
1203
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1385,9 +1394,9 @@
|
|
|
1385
1394
|
}
|
|
1386
1395
|
});
|
|
1387
1396
|
|
|
1388
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1397
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/stringify.js
|
|
1389
1398
|
var require_stringify = __commonJS({
|
|
1390
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1399
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/stringify.js"(exports, module) {
|
|
1391
1400
|
"use strict";
|
|
1392
1401
|
var getSideChannel = require_side_channel();
|
|
1393
1402
|
var utils = require_utils();
|
|
@@ -1642,9 +1651,9 @@
|
|
|
1642
1651
|
}
|
|
1643
1652
|
});
|
|
1644
1653
|
|
|
1645
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1654
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/parse.js
|
|
1646
1655
|
var require_parse = __commonJS({
|
|
1647
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1656
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/parse.js"(exports, module) {
|
|
1648
1657
|
"use strict";
|
|
1649
1658
|
var utils = require_utils();
|
|
1650
1659
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1681,7 +1690,7 @@
|
|
|
1681
1690
|
var isoSentinel = "utf8=%26%2310003%3B";
|
|
1682
1691
|
var charsetSentinel = "utf8=%E2%9C%93";
|
|
1683
1692
|
var parseValues = function parseQueryStringValues(str, options) {
|
|
1684
|
-
var obj = {};
|
|
1693
|
+
var obj = { __proto__: null };
|
|
1685
1694
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
|
|
1686
1695
|
var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
|
|
1687
1696
|
var parts = cleanStr.split(options.delimiter, limit);
|
|
@@ -1844,9 +1853,9 @@
|
|
|
1844
1853
|
}
|
|
1845
1854
|
});
|
|
1846
1855
|
|
|
1847
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1856
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/index.js
|
|
1848
1857
|
var require_lib = __commonJS({
|
|
1849
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1858
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/index.js"(exports, module) {
|
|
1850
1859
|
"use strict";
|
|
1851
1860
|
var stringify2 = require_stringify();
|
|
1852
1861
|
var parse2 = require_parse();
|
package/dist/index.cjs
CHANGED
|
@@ -92,13 +92,14 @@ var attachRawFromOneToAnthor = (from, to) => {
|
|
|
92
92
|
if (!from || !isObject(to)) {
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
;
|
|
96
|
+
["$raw", "$request", "$serialized"].forEach((key) => {
|
|
97
|
+
from[key] && Object.defineProperty(to, key, {
|
|
98
|
+
get() {
|
|
99
|
+
return from[key];
|
|
100
|
+
},
|
|
101
|
+
enumerable: false
|
|
102
|
+
});
|
|
102
103
|
});
|
|
103
104
|
};
|
|
104
105
|
|
|
@@ -972,16 +973,18 @@ var HTTPClient = class {
|
|
|
972
973
|
if (!data) {
|
|
973
974
|
return null;
|
|
974
975
|
}
|
|
975
|
-
const
|
|
976
|
-
|
|
977
|
-
|
|
976
|
+
const cameledObject = (Array.isArray(data) || isPlainObject(data)) && that.options.transformResponse ? that.options.transformResponse(data) : data;
|
|
977
|
+
let nextObject = cameledObject;
|
|
978
|
+
if (cameledObject && typeof cameledObject === "object") {
|
|
979
|
+
nextObject = { ...cameledObject };
|
|
980
|
+
Object.defineProperty(nextObject, "$raw", {
|
|
978
981
|
get() {
|
|
979
982
|
return res;
|
|
980
983
|
},
|
|
981
984
|
enumerable: false,
|
|
982
985
|
configurable: false
|
|
983
986
|
});
|
|
984
|
-
Object.defineProperty(
|
|
987
|
+
Object.defineProperty(nextObject, "$request", {
|
|
985
988
|
get() {
|
|
986
989
|
return {
|
|
987
990
|
url,
|
|
@@ -991,8 +994,13 @@ var HTTPClient = class {
|
|
|
991
994
|
},
|
|
992
995
|
enumerable: false
|
|
993
996
|
});
|
|
997
|
+
Object.defineProperty(nextObject, "$serialized", {
|
|
998
|
+
get() {
|
|
999
|
+
return cameledObject;
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
994
1002
|
}
|
|
995
|
-
return
|
|
1003
|
+
return nextObject;
|
|
996
1004
|
};
|
|
997
1005
|
}
|
|
998
1006
|
route.push(name);
|
|
@@ -1084,7 +1092,7 @@ var SnippetType = /* @__PURE__ */ ((SnippetType2) => {
|
|
|
1084
1092
|
return SnippetType2;
|
|
1085
1093
|
})(SnippetType || {});
|
|
1086
1094
|
|
|
1087
|
-
// ../../src/modules/subscribe/subscribe.constant.ts
|
|
1095
|
+
// ../../apps/core/src/modules/subscribe/subscribe.constant.ts
|
|
1088
1096
|
var SubscribePostCreateBit = 1 << 0;
|
|
1089
1097
|
var SubscribeNoteCreateBit = 1 << 1;
|
|
1090
1098
|
var SubscribeSayCreateBit = 1 << 2;
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ type ResponseWrapperType<Response, RawData, T> = {
|
|
|
57
57
|
method: string;
|
|
58
58
|
[k: string]: string;
|
|
59
59
|
};
|
|
60
|
+
$serialized: T;
|
|
60
61
|
};
|
|
61
62
|
type ResponseProxyExtraRaw<T, RawData = unknown, Response = unknown> = T extends object ? T & ResponseWrapperType<Response, RawData, T> : T extends unknown ? T & ResponseWrapperType<Response, RawData, T> : unknown;
|
|
62
63
|
|
|
@@ -129,7 +130,6 @@ interface TextBaseModel extends BaseCommentIndexModel {
|
|
|
129
130
|
text: string;
|
|
130
131
|
images?: Image[];
|
|
131
132
|
modified: string | null;
|
|
132
|
-
meta?: Record<string, any>;
|
|
133
133
|
}
|
|
134
134
|
type ModelWithLiked<T> = T & {
|
|
135
135
|
liked: boolean;
|
|
@@ -336,9 +336,13 @@ interface Url {
|
|
|
336
336
|
serverUrl: string;
|
|
337
337
|
webUrl: string;
|
|
338
338
|
}
|
|
339
|
+
interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {
|
|
340
|
+
}
|
|
341
|
+
interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images'> {
|
|
342
|
+
}
|
|
339
343
|
interface AggregateTop {
|
|
340
|
-
notes:
|
|
341
|
-
posts:
|
|
344
|
+
notes: AggregateTopNote[];
|
|
345
|
+
posts: AggregateTopPost[];
|
|
342
346
|
says: SayModel[];
|
|
343
347
|
}
|
|
344
348
|
declare enum TimelineType {
|
|
@@ -485,6 +489,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
485
489
|
path: string;
|
|
486
490
|
method: string;
|
|
487
491
|
};
|
|
492
|
+
$serialized: CategoryWithChildrenModel;
|
|
488
493
|
}>;
|
|
489
494
|
getTagByName(name: string): Promise<{
|
|
490
495
|
tag: string;
|
|
@@ -536,6 +541,10 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
536
541
|
path: string;
|
|
537
542
|
method: string;
|
|
538
543
|
};
|
|
544
|
+
$serialized: {
|
|
545
|
+
tag: string;
|
|
546
|
+
data: Pick<PostModel, 'id' | 'title' | 'slug' | 'category' | 'created'>[];
|
|
547
|
+
};
|
|
539
548
|
}>;
|
|
540
549
|
}
|
|
541
550
|
|
|
@@ -766,11 +775,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
766
775
|
[key: string]: any;
|
|
767
776
|
data: NoteWrappedWithLikedPayload;
|
|
768
777
|
} : ResponseWrapper extends {
|
|
769
|
-
data: NoteWrappedWithLikedPayload;
|
|
770
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
771
|
-
* @param id id | nid
|
|
772
|
-
* @param password 访问密码
|
|
773
|
-
*/
|
|
778
|
+
data: NoteWrappedWithLikedPayload;
|
|
774
779
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
775
780
|
data: NoteWrappedWithLikedPayload;
|
|
776
781
|
}>;
|
|
@@ -791,11 +796,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
791
796
|
[key: string]: any;
|
|
792
797
|
data: PaginateResult<NoteModel>;
|
|
793
798
|
} : ResponseWrapper extends {
|
|
794
|
-
data: PaginateResult<NoteModel>;
|
|
795
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
796
|
-
* @param id id | nid
|
|
797
|
-
* @param password 访问密码
|
|
798
|
-
*/
|
|
799
|
+
data: PaginateResult<NoteModel>;
|
|
799
800
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
800
801
|
data: PaginateResult<NoteModel>;
|
|
801
802
|
}>;
|
|
@@ -815,11 +816,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
815
816
|
data: {
|
|
816
817
|
data: Pick<NoteModel, 'id' | 'title' | 'nid' | 'created'>[];
|
|
817
818
|
size: number;
|
|
818
|
-
};
|
|
819
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
820
|
-
* @param id id | nid
|
|
821
|
-
* @param password 访问密码
|
|
822
|
-
*/
|
|
819
|
+
};
|
|
823
820
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
824
821
|
data: {
|
|
825
822
|
data: Pick<NoteModel, 'id' | 'title' | 'nid' | 'created'>[];
|
|
@@ -833,11 +830,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
833
830
|
[key: string]: any;
|
|
834
831
|
data: never;
|
|
835
832
|
} : ResponseWrapper extends {
|
|
836
|
-
data: never;
|
|
837
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
838
|
-
* @param id id | nid
|
|
839
|
-
* @param password 访问密码
|
|
840
|
-
*/
|
|
833
|
+
data: never;
|
|
841
834
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
842
835
|
data: never;
|
|
843
836
|
}>;
|
|
@@ -848,11 +841,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
848
841
|
[key: string]: any;
|
|
849
842
|
data: PaginateResult<NoteModel>;
|
|
850
843
|
} : ResponseWrapper extends {
|
|
851
|
-
data: PaginateResult<NoteModel>;
|
|
852
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
853
|
-
* @param id id | nid
|
|
854
|
-
* @param password 访问密码
|
|
855
|
-
*/
|
|
844
|
+
data: PaginateResult<NoteModel>;
|
|
856
845
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
857
846
|
data: PaginateResult<NoteModel>;
|
|
858
847
|
}>;
|
|
@@ -1194,47 +1183,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1194
1183
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1195
1184
|
*/
|
|
1196
1185
|
raw?: any;
|
|
1197
|
-
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1198
|
-
[key: string]: any;
|
|
1199
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1200
|
-
type: 'post';
|
|
1201
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1202
|
-
type: 'note';
|
|
1203
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1204
|
-
type: 'page';
|
|
1205
|
-
})> & {
|
|
1206
|
-
/**
|
|
1207
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1208
|
-
*/
|
|
1209
|
-
raw?: any;
|
|
1210
|
-
};
|
|
1211
|
-
} : ResponseWrapper extends {
|
|
1212
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1213
|
-
type: 'post';
|
|
1214
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1215
|
-
type: 'note';
|
|
1216
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1217
|
-
type: 'page';
|
|
1218
|
-
})> & {
|
|
1219
|
-
/**
|
|
1220
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1221
|
-
*/
|
|
1222
|
-
raw?: any;
|
|
1223
|
-
};
|
|
1224
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1225
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1226
|
-
type: 'post';
|
|
1227
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1228
|
-
type: 'note';
|
|
1229
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1230
|
-
type: 'page';
|
|
1231
|
-
})> & {
|
|
1232
|
-
/**
|
|
1233
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1234
|
-
*/
|
|
1235
|
-
raw?: any;
|
|
1236
|
-
};
|
|
1237
|
-
}>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1186
|
+
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1238
1187
|
[key: string]: any;
|
|
1239
1188
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1240
1189
|
type: 'post';
|
|
@@ -1247,47 +1196,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1247
1196
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1248
1197
|
*/
|
|
1249
1198
|
raw?: any;
|
|
1250
|
-
}, ResponseWrapper
|
|
1251
|
-
[key: string]: any;
|
|
1252
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1253
|
-
type: 'post';
|
|
1254
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1255
|
-
type: 'note';
|
|
1256
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1257
|
-
type: 'page';
|
|
1258
|
-
})> & {
|
|
1259
|
-
/**
|
|
1260
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1261
|
-
*/
|
|
1262
|
-
raw?: any;
|
|
1263
|
-
};
|
|
1264
|
-
} : ResponseWrapper extends {
|
|
1265
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1266
|
-
type: 'post';
|
|
1267
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1268
|
-
type: 'note';
|
|
1269
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1270
|
-
type: 'page';
|
|
1271
|
-
})> & {
|
|
1272
|
-
/**
|
|
1273
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1274
|
-
*/
|
|
1275
|
-
raw?: any;
|
|
1276
|
-
};
|
|
1277
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1278
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1279
|
-
type: 'post';
|
|
1280
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1281
|
-
type: 'note';
|
|
1282
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1283
|
-
type: 'page';
|
|
1284
|
-
})> & {
|
|
1285
|
-
/**
|
|
1286
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1287
|
-
*/
|
|
1288
|
-
raw?: any;
|
|
1289
|
-
};
|
|
1290
|
-
}>;
|
|
1199
|
+
}, ResponseWrapper>;
|
|
1291
1200
|
} : ResponseWrapper extends {
|
|
1292
1201
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1293
1202
|
type: 'post';
|
|
@@ -1300,47 +1209,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1300
1209
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1301
1210
|
*/
|
|
1302
1211
|
raw?: any;
|
|
1303
|
-
}, ResponseWrapper
|
|
1304
|
-
[key: string]: any;
|
|
1305
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1306
|
-
type: 'post';
|
|
1307
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1308
|
-
type: 'note';
|
|
1309
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1310
|
-
type: 'page';
|
|
1311
|
-
})> & {
|
|
1312
|
-
/**
|
|
1313
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1314
|
-
*/
|
|
1315
|
-
raw?: any;
|
|
1316
|
-
};
|
|
1317
|
-
} : ResponseWrapper extends {
|
|
1318
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1319
|
-
type: 'post';
|
|
1320
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1321
|
-
type: 'note';
|
|
1322
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1323
|
-
type: 'page';
|
|
1324
|
-
})> & {
|
|
1325
|
-
/**
|
|
1326
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1327
|
-
*/
|
|
1328
|
-
raw?: any;
|
|
1329
|
-
};
|
|
1330
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1331
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1332
|
-
type: 'post';
|
|
1333
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1334
|
-
type: 'note';
|
|
1335
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1336
|
-
type: 'page';
|
|
1337
|
-
})> & {
|
|
1338
|
-
/**
|
|
1339
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1340
|
-
*/
|
|
1341
|
-
raw?: any;
|
|
1342
|
-
};
|
|
1343
|
-
}>;
|
|
1212
|
+
}, ResponseWrapper>;
|
|
1344
1213
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1345
1214
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1346
1215
|
type: 'post';
|
|
@@ -1353,47 +1222,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1353
1222
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1354
1223
|
*/
|
|
1355
1224
|
raw?: any;
|
|
1356
|
-
}, ResponseWrapper
|
|
1357
|
-
[key: string]: any;
|
|
1358
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1359
|
-
type: 'post';
|
|
1360
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1361
|
-
type: 'note';
|
|
1362
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1363
|
-
type: 'page';
|
|
1364
|
-
})> & {
|
|
1365
|
-
/**
|
|
1366
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1367
|
-
*/
|
|
1368
|
-
raw?: any;
|
|
1369
|
-
};
|
|
1370
|
-
} : ResponseWrapper extends {
|
|
1371
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1372
|
-
type: 'post';
|
|
1373
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1374
|
-
type: 'note';
|
|
1375
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1376
|
-
type: 'page';
|
|
1377
|
-
})> & {
|
|
1378
|
-
/**
|
|
1379
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1380
|
-
*/
|
|
1381
|
-
raw?: any;
|
|
1382
|
-
};
|
|
1383
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1384
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1385
|
-
type: 'post';
|
|
1386
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1387
|
-
type: 'note';
|
|
1388
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1389
|
-
type: 'page';
|
|
1390
|
-
})> & {
|
|
1391
|
-
/**
|
|
1392
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1393
|
-
*/
|
|
1394
|
-
raw?: any;
|
|
1395
|
-
};
|
|
1396
|
-
}>;
|
|
1225
|
+
}, ResponseWrapper>;
|
|
1397
1226
|
}>;
|
|
1398
1227
|
}
|
|
1399
1228
|
|
|
@@ -1628,4 +1457,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
|
|
|
1628
1457
|
*/
|
|
1629
1458
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1630
1459
|
|
|
1631
|
-
export { AdminExtraModel, AggregateController, AggregateRoot, AggregateStat, AggregateTop, AlgoliaSearchOptionsModel, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentState, Coordinate, Count, EnumPageType, HTTPClient, IConfig, IConfigKeys, Image, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, NoteController, NoteModel, NoteMusicRecord, NoteWrappedPayload, NoteWrappedWithLikedPayload, PageController, PageModel, Pager, PaginateResult, PostController, PostModel, ProjectController, ProjectModel, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, RecentlyModel, RecentlyRefType, RecentlyRefTypes, RefType, RequestError, SayController, SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, SubscribeType, SubscribeTypeToBitMap, TLogin, TagModel, TextBaseModel, TimelineData, TimelineType, TopicController, TopicModel, Url, UrlOptionModel, UserController, UserModel, allContollerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
|
1460
|
+
export { AdminExtraModel, AggregateController, AggregateRoot, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentState, Coordinate, Count, EnumPageType, HTTPClient, IConfig, IConfigKeys, Image, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, NoteController, NoteModel, NoteMusicRecord, NoteWrappedPayload, NoteWrappedWithLikedPayload, PageController, PageModel, Pager, PaginateResult, PostController, PostModel, ProjectController, ProjectModel, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, RecentlyModel, RecentlyRefType, RecentlyRefTypes, RefType, RequestError, SayController, SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, SubscribeType, SubscribeTypeToBitMap, TLogin, TagModel, TextBaseModel, TimelineData, TimelineType, TopicController, TopicModel, Url, UrlOptionModel, UserController, UserModel, allContollerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|