@mx-space/api-client 0.9.4 → 0.10.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/adaptors/axios.ts +3 -2
- package/adaptors/umi-request.ts +3 -2
- package/build/index.cjs.js +26 -0
- 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.esm.js +26 -1
- 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 +26 -0
- 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/controllers/aggregate.ts +6 -6
- package/controllers/base.ts +3 -3
- package/controllers/category.ts +7 -7
- package/controllers/comment.ts +8 -8
- package/controllers/index.ts +3 -0
- package/controllers/link.ts +3 -3
- package/controllers/note.ts +9 -0
- package/controllers/page.ts +7 -7
- package/controllers/post.ts +7 -7
- package/controllers/project.ts +3 -3
- package/controllers/recently.ts +5 -5
- package/controllers/say.ts +5 -5
- package/controllers/search.ts +8 -8
- package/controllers/severless.ts +4 -4
- package/controllers/snippet.ts +4 -4
- package/controllers/topic.ts +39 -0
- package/controllers/user.ts +5 -5
- package/core/client.ts +6 -6
- package/esm/adaptors/axios.d.ts +2 -2
- package/esm/adaptors/axios.js.map +1 -1
- package/esm/adaptors/umi-request.d.ts +2 -2
- package/esm/adaptors/umi-request.js.map +1 -1
- package/esm/controllers/aggregate.d.ts +6 -6
- package/esm/controllers/base.d.ts +3 -3
- package/esm/controllers/category.d.ts +7 -6
- package/esm/controllers/category.js +1 -1
- package/esm/controllers/category.js.map +1 -1
- package/esm/controllers/comment.d.ts +8 -8
- package/esm/controllers/index.d.ts +3 -2
- package/esm/controllers/index.js +3 -1
- package/esm/controllers/index.js.map +1 -1
- package/esm/controllers/link.d.ts +3 -3
- package/esm/controllers/note.d.ts +11 -0
- package/esm/controllers/note.js +8 -0
- package/esm/controllers/note.js.map +1 -1
- package/esm/controllers/page.d.ts +7 -7
- package/esm/controllers/post.d.ts +7 -7
- package/esm/controllers/project.d.ts +3 -3
- package/esm/controllers/recently.d.ts +5 -5
- package/esm/controllers/say.d.ts +5 -5
- package/esm/controllers/search.d.ts +8 -8
- package/esm/controllers/severless.d.ts +4 -4
- package/esm/controllers/snippet.d.ts +4 -4
- package/esm/controllers/topic.d.ts +27 -0
- package/esm/controllers/topic.js +18 -0
- package/esm/controllers/topic.js.map +1 -0
- package/esm/controllers/user.d.ts +5 -5
- package/esm/core/client.d.ts +5 -5
- package/esm/interfaces/adapter.d.ts +1 -1
- package/esm/interfaces/client.d.ts +2 -2
- package/esm/models/aggregate.d.ts +7 -7
- package/esm/models/category.d.ts +2 -2
- package/esm/models/comment.d.ts +2 -2
- package/esm/models/link.d.ts +1 -1
- package/esm/models/note.d.ts +1 -1
- package/esm/models/page.d.ts +1 -1
- package/esm/models/post.d.ts +2 -2
- package/esm/models/project.d.ts +1 -1
- package/esm/models/recently.d.ts +1 -1
- package/esm/models/say.d.ts +1 -1
- package/esm/models/snippet.d.ts +1 -1
- package/esm/models/topic.d.ts +8 -0
- package/esm/models/topic.js +2 -0
- package/esm/models/topic.js.map +1 -0
- package/esm/models/user.d.ts +1 -1
- package/esm/utils/index.d.ts +1 -1
- package/interfaces/adapter.ts +1 -1
- package/interfaces/client.ts +2 -2
- package/lib/adaptors/axios.d.ts +2 -2
- package/lib/adaptors/axios.js.map +1 -1
- package/lib/adaptors/umi-request.d.ts +2 -2
- package/lib/adaptors/umi-request.js.map +1 -1
- package/lib/controllers/aggregate.d.ts +6 -6
- package/lib/controllers/base.d.ts +3 -3
- package/lib/controllers/category.d.ts +7 -6
- package/lib/controllers/category.js.map +1 -1
- package/lib/controllers/comment.d.ts +8 -8
- package/lib/controllers/index.d.ts +3 -2
- package/lib/controllers/index.js +4 -1
- package/lib/controllers/index.js.map +1 -1
- package/lib/controllers/link.d.ts +3 -3
- package/lib/controllers/note.d.ts +11 -0
- package/lib/controllers/note.js +8 -0
- package/lib/controllers/note.js.map +1 -1
- package/lib/controllers/page.d.ts +7 -7
- package/lib/controllers/post.d.ts +7 -7
- package/lib/controllers/project.d.ts +3 -3
- package/lib/controllers/recently.d.ts +5 -5
- package/lib/controllers/say.d.ts +5 -5
- package/lib/controllers/search.d.ts +8 -8
- package/lib/controllers/severless.d.ts +4 -4
- package/lib/controllers/snippet.d.ts +4 -4
- package/lib/controllers/topic.d.ts +27 -0
- package/lib/controllers/topic.js +22 -0
- package/lib/controllers/topic.js.map +1 -0
- package/lib/controllers/user.d.ts +5 -5
- package/lib/core/client.d.ts +5 -5
- package/lib/interfaces/adapter.d.ts +1 -1
- package/lib/interfaces/client.d.ts +2 -2
- package/lib/models/aggregate.d.ts +7 -7
- package/lib/models/category.d.ts +2 -2
- package/lib/models/comment.d.ts +2 -2
- package/lib/models/link.d.ts +1 -1
- package/lib/models/note.d.ts +1 -1
- package/lib/models/page.d.ts +1 -1
- package/lib/models/post.d.ts +2 -2
- package/lib/models/project.d.ts +1 -1
- package/lib/models/recently.d.ts +1 -1
- package/lib/models/say.d.ts +1 -1
- package/lib/models/snippet.d.ts +1 -1
- package/lib/models/topic.d.ts +8 -0
- package/lib/models/topic.js +3 -0
- package/lib/models/topic.js.map +1 -0
- package/lib/models/user.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/models/aggregate.ts +7 -7
- package/models/category.ts +2 -2
- package/models/comment.ts +2 -2
- package/models/link.ts +1 -1
- package/models/note.ts +1 -1
- 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/topic.ts +9 -0
- package/models/user.ts +1 -1
- package/package.json +6 -6
- package/types/adaptors/axios.d.ts +2 -2
- package/types/adaptors/umi-request.d.ts +2 -2
- package/types/controllers/aggregate.d.ts +6 -6
- package/types/controllers/base.d.ts +3 -3
- package/types/controllers/category.d.ts +7 -6
- package/types/controllers/comment.d.ts +8 -8
- package/types/controllers/index.d.ts +3 -2
- package/types/controllers/link.d.ts +3 -3
- package/types/controllers/note.d.ts +11 -0
- package/types/controllers/page.d.ts +7 -7
- package/types/controllers/post.d.ts +7 -7
- package/types/controllers/project.d.ts +3 -3
- package/types/controllers/recently.d.ts +5 -5
- package/types/controllers/say.d.ts +5 -5
- package/types/controllers/search.d.ts +8 -8
- package/types/controllers/severless.d.ts +4 -4
- package/types/controllers/snippet.d.ts +4 -4
- package/types/controllers/topic.d.ts +27 -0
- package/types/controllers/user.d.ts +5 -5
- package/types/core/client.d.ts +5 -5
- package/types/interfaces/adapter.d.ts +1 -1
- package/types/interfaces/client.d.ts +2 -2
- package/types/models/aggregate.d.ts +7 -7
- package/types/models/category.d.ts +2 -2
- package/types/models/comment.d.ts +2 -2
- package/types/models/link.d.ts +1 -1
- package/types/models/note.d.ts +1 -1
- package/types/models/page.d.ts +1 -1
- package/types/models/post.d.ts +2 -2
- package/types/models/project.d.ts +1 -1
- package/types/models/recently.d.ts +1 -1
- package/types/models/say.d.ts +1 -1
- package/types/models/snippet.d.ts +1 -1
- package/types/models/topic.d.ts +8 -0
- package/types/models/user.d.ts +1 -1
- package/types/utils/index.d.ts +1 -1
- package/utils/index.ts +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CategoryModel } from './category';
|
|
2
|
-
import { NoteModel } from './note';
|
|
3
|
-
import { PageModel } from './page';
|
|
4
|
-
import { PostModel } from './post';
|
|
5
|
-
import { SayModel } from './say';
|
|
6
|
-
import { SeoOptionModel } from './setting';
|
|
7
|
-
import { UserModel } from './user';
|
|
1
|
+
import type { CategoryModel } from './category';
|
|
2
|
+
import type { NoteModel } from './note';
|
|
3
|
+
import type { PageModel } from './page';
|
|
4
|
+
import type { PostModel } from './post';
|
|
5
|
+
import type { SayModel } from './say';
|
|
6
|
+
import type { SeoOptionModel } from './setting';
|
|
7
|
+
import type { UserModel } from './user';
|
|
8
8
|
export interface AggregateRoot {
|
|
9
9
|
user: UserModel;
|
|
10
10
|
seo: SeoOptionModel;
|
package/esm/models/category.d.ts
CHANGED
package/esm/models/comment.d.ts
CHANGED
package/esm/models/link.d.ts
CHANGED
package/esm/models/note.d.ts
CHANGED
package/esm/models/page.d.ts
CHANGED
package/esm/models/post.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Count, Image, TextBaseModel } from './base';
|
|
2
|
-
import { CategoryModel } from './category';
|
|
1
|
+
import type { Count, Image, TextBaseModel } from './base';
|
|
2
|
+
import type { CategoryModel } from './category';
|
|
3
3
|
export interface PostModel extends TextBaseModel {
|
|
4
4
|
summary?: string;
|
|
5
5
|
copyright: boolean;
|
package/esm/models/project.d.ts
CHANGED
package/esm/models/recently.d.ts
CHANGED
package/esm/models/say.d.ts
CHANGED
package/esm/models/snippet.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topic.js","sourceRoot":"","sources":["../../models/topic.ts"],"names":[],"mappings":""}
|
package/esm/models/user.d.ts
CHANGED
package/esm/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SortOrder } from '../interfaces/options';
|
|
1
|
+
import type { SortOrder } from '../interfaces/options';
|
|
2
2
|
export declare const isPlainObject: (obj: any) => any;
|
|
3
3
|
export declare const sortOrderToNumber: (order: SortOrder) => number;
|
|
4
4
|
export declare const destructureData: (payload: any) => any;
|
package/interfaces/adapter.ts
CHANGED
package/interfaces/client.ts
CHANGED
package/lib/adaptors/axios.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
1
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
3
3
|
export declare const axiosAdaptor: IRequestAdapter<AxiosInstance, AxiosResponse<unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../adaptors/axios.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../adaptors/axios.ts"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AAIzB,MAAM,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;AAE9B,2DAA2D;AAC9C,QAAA,YAAY,GAGrB,MAAM,CAAC,iBAAiB,CAAC;IAC3B,IAAI,OAAO;QACT,OAAO,KAAK,CAAA;IACd,CAAC;IACD,eAAe,EAAE,EAAmC;IACpD,GAAG,CAAC,GAAG,EAAE,OAAO;QACd,aAAa;QACb,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;IACD,IAAI,CAAC,GAAG,EAAE,OAAO;QACf,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;QACzC,aAAa;QACb,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IACtC,CAAC;IACD,GAAG,CAAC,GAAG,EAAE,OAAO;QACd,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;QACzC,aAAa;QACb,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IACrC,CAAC;IACD,MAAM,CAAC,GAAG,EAAE,OAAO;QACjB,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;QACnC,aAAa;QACb,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC;IACD,KAAK,CAAC,GAAG,EAAE,OAAO;QAChB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;QACzC,aAAa;QACb,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IACvC,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RequestMethod, RequestResponse } from 'umi-request';
|
|
2
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
1
|
+
import type { RequestMethod, RequestResponse } from 'umi-request';
|
|
2
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
3
3
|
export declare const umiAdaptor: IRequestAdapter<RequestMethod<true>, RequestResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"umi-request.js","sourceRoot":"","sources":["../../adaptors/umi-request.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"umi-request.js","sourceRoot":"","sources":["../../adaptors/umi-request.ts"],"names":[],"mappings":";;;AACA,6CAAoC;AAIpC,MAAM,KAAK,GAAG,IAAA,oBAAM,EAAC;IACnB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;CACrB,CAAC,CAAA;AAEW,QAAA,UAAU,GAGnB,MAAM,CAAC,iBAAiB,CAAC;IAC3B,IAAI,OAAO;QACT,OAAO,KAAK,CAAA;IACd,CAAC;IACD,eAAe,EAAE,EAA4B;IAC7C,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,CAAC,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { SortOrder } from '../interfaces/options';
|
|
4
|
-
import { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
5
|
-
import { AggregateRoot, AggregateStat, AggregateTop, TimelineData, TimelineType } from '../models/aggregate';
|
|
6
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { SortOrder } from '../interfaces/options';
|
|
4
|
+
import type { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
5
|
+
import type { AggregateRoot, AggregateStat, AggregateTop, TimelineData, TimelineType } from '../models/aggregate';
|
|
6
|
+
import type { HTTPClient } from '../core';
|
|
7
7
|
declare module '../core/client' {
|
|
8
8
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
9
9
|
aggregate: AggregateController<ResponseWrapper>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
2
|
-
import { PaginateResult } from '../models/base';
|
|
3
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
2
|
+
import type { PaginateResult } from '../models/base';
|
|
3
|
+
import type { HTTPClient } from '../core';
|
|
4
4
|
export declare abstract class BaseCrudController<T, ResponseWrapper> {
|
|
5
5
|
protected client: HTTPClient;
|
|
6
6
|
base: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler, RequestProxyResult, ResponseProxyExtraRaw } from '../interfaces/request';
|
|
4
|
-
import { HTTPClient } from '../core/client';
|
|
5
|
-
import { CategoryModel,
|
|
6
|
-
import {
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler, RequestProxyResult, ResponseProxyExtraRaw } from '../interfaces/request';
|
|
4
|
+
import type { HTTPClient } from '../core/client';
|
|
5
|
+
import type { CategoryModel, CategoryWithChildrenModel, TagModel } from '../models/category';
|
|
6
|
+
import { CategoryType } from '../models/category';
|
|
7
|
+
import type { PostModel } from '../models/post';
|
|
7
8
|
declare module '../core/client' {
|
|
8
9
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
9
10
|
category: CategoryController<ResponseWrapper>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../controllers/category.ts"],"names":[],"mappings":";;;AAOA,mCAAmE;AACnE,iDAA4C;AAG5C,yCAA4C;
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../controllers/category.ts"],"names":[],"mappings":";;;AAOA,mCAAmE;AACnE,iDAA4C;AAG5C,yCAA4C;AAO5C,iDAAiD;AAYjD,MAAa,kBAAkB;IAG7B,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAFtC,SAAI,GAAG,UAAU,CAAA;QACjB,SAAI,GAAG,YAAY,CAAA;QAEjB,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,KA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AAC,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;AAxFD,gDAwFC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { PaginationParams } from '../interfaces/params';
|
|
4
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
5
|
-
import { PaginateResult } from '../models/base';
|
|
6
|
-
import { CommentModel } from '../models/comment';
|
|
7
|
-
import { HTTPClient } from '../core';
|
|
8
|
-
import { CommentDto } from '../dtos/comment';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { PaginationParams } from '../interfaces/params';
|
|
4
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
5
|
+
import type { PaginateResult } from '../models/base';
|
|
6
|
+
import type { CommentModel } from '../models/comment';
|
|
7
|
+
import type { HTTPClient } from '../core';
|
|
8
|
+
import type { CommentDto } from '../dtos/comment';
|
|
9
9
|
declare module '../core/client' {
|
|
10
10
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
11
11
|
comment: CommentController<ResponseWrapper>;
|
|
@@ -11,7 +11,8 @@ import { SayController } from './say';
|
|
|
11
11
|
import { SearchController } from './search';
|
|
12
12
|
import { ServerlessController } from './severless';
|
|
13
13
|
import { SnippetController } from './snippet';
|
|
14
|
+
import { TopicController } from './topic';
|
|
14
15
|
import { UserController } from './user';
|
|
15
16
|
export declare const allControllers: (typeof AggregateController | typeof CategoryController | typeof CommentController | typeof LinkController | typeof NoteController | typeof PageController | typeof PostController | typeof ProjectController | typeof RecentlyController | typeof SayController | typeof SearchController | typeof ServerlessController | typeof SnippetController | typeof UserController)[];
|
|
16
|
-
export declare const allContollerNames: readonly ["aggregate", "category", "comment", "link", "note", "page", "post", "project", "recently", "say", "search", "snippet", "serverless", "user", "friend", "master", "shorthand"];
|
|
17
|
-
export { AggregateController, CategoryController, CommentController, LinkController, NoteController, PageController, PostController, ProjectController, RecentlyController, SayController, SearchController, SnippetController, ServerlessController, UserController, };
|
|
17
|
+
export declare const allContollerNames: readonly ["aggregate", "category", "comment", "link", "note", "page", "post", "project", "topic", "recently", "say", "search", "snippet", "serverless", "user", "friend", "master", "shorthand"];
|
|
18
|
+
export { AggregateController, CategoryController, CommentController, LinkController, NoteController, PageController, PostController, ProjectController, RecentlyController, SayController, SearchController, SnippetController, ServerlessController, UserController, TopicController, };
|
package/lib/controllers/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserController = exports.ServerlessController = exports.SnippetController = exports.SearchController = exports.SayController = exports.RecentlyController = exports.ProjectController = exports.PostController = exports.PageController = exports.NoteController = exports.LinkController = exports.CommentController = exports.CategoryController = exports.AggregateController = exports.allContollerNames = exports.allControllers = void 0;
|
|
3
|
+
exports.TopicController = exports.UserController = exports.ServerlessController = exports.SnippetController = exports.SearchController = exports.SayController = exports.RecentlyController = exports.ProjectController = exports.PostController = exports.PageController = exports.NoteController = exports.LinkController = exports.CommentController = exports.CategoryController = exports.AggregateController = exports.allContollerNames = exports.allControllers = void 0;
|
|
4
4
|
const aggregate_1 = require("./aggregate");
|
|
5
5
|
Object.defineProperty(exports, "AggregateController", { enumerable: true, get: function () { return aggregate_1.AggregateController; } });
|
|
6
6
|
const category_1 = require("./category");
|
|
@@ -27,6 +27,8 @@ const severless_1 = require("./severless");
|
|
|
27
27
|
Object.defineProperty(exports, "ServerlessController", { enumerable: true, get: function () { return severless_1.ServerlessController; } });
|
|
28
28
|
const snippet_1 = require("./snippet");
|
|
29
29
|
Object.defineProperty(exports, "SnippetController", { enumerable: true, get: function () { return snippet_1.SnippetController; } });
|
|
30
|
+
const topic_1 = require("./topic");
|
|
31
|
+
Object.defineProperty(exports, "TopicController", { enumerable: true, get: function () { return topic_1.TopicController; } });
|
|
30
32
|
const user_1 = require("./user");
|
|
31
33
|
Object.defineProperty(exports, "UserController", { enumerable: true, get: function () { return user_1.UserController; } });
|
|
32
34
|
exports.allControllers = [
|
|
@@ -54,6 +56,7 @@ exports.allContollerNames = [
|
|
|
54
56
|
'page',
|
|
55
57
|
'post',
|
|
56
58
|
'project',
|
|
59
|
+
'topic',
|
|
57
60
|
'recently',
|
|
58
61
|
'say',
|
|
59
62
|
'search',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../controllers/index.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../controllers/index.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAyD/C,oGAzDO,+BAAmB,OAyDP;AAxDrB,yCAA+C;AAyD7C,mGAzDO,6BAAkB,OAyDP;AAxDpB,uCAA6C;AAyD3C,kGAzDO,2BAAiB,OAyDP;AAxDnB,iCAAuC;AAyDrC,+FAzDO,qBAAc,OAyDP;AAxDhB,iCAAuC;AAyDrC,+FAzDO,qBAAc,OAyDP;AAxDhB,iCAAuC;AAyDrC,+FAzDO,qBAAc,OAyDP;AAxDhB,iCAAuC;AAyDrC,+FAzDO,qBAAc,OAyDP;AAxDhB,uCAA6C;AAyD3C,kGAzDO,2BAAiB,OAyDP;AAxDnB,yCAA+C;AAyD7C,mGAzDO,6BAAkB,OAyDP;AAxDpB,+BAAqC;AAyDnC,8FAzDO,mBAAa,OAyDP;AAxDf,qCAA2C;AAyDzC,iGAzDO,yBAAgB,OAyDP;AAxDlB,2CAAkD;AA0DhD,qGA1DO,gCAAoB,OA0DP;AAzDtB,uCAA6C;AAwD3C,kGAxDO,2BAAiB,OAwDP;AAvDnB,mCAAyC;AA0DvC,gGA1DO,uBAAe,OA0DP;AAzDjB,iCAAuC;AAwDrC,+FAxDO,qBAAc,OAwDP;AAtDH,QAAA,cAAc,GAAG;IAC5B,+BAAmB;IACnB,6BAAkB;IAClB,2BAAiB;IACjB,qBAAc;IACd,qBAAc;IACd,qBAAc;IACd,qBAAc;IACd,2BAAiB;IACjB,6BAAkB;IAClB,mBAAa;IACb,yBAAgB;IAChB,2BAAiB;IACjB,gCAAoB;IACpB,qBAAc;CACf,CAAA;AAEY,QAAA,iBAAiB,GAAG;IAC/B,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;IACT,OAAO;IACP,UAAU;IACV,KAAK;IACL,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,MAAM;IAEN,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,WAAW;CACH,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { LinkModel } from '../models/link';
|
|
3
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { LinkModel } from '../models/link';
|
|
3
|
+
import type { HTTPClient } from '../core';
|
|
4
4
|
import { BaseCrudController } from './base';
|
|
5
5
|
declare module '../core/client' {
|
|
6
6
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
@@ -88,4 +88,15 @@ export declare class NoteController<ResponseWrapper> implements IController {
|
|
|
88
88
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
89
89
|
data: never;
|
|
90
90
|
}>;
|
|
91
|
+
/**
|
|
92
|
+
* 获取专栏内的所有日记
|
|
93
|
+
*/
|
|
94
|
+
getNoteByTopicId(topicId: string, page?: number, size?: number): RequestProxyResult<PaginateResult<NoteModel>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
data: PaginateResult<NoteModel>;
|
|
97
|
+
} : ResponseWrapper extends {
|
|
98
|
+
data: PaginateResult<NoteModel>;
|
|
99
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
100
|
+
data: PaginateResult<NoteModel>;
|
|
101
|
+
}>;
|
|
91
102
|
}
|
package/lib/controllers/note.js
CHANGED
|
@@ -59,6 +59,14 @@ class NoteController {
|
|
|
59
59
|
likeIt(id) {
|
|
60
60
|
return this.proxy.like(id).get();
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* 获取专栏内的所有日记
|
|
64
|
+
*/
|
|
65
|
+
getNoteByTopicId(topicId, page = 1, size = 10) {
|
|
66
|
+
return this.proxy.topics(topicId).get({
|
|
67
|
+
params: { page, size },
|
|
68
|
+
});
|
|
69
|
+
}
|
|
62
70
|
}
|
|
63
71
|
exports.NoteController = NoteController;
|
|
64
72
|
//# sourceMappingURL=note.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../controllers/note.ts"],"names":[],"mappings":";;;AAMA,iDAA4C;AAoB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from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
4
|
-
import { SelectFields } from '../interfaces/types';
|
|
5
|
-
import { PaginateResult } from '../models/base';
|
|
6
|
-
import { PageModel } from '../models/page';
|
|
7
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
4
|
+
import type { SelectFields } from '../interfaces/types';
|
|
5
|
+
import type { PaginateResult } from '../models/base';
|
|
6
|
+
import type { PageModel } from '../models/page';
|
|
7
|
+
import type { HTTPClient } from '../core';
|
|
8
8
|
declare module '../core/client' {
|
|
9
9
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
10
10
|
page: PageController<ResponseWrapper>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
4
|
-
import { SelectFields } from '../interfaces/types';
|
|
5
|
-
import { PaginateResult } from '../models/base';
|
|
6
|
-
import { PostModel } from '../models/post';
|
|
7
|
-
import { HTTPClient } from '../core/client';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
4
|
+
import type { SelectFields } from '../interfaces/types';
|
|
5
|
+
import type { PaginateResult } from '../models/base';
|
|
6
|
+
import type { PostModel } from '../models/post';
|
|
7
|
+
import type { HTTPClient } from '../core/client';
|
|
8
8
|
declare module '../core/client' {
|
|
9
9
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
10
10
|
post: PostController<ResponseWrapper>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { ProjectModel } from '../models/project';
|
|
3
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { ProjectModel } from '../models/project';
|
|
3
|
+
import type { HTTPClient } from '../core';
|
|
4
4
|
import { BaseCrudController } from './base';
|
|
5
5
|
declare module '../core/client' {
|
|
6
6
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
4
|
-
import { RecentlyModel } from '../models/recently';
|
|
5
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
4
|
+
import type { RecentlyModel } from '../models/recently';
|
|
5
|
+
import type { HTTPClient } from '../core';
|
|
6
6
|
declare module '../core/client' {
|
|
7
7
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
8
8
|
recently: RecentlyController<ResponseWrapper>;
|
package/lib/controllers/say.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
4
|
-
import { SayModel } from '../models/say';
|
|
5
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
4
|
+
import type { SayModel } from '../models/say';
|
|
5
|
+
import type { HTTPClient } from '../core';
|
|
6
6
|
import { BaseCrudController } from './base';
|
|
7
7
|
declare module '../core/client' {
|
|
8
8
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
4
|
-
import { PaginateResult } from '../models/base';
|
|
5
|
-
import { NoteModel } from '../models/note';
|
|
6
|
-
import { PostModel } from '../models/post';
|
|
7
|
-
import { PageModel } from '..';
|
|
8
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler, RequestProxyResult } from '../interfaces/request';
|
|
4
|
+
import type { PaginateResult } from '../models/base';
|
|
5
|
+
import type { NoteModel } from '../models/note';
|
|
6
|
+
import type { PostModel } from '../models/post';
|
|
7
|
+
import type { PageModel } from '..';
|
|
8
|
+
import type { HTTPClient } from '../core';
|
|
9
9
|
declare module '../core/client' {
|
|
10
10
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
11
11
|
search: SearchController<ResponseWrapper>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
4
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
4
|
+
import type { HTTPClient } from '../core';
|
|
5
5
|
declare module '../core/client' {
|
|
6
6
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
7
7
|
serverless: ServerlessController<ResponseWrapper>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
4
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
4
|
+
import type { HTTPClient } from '../core';
|
|
5
5
|
declare module '../core/client' {
|
|
6
6
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
7
7
|
snippet: SnippetController<ResponseWrapper>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
4
|
+
import type { SayModel } from '../models/say';
|
|
5
|
+
import type { TopicModel } from '../models/topic';
|
|
6
|
+
import type { HTTPClient } from '../core';
|
|
7
|
+
import { BaseCrudController } from './base';
|
|
8
|
+
declare module '../core/client' {
|
|
9
|
+
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
10
|
+
topic: TopicController<ResponseWrapper>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare class TopicController<ResponseWrapper> extends BaseCrudController<SayModel, ResponseWrapper> implements IController {
|
|
14
|
+
protected client: HTTPClient;
|
|
15
|
+
base: string;
|
|
16
|
+
name: string;
|
|
17
|
+
constructor(client: HTTPClient);
|
|
18
|
+
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
19
|
+
getTopicBySlug(slug: string): import("../interfaces/request").RequestProxyResult<TopicModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
data: TopicModel;
|
|
22
|
+
} : ResponseWrapper extends {
|
|
23
|
+
data: TopicModel;
|
|
24
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
25
|
+
data: TopicModel;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TopicController = void 0;
|
|
4
|
+
const auto_bind_1 = require("../utils/auto-bind");
|
|
5
|
+
const base_1 = require("./base");
|
|
6
|
+
class TopicController extends base_1.BaseCrudController {
|
|
7
|
+
constructor(client) {
|
|
8
|
+
super(client);
|
|
9
|
+
this.client = client;
|
|
10
|
+
this.base = 'topics';
|
|
11
|
+
this.name = 'topic';
|
|
12
|
+
(0, auto_bind_1.autoBind)(this);
|
|
13
|
+
}
|
|
14
|
+
get proxy() {
|
|
15
|
+
return this.client.proxy(this.base);
|
|
16
|
+
}
|
|
17
|
+
getTopicBySlug(slug) {
|
|
18
|
+
return this.proxy.slug(slug).get();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.TopicController = TopicController;
|
|
22
|
+
//# sourceMappingURL=topic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topic.js","sourceRoot":"","sources":["../../controllers/topic.ts"],"names":[],"mappings":";;;AAKA,iDAA4C;AAG5C,iCAA2C;AAW3C,MAAa,eACX,SAAQ,yBAA6C;IAMrD,YAAsB,MAAkB;QACtC,KAAK,CAAC,MAAM,CAAC,CAAA;QADO,WAAM,GAAN,MAAM,CAAY;QAHxC,SAAI,GAAG,QAAQ,CAAA;QACf,SAAI,GAAG,OAAO,CAAA;QAIZ,IAAA,oBAAQ,EAAC,IAAI,CAAC,CAAA;IAChB,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED,cAAc,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAc,CAAA;IAChD,CAAC;CACF;AAnBD,0CAmBC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { IController } from '../interfaces/controller';
|
|
3
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
4
|
-
import { TLogin, UserModel } from '../models/user';
|
|
5
|
-
import { HTTPClient } from '../core';
|
|
1
|
+
import type { IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { IController } from '../interfaces/controller';
|
|
3
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
4
|
+
import type { TLogin, UserModel } from '../models/user';
|
|
5
|
+
import type { HTTPClient } from '../core';
|
|
6
6
|
declare module '../core/client' {
|
|
7
7
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
8
8
|
user: UserController<ResponseWrapper>;
|
package/lib/core/client.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IAdaptorRequestResponseType, IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
-
import { ClientOptions } from '../interfaces/client';
|
|
3
|
-
import { IController } from '../interfaces/controller';
|
|
4
|
-
import { IRequestHandler } from '../interfaces/request';
|
|
5
|
-
import { Class } from '../interfaces/types';
|
|
1
|
+
import type { IAdaptorRequestResponseType, IRequestAdapter } from '../interfaces/adapter';
|
|
2
|
+
import type { ClientOptions } from '../interfaces/client';
|
|
3
|
+
import type { IController } from '../interfaces/controller';
|
|
4
|
+
import type { IRequestHandler } from '../interfaces/request';
|
|
5
|
+
import type { Class } from '../interfaces/types';
|
|
6
6
|
export type { HTTPClient };
|
|
7
7
|
declare class HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
8
8
|
private readonly _endpoint;
|