@mx-space/api-client 1.6.2 → 1.7.1

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/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-be44aa1e.js';
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 RefType {
615
- Page = "Page",
616
- Post = "Post",
617
- Note = "Note"
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: 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, RefType, RequestError, SayController, SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, SubscribeType, SubscribeTypeToBitMap, TLogin, TagModel, TextBaseModel, TimelineData, TimelineType, TopicController, TopicModel, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
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, CollectionRefTypes, 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-be44aa1e.js';
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 RefType {
615
- Page = "Page",
616
- Post = "Post",
617
- Note = "Note"
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: 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, RefType, RequestError, SayController, SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, SubscribeType, SubscribeTypeToBitMap, TLogin, TagModel, TextBaseModel, TimelineData, TimelineType, TopicController, TopicModel, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
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, CollectionRefTypes, 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 };
@@ -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,10 @@
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
- }
5
+ export { CollectionRefTypes }
9
6
  export interface CommentModel extends BaseModel {
10
- refType: RefType
7
+ refType: CollectionRefTypes
11
8
  ref: string
12
9
  state: number
13
10
  commentsIndex: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "1.6.2",
3
+ "version": "1.7.1",
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.15",
48
- "@types/express": "4.17.20",
49
- "@types/lodash": "4.14.200",
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.5.1",
52
- "camelcase-keys": "^7.0.2",
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.0",
56
+ "ky": "1.1.3",
57
57
  "lodash": "4.17.21",
58
- "tsup": "7.2.0",
58
+ "tsup": "8.0.1",
59
59
  "umi-request": "1.4.0",
60
- "vite": "^4.5.0",
61
- "vitest": "^0.34.6"
60
+ "vite": "^5.0.10",
61
+ "vitest": "^1.0.4"
62
62
  }
63
63
  }
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "outDir": "./esm",
5
5
  "baseUrl": ".",
6
6
  "jsx": "react",
7
- "target": "ES2020",
7
+ "target": "es2020",
8
8
  "lib": [
9
9
  "ESNext",
10
10
  "DOM",