@mx-space/api-client 1.3.4 → 1.4.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/.eslintcache +1 -1
- 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/ky.global.js +13 -12
- package/dist/adaptors/umi-request.global.js +28 -30
- package/dist/index.d.ts +12 -168
- package/models/aggregate.ts +13 -2
- package/models/base.ts +0 -2
- package/models/comment.ts +1 -0
- package/package.json +7 -9
|
@@ -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) {
|
|
@@ -533,16 +533,16 @@
|
|
|
533
533
|
}
|
|
534
534
|
});
|
|
535
535
|
|
|
536
|
-
// ../../node_modules/.pnpm/object-inspect@1.12.
|
|
536
|
+
// ../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/util.inspect.js
|
|
537
537
|
var require_util_inspect = __commonJS({
|
|
538
|
-
"../../node_modules/.pnpm/object-inspect@1.12.
|
|
538
|
+
"../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/util.inspect.js"(exports, module) {
|
|
539
539
|
module.exports = __require("util").inspect;
|
|
540
540
|
}
|
|
541
541
|
});
|
|
542
542
|
|
|
543
|
-
// ../../node_modules/.pnpm/object-inspect@1.12.
|
|
543
|
+
// ../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js
|
|
544
544
|
var require_object_inspect = __commonJS({
|
|
545
|
-
"../../node_modules/.pnpm/object-inspect@1.12.
|
|
545
|
+
"../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js"(exports, module) {
|
|
546
546
|
var hasMap = typeof Map === "function" && Map.prototype;
|
|
547
547
|
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
|
|
548
548
|
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
|
|
@@ -719,16 +719,20 @@
|
|
|
719
719
|
}
|
|
720
720
|
if (isMap(obj)) {
|
|
721
721
|
var mapParts = [];
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
722
|
+
if (mapForEach) {
|
|
723
|
+
mapForEach.call(obj, function(value, key) {
|
|
724
|
+
mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
|
|
725
|
+
});
|
|
726
|
+
}
|
|
725
727
|
return collectionOf("Map", mapSize.call(obj), mapParts, indent);
|
|
726
728
|
}
|
|
727
729
|
if (isSet(obj)) {
|
|
728
730
|
var setParts = [];
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
731
|
+
if (setForEach) {
|
|
732
|
+
setForEach.call(obj, function(value) {
|
|
733
|
+
setParts.push(inspect(value, obj));
|
|
734
|
+
});
|
|
735
|
+
}
|
|
732
736
|
return collectionOf("Set", setSize.call(obj), setParts, indent);
|
|
733
737
|
}
|
|
734
738
|
if (isWeakMap(obj)) {
|
|
@@ -1156,9 +1160,9 @@
|
|
|
1156
1160
|
}
|
|
1157
1161
|
});
|
|
1158
1162
|
|
|
1159
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1163
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js
|
|
1160
1164
|
var require_formats = __commonJS({
|
|
1161
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1165
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js"(exports, module) {
|
|
1162
1166
|
"use strict";
|
|
1163
1167
|
var replace = String.prototype.replace;
|
|
1164
1168
|
var percentTwenties = /%20/g;
|
|
@@ -1182,9 +1186,9 @@
|
|
|
1182
1186
|
}
|
|
1183
1187
|
});
|
|
1184
1188
|
|
|
1185
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1189
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js
|
|
1186
1190
|
var require_utils = __commonJS({
|
|
1187
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1191
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js"(exports, module) {
|
|
1188
1192
|
"use strict";
|
|
1189
1193
|
var formats = require_formats();
|
|
1190
1194
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1381,9 +1385,9 @@
|
|
|
1381
1385
|
}
|
|
1382
1386
|
});
|
|
1383
1387
|
|
|
1384
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1388
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js
|
|
1385
1389
|
var require_stringify = __commonJS({
|
|
1386
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1390
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js"(exports, module) {
|
|
1387
1391
|
"use strict";
|
|
1388
1392
|
var getSideChannel = require_side_channel();
|
|
1389
1393
|
var utils = require_utils();
|
|
@@ -1402,7 +1406,6 @@
|
|
|
1402
1406
|
}
|
|
1403
1407
|
};
|
|
1404
1408
|
var isArray2 = Array.isArray;
|
|
1405
|
-
var split = String.prototype.split;
|
|
1406
1409
|
var push = Array.prototype.push;
|
|
1407
1410
|
var pushToArray = function(arr, valueOrArray) {
|
|
1408
1411
|
push.apply(arr, isArray2(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
@@ -1472,14 +1475,6 @@
|
|
|
1472
1475
|
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
1473
1476
|
if (encoder) {
|
|
1474
1477
|
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
|
|
1475
|
-
if (generateArrayPrefix === "comma" && encodeValuesOnly) {
|
|
1476
|
-
var valuesArray = split.call(String(obj), ",");
|
|
1477
|
-
var valuesJoined = "";
|
|
1478
|
-
for (var i = 0; i < valuesArray.length; ++i) {
|
|
1479
|
-
valuesJoined += (i === 0 ? "" : ",") + formatter(encoder(valuesArray[i], defaults.encoder, charset, "value", format));
|
|
1480
|
-
}
|
|
1481
|
-
return [formatter(keyValue) + (commaRoundTrip && isArray2(obj) && valuesArray.length === 1 ? "[]" : "") + "=" + valuesJoined];
|
|
1482
|
-
}
|
|
1483
1478
|
return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
|
|
1484
1479
|
}
|
|
1485
1480
|
return [formatter(prefix) + "=" + formatter(String(obj))];
|
|
@@ -1490,6 +1485,9 @@
|
|
|
1490
1485
|
}
|
|
1491
1486
|
var objKeys;
|
|
1492
1487
|
if (generateArrayPrefix === "comma" && isArray2(obj)) {
|
|
1488
|
+
if (encodeValuesOnly && encoder) {
|
|
1489
|
+
obj = utils.maybeMap(obj, encoder);
|
|
1490
|
+
}
|
|
1493
1491
|
objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
|
|
1494
1492
|
} else if (isArray2(filter)) {
|
|
1495
1493
|
objKeys = filter;
|
|
@@ -1515,7 +1513,7 @@
|
|
|
1515
1513
|
commaRoundTrip,
|
|
1516
1514
|
strictNullHandling,
|
|
1517
1515
|
skipNulls,
|
|
1518
|
-
encoder,
|
|
1516
|
+
generateArrayPrefix === "comma" && encodeValuesOnly && isArray2(obj) ? null : encoder,
|
|
1519
1517
|
filter,
|
|
1520
1518
|
sort,
|
|
1521
1519
|
allowDots,
|
|
@@ -1644,9 +1642,9 @@
|
|
|
1644
1642
|
}
|
|
1645
1643
|
});
|
|
1646
1644
|
|
|
1647
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1645
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js
|
|
1648
1646
|
var require_parse = __commonJS({
|
|
1649
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1647
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js"(exports, module) {
|
|
1650
1648
|
"use strict";
|
|
1651
1649
|
var utils = require_utils();
|
|
1652
1650
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1846,9 +1844,9 @@
|
|
|
1846
1844
|
}
|
|
1847
1845
|
});
|
|
1848
1846
|
|
|
1849
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1847
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js
|
|
1850
1848
|
var require_lib = __commonJS({
|
|
1851
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1849
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js"(exports, module) {
|
|
1852
1850
|
"use strict";
|
|
1853
1851
|
var stringify2 = require_stringify();
|
|
1854
1852
|
var parse2 = require_parse();
|
package/dist/index.d.ts
CHANGED
|
@@ -129,7 +129,6 @@ interface TextBaseModel extends BaseCommentIndexModel {
|
|
|
129
129
|
text: string;
|
|
130
130
|
images?: Image[];
|
|
131
131
|
modified: string | null;
|
|
132
|
-
meta?: Record<string, any>;
|
|
133
132
|
}
|
|
134
133
|
type ModelWithLiked<T> = T & {
|
|
135
134
|
liked: boolean;
|
|
@@ -336,9 +335,13 @@ interface Url {
|
|
|
336
335
|
serverUrl: string;
|
|
337
336
|
webUrl: string;
|
|
338
337
|
}
|
|
338
|
+
interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {
|
|
339
|
+
}
|
|
340
|
+
interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images'> {
|
|
341
|
+
}
|
|
339
342
|
interface AggregateTop {
|
|
340
|
-
notes:
|
|
341
|
-
posts:
|
|
343
|
+
notes: AggregateTopNote[];
|
|
344
|
+
posts: AggregateTopPost[];
|
|
342
345
|
says: SayModel[];
|
|
343
346
|
}
|
|
344
347
|
declare enum TimelineType {
|
|
@@ -566,6 +569,7 @@ interface CommentModel extends BaseModel {
|
|
|
566
569
|
parent?: CommentModel | string;
|
|
567
570
|
children: CommentModel[];
|
|
568
571
|
isWhispers?: boolean;
|
|
572
|
+
location?: string;
|
|
569
573
|
}
|
|
570
574
|
interface CommentRef {
|
|
571
575
|
id: string;
|
|
@@ -1193,47 +1197,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1193
1197
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1194
1198
|
*/
|
|
1195
1199
|
raw?: any;
|
|
1196
|
-
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1197
|
-
[key: string]: any;
|
|
1198
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1199
|
-
type: 'post';
|
|
1200
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1201
|
-
type: 'note';
|
|
1202
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1203
|
-
type: 'page';
|
|
1204
|
-
})> & {
|
|
1205
|
-
/**
|
|
1206
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1207
|
-
*/
|
|
1208
|
-
raw?: any;
|
|
1209
|
-
};
|
|
1210
|
-
} : ResponseWrapper extends {
|
|
1211
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1212
|
-
type: 'post';
|
|
1213
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1214
|
-
type: 'note';
|
|
1215
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1216
|
-
type: 'page';
|
|
1217
|
-
})> & {
|
|
1218
|
-
/**
|
|
1219
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1220
|
-
*/
|
|
1221
|
-
raw?: any;
|
|
1222
|
-
};
|
|
1223
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1224
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1225
|
-
type: 'post';
|
|
1226
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1227
|
-
type: 'note';
|
|
1228
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1229
|
-
type: 'page';
|
|
1230
|
-
})> & {
|
|
1231
|
-
/**
|
|
1232
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1233
|
-
*/
|
|
1234
|
-
raw?: any;
|
|
1235
|
-
};
|
|
1236
|
-
}>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1200
|
+
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1237
1201
|
[key: string]: any;
|
|
1238
1202
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1239
1203
|
type: 'post';
|
|
@@ -1246,47 +1210,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1246
1210
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1247
1211
|
*/
|
|
1248
1212
|
raw?: any;
|
|
1249
|
-
}, ResponseWrapper
|
|
1250
|
-
[key: string]: any;
|
|
1251
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1252
|
-
type: 'post';
|
|
1253
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1254
|
-
type: 'note';
|
|
1255
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1256
|
-
type: 'page';
|
|
1257
|
-
})> & {
|
|
1258
|
-
/**
|
|
1259
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1260
|
-
*/
|
|
1261
|
-
raw?: any;
|
|
1262
|
-
};
|
|
1263
|
-
} : ResponseWrapper extends {
|
|
1264
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1265
|
-
type: 'post';
|
|
1266
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1267
|
-
type: 'note';
|
|
1268
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1269
|
-
type: 'page';
|
|
1270
|
-
})> & {
|
|
1271
|
-
/**
|
|
1272
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1273
|
-
*/
|
|
1274
|
-
raw?: any;
|
|
1275
|
-
};
|
|
1276
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1277
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1278
|
-
type: 'post';
|
|
1279
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1280
|
-
type: 'note';
|
|
1281
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1282
|
-
type: 'page';
|
|
1283
|
-
})> & {
|
|
1284
|
-
/**
|
|
1285
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1286
|
-
*/
|
|
1287
|
-
raw?: any;
|
|
1288
|
-
};
|
|
1289
|
-
}>;
|
|
1213
|
+
}, ResponseWrapper>;
|
|
1290
1214
|
} : ResponseWrapper extends {
|
|
1291
1215
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1292
1216
|
type: 'post';
|
|
@@ -1299,47 +1223,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1299
1223
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1300
1224
|
*/
|
|
1301
1225
|
raw?: any;
|
|
1302
|
-
}, ResponseWrapper
|
|
1303
|
-
[key: string]: any;
|
|
1304
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1305
|
-
type: 'post';
|
|
1306
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1307
|
-
type: 'note';
|
|
1308
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1309
|
-
type: 'page';
|
|
1310
|
-
})> & {
|
|
1311
|
-
/**
|
|
1312
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1313
|
-
*/
|
|
1314
|
-
raw?: any;
|
|
1315
|
-
};
|
|
1316
|
-
} : ResponseWrapper extends {
|
|
1317
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1318
|
-
type: 'post';
|
|
1319
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1320
|
-
type: 'note';
|
|
1321
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1322
|
-
type: 'page';
|
|
1323
|
-
})> & {
|
|
1324
|
-
/**
|
|
1325
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1326
|
-
*/
|
|
1327
|
-
raw?: any;
|
|
1328
|
-
};
|
|
1329
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1330
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1331
|
-
type: 'post';
|
|
1332
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1333
|
-
type: 'note';
|
|
1334
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1335
|
-
type: 'page';
|
|
1336
|
-
})> & {
|
|
1337
|
-
/**
|
|
1338
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1339
|
-
*/
|
|
1340
|
-
raw?: any;
|
|
1341
|
-
};
|
|
1342
|
-
}>;
|
|
1226
|
+
}, ResponseWrapper>;
|
|
1343
1227
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1344
1228
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1345
1229
|
type: 'post';
|
|
@@ -1352,47 +1236,7 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1352
1236
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1353
1237
|
*/
|
|
1354
1238
|
raw?: any;
|
|
1355
|
-
}, ResponseWrapper
|
|
1356
|
-
[key: string]: any;
|
|
1357
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1358
|
-
type: 'post';
|
|
1359
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1360
|
-
type: 'note';
|
|
1361
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1362
|
-
type: 'page';
|
|
1363
|
-
})> & {
|
|
1364
|
-
/**
|
|
1365
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1366
|
-
*/
|
|
1367
|
-
raw?: any;
|
|
1368
|
-
};
|
|
1369
|
-
} : ResponseWrapper extends {
|
|
1370
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1371
|
-
type: 'post';
|
|
1372
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1373
|
-
type: 'note';
|
|
1374
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1375
|
-
type: 'page';
|
|
1376
|
-
})> & {
|
|
1377
|
-
/**
|
|
1378
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1379
|
-
*/
|
|
1380
|
-
raw?: any;
|
|
1381
|
-
};
|
|
1382
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1383
|
-
data: PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1384
|
-
type: 'post';
|
|
1385
|
-
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1386
|
-
type: 'note';
|
|
1387
|
-
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1388
|
-
type: 'page';
|
|
1389
|
-
})> & {
|
|
1390
|
-
/**
|
|
1391
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
1392
|
-
*/
|
|
1393
|
-
raw?: any;
|
|
1394
|
-
};
|
|
1395
|
-
}>;
|
|
1239
|
+
}, ResponseWrapper>;
|
|
1396
1240
|
}>;
|
|
1397
1241
|
}
|
|
1398
1242
|
|
|
@@ -1627,4 +1471,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
|
|
|
1627
1471
|
*/
|
|
1628
1472
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1629
1473
|
|
|
1630
|
-
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 };
|
|
1474
|
+
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 };
|
package/models/aggregate.ts
CHANGED
|
@@ -20,9 +20,20 @@ export interface Url {
|
|
|
20
20
|
webUrl: string
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
24
|
+
export interface AggregateTopNote
|
|
25
|
+
extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {}
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
28
|
+
export interface AggregateTopPost
|
|
29
|
+
extends Pick<
|
|
30
|
+
PostModel,
|
|
31
|
+
'id' | 'slug' | 'created' | 'title' | 'category' | 'images'
|
|
32
|
+
> {}
|
|
33
|
+
|
|
23
34
|
export interface AggregateTop {
|
|
24
|
-
notes:
|
|
25
|
-
posts:
|
|
35
|
+
notes: AggregateTopNote[]
|
|
36
|
+
posts: AggregateTopPost[]
|
|
26
37
|
says: SayModel[]
|
|
27
38
|
}
|
|
28
39
|
|
package/models/base.ts
CHANGED
package/models/comment.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-space/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A api client for mx-space server@next",
|
|
6
6
|
"author": "Innei",
|
|
@@ -59,19 +59,17 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/cors": "2.8.13",
|
|
62
|
-
"@types/express": "4.17.
|
|
63
|
-
"@types/lodash": "4.14.
|
|
62
|
+
"@types/express": "4.17.17",
|
|
63
|
+
"@types/lodash": "4.14.194",
|
|
64
64
|
"abort-controller": "3.0.0",
|
|
65
65
|
"axios": "^1.3.1",
|
|
66
|
-
"camelcase-keys": "
|
|
66
|
+
"camelcase-keys": "^7",
|
|
67
67
|
"cors": "2.8.5",
|
|
68
68
|
"express": "4.18.2",
|
|
69
|
-
"
|
|
70
|
-
"ky": "0.33.2",
|
|
69
|
+
"ky": "0.33.3",
|
|
71
70
|
"lodash": "4.17.21",
|
|
72
|
-
"node-fetch": "3.3.
|
|
73
|
-
"
|
|
74
|
-
"tsup": "6.6.2",
|
|
71
|
+
"node-fetch": "3.3.1",
|
|
72
|
+
"tsup": "6.7.0",
|
|
75
73
|
"umi-request": "1.4.0"
|
|
76
74
|
}
|
|
77
75
|
}
|