@mx-space/api-client 1.6.2 → 1.7.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-be44aa1e.d.ts → adapter-29diOMCR.d.cts} +1 -1
- package/dist/adapter-29diOMCR.d.ts +23 -0
- package/dist/adaptors/axios.d.cts +1 -1
- package/dist/adaptors/axios.d.ts +1 -1
- package/dist/adaptors/axios.global.js +153 -128
- package/dist/adaptors/fetch.d.cts +1 -1
- package/dist/adaptors/fetch.d.ts +1 -1
- package/dist/adaptors/ky.d.cts +1 -1
- package/dist/adaptors/ky.d.ts +1 -1
- package/dist/adaptors/ky.global.js +55 -14
- package/dist/adaptors/umi-request.d.cts +1 -1
- package/dist/adaptors/umi-request.d.ts +1 -1
- package/dist/adaptors/umi-request.global.js +252 -57
- package/dist/index.cjs +0 -8
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.global.js +0 -6
- package/dist/index.js +0 -7
- package/models/comment.ts +2 -6
- package/package.json +10 -10
- package/tsconfig.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39,7 +39,6 @@ __export(api_client_exports, {
|
|
|
39
39
|
RecentlyAttitudeResultEnum: () => RecentlyAttitudeResultEnum,
|
|
40
40
|
RecentlyController: () => RecentlyController,
|
|
41
41
|
RecentlyRefTypes: () => RecentlyRefTypes,
|
|
42
|
-
RefType: () => RefType,
|
|
43
42
|
RequestError: () => RequestError,
|
|
44
43
|
SayController: () => SayController,
|
|
45
44
|
SearchController: () => SearchController,
|
|
@@ -1081,12 +1080,6 @@ var TimelineType = /* @__PURE__ */ ((TimelineType2) => {
|
|
|
1081
1080
|
})(TimelineType || {});
|
|
1082
1081
|
|
|
1083
1082
|
// models/comment.ts
|
|
1084
|
-
var RefType = /* @__PURE__ */ ((RefType2) => {
|
|
1085
|
-
RefType2["Page"] = "Page";
|
|
1086
|
-
RefType2["Post"] = "Post";
|
|
1087
|
-
RefType2["Note"] = "Note";
|
|
1088
|
-
return RefType2;
|
|
1089
|
-
})(RefType || {});
|
|
1090
1083
|
var CommentState = /* @__PURE__ */ ((CommentState2) => {
|
|
1091
1084
|
CommentState2[CommentState2["Unread"] = 0] = "Unread";
|
|
1092
1085
|
CommentState2[CommentState2["Read"] = 1] = "Read";
|
|
@@ -1171,7 +1164,6 @@ var api_client_default = createClient;
|
|
|
1171
1164
|
RecentlyAttitudeResultEnum,
|
|
1172
1165
|
RecentlyController,
|
|
1173
1166
|
RecentlyRefTypes,
|
|
1174
|
-
RefType,
|
|
1175
1167
|
RequestError,
|
|
1176
1168
|
SayController,
|
|
1177
1169
|
SearchController,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-
|
|
1
|
+
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-29diOMCR.cjs';
|
|
2
2
|
|
|
3
3
|
interface IController {
|
|
4
4
|
base: string;
|
|
@@ -611,13 +611,15 @@ interface PaginationParams {
|
|
|
611
611
|
page?: number;
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
declare enum
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
614
|
+
declare enum CollectionRefTypes {
|
|
615
|
+
Post = "posts",
|
|
616
|
+
Note = "notes",
|
|
617
|
+
Page = "pages",
|
|
618
|
+
Recently = "recentlies"
|
|
618
619
|
}
|
|
620
|
+
|
|
619
621
|
interface CommentModel extends BaseModel {
|
|
620
|
-
refType:
|
|
622
|
+
refType: CollectionRefTypes;
|
|
621
623
|
ref: string;
|
|
622
624
|
state: number;
|
|
623
625
|
commentsIndex: number;
|
|
@@ -1496,4 +1498,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
|
|
|
1496
1498
|
*/
|
|
1497
1499
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1498
1500
|
|
|
1499
|
-
export { AckController, ActivityController, AdminExtraModel, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentState, Coordinate, Count, EnumPageType, HTTPClient, IConfig, IConfigKeys, Image, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, NoteController, NoteModel, NoteMusicRecord, NoteWrappedPayload, NoteWrappedWithLikedPayload, PageController, PageModel, Pager, PaginateResult, PostController, PostModel, ProjectController, ProjectModel, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, RecentlyModel, RecentlyRefType, RecentlyRefTypes,
|
|
1501
|
+
export { AckController, ActivityController, AdminExtraModel, AggregateController, type AggregateRoot, type AggregateRootWithTheme, type AggregateStat, type AggregateTop, type AggregateTopNote, type AggregateTopPost, AlgoliaSearchOptionsModel, BackupOptionsModel, BaiduSearchOptionsModel, type BaseCommentIndexModel, type BaseModel, CategoryController, type CategoryEntries, type CategoryModel, CategoryType, type CategoryWithChildrenModel, CommentController, type CommentDto, type CommentModel, CommentOptionsModel, type CommentRef, CommentState, type Coordinate, type Count, EnumPageType, HTTPClient, type IConfig, type IConfigKeys, type Image, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteMusicRecord, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, SayController, type SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, type SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, type SubscribeType, SubscribeTypeToBitMap, type TLogin, type TagModel, type TextBaseModel, type TimelineData, TimelineType, TopicController, type TopicModel, type Url, UrlOptionModel, UserController, type UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-
|
|
1
|
+
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-29diOMCR.js';
|
|
2
2
|
|
|
3
3
|
interface IController {
|
|
4
4
|
base: string;
|
|
@@ -611,13 +611,15 @@ interface PaginationParams {
|
|
|
611
611
|
page?: number;
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
declare enum
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
614
|
+
declare enum CollectionRefTypes {
|
|
615
|
+
Post = "posts",
|
|
616
|
+
Note = "notes",
|
|
617
|
+
Page = "pages",
|
|
618
|
+
Recently = "recentlies"
|
|
618
619
|
}
|
|
620
|
+
|
|
619
621
|
interface CommentModel extends BaseModel {
|
|
620
|
-
refType:
|
|
622
|
+
refType: CollectionRefTypes;
|
|
621
623
|
ref: string;
|
|
622
624
|
state: number;
|
|
623
625
|
commentsIndex: number;
|
|
@@ -1496,4 +1498,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
|
|
|
1496
1498
|
*/
|
|
1497
1499
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1498
1500
|
|
|
1499
|
-
export { AckController, ActivityController, AdminExtraModel, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentState, Coordinate, Count, EnumPageType, HTTPClient, IConfig, IConfigKeys, Image, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, NoteController, NoteModel, NoteMusicRecord, NoteWrappedPayload, NoteWrappedWithLikedPayload, PageController, PageModel, Pager, PaginateResult, PostController, PostModel, ProjectController, ProjectModel, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, RecentlyModel, RecentlyRefType, RecentlyRefTypes,
|
|
1501
|
+
export { AckController, ActivityController, AdminExtraModel, AggregateController, type AggregateRoot, type AggregateRootWithTheme, type AggregateStat, type AggregateTop, type AggregateTopNote, type AggregateTopPost, AlgoliaSearchOptionsModel, BackupOptionsModel, BaiduSearchOptionsModel, type BaseCommentIndexModel, type BaseModel, CategoryController, type CategoryEntries, type CategoryModel, CategoryType, type CategoryWithChildrenModel, CommentController, type CommentDto, type CommentModel, CommentOptionsModel, type CommentRef, CommentState, type Coordinate, type Count, EnumPageType, HTTPClient, type IConfig, type IConfigKeys, type Image, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteMusicRecord, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, SayController, type SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, type SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, type SubscribeType, SubscribeTypeToBitMap, type TLogin, type TagModel, type TextBaseModel, type TimelineData, TimelineType, TopicController, type TopicModel, type Url, UrlOptionModel, UserController, type UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
package/dist/index.global.js
CHANGED
|
@@ -1017,12 +1017,6 @@
|
|
|
1017
1017
|
})(TimelineType || {});
|
|
1018
1018
|
|
|
1019
1019
|
// models/comment.ts
|
|
1020
|
-
var RefType = /* @__PURE__ */ ((RefType2) => {
|
|
1021
|
-
RefType2["Page"] = "Page";
|
|
1022
|
-
RefType2["Post"] = "Post";
|
|
1023
|
-
RefType2["Note"] = "Note";
|
|
1024
|
-
return RefType2;
|
|
1025
|
-
})(RefType || {});
|
|
1026
1020
|
var CommentState = /* @__PURE__ */ ((CommentState2) => {
|
|
1027
1021
|
CommentState2[CommentState2["Unread"] = 0] = "Unread";
|
|
1028
1022
|
CommentState2[CommentState2["Read"] = 1] = "Read";
|
package/dist/index.js
CHANGED
|
@@ -1015,12 +1015,6 @@ var TimelineType = /* @__PURE__ */ ((TimelineType2) => {
|
|
|
1015
1015
|
})(TimelineType || {});
|
|
1016
1016
|
|
|
1017
1017
|
// models/comment.ts
|
|
1018
|
-
var RefType = /* @__PURE__ */ ((RefType2) => {
|
|
1019
|
-
RefType2["Page"] = "Page";
|
|
1020
|
-
RefType2["Post"] = "Post";
|
|
1021
|
-
RefType2["Note"] = "Note";
|
|
1022
|
-
return RefType2;
|
|
1023
|
-
})(RefType || {});
|
|
1024
1018
|
var CommentState = /* @__PURE__ */ ((CommentState2) => {
|
|
1025
1019
|
CommentState2[CommentState2["Unread"] = 0] = "Unread";
|
|
1026
1020
|
CommentState2[CommentState2["Read"] = 1] = "Read";
|
|
@@ -1104,7 +1098,6 @@ export {
|
|
|
1104
1098
|
RecentlyAttitudeResultEnum,
|
|
1105
1099
|
RecentlyController,
|
|
1106
1100
|
RecentlyRefTypes,
|
|
1107
|
-
RefType,
|
|
1108
1101
|
RequestError,
|
|
1109
1102
|
SayController,
|
|
1110
1103
|
SearchController,
|
package/models/comment.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
+
import type { CollectionRefTypes } from '@core/constants/db.constant'
|
|
1
2
|
import type { BaseModel } from './base'
|
|
2
3
|
import type { CategoryModel } from './category'
|
|
3
4
|
|
|
4
|
-
export enum RefType {
|
|
5
|
-
Page = 'Page',
|
|
6
|
-
Post = 'Post',
|
|
7
|
-
Note = 'Note',
|
|
8
|
-
}
|
|
9
5
|
export interface CommentModel extends BaseModel {
|
|
10
|
-
refType:
|
|
6
|
+
refType: CollectionRefTypes
|
|
11
7
|
ref: string
|
|
12
8
|
state: number
|
|
13
9
|
commentsIndex: number
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-space/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A api client for mx-space server@next",
|
|
6
6
|
"author": "Innei",
|
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
"dev": "vitest"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/cors": "2.8.
|
|
48
|
-
"@types/express": "4.17.
|
|
49
|
-
"@types/lodash": "4.14.
|
|
47
|
+
"@types/cors": "2.8.17",
|
|
48
|
+
"@types/express": "4.17.21",
|
|
49
|
+
"@types/lodash": "4.14.202",
|
|
50
50
|
"abort-controller": "3.0.0",
|
|
51
|
-
"axios": "^1.
|
|
52
|
-
"camelcase-keys": "^
|
|
51
|
+
"axios": "^1.6.2",
|
|
52
|
+
"camelcase-keys": "^9.1.2",
|
|
53
53
|
"cors": "2.8.5",
|
|
54
54
|
"express": "4.18.2",
|
|
55
55
|
"form-data": "4.0.0",
|
|
56
|
-
"ky": "1.1.
|
|
56
|
+
"ky": "1.1.3",
|
|
57
57
|
"lodash": "4.17.21",
|
|
58
|
-
"tsup": "
|
|
58
|
+
"tsup": "8.0.1",
|
|
59
59
|
"umi-request": "1.4.0",
|
|
60
|
-
"vite": "^
|
|
61
|
-
"vitest": "^0.
|
|
60
|
+
"vite": "^5.0.10",
|
|
61
|
+
"vitest": "^1.0.4"
|
|
62
62
|
}
|
|
63
63
|
}
|