@mx-space/api-client 0.3.3 → 0.3.7
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/build/index.cjs.js +59 -9
- package/build/index.cjs.js.map +1 -1
- package/build/index.cjs.min.js +1 -1
- package/build/index.cjs.min.js.map +1 -1
- package/build/index.d.ts +217 -128
- package/build/index.esm.js +59 -9
- package/build/index.esm.js.map +1 -1
- package/build/index.esm.min.js +1 -1
- package/build/index.esm.min.js.map +1 -1
- package/build/index.umd.js +59 -9
- package/build/index.umd.js.map +1 -1
- package/build/index.umd.min.js +1 -1
- package/build/index.umd.min.js.map +1 -1
- package/esm/adaptors/axios.d.ts +3 -0
- package/esm/adaptors/axios.js +46 -0
- package/esm/adaptors/axios.js.map +1 -0
- package/esm/adaptors/umi-request.d.ts +3 -0
- package/esm/adaptors/umi-request.js +27 -0
- package/esm/adaptors/umi-request.js.map +1 -0
- package/esm/core/client.d.ts +1 -1
- package/esm/core/controllers/aggregate.d.ts +5 -7
- package/esm/core/controllers/aggregate.js +2 -0
- package/esm/core/controllers/aggregate.js.map +1 -1
- package/esm/core/controllers/base.d.ts +5 -7
- package/esm/core/controllers/base.js +2 -0
- package/esm/core/controllers/base.js.map +1 -1
- package/esm/core/controllers/category.d.ts +6 -16
- package/esm/core/controllers/category.js +4 -2
- package/esm/core/controllers/category.js.map +1 -1
- package/esm/core/controllers/comment.d.ts +6 -8
- package/esm/core/controllers/comment.js +2 -0
- package/esm/core/controllers/comment.js.map +1 -1
- package/esm/core/controllers/link.js +2 -0
- package/esm/core/controllers/link.js.map +1 -1
- package/esm/core/controllers/note.d.ts +8 -10
- package/esm/core/controllers/note.js +2 -0
- package/esm/core/controllers/note.js.map +1 -1
- package/esm/core/controllers/page.js +2 -0
- package/esm/core/controllers/page.js.map +1 -1
- package/esm/core/controllers/post.js +2 -0
- package/esm/core/controllers/post.js.map +1 -1
- package/esm/core/controllers/project.js +2 -0
- package/esm/core/controllers/project.js.map +1 -1
- package/esm/core/controllers/recently.js +2 -0
- package/esm/core/controllers/recently.js.map +1 -1
- package/esm/core/controllers/say.js +2 -0
- package/esm/core/controllers/say.js.map +1 -1
- package/esm/core/controllers/search.d.ts +6 -6
- package/esm/core/controllers/search.js +2 -0
- package/esm/core/controllers/search.js.map +1 -1
- package/esm/core/controllers/snippet.js +2 -0
- package/esm/core/controllers/snippet.js.map +1 -1
- package/esm/core/controllers/user.js +2 -0
- package/esm/core/controllers/user.js.map +1 -1
- package/esm/interfaces/instance.d.ts +11 -6
- package/esm/models/aggregate.d.ts +2 -1
- package/esm/models/aggregate.js.map +1 -1
- package/esm/models/post.d.ts +1 -9
- package/esm/utils/auto-bind.d.ts +4 -0
- package/esm/utils/auto-bind.js +36 -0
- package/esm/utils/auto-bind.js.map +1 -0
- package/lib/adaptors/axios.d.ts +3 -0
- package/lib/adaptors/axios.js +52 -0
- package/lib/adaptors/axios.js.map +1 -0
- package/lib/adaptors/umi-request.d.ts +3 -0
- package/lib/adaptors/umi-request.js +30 -0
- package/lib/adaptors/umi-request.js.map +1 -0
- package/lib/core/client.d.ts +1 -1
- package/lib/core/controllers/aggregate.d.ts +5 -7
- package/lib/core/controllers/aggregate.js +2 -0
- package/lib/core/controllers/aggregate.js.map +1 -1
- package/lib/core/controllers/base.d.ts +5 -7
- package/lib/core/controllers/base.js +2 -0
- package/lib/core/controllers/base.js.map +1 -1
- package/lib/core/controllers/category.d.ts +6 -16
- package/lib/core/controllers/category.js +5 -3
- package/lib/core/controllers/category.js.map +1 -1
- package/lib/core/controllers/comment.d.ts +6 -8
- package/lib/core/controllers/comment.js +2 -0
- package/lib/core/controllers/comment.js.map +1 -1
- package/lib/core/controllers/link.js +2 -0
- package/lib/core/controllers/link.js.map +1 -1
- package/lib/core/controllers/note.d.ts +8 -10
- package/lib/core/controllers/note.js +2 -0
- package/lib/core/controllers/note.js.map +1 -1
- package/lib/core/controllers/page.js +2 -0
- package/lib/core/controllers/page.js.map +1 -1
- package/lib/core/controllers/post.js +2 -0
- package/lib/core/controllers/post.js.map +1 -1
- package/lib/core/controllers/project.js +2 -0
- package/lib/core/controllers/project.js.map +1 -1
- package/lib/core/controllers/recently.js +2 -0
- package/lib/core/controllers/recently.js.map +1 -1
- package/lib/core/controllers/say.js +2 -0
- package/lib/core/controllers/say.js.map +1 -1
- package/lib/core/controllers/search.d.ts +6 -6
- package/lib/core/controllers/search.js +2 -0
- package/lib/core/controllers/search.js.map +1 -1
- package/lib/core/controllers/snippet.js +2 -0
- package/lib/core/controllers/snippet.js.map +1 -1
- package/lib/core/controllers/user.js +2 -0
- package/lib/core/controllers/user.js.map +1 -1
- package/lib/interfaces/instance.d.ts +11 -6
- package/lib/models/aggregate.d.ts +2 -1
- package/lib/models/aggregate.js.map +1 -1
- package/lib/models/post.d.ts +1 -9
- package/lib/utils/auto-bind.d.ts +4 -0
- package/lib/utils/auto-bind.js +40 -0
- package/lib/utils/auto-bind.js.map +1 -0
- package/package.json +21 -17
- package/readme.md +77 -57
- package/esm/types/helper.d.ts +0 -2
- package/esm/types/helper.js +0 -2
- package/esm/types/helper.js.map +0 -1
- package/lib/types/helper.d.ts +0 -2
- package/lib/types/helper.js +0 -3
- package/lib/types/helper.js.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.axiosAdaptor = void 0;
|
|
18
|
+
const axios_1 = __importDefault(require("axios"));
|
|
19
|
+
const $http = axios_1.default.create({});
|
|
20
|
+
// ignore axios `method` declare not assignable to `Method`
|
|
21
|
+
exports.axiosAdaptor = {
|
|
22
|
+
get default() {
|
|
23
|
+
return $http;
|
|
24
|
+
},
|
|
25
|
+
get(url, options) {
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
return $http.get(url, options);
|
|
28
|
+
},
|
|
29
|
+
post(url, options) {
|
|
30
|
+
const _a = options || {}, { data } = _a, config = __rest(_a, ["data"]);
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
return $http.post(url, data, config);
|
|
33
|
+
},
|
|
34
|
+
put(url, options) {
|
|
35
|
+
const _a = options || {}, { data } = _a, config = __rest(_a, ["data"]);
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
return $http.put(url, data, config);
|
|
38
|
+
},
|
|
39
|
+
delete(url, options) {
|
|
40
|
+
const config = __rest(options || {}
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
, []);
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
return $http.delete(url, config);
|
|
45
|
+
},
|
|
46
|
+
patch(url, options) {
|
|
47
|
+
const _a = options || {}, { data } = _a, config = __rest(_a, ["data"]);
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
return $http.patch(url, data, config);
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=axios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../src/adaptors/axios.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA4C;AAE5C,MAAM,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC,EAAE,CAAC,C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esModule", { value: true });
|
|
3
|
+
exports.umiAdaptor = void 0;
|
|
4
|
+
const umi_request_1 = require("umi-request");
|
|
5
|
+
const $http = (0, umi_request_1.extend)({
|
|
6
|
+
getResponse: true,
|
|
7
|
+
requestType: 'json',
|
|
8
|
+
responseType: 'json',
|
|
9
|
+
});
|
|
10
|
+
exports.umiAdaptor = {
|
|
11
|
+
get default() {
|
|
12
|
+
return $http;
|
|
13
|
+
},
|
|
14
|
+
get(url, options) {
|
|
15
|
+
return $http.get(url, options);
|
|
16
|
+
},
|
|
17
|
+
post(url, options) {
|
|
18
|
+
return $http.post(url, options);
|
|
19
|
+
},
|
|
20
|
+
put(url, options) {
|
|
21
|
+
return $http.put(url, options);
|
|
22
|
+
},
|
|
23
|
+
delete(url, options) {
|
|
24
|
+
return $http.delete(url, options);
|
|
25
|
+
},
|
|
26
|
+
patch(url, options) {
|
|
27
|
+
return $http.patch(url, options);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=umi-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"umi-request.js","sourceRoot":"","sources":["../../src/adaptors/umi-request.ts"],"names":[],"mappings":";;;AAAA,6CAAmD;AAEnD,MAAM,KAAK,GAAG,IAAA,oBAAM,EAAC;IACnB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;CACrB,CAAC,CAAA;AAEW,QAAA,UAAU,GAAyC;IAC9D,IAAI,OAAO;QACT,OAAO,KAAK,CAAA;IACd,CAAC;IACD,GAAG,CAAC,GAAG,EAAE,OAAO;QACd,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;IACD,IAAI,CAAC,GAAG,EAAE,OAAO;QACf,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IACjC,CAAC;IACD,GAAG,CAAC,GAAG,EAAE,OAAO;QACd,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;IACD,MAAM,CAAC,GAAG,EAAE,OAAO;QACjB,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IACnC,CAAC;IACD,KAAK,CAAC,GAAG,EAAE,OAAO;QAChB,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAClC,CAAC;CACF,CAAA"}
|
package/lib/core/client.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class HTTPClient extends HTTPControllerDefine {
|
|
|
13
13
|
injectControllers(...Controller: Class<IController>[]): void;
|
|
14
14
|
injectControllers(Controller: Class<IController>[]): void;
|
|
15
15
|
get endpoint(): string;
|
|
16
|
-
get instance(): IRequestAdapter
|
|
16
|
+
get instance(): IRequestAdapter<any>;
|
|
17
17
|
request(options: {
|
|
18
18
|
url: string;
|
|
19
19
|
method?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IController } from "../../interfaces/controller";
|
|
2
2
|
import { SortOrder } from "../../interfaces/options";
|
|
3
|
+
import { RequestProxyResult } from "../../interfaces/request";
|
|
3
4
|
import { AggregateRoot, AggregateStat, AggregateTop, TimelineData, TimelineType } from "../../models/aggregate";
|
|
4
5
|
import { HTTPClient } from '..';
|
|
5
6
|
export declare class AggregateController implements IController {
|
|
@@ -11,14 +12,11 @@ export declare class AggregateController implements IController {
|
|
|
11
12
|
/**
|
|
12
13
|
* 获取聚合数据
|
|
13
14
|
*/
|
|
14
|
-
getAggregateData():
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
data: AggregateRoot;
|
|
17
|
-
}>;
|
|
15
|
+
getAggregateData(): RequestProxyResult<AggregateRoot>;
|
|
18
16
|
/**
|
|
19
17
|
* 获取最新发布的内容
|
|
20
18
|
*/
|
|
21
|
-
getTop(size?: number):
|
|
19
|
+
getTop(size?: number): RequestProxyResult<AggregateTop, {
|
|
22
20
|
[key: string]: any;
|
|
23
21
|
data: AggregateTop;
|
|
24
22
|
}>;
|
|
@@ -26,7 +24,7 @@ export declare class AggregateController implements IController {
|
|
|
26
24
|
sort?: SortOrder;
|
|
27
25
|
type?: TimelineType;
|
|
28
26
|
year?: number;
|
|
29
|
-
}):
|
|
27
|
+
}): RequestProxyResult<{
|
|
30
28
|
data: TimelineData;
|
|
31
29
|
}, {
|
|
32
30
|
[key: string]: any;
|
|
@@ -37,7 +35,7 @@ export declare class AggregateController implements IController {
|
|
|
37
35
|
/**
|
|
38
36
|
* 获取聚合数据统计
|
|
39
37
|
*/
|
|
40
|
-
getStat():
|
|
38
|
+
getStat(): RequestProxyResult<AggregateStat, {
|
|
41
39
|
[key: string]: any;
|
|
42
40
|
data: AggregateStat;
|
|
43
41
|
}>;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AggregateController = void 0;
|
|
4
4
|
const utils_1 = require("../../utils");
|
|
5
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
5
6
|
class AggregateController {
|
|
6
7
|
constructor(client) {
|
|
7
8
|
this.client = client;
|
|
8
9
|
this.base = 'aggregate';
|
|
9
10
|
this.name = 'aggregate';
|
|
11
|
+
(0, auto_bind_1.autoBind)(this);
|
|
10
12
|
}
|
|
11
13
|
get proxy() {
|
|
12
14
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate.js","sourceRoot":"","sources":["../../../src/core/controllers/aggregate.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"aggregate.js","sourceRoot":"","sources":["../../../src/core/controllers/aggregate.ts"],"names":[],"mappings":";;;AAUA,uCAA2C;AAC3C,qDAA4C;AAG5C,MAAa,mBAAmB;IAG9B,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAFtC,SAAI,GAAG,WAAW,CAAA;QAClB,SAAI,GAAG,WAAW,CAAA;QAEhB,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IACD,IAAY,KAAK;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,EAAiB,CAAA;IACxC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,GAAG,CAAC;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAe,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED,WAAW,CAAC,OAIX;QACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;QAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAyB;YACrD,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,IAAI,IAAA,yBAAiB,EAAC,IAAI,CAAC;gBACrC,IAAI;gBACJ,IAAI;aACL;SACF,CAAC,CAAA;IACJ,CAAC;IACD;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAiB,CAAA;IAC7C,CAAC;CACF;AA5CD,kDA4CC"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import { IRequestHandler, RequestProxyResult } from "../../interfaces/request";
|
|
1
2
|
import { PaginateResult } from "../../models/base";
|
|
2
3
|
import { HTTPClient } from '..';
|
|
3
4
|
export declare abstract class BaseCrudController<T> {
|
|
4
5
|
protected client: HTTPClient;
|
|
5
6
|
base: string;
|
|
6
7
|
constructor(client: HTTPClient);
|
|
7
|
-
protected get proxy():
|
|
8
|
-
getById(id: string):
|
|
9
|
-
|
|
10
|
-
data: T;
|
|
11
|
-
}>;
|
|
12
|
-
getAll(): import("../../interfaces/request").RequestProxyResult<{
|
|
8
|
+
protected get proxy(): IRequestHandler;
|
|
9
|
+
getById(id: string): RequestProxyResult<T>;
|
|
10
|
+
getAll(): RequestProxyResult<{
|
|
13
11
|
data: T[];
|
|
14
12
|
}, {
|
|
15
13
|
[key: string]: any;
|
|
@@ -22,7 +20,7 @@ export declare abstract class BaseCrudController<T> {
|
|
|
22
20
|
* @param page
|
|
23
21
|
* @param perPage
|
|
24
22
|
*/
|
|
25
|
-
getAllPaginated(page?: number, perPage?: number):
|
|
23
|
+
getAllPaginated(page?: number, perPage?: number): RequestProxyResult<PaginateResult<T>, {
|
|
26
24
|
[key: string]: any;
|
|
27
25
|
data: PaginateResult<T>;
|
|
28
26
|
}>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseCrudController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
class BaseCrudController {
|
|
5
6
|
constructor(client) {
|
|
6
7
|
this.client = client;
|
|
8
|
+
(0, auto_bind_1.autoBind)(this);
|
|
7
9
|
}
|
|
8
10
|
get proxy() {
|
|
9
11
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/core/controllers/base.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/core/controllers/base.ts"],"names":[],"mappings":";;;AAEA,qDAA4C;AAG5C,MAAsB,kBAAkB;IAEtC,YAAsB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QACtC,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IACD,IAAc,KAAK;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED,OAAO,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,EAAK,CAAA;IAChC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAiB,CAAA;IAC5C,CAAC;IACD;;;;OAIG;IACH,eAAe,CAAC,IAAa,EAAE,OAAgB;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB;YACvC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;SAChC,CAAC,CAAA;IACJ,CAAC;CACF;AA1BD,gDA0BC"}
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
import { IController } from "../../interfaces/controller";
|
|
2
|
-
import { ResponseProxyExtraRaw } from "../../interfaces/request";
|
|
3
|
-
import { CategoryWithChildrenModel, TagModel } from
|
|
4
|
-
import {
|
|
5
|
-
import { HTTPClient } from '
|
|
2
|
+
import { RequestProxyResult, ResponseProxyExtraRaw } from "../../interfaces/request";
|
|
3
|
+
import { CategoryModel, CategoryWithChildrenModel, TagModel } from '../../models/category';
|
|
4
|
+
import { PostModel } from '../../models/post';
|
|
5
|
+
import { HTTPClient } from '../client';
|
|
6
6
|
export declare class CategoryController implements IController {
|
|
7
7
|
private client;
|
|
8
8
|
name: string;
|
|
9
9
|
base: string;
|
|
10
10
|
constructor(client: HTTPClient);
|
|
11
11
|
private get proxy();
|
|
12
|
-
getAllCategories():
|
|
12
|
+
getAllCategories(): RequestProxyResult<{
|
|
13
13
|
data: CategoryModel[];
|
|
14
|
-
}, {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
data: {
|
|
17
|
-
data: CategoryModel[];
|
|
18
|
-
};
|
|
19
14
|
}>;
|
|
20
|
-
getAllTags():
|
|
15
|
+
getAllTags(): RequestProxyResult<{
|
|
21
16
|
data: TagModel[];
|
|
22
|
-
}, {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
data: {
|
|
25
|
-
data: TagModel[];
|
|
26
|
-
};
|
|
27
17
|
}>;
|
|
28
18
|
getCategoryDetail(id: string): Promise<ResponseProxyExtraRaw<CategoryWithChildrenModel>>;
|
|
29
19
|
getCategoryDetail(ids: string[]): Promise<ResponseProxyExtraRaw<Map<string, CategoryWithChildrenModel>>>;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CategoryController = void 0;
|
|
4
|
-
const category_1 = require("../../models/category");
|
|
5
4
|
const utils_1 = require("../../utils");
|
|
6
|
-
const
|
|
5
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
6
|
+
const category_1 = require("../../models/category");
|
|
7
|
+
const error_1 = require("../error");
|
|
7
8
|
class CategoryController {
|
|
8
9
|
constructor(client) {
|
|
9
10
|
this.client = client;
|
|
10
11
|
this.name = 'category';
|
|
11
12
|
this.base = 'categories';
|
|
13
|
+
(0, auto_bind_1.autoBind)(this);
|
|
12
14
|
}
|
|
13
15
|
get proxy() {
|
|
14
16
|
return this.client.proxy(this.base);
|
|
@@ -46,7 +48,7 @@ class CategoryController {
|
|
|
46
48
|
});
|
|
47
49
|
const entries = data === null || data === void 0 ? void 0 : data.entries;
|
|
48
50
|
if (!entries) {
|
|
49
|
-
throw new
|
|
51
|
+
throw new error_1.RequestError('data structure error', 500, data.$request.path, data);
|
|
50
52
|
}
|
|
51
53
|
const map = new Map(Object.entries(entries).map(([id, value]) => [id.toLowerCase(), value]));
|
|
52
54
|
(0, utils_1.attachRawFromOneToAnthor)(data, map);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../src/core/controllers/category.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../src/core/controllers/category.ts"],"names":[],"mappings":";;;AAEA,uCAAmE;AACnE,qDAA4C;AAC5C,oDA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CAAC,CAAA;YACF,MAAM,OAAO,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAA;YAC7B,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAM,IAAI,oBAAY,CACpB,sBAAsB,EACtB,GAAG,EACH,IAAI,CAAC,QAAQ,CAAC,IAAI,EAClB,IAAI,CACL,CAAA;aACF;YAED,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC,CACxE,CAAA;YAED,IAAA,gCAAwB,EAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACnC,OAAO,GAAG,CAAA;SACX;IACH,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QAC1C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,EAA6B,CAAA;QACvE,OAAO,IAAA,uBAAe,EAAC,GAAG,CAAe,CAAA;IAC3C,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,IAAY;QAC7B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAGnC;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,CAAC;aACP;SACF,CAAC,CAAA;QAEF,OAAO,GAAG,CAAA;IACZ,CAAC;CACF;AArFD,gDAqFC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IController } from "../../interfaces/controller";
|
|
2
2
|
import { PaginationParams } from "../../interfaces/params";
|
|
3
|
+
import { IRequestHandler, RequestProxyResult } from "../../interfaces/request";
|
|
3
4
|
import { PaginateResult } from "../../models/base";
|
|
4
5
|
import { CommentModel } from "../../models/comment";
|
|
5
6
|
import { HTTPClient } from '..';
|
|
@@ -9,33 +10,30 @@ export declare class CommentController implements IController {
|
|
|
9
10
|
base: string;
|
|
10
11
|
name: string;
|
|
11
12
|
constructor(client: HTTPClient);
|
|
12
|
-
get proxy():
|
|
13
|
+
get proxy(): IRequestHandler;
|
|
13
14
|
/**
|
|
14
15
|
* 根据 comment id 获取评论, 包括子评论
|
|
15
16
|
*/
|
|
16
|
-
getById(id: string):
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
data: CommentModel;
|
|
19
|
-
}>;
|
|
17
|
+
getById(id: string): RequestProxyResult<CommentModel>;
|
|
20
18
|
/**
|
|
21
19
|
* 获取文章的评论列表
|
|
22
20
|
* @param refId 文章 Id
|
|
23
21
|
*/
|
|
24
|
-
getByRefId(refId: string, pagination?: PaginationParams):
|
|
22
|
+
getByRefId(refId: string, pagination?: PaginationParams): RequestProxyResult<PaginateResult<CommentModel>, {
|
|
25
23
|
[key: string]: any;
|
|
26
24
|
data: PaginateResult<CommentModel>;
|
|
27
25
|
}>;
|
|
28
26
|
/**
|
|
29
27
|
* 评论
|
|
30
28
|
*/
|
|
31
|
-
comment(refId: string, data: CommentDto):
|
|
29
|
+
comment(refId: string, data: CommentDto): RequestProxyResult<CommentModel, {
|
|
32
30
|
[key: string]: any;
|
|
33
31
|
data: CommentModel;
|
|
34
32
|
}>;
|
|
35
33
|
/**
|
|
36
34
|
* 回复评论
|
|
37
35
|
*/
|
|
38
|
-
reply(commentId: string, data: CommentDto):
|
|
36
|
+
reply(commentId: string, data: CommentDto): RequestProxyResult<CommentModel, {
|
|
39
37
|
[key: string]: any;
|
|
40
38
|
data: CommentModel;
|
|
41
39
|
}>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommentController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
class CommentController {
|
|
5
6
|
constructor(client) {
|
|
6
7
|
this.client = client;
|
|
7
8
|
this.base = 'comments';
|
|
8
9
|
this.name = 'comment';
|
|
10
|
+
(0, auto_bind_1.autoBind)(this);
|
|
9
11
|
}
|
|
10
12
|
get proxy() {
|
|
11
13
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/core/controllers/comment.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/core/controllers/comment.ts"],"names":[],"mappings":";;;AAKA,qDAA4C;AAI5C,MAAa,iBAAiB;IAI5B,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAH/C,SAAI,GAAG,UAAU,CAAA;QACjB,SAAI,GAAG,SAAS,CAAA;QAGd,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,EAAgB,CAAA;IAC3C,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,KAAa,EAAE,aAA+B,EAAE;QACzD,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,UAAU,CAAA;QACjC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAA+B;YAC7D,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE,EAAE;SAC9C,CAAC,CAAA;IACJ,CAAC;IACD;;OAEG;IACH,OAAO,CAAC,KAAa,EAAE,IAAgB;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAe;YAC1C,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAiB,EAAE,IAAgB;QACvC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CAAe;YACpD,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF;AA9CD,8CA8CC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LinkController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
const base_1 = require("./base");
|
|
5
6
|
class LinkController extends base_1.BaseCrudController {
|
|
6
7
|
constructor(client) {
|
|
@@ -8,6 +9,7 @@ class LinkController extends base_1.BaseCrudController {
|
|
|
8
9
|
this.client = client;
|
|
9
10
|
this.name = 'link';
|
|
10
11
|
this.base = 'links';
|
|
12
|
+
(0, auto_bind_1.autoBind)(this);
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
exports.LinkController = LinkController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/core/controllers/link.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/core/controllers/link.ts"],"names":[],"mappings":";;;AACA,qDAA4C;AAE5C,iCAA2C;AAE3C,MAAa,cAAe,SAAQ,yBAA6B;IAC/D,YAA+B,MAAkB;QAC/C,KAAK,CAAC,MAAM,CAAC,CAAA;QADgB,WAAM,GAAN,MAAM,CAAY;QAKjD,SAAI,GAAG,MAAM,CAAA;QACb,SAAI,GAAG,OAAO,CAAA;QAJZ,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;CAIF;AARD,wCAQC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IController } from "../../interfaces/controller";
|
|
2
|
+
import { IRequestHandler, RequestProxyResult } from "../../interfaces/request";
|
|
2
3
|
import { PaginateResult } from "../../models/base";
|
|
3
4
|
import { NoteModel, NoteWrappedPayload } from "../../models/note";
|
|
4
5
|
import { SelectFields } from "../../types/helper";
|
|
5
|
-
import { HTTPClient } from '
|
|
6
|
+
import { HTTPClient } from '../client';
|
|
6
7
|
export declare type NoteListOptions = {
|
|
7
8
|
select?: SelectFields<keyof NoteModel>;
|
|
8
9
|
year?: number;
|
|
@@ -14,34 +15,31 @@ export declare class NoteController implements IController {
|
|
|
14
15
|
base: string;
|
|
15
16
|
name: string;
|
|
16
17
|
constructor(client: HTTPClient);
|
|
17
|
-
get proxy():
|
|
18
|
+
get proxy(): IRequestHandler;
|
|
18
19
|
/**
|
|
19
20
|
* 最新日记
|
|
20
21
|
*/
|
|
21
|
-
getLatest():
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
data: NoteWrappedPayload;
|
|
24
|
-
}>;
|
|
22
|
+
getLatest(): RequestProxyResult<NoteWrappedPayload>;
|
|
25
23
|
/**
|
|
26
24
|
* 获取一篇日记
|
|
27
25
|
* @param id id | nid
|
|
28
26
|
* @param password 访问密码
|
|
29
27
|
*/
|
|
30
|
-
getNoteById(id: string | number, password?: string):
|
|
28
|
+
getNoteById(id: string | number, password?: string): RequestProxyResult<NoteWrappedPayload, {
|
|
31
29
|
[key: string]: any;
|
|
32
30
|
data: NoteWrappedPayload;
|
|
33
31
|
}>;
|
|
34
32
|
/**
|
|
35
33
|
* 日记列表分页
|
|
36
34
|
*/
|
|
37
|
-
getList(page?: number, perPage?: number, options?: NoteListOptions):
|
|
35
|
+
getList(page?: number, perPage?: number, options?: NoteListOptions): RequestProxyResult<PaginateResult<NoteModel>, {
|
|
38
36
|
[key: string]: any;
|
|
39
37
|
data: PaginateResult<NoteModel>;
|
|
40
38
|
}>;
|
|
41
39
|
/**
|
|
42
40
|
* 获取当前日记的上下各 n / 2 篇日记
|
|
43
41
|
*/
|
|
44
|
-
getMiddleList(id: string, size?: number):
|
|
42
|
+
getMiddleList(id: string, size?: number): RequestProxyResult<{
|
|
45
43
|
data: Pick<NoteModel, 'id' | 'title' | 'nid' | 'created'>[];
|
|
46
44
|
size: number;
|
|
47
45
|
}, {
|
|
@@ -54,7 +52,7 @@ export declare class NoteController implements IController {
|
|
|
54
52
|
/**
|
|
55
53
|
* 喜欢这篇日记
|
|
56
54
|
*/
|
|
57
|
-
likeIt(id: string):
|
|
55
|
+
likeIt(id: string): RequestProxyResult<never, {
|
|
58
56
|
[key: string]: any;
|
|
59
57
|
data: never;
|
|
60
58
|
}>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NoteController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
class NoteController {
|
|
5
6
|
constructor(client) {
|
|
6
7
|
this.client = client;
|
|
7
8
|
this.base = 'notes';
|
|
8
9
|
this.name = 'note';
|
|
10
|
+
(0, auto_bind_1.autoBind)(this);
|
|
9
11
|
}
|
|
10
12
|
get proxy() {
|
|
11
13
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../../src/core/controllers/note.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../../src/core/controllers/note.ts"],"names":[],"mappings":";;;AAKA,qDAA4C;AAU5C,MAAa,cAAc;IAIzB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAHtC,SAAI,GAAG,OAAO,CAAA;QACd,SAAI,GAAG,MAAM,CAAA;QAGX,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IACD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,I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AC;CACF;AAtED,wCAsEC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
class PageController {
|
|
5
6
|
constructor(client) {
|
|
6
7
|
this.client = client;
|
|
7
8
|
this.base = 'pages';
|
|
8
9
|
this.name = 'page';
|
|
10
|
+
(0, auto_bind_1.autoBind)(this);
|
|
9
11
|
}
|
|
10
12
|
get proxy() {
|
|
11
13
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/core/controllers/page.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/core/controllers/page.ts"],"names":[],"mappings":";;;AAIA,qDAA4C;AAS5C,MAAa,cAAc;IACzB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAG/C,SAAI,GAAG,OAAO,CAAA;QACd,SAAI,GAAG,MAAM,CAAA;QAHX,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IAGD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IACD;;OAEG;IACH,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,OAAO,GAAG,EAAE,EAAE,UAA2B,EAAE;QAC3D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAA;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B;YAC/C,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,GAAG,CAAC;gBACzB,MAAM;gBACN,SAAS;aACV;SACF,CAAC,CAAA;IACJ,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,EAAa,CAAA;IACxC,CAAC;IACD;;;;OAIG;IACH,SAAS,CAAC,IAAY;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAY,EAAE,CAAC,CAAA;IACjD,CAAC;CACF;AAvCD,wCAuCC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PostController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
class PostController {
|
|
5
6
|
constructor(client) {
|
|
6
7
|
this.client = client;
|
|
7
8
|
this.base = 'posts';
|
|
8
9
|
this.name = 'post';
|
|
10
|
+
(0, auto_bind_1.autoBind)(this);
|
|
9
11
|
}
|
|
10
12
|
get proxy() {
|
|
11
13
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/core/controllers/post.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/core/controllers/post.ts"],"names":[],"mappings":";;;AAKA,qDAA4C;AAU5C,MAAa,cAAc;IACzB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAItC,SAAI,GAAG,OAAO,CAAA;QAEd,SAAI,GAAG,MAAM,CAAA;QALX,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IAMD,IAAY,KAAK;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,OAAO,GAAG,EAAE,EAAE,UAA2B,EAAE;QAC3D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;QACnD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B;YAC/C,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,GAAG,CAAC;gBACzB,MAAM;gBACN,SAAS;gBACT,IAAI;aACL;SACF,CAAC,CAAA;IACJ,CAAC;IAaD,OAAO,CAAC,gBAAwB,EAAE,IAAa;QAC7C,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,EAAa,CAAA;SACrD;aAAM;YACL,OAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAa,CAAA;SAC3D;IACH,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAa,CAAA;IAC3C,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,CAAO,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IAC/D,CAAC;CACF;AAjED,wCAiEC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProjectController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
const base_1 = require("./base");
|
|
5
6
|
class ProjectController extends base_1.BaseCrudController {
|
|
6
7
|
constructor(client) {
|
|
@@ -8,6 +9,7 @@ class ProjectController extends base_1.BaseCrudController {
|
|
|
8
9
|
this.client = client;
|
|
9
10
|
this.base = 'projects';
|
|
10
11
|
this.name = 'project';
|
|
12
|
+
(0, auto_bind_1.autoBind)(this);
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
exports.ProjectController = ProjectController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/core/controllers/project.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/core/controllers/project.ts"],"names":[],"mappings":";;;AACA,qDAA4C;AAE5C,iCAA2C;AAE3C,MAAa,iBAAkB,SAAQ,yBAAgC;IACrE,YAA+B,MAAkB;QAC/C,KAAK,CAAC,MAAM,CAAC,CAAA;QADgB,WAAM,GAAN,MAAM,CAAY;QAKjD,SAAI,GAAG,UAAU,CAAA;QACjB,SAAI,GAAG,SAAS,CAAA;QAJd,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;CAIF;AARD,8CAQC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RecentlyController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
class RecentlyController {
|
|
5
6
|
constructor(client) {
|
|
6
7
|
this.client = client;
|
|
7
8
|
this.base = 'recently';
|
|
8
9
|
this.name = 'recently';
|
|
10
|
+
(0, auto_bind_1.autoBind)(this);
|
|
9
11
|
}
|
|
10
12
|
get proxy() {
|
|
11
13
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recently.js","sourceRoot":"","sources":["../../../src/core/controllers/recently.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"recently.js","sourceRoot":"","sources":["../../../src/core/controllers/recently.ts"],"names":[],"mappings":";;;AAEA,qDAA4C;AAG5C,MAAa,kBAAkB;IAI7B,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAH/C,SAAI,GAAG,UAAU,CAAA;QACjB,SAAI,GAAG,UAAU,CAAA;QAGf,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IACD;;OAEG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAiB,CAAA;IAC/C,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAA6B,CAAA;IACxD,CAAC;IAED,OAAO,CACL,MAA2B,EAC3B,KAA0B,EAC1B,IAAsB;QAEtB,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAA;SAC3D;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B;YAC/C,MAAM,EAAE;gBACN,MAAM;gBACN,KAAK;gBACL,IAAI;aACL;SACF,CAAC,CAAA;IACJ,CAAC;CACF;AAtCD,gDAsCC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SayController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../../utils/auto-bind");
|
|
4
5
|
const base_1 = require("./base");
|
|
5
6
|
class SayController extends base_1.BaseCrudController {
|
|
6
7
|
constructor(client) {
|
|
@@ -8,6 +9,7 @@ class SayController extends base_1.BaseCrudController {
|
|
|
8
9
|
this.client = client;
|
|
9
10
|
this.base = 'says';
|
|
10
11
|
this.name = 'say';
|
|
12
|
+
(0, auto_bind_1.autoBind)(this);
|
|
11
13
|
}
|
|
12
14
|
get proxy() {
|
|
13
15
|
return this.client.proxy(this.base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"say.js","sourceRoot":"","sources":["../../../src/core/controllers/say.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"say.js","sourceRoot":"","sources":["../../../src/core/controllers/say.ts"],"names":[],"mappings":";;;AAEA,qDAA4C;AAE5C,iCAA2C;AAE3C,MAAa,aACX,SAAQ,yBAA4B;IAMpC,YAAsB,MAAkB;QACtC,KAAK,CAAC,MAAM,CAAC,CAAA;QADO,WAAM,GAAN,MAAM,CAAY;QAHxC,SAAI,GAAG,MAAM,CAAA;QACb,SAAI,GAAG,KAAK,CAAA;QAIV,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IAED,IAAc,KAAK;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAA6B,CAAA;IAC3D,CAAC;CACF;AAtBD,sCAsBC"}
|