@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.
- package/controllers/activity.ts +5 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.global.js +3 -0
- package/dist/index.js +3 -0
- package/models/activity.ts +30 -0
- package/package.json +1 -1
package/controllers/activity.ts
CHANGED
|
@@ -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
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 };
|
package/dist/index.global.js
CHANGED
package/dist/index.js
CHANGED
package/models/activity.ts
CHANGED
|
@@ -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
|
+
}
|