@mx-space/api-client 1.12.0 → 1.12.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.
@@ -3,6 +3,7 @@ import type { IController } from '~/interfaces/controller'
3
3
  import type { IRequestHandler } from '~/interfaces/request'
4
4
  import type {
5
5
  ActivityPresence,
6
+ LastYearPublication,
6
7
  RecentActivities,
7
8
  RoomsData,
8
9
  } from '~/models/activity'
@@ -95,4 +96,8 @@ export class ActivityController<ResponseWrapper> implements IController {
95
96
  async getRecentActivities() {
96
97
  return this.proxy.recent.get<RecentActivities>()
97
98
  }
99
+
100
+ async getLastYearPublication(): Promise<LastYearPublication> {
101
+ return this.proxy(`last-year`).publication.get<LastYearPublication>()
102
+ }
98
103
  }
package/dist/index.cjs CHANGED
@@ -250,6 +250,9 @@ var ActivityController = class {
250
250
  async getRecentActivities() {
251
251
  return this.proxy.recent.get();
252
252
  }
253
+ async getLastYearPublication() {
254
+ return this.proxy(`last-year`).publication.get();
255
+ }
253
256
  };
254
257
 
255
258
  // controllers/aggregate.ts
package/dist/index.d.cts CHANGED
@@ -294,6 +294,34 @@ interface RecentRecent {
294
294
  down: number;
295
295
  created: string;
296
296
  }
297
+ interface LastYearPublication {
298
+ posts: PostsItem[];
299
+ notes: NotesItem[];
300
+ }
301
+ interface PostsItem {
302
+ id: string;
303
+ created: string;
304
+ title: string;
305
+ slug: string;
306
+ categoryId: string;
307
+ category: Category;
308
+ }
309
+ interface Category {
310
+ id: string;
311
+ type: number;
312
+ name: string;
313
+ slug: string;
314
+ created: string;
315
+ }
316
+ interface NotesItem {
317
+ id: string;
318
+ created: string;
319
+ title: string;
320
+ mood: string;
321
+ weather: string;
322
+ nid: number;
323
+ bookmark: boolean;
324
+ }
297
325
 
298
326
  declare module '../core/client' {
299
327
  interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
@@ -420,6 +448,7 @@ declare class ActivityController<ResponseWrapper> implements IController {
420
448
  };
421
449
  $serialized: RecentActivities;
422
450
  }>;
451
+ getLastYearPublication(): Promise<LastYearPublication>;
423
452
  }
424
453
 
425
454
  type SortOrder = 'asc' | 'desc';
@@ -1826,4 +1855,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
1826
1855
  */
1827
1856
  declare const camelcaseKeys: <T = any>(obj: any) => T;
1828
1857
 
1829
- export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, 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, IRequestAdapter, type Image, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, 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 };
1858
+ export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, 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, IRequestAdapter, type Image, type LastYearPublication, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, 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
@@ -294,6 +294,34 @@ interface RecentRecent {
294
294
  down: number;
295
295
  created: string;
296
296
  }
297
+ interface LastYearPublication {
298
+ posts: PostsItem[];
299
+ notes: NotesItem[];
300
+ }
301
+ interface PostsItem {
302
+ id: string;
303
+ created: string;
304
+ title: string;
305
+ slug: string;
306
+ categoryId: string;
307
+ category: Category;
308
+ }
309
+ interface Category {
310
+ id: string;
311
+ type: number;
312
+ name: string;
313
+ slug: string;
314
+ created: string;
315
+ }
316
+ interface NotesItem {
317
+ id: string;
318
+ created: string;
319
+ title: string;
320
+ mood: string;
321
+ weather: string;
322
+ nid: number;
323
+ bookmark: boolean;
324
+ }
297
325
 
298
326
  declare module '@mx-space/api-client' {
299
327
  interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
@@ -420,6 +448,7 @@ declare class ActivityController<ResponseWrapper> implements IController {
420
448
  };
421
449
  $serialized: RecentActivities;
422
450
  }>;
451
+ getLastYearPublication(): Promise<LastYearPublication>;
423
452
  }
424
453
 
425
454
  type SortOrder = 'asc' | 'desc';
@@ -1826,4 +1855,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
1826
1855
  */
1827
1856
  declare const camelcaseKeys: <T = any>(obj: any) => T;
1828
1857
 
1829
- export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, 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, IRequestAdapter, type Image, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, 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 };
1858
+ export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, 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, IRequestAdapter, type Image, type LastYearPublication, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, 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 };
@@ -185,6 +185,9 @@
185
185
  async getRecentActivities() {
186
186
  return this.proxy.recent.get();
187
187
  }
188
+ async getLastYearPublication() {
189
+ return this.proxy(`last-year`).publication.get();
190
+ }
188
191
  };
189
192
 
190
193
  // controllers/aggregate.ts
package/dist/index.js CHANGED
@@ -183,6 +183,9 @@ var ActivityController = class {
183
183
  async getRecentActivities() {
184
184
  return this.proxy.recent.get();
185
185
  }
186
+ async getLastYearPublication() {
187
+ return this.proxy(`last-year`).publication.get();
188
+ }
186
189
  };
187
190
 
188
191
  // controllers/aggregate.ts
@@ -100,3 +100,33 @@ export interface RecentRecent {
100
100
  down: number
101
101
  created: string
102
102
  }
103
+
104
+ export interface LastYearPublication {
105
+ posts: PostsItem[]
106
+ notes: NotesItem[]
107
+ }
108
+
109
+ interface PostsItem {
110
+ id: string
111
+ created: string
112
+ title: string
113
+ slug: string
114
+ categoryId: string
115
+ category: Category
116
+ }
117
+ interface Category {
118
+ id: string
119
+ type: number
120
+ name: string
121
+ slug: string
122
+ created: string
123
+ }
124
+ interface NotesItem {
125
+ id: string
126
+ created: string
127
+ title: string
128
+ mood: string
129
+ weather: string
130
+ nid: number
131
+ bookmark: boolean
132
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "type": "module",
5
5
  "description": "A api client for mx-space server@next",
6
6
  "author": "Innei",