@mx-space/api-client 1.8.1 → 1.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/controllers/recently.ts +13 -5
- package/dist/adaptors/umi-request.global.js +2 -2
- package/dist/index.cjs +8 -1
- package/dist/index.d.cts +22 -7
- package/dist/index.d.ts +22 -7
- package/dist/index.global.js +8 -1
- package/dist/index.js +8 -1
- package/models/note.ts +1 -6
- package/package.json +1 -1
package/controllers/recently.ts
CHANGED
|
@@ -50,11 +50,15 @@ export class RecentlyController<ResponseWrapper> implements IController {
|
|
|
50
50
|
}>()
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
getList(
|
|
54
|
-
before
|
|
55
|
-
after
|
|
56
|
-
size
|
|
57
|
-
|
|
53
|
+
getList({
|
|
54
|
+
before,
|
|
55
|
+
after,
|
|
56
|
+
size,
|
|
57
|
+
}: {
|
|
58
|
+
before?: string | undefined
|
|
59
|
+
after?: string | undefined
|
|
60
|
+
size?: number | number
|
|
61
|
+
} = {}) {
|
|
58
62
|
return this.proxy.get<{ data: RecentlyModel[] & { comments: number } }>({
|
|
59
63
|
params: {
|
|
60
64
|
before,
|
|
@@ -64,6 +68,10 @@ export class RecentlyController<ResponseWrapper> implements IController {
|
|
|
64
68
|
})
|
|
65
69
|
}
|
|
66
70
|
|
|
71
|
+
getById(id: string) {
|
|
72
|
+
return this.proxy(id).get<RecentlyModel & { comments: number }>()
|
|
73
|
+
}
|
|
74
|
+
|
|
67
75
|
/** 表态:点赞,点踩 */
|
|
68
76
|
attitude(id: string, attitude: RecentlyAttitudeEnum) {
|
|
69
77
|
return this.proxy.attitude(id).get<{ code: RecentlyAttitudeResultEnum }>({
|
|
@@ -694,9 +694,9 @@
|
|
|
694
694
|
}
|
|
695
695
|
});
|
|
696
696
|
|
|
697
|
-
// ../../node_modules/.pnpm/set-function-length@1.2.
|
|
697
|
+
// ../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
|
|
698
698
|
var require_set_function_length = __commonJS({
|
|
699
|
-
"../../node_modules/.pnpm/set-function-length@1.2.
|
|
699
|
+
"../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports, module) {
|
|
700
700
|
"use strict";
|
|
701
701
|
var GetIntrinsic = require_get_intrinsic();
|
|
702
702
|
var define = require_define_data_property();
|
package/dist/index.cjs
CHANGED
|
@@ -660,7 +660,11 @@ var RecentlyController = class {
|
|
|
660
660
|
getAll() {
|
|
661
661
|
return this.proxy.all.get();
|
|
662
662
|
}
|
|
663
|
-
getList(
|
|
663
|
+
getList({
|
|
664
|
+
before,
|
|
665
|
+
after,
|
|
666
|
+
size
|
|
667
|
+
} = {}) {
|
|
664
668
|
return this.proxy.get({
|
|
665
669
|
params: {
|
|
666
670
|
before,
|
|
@@ -669,6 +673,9 @@ var RecentlyController = class {
|
|
|
669
673
|
}
|
|
670
674
|
});
|
|
671
675
|
}
|
|
676
|
+
getById(id) {
|
|
677
|
+
return this.proxy(id).get();
|
|
678
|
+
}
|
|
672
679
|
/** 表态:点赞,点踩 */
|
|
673
680
|
attitude(id, attitude) {
|
|
674
681
|
return this.proxy.attitude(id).get({
|
package/dist/index.d.cts
CHANGED
|
@@ -356,16 +356,11 @@ interface NoteModel extends TextBaseModel {
|
|
|
356
356
|
publicAt?: Date;
|
|
357
357
|
password?: string | null;
|
|
358
358
|
nid: number;
|
|
359
|
-
music?: NoteMusicRecord[];
|
|
360
359
|
location?: string;
|
|
361
360
|
coordinates?: Coordinate;
|
|
362
361
|
topic?: TopicModel;
|
|
363
362
|
topicId?: string;
|
|
364
363
|
}
|
|
365
|
-
interface NoteMusicRecord {
|
|
366
|
-
type: string;
|
|
367
|
-
id: string;
|
|
368
|
-
}
|
|
369
364
|
interface Coordinate {
|
|
370
365
|
latitude: number;
|
|
371
366
|
longitude: number;
|
|
@@ -1229,7 +1224,11 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1229
1224
|
};
|
|
1230
1225
|
};
|
|
1231
1226
|
}>;
|
|
1232
|
-
getList(before
|
|
1227
|
+
getList({ before, after, size, }?: {
|
|
1228
|
+
before?: string | undefined;
|
|
1229
|
+
after?: string | undefined;
|
|
1230
|
+
size?: number | number;
|
|
1231
|
+
}): RequestProxyResult<{
|
|
1233
1232
|
data: RecentlyModel[] & {
|
|
1234
1233
|
comments: number;
|
|
1235
1234
|
};
|
|
@@ -1253,6 +1252,22 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1253
1252
|
};
|
|
1254
1253
|
};
|
|
1255
1254
|
}>;
|
|
1255
|
+
getById(id: string): RequestProxyResult<RecentlyModel & {
|
|
1256
|
+
comments: number;
|
|
1257
|
+
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1258
|
+
[key: string]: any;
|
|
1259
|
+
data: RecentlyModel & {
|
|
1260
|
+
comments: number;
|
|
1261
|
+
};
|
|
1262
|
+
} : ResponseWrapper extends {
|
|
1263
|
+
data: RecentlyModel & {
|
|
1264
|
+
comments: number;
|
|
1265
|
+
};
|
|
1266
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1267
|
+
data: RecentlyModel & {
|
|
1268
|
+
comments: number;
|
|
1269
|
+
};
|
|
1270
|
+
}>;
|
|
1256
1271
|
/** 表态:点赞,点踩 */
|
|
1257
1272
|
attitude(id: string, attitude: RecentlyAttitudeEnum): RequestProxyResult<{
|
|
1258
1273
|
code: RecentlyAttitudeResultEnum;
|
|
@@ -1614,4 +1629,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
|
|
|
1614
1629
|
*/
|
|
1615
1630
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1616
1631
|
|
|
1617
|
-
export { 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
|
|
1632
|
+
export { 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, 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
|
@@ -356,16 +356,11 @@ interface NoteModel extends TextBaseModel {
|
|
|
356
356
|
publicAt?: Date;
|
|
357
357
|
password?: string | null;
|
|
358
358
|
nid: number;
|
|
359
|
-
music?: NoteMusicRecord[];
|
|
360
359
|
location?: string;
|
|
361
360
|
coordinates?: Coordinate;
|
|
362
361
|
topic?: TopicModel;
|
|
363
362
|
topicId?: string;
|
|
364
363
|
}
|
|
365
|
-
interface NoteMusicRecord {
|
|
366
|
-
type: string;
|
|
367
|
-
id: string;
|
|
368
|
-
}
|
|
369
364
|
interface Coordinate {
|
|
370
365
|
latitude: number;
|
|
371
366
|
longitude: number;
|
|
@@ -1229,7 +1224,11 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1229
1224
|
};
|
|
1230
1225
|
};
|
|
1231
1226
|
}>;
|
|
1232
|
-
getList(before
|
|
1227
|
+
getList({ before, after, size, }?: {
|
|
1228
|
+
before?: string | undefined;
|
|
1229
|
+
after?: string | undefined;
|
|
1230
|
+
size?: number | number;
|
|
1231
|
+
}): RequestProxyResult<{
|
|
1233
1232
|
data: RecentlyModel[] & {
|
|
1234
1233
|
comments: number;
|
|
1235
1234
|
};
|
|
@@ -1253,6 +1252,22 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1253
1252
|
};
|
|
1254
1253
|
};
|
|
1255
1254
|
}>;
|
|
1255
|
+
getById(id: string): RequestProxyResult<RecentlyModel & {
|
|
1256
|
+
comments: number;
|
|
1257
|
+
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1258
|
+
[key: string]: any;
|
|
1259
|
+
data: RecentlyModel & {
|
|
1260
|
+
comments: number;
|
|
1261
|
+
};
|
|
1262
|
+
} : ResponseWrapper extends {
|
|
1263
|
+
data: RecentlyModel & {
|
|
1264
|
+
comments: number;
|
|
1265
|
+
};
|
|
1266
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1267
|
+
data: RecentlyModel & {
|
|
1268
|
+
comments: number;
|
|
1269
|
+
};
|
|
1270
|
+
}>;
|
|
1256
1271
|
/** 表态:点赞,点踩 */
|
|
1257
1272
|
attitude(id: string, attitude: RecentlyAttitudeEnum): RequestProxyResult<{
|
|
1258
1273
|
code: RecentlyAttitudeResultEnum;
|
|
@@ -1614,4 +1629,4 @@ interface SnippetModel<T = unknown> extends BaseModel {
|
|
|
1614
1629
|
*/
|
|
1615
1630
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1616
1631
|
|
|
1617
|
-
export { 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
|
|
1632
|
+
export { 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, 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
|
@@ -596,7 +596,11 @@
|
|
|
596
596
|
getAll() {
|
|
597
597
|
return this.proxy.all.get();
|
|
598
598
|
}
|
|
599
|
-
getList(
|
|
599
|
+
getList({
|
|
600
|
+
before,
|
|
601
|
+
after,
|
|
602
|
+
size
|
|
603
|
+
} = {}) {
|
|
600
604
|
return this.proxy.get({
|
|
601
605
|
params: {
|
|
602
606
|
before,
|
|
@@ -605,6 +609,9 @@
|
|
|
605
609
|
}
|
|
606
610
|
});
|
|
607
611
|
}
|
|
612
|
+
getById(id) {
|
|
613
|
+
return this.proxy(id).get();
|
|
614
|
+
}
|
|
608
615
|
/** 表态:点赞,点踩 */
|
|
609
616
|
attitude(id, attitude) {
|
|
610
617
|
return this.proxy.attitude(id).get({
|
package/dist/index.js
CHANGED
|
@@ -594,7 +594,11 @@ var RecentlyController = class {
|
|
|
594
594
|
getAll() {
|
|
595
595
|
return this.proxy.all.get();
|
|
596
596
|
}
|
|
597
|
-
getList(
|
|
597
|
+
getList({
|
|
598
|
+
before,
|
|
599
|
+
after,
|
|
600
|
+
size
|
|
601
|
+
} = {}) {
|
|
598
602
|
return this.proxy.get({
|
|
599
603
|
params: {
|
|
600
604
|
before,
|
|
@@ -603,6 +607,9 @@ var RecentlyController = class {
|
|
|
603
607
|
}
|
|
604
608
|
});
|
|
605
609
|
}
|
|
610
|
+
getById(id) {
|
|
611
|
+
return this.proxy(id).get();
|
|
612
|
+
}
|
|
606
613
|
/** 表态:点赞,点踩 */
|
|
607
614
|
attitude(id, attitude) {
|
|
608
615
|
return this.proxy.attitude(id).get({
|
package/models/note.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface NoteModel extends TextBaseModel {
|
|
|
15
15
|
publicAt?: Date
|
|
16
16
|
password?: string | null
|
|
17
17
|
nid: number
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
location?: string
|
|
20
20
|
|
|
21
21
|
coordinates?: Coordinate
|
|
@@ -23,11 +23,6 @@ export interface NoteModel extends TextBaseModel {
|
|
|
23
23
|
topicId?: string
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export interface NoteMusicRecord {
|
|
27
|
-
type: string
|
|
28
|
-
id: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
26
|
export interface Coordinate {
|
|
32
27
|
latitude: number
|
|
33
28
|
longitude: number
|