@mx-space/api-client 3.0.0 → 3.3.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/dist/{adapter-D1g1obyM.d.mts → adapter-BICozHDF.d.mts} +1 -0
- package/dist/{adapter-DLzJOGbI.d.cts → adapter-DB4Vji9d.d.cts} +1 -0
- package/dist/adaptors/axios.cjs +12 -16
- package/dist/adaptors/axios.d.cts +1 -1
- package/dist/adaptors/axios.d.mts +1 -1
- package/dist/adaptors/axios.mjs +1 -3
- package/dist/adaptors/fetch.cjs +2 -4
- package/dist/adaptors/fetch.d.cts +1 -1
- package/dist/adaptors/fetch.d.mts +1 -1
- package/dist/adaptors/fetch.mjs +1 -2
- package/dist/adaptors/umi-request.cjs +7 -7
- package/dist/adaptors/umi-request.d.cts +1 -1
- package/dist/adaptors/umi-request.d.mts +1 -1
- package/dist/adaptors/umi-request.mjs +1 -3
- package/dist/index.cjs +35 -64
- package/dist/index.d.cts +42 -58
- package/dist/index.d.mts +42 -58
- package/dist/index.mjs +31 -62
- package/package.json +7 -7
package/dist/adaptors/axios.cjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
//#region \0rolldown/runtime.js
|
|
3
6
|
var __create = Object.create;
|
|
4
7
|
var __defProp = Object.defineProperty;
|
|
@@ -7,16 +10,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
10
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
11
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
12
|
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
+
key = keys[i];
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: ((k) => from[k]).bind(null, key),
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
20
19
|
}
|
|
21
20
|
return to;
|
|
22
21
|
};
|
|
@@ -24,11 +23,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
23
|
value: mod,
|
|
25
24
|
enumerable: true
|
|
26
25
|
}) : target, mod));
|
|
27
|
-
|
|
28
26
|
//#endregion
|
|
29
27
|
let axios = require("axios");
|
|
30
|
-
axios = __toESM(axios);
|
|
31
|
-
|
|
28
|
+
axios = __toESM(axios, 1);
|
|
32
29
|
//#region adaptors/axios.ts
|
|
33
30
|
const $http = /* @__PURE__ */ axios.default.create({});
|
|
34
31
|
const axiosAdaptor = Object.preventExtensions({
|
|
@@ -56,8 +53,7 @@ const axiosAdaptor = Object.preventExtensions({
|
|
|
56
53
|
return $http.patch(url, data, config);
|
|
57
54
|
}
|
|
58
55
|
});
|
|
59
|
-
|
|
60
56
|
//#endregion
|
|
61
57
|
exports.__toESM = __toESM;
|
|
62
58
|
exports.axiosAdaptor = axiosAdaptor;
|
|
63
|
-
exports.default = axiosAdaptor;
|
|
59
|
+
exports.default = axiosAdaptor;
|
package/dist/adaptors/axios.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
|
|
3
2
|
//#region adaptors/axios.ts
|
|
4
3
|
const $http = /* @__PURE__ */ axios.create({});
|
|
5
4
|
const axiosAdaptor = Object.preventExtensions({
|
|
@@ -27,6 +26,5 @@ const axiosAdaptor = Object.preventExtensions({
|
|
|
27
26
|
return $http.patch(url, data, config);
|
|
28
27
|
}
|
|
29
28
|
});
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
|
-
export { axiosAdaptor, axiosAdaptor as default };
|
|
30
|
+
export { axiosAdaptor, axiosAdaptor as default };
|
package/dist/adaptors/fetch.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
2
|
//#region adaptors/fetch.ts
|
|
4
3
|
const jsonDataAttachResponse = async (response) => {
|
|
5
4
|
const cloned = response.clone();
|
|
@@ -72,6 +71,5 @@ const fetchAdaptor = Object.preventExtensions({
|
|
|
72
71
|
},
|
|
73
72
|
responseWrapper: {}
|
|
74
73
|
});
|
|
75
|
-
|
|
76
74
|
//#endregion
|
|
77
|
-
exports.fetchAdaptor = fetchAdaptor;
|
|
75
|
+
exports.fetchAdaptor = fetchAdaptor;
|
package/dist/adaptors/fetch.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
require("./axios.cjs");
|
|
5
6
|
//#region adaptors/umi-request.ts
|
|
6
|
-
const $http = /* @__PURE__ */ (0,
|
|
7
|
+
const $http = /* @__PURE__ */ (0, require("umi-request").extend)({
|
|
7
8
|
getResponse: true,
|
|
8
9
|
requestType: "json",
|
|
9
10
|
responseType: "json"
|
|
@@ -29,7 +30,6 @@ const umiAdaptor = Object.preventExtensions({
|
|
|
29
30
|
return $http.patch(url, options);
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
|
-
|
|
33
33
|
//#endregion
|
|
34
34
|
exports.default = umiAdaptor;
|
|
35
|
-
exports.umiAdaptor = umiAdaptor;
|
|
35
|
+
exports.umiAdaptor = umiAdaptor;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { extend } from "umi-request";
|
|
2
|
-
|
|
3
2
|
//#region adaptors/umi-request.ts
|
|
4
3
|
const $http = /* @__PURE__ */ extend({
|
|
5
4
|
getResponse: true,
|
|
@@ -27,6 +26,5 @@ const umiAdaptor = Object.preventExtensions({
|
|
|
27
26
|
return $http.patch(url, options);
|
|
28
27
|
}
|
|
29
28
|
});
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
|
-
export { umiAdaptor as default, umiAdaptor };
|
|
30
|
+
export { umiAdaptor as default, umiAdaptor };
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
2
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
3
5
|
//#region utils/index.ts
|
|
4
6
|
const isPlainObject = (obj) => isObject(obj) && Object.prototype.toString.call(obj) === "[object Object]" && Object.getPrototypeOf(obj) === Object.prototype;
|
|
5
7
|
const sortOrderToNumber = (order) => {
|
|
@@ -35,7 +37,6 @@ const attachRawFromOneToAnthor = (from, to) => {
|
|
|
35
37
|
});
|
|
36
38
|
});
|
|
37
39
|
};
|
|
38
|
-
|
|
39
40
|
//#endregion
|
|
40
41
|
//#region utils/camelcase-keys.ts
|
|
41
42
|
/**
|
|
@@ -57,14 +58,12 @@ function camelcase(str) {
|
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
60
|
const isMongoId = (id) => id.length === 24 && /^[\dA-F]{24}$/i.test(id);
|
|
60
|
-
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region utils/path.ts
|
|
63
63
|
const resolveFullPath = (endpoint, path) => {
|
|
64
64
|
if (!path.startsWith("/")) path = `/${path}`;
|
|
65
65
|
return `${endpoint}${path}`;
|
|
66
66
|
};
|
|
67
|
-
|
|
68
67
|
//#endregion
|
|
69
68
|
//#region utils/auto-bind.ts
|
|
70
69
|
const getAllProperties = (object) => {
|
|
@@ -88,7 +87,6 @@ function autoBind(self, { include, exclude } = {}) {
|
|
|
88
87
|
}
|
|
89
88
|
return self;
|
|
90
89
|
}
|
|
91
|
-
|
|
92
90
|
//#endregion
|
|
93
91
|
//#region controllers/ack.ts
|
|
94
92
|
/**
|
|
@@ -114,7 +112,6 @@ var AckController = class {
|
|
|
114
112
|
} });
|
|
115
113
|
}
|
|
116
114
|
};
|
|
117
|
-
|
|
118
115
|
//#endregion
|
|
119
116
|
//#region controllers/activity.ts
|
|
120
117
|
/**
|
|
@@ -141,7 +138,17 @@ var ActivityController = class {
|
|
|
141
138
|
* @support core >= 5.0.0
|
|
142
139
|
*/
|
|
143
140
|
getPresence(roomName) {
|
|
144
|
-
return this.proxy.presence.get({
|
|
141
|
+
return this.proxy.presence.get({
|
|
142
|
+
params: { room_name: roomName },
|
|
143
|
+
transformResponse: (data) => {
|
|
144
|
+
const payload = data;
|
|
145
|
+
return {
|
|
146
|
+
...camelcaseKeys(Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "data" && key !== "readers"))),
|
|
147
|
+
data: Object.fromEntries(Object.entries(payload.data ?? {}).map(([identity, value]) => [identity, camelcaseKeys(value)])),
|
|
148
|
+
readers: Object.fromEntries(Object.entries(payload.readers ?? {}).map(([id, value]) => [id, camelcaseKeys(value)]))
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
});
|
|
145
152
|
}
|
|
146
153
|
/**
|
|
147
154
|
*
|
|
@@ -168,7 +175,6 @@ var ActivityController = class {
|
|
|
168
175
|
return this.proxy(`last-year`).publication.get();
|
|
169
176
|
}
|
|
170
177
|
};
|
|
171
|
-
|
|
172
178
|
//#endregion
|
|
173
179
|
//#region controllers/aggregate.ts
|
|
174
180
|
var AggregateController = class {
|
|
@@ -219,7 +225,6 @@ var AggregateController = class {
|
|
|
219
225
|
return this.proxy.stat.get();
|
|
220
226
|
}
|
|
221
227
|
};
|
|
222
|
-
|
|
223
228
|
//#endregion
|
|
224
229
|
//#region controllers/ai.ts
|
|
225
230
|
/**
|
|
@@ -335,7 +340,6 @@ var AIController = class {
|
|
|
335
340
|
});
|
|
336
341
|
}
|
|
337
342
|
};
|
|
338
|
-
|
|
339
343
|
//#endregion
|
|
340
344
|
//#region core/error.ts
|
|
341
345
|
var RequestError = class extends Error {
|
|
@@ -346,7 +350,6 @@ var RequestError = class extends Error {
|
|
|
346
350
|
this.raw = raw;
|
|
347
351
|
}
|
|
348
352
|
};
|
|
349
|
-
|
|
350
353
|
//#endregion
|
|
351
354
|
//#region models/category.ts
|
|
352
355
|
let CategoryType = /* @__PURE__ */ function(CategoryType) {
|
|
@@ -354,7 +357,6 @@ let CategoryType = /* @__PURE__ */ function(CategoryType) {
|
|
|
354
357
|
CategoryType[CategoryType["Tag"] = 1] = "Tag";
|
|
355
358
|
return CategoryType;
|
|
356
359
|
}({});
|
|
357
|
-
|
|
358
360
|
//#endregion
|
|
359
361
|
//#region controllers/category.ts
|
|
360
362
|
var CategoryController = class {
|
|
@@ -368,10 +370,10 @@ var CategoryController = class {
|
|
|
368
370
|
return this.client.proxy(this.base);
|
|
369
371
|
}
|
|
370
372
|
getAllCategories() {
|
|
371
|
-
return this.proxy.get({ params: { type:
|
|
373
|
+
return this.proxy.get({ params: { type: 0 } });
|
|
372
374
|
}
|
|
373
375
|
getAllTags() {
|
|
374
|
-
return this.proxy.get({ params: { type:
|
|
376
|
+
return this.proxy.get({ params: { type: 1 } });
|
|
375
377
|
}
|
|
376
378
|
async getCategoryDetail(ids) {
|
|
377
379
|
if (typeof ids === "string") {
|
|
@@ -395,7 +397,6 @@ var CategoryController = class {
|
|
|
395
397
|
return await this.proxy(name).get({ params: { tag: 1 } });
|
|
396
398
|
}
|
|
397
399
|
};
|
|
398
|
-
|
|
399
400
|
//#endregion
|
|
400
401
|
//#region controllers/comment.ts
|
|
401
402
|
var CommentController = class {
|
|
@@ -418,11 +419,13 @@ var CommentController = class {
|
|
|
418
419
|
* 获取文章的评论列表
|
|
419
420
|
* @param refId 文章 Id
|
|
420
421
|
*/
|
|
421
|
-
getByRefId(refId,
|
|
422
|
-
const { page, size } =
|
|
422
|
+
getByRefId(refId, params = {}) {
|
|
423
|
+
const { page, size, sort, around } = params;
|
|
423
424
|
return this.proxy.ref(refId).get({ params: {
|
|
424
425
|
page: page || 1,
|
|
425
|
-
size: size || 10
|
|
426
|
+
size: size || 10,
|
|
427
|
+
...sort ? { sort } : {},
|
|
428
|
+
...around ? { around } : {}
|
|
426
429
|
} });
|
|
427
430
|
}
|
|
428
431
|
getThreadReplies(rootCommentId, params = {}) {
|
|
@@ -447,7 +450,6 @@ var CommentController = class {
|
|
|
447
450
|
return this.proxy.reader.reply(commentId).post({ data });
|
|
448
451
|
}
|
|
449
452
|
};
|
|
450
|
-
|
|
451
453
|
//#endregion
|
|
452
454
|
//#region controllers/base.ts
|
|
453
455
|
var BaseCrudController = class {
|
|
@@ -477,7 +479,6 @@ var BaseCrudController = class {
|
|
|
477
479
|
} });
|
|
478
480
|
}
|
|
479
481
|
};
|
|
480
|
-
|
|
481
482
|
//#endregion
|
|
482
483
|
//#region controllers/link.ts
|
|
483
484
|
var LinkController = class extends BaseCrudController {
|
|
@@ -496,7 +497,6 @@ var LinkController = class extends BaseCrudController {
|
|
|
496
497
|
return await this.proxy.audit.post({ data });
|
|
497
498
|
}
|
|
498
499
|
};
|
|
499
|
-
|
|
500
500
|
//#endregion
|
|
501
501
|
//#region controllers/note.ts
|
|
502
502
|
var NoteController = class {
|
|
@@ -592,7 +592,6 @@ var NoteController = class {
|
|
|
592
592
|
} });
|
|
593
593
|
}
|
|
594
594
|
};
|
|
595
|
-
|
|
596
595
|
//#endregion
|
|
597
596
|
//#region controllers/owner.ts
|
|
598
597
|
var UserController = class {
|
|
@@ -667,7 +666,6 @@ var UserController = class {
|
|
|
667
666
|
return this.proxy.check_logged.get({ params: normalized ? { token: normalized } : void 0 });
|
|
668
667
|
}
|
|
669
668
|
};
|
|
670
|
-
|
|
671
669
|
//#endregion
|
|
672
670
|
//#region controllers/page.ts
|
|
673
671
|
var PageController = class {
|
|
@@ -708,7 +706,6 @@ var PageController = class {
|
|
|
708
706
|
return this.proxy.slug(slug).get({ params: options?.prefer ? { prefer: options.prefer } : void 0 });
|
|
709
707
|
}
|
|
710
708
|
};
|
|
711
|
-
|
|
712
709
|
//#endregion
|
|
713
710
|
//#region controllers/post.ts
|
|
714
711
|
var PostController = class {
|
|
@@ -760,7 +757,6 @@ var PostController = class {
|
|
|
760
757
|
return this.proxy("get-url")(slug).get();
|
|
761
758
|
}
|
|
762
759
|
};
|
|
763
|
-
|
|
764
760
|
//#endregion
|
|
765
761
|
//#region controllers/project.ts
|
|
766
762
|
var ProjectController = class extends BaseCrudController {
|
|
@@ -772,7 +768,6 @@ var ProjectController = class extends BaseCrudController {
|
|
|
772
768
|
autoBind(this);
|
|
773
769
|
}
|
|
774
770
|
};
|
|
775
|
-
|
|
776
771
|
//#endregion
|
|
777
772
|
//#region controllers/recently.ts
|
|
778
773
|
let RecentlyAttitudeResultEnum = /* @__PURE__ */ function(RecentlyAttitudeResultEnum) {
|
|
@@ -819,7 +814,6 @@ var RecentlyController = class {
|
|
|
819
814
|
return this.proxy.attitude(id).get({ params: { attitude } });
|
|
820
815
|
}
|
|
821
816
|
};
|
|
822
|
-
|
|
823
817
|
//#endregion
|
|
824
818
|
//#region controllers/say.ts
|
|
825
819
|
var SayController = class extends BaseCrudController {
|
|
@@ -840,7 +834,6 @@ var SayController = class extends BaseCrudController {
|
|
|
840
834
|
return this.proxy.random.get();
|
|
841
835
|
}
|
|
842
836
|
};
|
|
843
|
-
|
|
844
837
|
//#endregion
|
|
845
838
|
//#region controllers/search.ts
|
|
846
839
|
var SearchController = class {
|
|
@@ -859,21 +852,13 @@ var SearchController = class {
|
|
|
859
852
|
...options
|
|
860
853
|
} });
|
|
861
854
|
}
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
* https://www.algolia.com/doc/api-reference/api-methods/search/
|
|
865
|
-
* @param keyword
|
|
866
|
-
* @param options
|
|
867
|
-
* @returns
|
|
868
|
-
*/
|
|
869
|
-
searchByAlgolia(keyword, options) {
|
|
870
|
-
return this.proxy("algolia").get({ params: {
|
|
855
|
+
searchAll(keyword, options) {
|
|
856
|
+
return this.proxy.get({ params: {
|
|
871
857
|
keyword,
|
|
872
858
|
...options
|
|
873
859
|
} });
|
|
874
860
|
}
|
|
875
861
|
};
|
|
876
|
-
|
|
877
862
|
//#endregion
|
|
878
863
|
//#region controllers/severless.ts
|
|
879
864
|
var ServerlessController = class {
|
|
@@ -890,7 +875,6 @@ var ServerlessController = class {
|
|
|
890
875
|
return this.proxy(reference)(name).get();
|
|
891
876
|
}
|
|
892
877
|
};
|
|
893
|
-
|
|
894
878
|
//#endregion
|
|
895
879
|
//#region controllers/snippet.ts
|
|
896
880
|
var SnippetController = class {
|
|
@@ -907,7 +891,6 @@ var SnippetController = class {
|
|
|
907
891
|
return this.proxy(reference)(name).get();
|
|
908
892
|
}
|
|
909
893
|
};
|
|
910
|
-
|
|
911
894
|
//#endregion
|
|
912
895
|
//#region controllers/subscribe.ts
|
|
913
896
|
var SubscribeController = class {
|
|
@@ -939,7 +922,6 @@ var SubscribeController = class {
|
|
|
939
922
|
} });
|
|
940
923
|
}
|
|
941
924
|
};
|
|
942
|
-
|
|
943
925
|
//#endregion
|
|
944
926
|
//#region controllers/topic.ts
|
|
945
927
|
var TopicController = class extends BaseCrudController {
|
|
@@ -957,7 +939,6 @@ var TopicController = class extends BaseCrudController {
|
|
|
957
939
|
return this.proxy.slug(slug).get();
|
|
958
940
|
}
|
|
959
941
|
};
|
|
960
|
-
|
|
961
942
|
//#endregion
|
|
962
943
|
//#region controllers/index.ts
|
|
963
944
|
const allControllers = [
|
|
@@ -1004,7 +985,6 @@ const allControllerNames = [
|
|
|
1004
985
|
"friend",
|
|
1005
986
|
"shorthand"
|
|
1006
987
|
];
|
|
1007
|
-
|
|
1008
988
|
//#endregion
|
|
1009
989
|
//#region core/attach-request.ts
|
|
1010
990
|
function attachRequestMethod(target) {
|
|
@@ -1034,7 +1014,6 @@ function handleSearchParams(obj) {
|
|
|
1034
1014
|
});
|
|
1035
1015
|
return search.toString();
|
|
1036
1016
|
}
|
|
1037
|
-
|
|
1038
1017
|
//#endregion
|
|
1039
1018
|
//#region core/client.ts
|
|
1040
1019
|
const methodPrefix = "_$";
|
|
@@ -1122,14 +1101,15 @@ var HTTPClient = class {
|
|
|
1122
1101
|
return path.startsWith("/") ? path : `/${path}`;
|
|
1123
1102
|
}
|
|
1124
1103
|
};
|
|
1125
|
-
if (methods.includes(name)) return async (options) => {
|
|
1104
|
+
if (methods.includes(name)) return async (options = {}) => {
|
|
1126
1105
|
const url = resolveFullPath(that.endpoint, route.join("/"));
|
|
1127
1106
|
route.length = 0;
|
|
1107
|
+
const { transformResponse: perRequestTransformResponse, ...requestOptions } = options;
|
|
1128
1108
|
let res;
|
|
1129
1109
|
try {
|
|
1130
1110
|
res = await manager.request({
|
|
1131
1111
|
method: name,
|
|
1132
|
-
...
|
|
1112
|
+
...requestOptions,
|
|
1133
1113
|
url
|
|
1134
1114
|
});
|
|
1135
1115
|
} catch (error) {
|
|
@@ -1144,7 +1124,8 @@ var HTTPClient = class {
|
|
|
1144
1124
|
}
|
|
1145
1125
|
const data = that.options.getDataFromResponse(res);
|
|
1146
1126
|
if (!data) return null;
|
|
1147
|
-
const
|
|
1127
|
+
const responseTransformer = perRequestTransformResponse === void 0 ? that.options.transformResponse : perRequestTransformResponse || void 0;
|
|
1128
|
+
const cameledObject = (Array.isArray(data) || isPlainObject(data)) && responseTransformer ? responseTransformer(data) : data;
|
|
1148
1129
|
let nextObject = cameledObject;
|
|
1149
1130
|
if (cameledObject && typeof cameledObject === "object") {
|
|
1150
1131
|
nextObject = Array.isArray(cameledObject) ? [...cameledObject] : { ...cameledObject };
|
|
@@ -1191,7 +1172,6 @@ function createClient(adapter) {
|
|
|
1191
1172
|
return client;
|
|
1192
1173
|
};
|
|
1193
1174
|
}
|
|
1194
|
-
|
|
1195
1175
|
//#endregion
|
|
1196
1176
|
//#region models/aggregate.ts
|
|
1197
1177
|
let TimelineType = /* @__PURE__ */ function(TimelineType) {
|
|
@@ -1199,7 +1179,6 @@ let TimelineType = /* @__PURE__ */ function(TimelineType) {
|
|
|
1199
1179
|
TimelineType[TimelineType["Note"] = 1] = "Note";
|
|
1200
1180
|
return TimelineType;
|
|
1201
1181
|
}({});
|
|
1202
|
-
|
|
1203
1182
|
//#endregion
|
|
1204
1183
|
//#region ../../apps/core/src/constants/db.constant.ts
|
|
1205
1184
|
const NOTE_COLLECTION_NAME = "notes";
|
|
@@ -1213,7 +1192,6 @@ let CollectionRefTypes = /* @__PURE__ */ function(CollectionRefTypes) {
|
|
|
1213
1192
|
CollectionRefTypes[CollectionRefTypes["Recently"] = RECENTLY_COLLECTION_NAME] = "Recently";
|
|
1214
1193
|
return CollectionRefTypes;
|
|
1215
1194
|
}({});
|
|
1216
|
-
|
|
1217
1195
|
//#endregion
|
|
1218
1196
|
//#region models/comment.ts
|
|
1219
1197
|
let CommentState = /* @__PURE__ */ function(CommentState) {
|
|
@@ -1222,7 +1200,6 @@ let CommentState = /* @__PURE__ */ function(CommentState) {
|
|
|
1222
1200
|
CommentState[CommentState["Junk"] = 2] = "Junk";
|
|
1223
1201
|
return CommentState;
|
|
1224
1202
|
}({});
|
|
1225
|
-
|
|
1226
1203
|
//#endregion
|
|
1227
1204
|
//#region models/link.ts
|
|
1228
1205
|
let LinkType = /* @__PURE__ */ function(LinkType) {
|
|
@@ -1238,7 +1215,6 @@ let LinkState = /* @__PURE__ */ function(LinkState) {
|
|
|
1238
1215
|
LinkState[LinkState["Reject"] = 4] = "Reject";
|
|
1239
1216
|
return LinkState;
|
|
1240
1217
|
}({});
|
|
1241
|
-
|
|
1242
1218
|
//#endregion
|
|
1243
1219
|
//#region models/page.ts
|
|
1244
1220
|
let EnumPageType = /* @__PURE__ */ function(EnumPageType) {
|
|
@@ -1247,7 +1223,6 @@ let EnumPageType = /* @__PURE__ */ function(EnumPageType) {
|
|
|
1247
1223
|
EnumPageType["frame"] = "frame";
|
|
1248
1224
|
return EnumPageType;
|
|
1249
1225
|
}({});
|
|
1250
|
-
|
|
1251
1226
|
//#endregion
|
|
1252
1227
|
//#region models/recently.ts
|
|
1253
1228
|
let RecentlyRefTypes = /* @__PURE__ */ function(RecentlyRefTypes) {
|
|
@@ -1267,7 +1242,6 @@ let RecentlyTypeEnum = /* @__PURE__ */ function(RecentlyTypeEnum) {
|
|
|
1267
1242
|
RecentlyTypeEnum["Code"] = "code";
|
|
1268
1243
|
return RecentlyTypeEnum;
|
|
1269
1244
|
}({});
|
|
1270
|
-
|
|
1271
1245
|
//#endregion
|
|
1272
1246
|
//#region models/snippet.ts
|
|
1273
1247
|
let SnippetType = /* @__PURE__ */ function(SnippetType) {
|
|
@@ -1277,7 +1251,6 @@ let SnippetType = /* @__PURE__ */ function(SnippetType) {
|
|
|
1277
1251
|
SnippetType["YAML"] = "yaml";
|
|
1278
1252
|
return SnippetType;
|
|
1279
1253
|
}({});
|
|
1280
|
-
|
|
1281
1254
|
//#endregion
|
|
1282
1255
|
//#region ../../apps/core/src/modules/subscribe/subscribe.constant.ts
|
|
1283
1256
|
const SubscribePostCreateBit = 1;
|
|
@@ -1286,17 +1259,15 @@ const SubscribeSayCreateBit = 4;
|
|
|
1286
1259
|
const SubscribeRecentCreateBit = 8;
|
|
1287
1260
|
const SubscribeAllBit = 15;
|
|
1288
1261
|
const SubscribeTypeToBitMap = {
|
|
1289
|
-
post_c:
|
|
1290
|
-
note_c:
|
|
1291
|
-
say_c:
|
|
1292
|
-
recently_c:
|
|
1293
|
-
all:
|
|
1262
|
+
post_c: 1,
|
|
1263
|
+
note_c: 2,
|
|
1264
|
+
say_c: 4,
|
|
1265
|
+
recently_c: 8,
|
|
1266
|
+
all: 15
|
|
1294
1267
|
};
|
|
1295
|
-
|
|
1296
1268
|
//#endregion
|
|
1297
1269
|
//#region index.ts
|
|
1298
1270
|
var api_client_default = createClient;
|
|
1299
|
-
|
|
1300
1271
|
//#endregion
|
|
1301
1272
|
exports.AIController = AIController;
|
|
1302
1273
|
exports.AckController = AckController;
|
|
@@ -1340,4 +1311,4 @@ exports.allControllerNames = allControllerNames;
|
|
|
1340
1311
|
exports.allControllers = allControllers;
|
|
1341
1312
|
exports.createClient = createClient;
|
|
1342
1313
|
exports.default = api_client_default;
|
|
1343
|
-
exports.simpleCamelcaseKeys = camelcaseKeys;
|
|
1314
|
+
exports.simpleCamelcaseKeys = camelcaseKeys;
|