@f3liz/rescript-misskey-api 0.6.9 → 0.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/lib/es6/src/Misskey.mjs +133 -156
- package/lib/es6/src/bindings/Ofetch.mjs +2 -0
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAccount.mjs +70 -48
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAdmin.mjs +133 -98
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAntennas.mjs +9 -6
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkApp.mjs +6 -4
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAuth.mjs +6 -4
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkChannels.mjs +18 -12
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkCharts.mjs +6 -4
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkChat.mjs +70 -54
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkClips.mjs +12 -8
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkDefault.mjs +27 -20
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkDrive.mjs +35 -24
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFederation.mjs +18 -12
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFlash.mjs +9 -6
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFlashs.mjs +3 -2
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFollowing.mjs +21 -14
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkGallery.mjs +12 -8
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkGroups.mjs +30 -24
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkHashtags.mjs +6 -4
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkLists.mjs +9 -6
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkMeta.mjs +27 -18
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkNotes.mjs +85 -58
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkNotifications.mjs +2 -2
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkPages.mjs +8 -6
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkRole.mjs +9 -6
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkUsers.mjs +35 -24
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkWebhooks.mjs +7 -6
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAccount.mjs +92 -68
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAdmin.mjs +266 -214
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAntennas.mjs +17 -12
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoApp.mjs +6 -4
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAuth.mjs +14 -10
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoChannels.mjs +35 -26
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoCharts.mjs +72 -48
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoClip.mjs +4 -4
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoClips.mjs +17 -12
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoDefault.mjs +133 -110
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoDrive.mjs +51 -36
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoFederation.mjs +32 -22
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoFlash.mjs +12 -10
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoFlashs.mjs +5 -4
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoFollowing.mjs +27 -20
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoGallery.mjs +24 -18
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoHashtags.mjs +18 -12
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoLists.mjs +23 -18
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoMeta.mjs +71 -48
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoNonProductive.mjs +5 -4
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoNotes.mjs +96 -70
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoNotifications.mjs +8 -8
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoPages.mjs +17 -14
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoReactions.mjs +4 -4
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoResetPassword.mjs +4 -4
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoRole.mjs +12 -8
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoUsers.mjs +83 -56
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoWebhooks.mjs +17 -14
- package/package.json +3 -2
- package/src/Misskey.res +92 -149
- package/src/bindings/Ofetch.res +14 -0
- package/src/generated/kokonect-link/api/KokonectLinkAccount.res +94 -166
- package/src/generated/kokonect-link/api/KokonectLinkAdmin.res +182 -329
- package/src/generated/kokonect-link/api/KokonectLinkAntennas.res +12 -21
- package/src/generated/kokonect-link/api/KokonectLinkApp.res +8 -14
- package/src/generated/kokonect-link/api/KokonectLinkAuth.res +8 -14
- package/src/generated/kokonect-link/api/KokonectLinkChannels.res +24 -42
- package/src/generated/kokonect-link/api/KokonectLinkCharts.res +8 -14
- package/src/generated/kokonect-link/api/KokonectLinkChat.res +97 -178
- package/src/generated/kokonect-link/api/KokonectLinkClips.res +16 -28
- package/src/generated/kokonect-link/api/KokonectLinkDefault.res +37 -67
- package/src/generated/kokonect-link/api/KokonectLinkDrive.res +47 -83
- package/src/generated/kokonect-link/api/KokonectLinkFederation.res +24 -42
- package/src/generated/kokonect-link/api/KokonectLinkFlash.res +12 -21
- package/src/generated/kokonect-link/api/KokonectLinkFlashs.res +4 -7
- package/src/generated/kokonect-link/api/KokonectLinkFollowing.res +28 -49
- package/src/generated/kokonect-link/api/KokonectLinkGallery.res +16 -28
- package/src/generated/kokonect-link/api/KokonectLinkGroups.res +42 -78
- package/src/generated/kokonect-link/api/KokonectLinkHashtags.res +8 -14
- package/src/generated/kokonect-link/api/KokonectLinkLists.res +12 -21
- package/src/generated/kokonect-link/api/KokonectLinkMeta.res +36 -63
- package/src/generated/kokonect-link/api/KokonectLinkNotes.res +114 -201
- package/src/generated/kokonect-link/api/KokonectLinkNotifications.res +3 -6
- package/src/generated/kokonect-link/api/KokonectLinkPages.res +11 -20
- package/src/generated/kokonect-link/api/KokonectLinkRole.res +12 -21
- package/src/generated/kokonect-link/api/KokonectLinkUsers.res +47 -83
- package/src/generated/kokonect-link/api/KokonectLinkWebhooks.res +10 -19
- package/src/generated/misskey-io/api/MisskeyIoAccount.res +126 -228
- package/src/generated/misskey-io/api/MisskeyIoAdmin.res +373 -694
- package/src/generated/misskey-io/api/MisskeyIoAntennas.res +23 -41
- package/src/generated/misskey-io/api/MisskeyIoApp.res +8 -14
- package/src/generated/misskey-io/api/MisskeyIoAuth.res +19 -34
- package/src/generated/misskey-io/api/MisskeyIoChannels.res +48 -87
- package/src/generated/misskey-io/api/MisskeyIoCharts.res +96 -168
- package/src/generated/misskey-io/api/MisskeyIoClip.res +6 -12
- package/src/generated/misskey-io/api/MisskeyIoClips.res +23 -41
- package/src/generated/misskey-io/api/MisskeyIoDefault.res +188 -353
- package/src/generated/misskey-io/api/MisskeyIoDrive.res +69 -123
- package/src/generated/misskey-io/api/MisskeyIoFederation.res +43 -76
- package/src/generated/misskey-io/api/MisskeyIoFlash.res +17 -32
- package/src/generated/misskey-io/api/MisskeyIoFlashs.res +7 -13
- package/src/generated/misskey-io/api/MisskeyIoFollowing.res +37 -67
- package/src/generated/misskey-io/api/MisskeyIoGallery.res +33 -60
- package/src/generated/misskey-io/api/MisskeyIoHashtags.res +24 -42
- package/src/generated/misskey-io/api/MisskeyIoLists.res +32 -59
- package/src/generated/misskey-io/api/MisskeyIoMeta.res +95 -167
- package/src/generated/misskey-io/api/MisskeyIoNonProductive.res +7 -13
- package/src/generated/misskey-io/api/MisskeyIoNotes.res +131 -236
- package/src/generated/misskey-io/api/MisskeyIoNotifications.res +12 -24
- package/src/generated/misskey-io/api/MisskeyIoPages.res +24 -45
- package/src/generated/misskey-io/api/MisskeyIoReactions.res +6 -12
- package/src/generated/misskey-io/api/MisskeyIoResetPassword.res +6 -12
- package/src/generated/misskey-io/api/MisskeyIoRole.res +16 -28
- package/src/generated/misskey-io/api/MisskeyIoUsers.res +111 -195
- package/src/generated/misskey-io/api/MisskeyIoWebhooks.res +24 -45
|
@@ -12,15 +12,17 @@ let postGalleryFeaturedRequestSchema = S.object(s => ({
|
|
|
12
12
|
|
|
13
13
|
let postGalleryFeaturedResponseSchema = S.array(MisskeyIoComponentSchemas.GalleryPost.schema);
|
|
14
14
|
|
|
15
|
-
function postGalleryFeatured(body, fetch) {
|
|
15
|
+
async function postGalleryFeatured(body, fetch) {
|
|
16
16
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryFeaturedRequestSchema);
|
|
17
|
-
|
|
17
|
+
let response = await fetch("/gallery/featured", "POST", jsonBody);
|
|
18
|
+
return S.parseOrThrow(response, postGalleryFeaturedResponseSchema);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
let postGalleryPopularResponseSchema = S.array(MisskeyIoComponentSchemas.GalleryPost.schema);
|
|
21
22
|
|
|
22
|
-
function postGalleryPopular(fetch) {
|
|
23
|
-
|
|
23
|
+
async function postGalleryPopular(fetch) {
|
|
24
|
+
let response = await fetch("/gallery/popular", "POST", undefined);
|
|
25
|
+
return S.parseOrThrow(response, postGalleryPopularResponseSchema);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
let postGalleryPostsRequestSchema = S.object(s => ({
|
|
@@ -31,9 +33,10 @@ let postGalleryPostsRequestSchema = S.object(s => ({
|
|
|
31
33
|
|
|
32
34
|
let postGalleryPostsResponseSchema = S.array(MisskeyIoComponentSchemas.GalleryPost.schema);
|
|
33
35
|
|
|
34
|
-
function postGalleryPosts(body, fetch) {
|
|
36
|
+
async function postGalleryPosts(body, fetch) {
|
|
35
37
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryPostsRequestSchema);
|
|
36
|
-
|
|
38
|
+
let response = await fetch("/gallery/posts", "POST", jsonBody);
|
|
39
|
+
return S.parseOrThrow(response, postGalleryPostsResponseSchema);
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
let postGalleryPostsCreateRequestSchema = S.object(s => ({
|
|
@@ -45,27 +48,28 @@ let postGalleryPostsCreateRequestSchema = S.object(s => ({
|
|
|
45
48
|
|
|
46
49
|
let postGalleryPostsCreateResponseSchema = MisskeyIoComponentSchemas.GalleryPost.schema;
|
|
47
50
|
|
|
48
|
-
function postGalleryPostsCreate(body, fetch) {
|
|
51
|
+
async function postGalleryPostsCreate(body, fetch) {
|
|
49
52
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryPostsCreateRequestSchema);
|
|
50
|
-
|
|
53
|
+
let response = await fetch("/gallery/posts/create", "POST", jsonBody);
|
|
54
|
+
return S.parseOrThrow(response, postGalleryPostsCreateResponseSchema);
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
let postGalleryPostsDeleteRequestSchema = S.object(s => ({
|
|
54
58
|
postId: s.f("postId", S.string)
|
|
55
59
|
}));
|
|
56
60
|
|
|
57
|
-
function postGalleryPostsDelete(body, fetch) {
|
|
61
|
+
async function postGalleryPostsDelete(body, fetch) {
|
|
58
62
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryPostsDeleteRequestSchema);
|
|
59
|
-
|
|
63
|
+
await fetch("/gallery/posts/delete", "POST", jsonBody);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
let postGalleryPostsLikeRequestSchema = S.object(s => ({
|
|
63
67
|
postId: s.f("postId", S.string)
|
|
64
68
|
}));
|
|
65
69
|
|
|
66
|
-
function postGalleryPostsLike(body, fetch) {
|
|
70
|
+
async function postGalleryPostsLike(body, fetch) {
|
|
67
71
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryPostsLikeRequestSchema);
|
|
68
|
-
|
|
72
|
+
await fetch("/gallery/posts/like", "POST", jsonBody);
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
let postGalleryPostsShowRequestSchema = S.object(s => ({
|
|
@@ -74,18 +78,19 @@ let postGalleryPostsShowRequestSchema = S.object(s => ({
|
|
|
74
78
|
|
|
75
79
|
let postGalleryPostsShowResponseSchema = MisskeyIoComponentSchemas.GalleryPost.schema;
|
|
76
80
|
|
|
77
|
-
function postGalleryPostsShow(body, fetch) {
|
|
81
|
+
async function postGalleryPostsShow(body, fetch) {
|
|
78
82
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryPostsShowRequestSchema);
|
|
79
|
-
|
|
83
|
+
let response = await fetch("/gallery/posts/show", "POST", jsonBody);
|
|
84
|
+
return S.parseOrThrow(response, postGalleryPostsShowResponseSchema);
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
let postGalleryPostsUnlikeRequestSchema = S.object(s => ({
|
|
83
88
|
postId: s.f("postId", S.string)
|
|
84
89
|
}));
|
|
85
90
|
|
|
86
|
-
function postGalleryPostsUnlike(body, fetch) {
|
|
91
|
+
async function postGalleryPostsUnlike(body, fetch) {
|
|
87
92
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryPostsUnlikeRequestSchema);
|
|
88
|
-
|
|
93
|
+
await fetch("/gallery/posts/unlike", "POST", jsonBody);
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
let postGalleryPostsUpdateRequestSchema = S.object(s => ({
|
|
@@ -98,9 +103,10 @@ let postGalleryPostsUpdateRequestSchema = S.object(s => ({
|
|
|
98
103
|
|
|
99
104
|
let postGalleryPostsUpdateResponseSchema = MisskeyIoComponentSchemas.GalleryPost.schema;
|
|
100
105
|
|
|
101
|
-
function postGalleryPostsUpdate(body, fetch) {
|
|
106
|
+
async function postGalleryPostsUpdate(body, fetch) {
|
|
102
107
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postGalleryPostsUpdateRequestSchema);
|
|
103
|
-
|
|
108
|
+
let response = await fetch("/gallery/posts/update", "POST", jsonBody);
|
|
109
|
+
return S.parseOrThrow(response, postGalleryPostsUpdateResponseSchema);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
export {
|
|
@@ -15,9 +15,10 @@ let postHashtagsListRequestSchema = S.object(s => ({
|
|
|
15
15
|
|
|
16
16
|
let postHashtagsListResponseSchema = S.array(MisskeyIoComponentSchemas.Hashtag.schema);
|
|
17
17
|
|
|
18
|
-
function postHashtagsList(body, fetch) {
|
|
18
|
+
async function postHashtagsList(body, fetch) {
|
|
19
19
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postHashtagsListRequestSchema);
|
|
20
|
-
|
|
20
|
+
let response = await fetch("/hashtags/list", "POST", jsonBody);
|
|
21
|
+
return S.parseOrThrow(response, postHashtagsListResponseSchema);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
let postHashtagsSearchRequestSchema = S.object(s => ({
|
|
@@ -28,9 +29,10 @@ let postHashtagsSearchRequestSchema = S.object(s => ({
|
|
|
28
29
|
|
|
29
30
|
let postHashtagsSearchResponseSchema = S.array(S.string);
|
|
30
31
|
|
|
31
|
-
function postHashtagsSearch(body, fetch) {
|
|
32
|
+
async function postHashtagsSearch(body, fetch) {
|
|
32
33
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postHashtagsSearchRequestSchema);
|
|
33
|
-
|
|
34
|
+
let response = await fetch("/hashtags/search", "POST", jsonBody);
|
|
35
|
+
return S.parseOrThrow(response, postHashtagsSearchResponseSchema);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
let postHashtagsShowRequestSchema = S.object(s => ({
|
|
@@ -39,9 +41,10 @@ let postHashtagsShowRequestSchema = S.object(s => ({
|
|
|
39
41
|
|
|
40
42
|
let postHashtagsShowResponseSchema = MisskeyIoComponentSchemas.Hashtag.schema;
|
|
41
43
|
|
|
42
|
-
function postHashtagsShow(body, fetch) {
|
|
44
|
+
async function postHashtagsShow(body, fetch) {
|
|
43
45
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postHashtagsShowRequestSchema);
|
|
44
|
-
|
|
46
|
+
let response = await fetch("/hashtags/show", "POST", jsonBody);
|
|
47
|
+
return S.parseOrThrow(response, postHashtagsShowResponseSchema);
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
let getHashtagsTrendResponse_1Schema = S.object(s => ({
|
|
@@ -52,8 +55,9 @@ let getHashtagsTrendResponse_1Schema = S.object(s => ({
|
|
|
52
55
|
|
|
53
56
|
let getHashtagsTrendResponseSchema = S.array(getHashtagsTrendResponse_1Schema);
|
|
54
57
|
|
|
55
|
-
function getHashtagsTrend(fetch) {
|
|
56
|
-
|
|
58
|
+
async function getHashtagsTrend(fetch) {
|
|
59
|
+
let response = await fetch("/hashtags/trend", "GET", undefined);
|
|
60
|
+
return S.parseOrThrow(response, getHashtagsTrendResponseSchema);
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
let postHashtagsTrendResponse_1Schema = S.object(s => ({
|
|
@@ -64,8 +68,9 @@ let postHashtagsTrendResponse_1Schema = S.object(s => ({
|
|
|
64
68
|
|
|
65
69
|
let postHashtagsTrendResponseSchema = S.array(postHashtagsTrendResponse_1Schema);
|
|
66
70
|
|
|
67
|
-
function postHashtagsTrend(fetch) {
|
|
68
|
-
|
|
71
|
+
async function postHashtagsTrend(fetch) {
|
|
72
|
+
let response = await fetch("/hashtags/trend", "POST", undefined);
|
|
73
|
+
return S.parseOrThrow(response, postHashtagsTrendResponseSchema);
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
let postHashtagsUsersRequestSchema = S.object(s => ({
|
|
@@ -80,9 +85,10 @@ let postHashtagsUsersRequestSchema = S.object(s => ({
|
|
|
80
85
|
|
|
81
86
|
let postHashtagsUsersResponseSchema = S.array(MisskeyIoComponentSchemas.UserDetailed.schema);
|
|
82
87
|
|
|
83
|
-
function postHashtagsUsers(body, fetch) {
|
|
88
|
+
async function postHashtagsUsers(body, fetch) {
|
|
84
89
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postHashtagsUsersRequestSchema);
|
|
85
|
-
|
|
90
|
+
let response = await fetch("/hashtags/users", "POST", jsonBody);
|
|
91
|
+
return S.parseOrThrow(response, postHashtagsUsersResponseSchema);
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
export {
|
|
@@ -11,18 +11,19 @@ let postUsersListsCreateRequestSchema = S.object(s => ({
|
|
|
11
11
|
|
|
12
12
|
let postUsersListsCreateResponseSchema = MisskeyIoComponentSchemas.UserList.schema;
|
|
13
13
|
|
|
14
|
-
function postUsersListsCreate(body, fetch) {
|
|
14
|
+
async function postUsersListsCreate(body, fetch) {
|
|
15
15
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsCreateRequestSchema);
|
|
16
|
-
|
|
16
|
+
let response = await fetch("/users/lists/create", "POST", jsonBody);
|
|
17
|
+
return S.parseOrThrow(response, postUsersListsCreateResponseSchema);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
let postUsersListsDeleteRequestSchema = S.object(s => ({
|
|
20
21
|
listId: s.f("listId", S.string)
|
|
21
22
|
}));
|
|
22
23
|
|
|
23
|
-
function postUsersListsDelete(body, fetch) {
|
|
24
|
+
async function postUsersListsDelete(body, fetch) {
|
|
24
25
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsDeleteRequestSchema);
|
|
25
|
-
|
|
26
|
+
await fetch("/users/lists/delete", "POST", jsonBody);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
let postUsersListsGetMembershipsRequestSchema = S.object(s => ({
|
|
@@ -43,9 +44,10 @@ let postUsersListsGetMembershipsResponse_1Schema = S.object(s => ({
|
|
|
43
44
|
|
|
44
45
|
let postUsersListsGetMembershipsResponseSchema = S.array(postUsersListsGetMembershipsResponse_1Schema);
|
|
45
46
|
|
|
46
|
-
function postUsersListsGetMemberships(body, fetch) {
|
|
47
|
+
async function postUsersListsGetMemberships(body, fetch) {
|
|
47
48
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsGetMembershipsRequestSchema);
|
|
48
|
-
|
|
49
|
+
let response = await fetch("/users/lists/get-memberships", "POST", jsonBody);
|
|
50
|
+
return S.parseOrThrow(response, postUsersListsGetMembershipsResponseSchema);
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
let postUsersListsListRequestSchema = S.object(s => ({
|
|
@@ -54,9 +56,10 @@ let postUsersListsListRequestSchema = S.object(s => ({
|
|
|
54
56
|
|
|
55
57
|
let postUsersListsListResponseSchema = S.array(MisskeyIoComponentSchemas.UserList.schema);
|
|
56
58
|
|
|
57
|
-
function postUsersListsList(body, fetch) {
|
|
59
|
+
async function postUsersListsList(body, fetch) {
|
|
58
60
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsListRequestSchema);
|
|
59
|
-
|
|
61
|
+
let response = await fetch("/users/lists/list", "POST", jsonBody);
|
|
62
|
+
return S.parseOrThrow(response, postUsersListsListResponseSchema);
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
let postUsersListsPullRequestSchema = S.object(s => ({
|
|
@@ -64,9 +67,9 @@ let postUsersListsPullRequestSchema = S.object(s => ({
|
|
|
64
67
|
userId: s.f("userId", S.string)
|
|
65
68
|
}));
|
|
66
69
|
|
|
67
|
-
function postUsersListsPull(body, fetch) {
|
|
70
|
+
async function postUsersListsPull(body, fetch) {
|
|
68
71
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsPullRequestSchema);
|
|
69
|
-
|
|
72
|
+
await fetch("/users/lists/pull", "POST", jsonBody);
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
let postUsersListsPushRequestSchema = S.object(s => ({
|
|
@@ -74,9 +77,9 @@ let postUsersListsPushRequestSchema = S.object(s => ({
|
|
|
74
77
|
userId: s.f("userId", S.string)
|
|
75
78
|
}));
|
|
76
79
|
|
|
77
|
-
function postUsersListsPush(body, fetch) {
|
|
80
|
+
async function postUsersListsPush(body, fetch) {
|
|
78
81
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsPushRequestSchema);
|
|
79
|
-
|
|
82
|
+
await fetch("/users/lists/push", "POST", jsonBody);
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
let postUsersListsShowRequestSchema = S.object(s => ({
|
|
@@ -86,9 +89,10 @@ let postUsersListsShowRequestSchema = S.object(s => ({
|
|
|
86
89
|
|
|
87
90
|
let postUsersListsShowResponseSchema = MisskeyIoComponentSchemas.UserList.schema;
|
|
88
91
|
|
|
89
|
-
function postUsersListsShow(body, fetch) {
|
|
92
|
+
async function postUsersListsShow(body, fetch) {
|
|
90
93
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsShowRequestSchema);
|
|
91
|
-
|
|
94
|
+
let response = await fetch("/users/lists/show", "POST", jsonBody);
|
|
95
|
+
return S.parseOrThrow(response, postUsersListsShowResponseSchema);
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
let postUsersListsUpdateRequestSchema = S.object(s => ({
|
|
@@ -99,9 +103,10 @@ let postUsersListsUpdateRequestSchema = S.object(s => ({
|
|
|
99
103
|
|
|
100
104
|
let postUsersListsUpdateResponseSchema = MisskeyIoComponentSchemas.UserList.schema;
|
|
101
105
|
|
|
102
|
-
function postUsersListsUpdate(body, fetch) {
|
|
106
|
+
async function postUsersListsUpdate(body, fetch) {
|
|
103
107
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsUpdateRequestSchema);
|
|
104
|
-
|
|
108
|
+
let response = await fetch("/users/lists/update", "POST", jsonBody);
|
|
109
|
+
return S.parseOrThrow(response, postUsersListsUpdateResponseSchema);
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
let postUsersListsUpdateMembershipRequestSchema = S.object(s => ({
|
|
@@ -110,9 +115,9 @@ let postUsersListsUpdateMembershipRequestSchema = S.object(s => ({
|
|
|
110
115
|
withReplies: s.f("withReplies", S.option(S.bool))
|
|
111
116
|
}));
|
|
112
117
|
|
|
113
|
-
function postUsersListsUpdateMembership(body, fetch) {
|
|
118
|
+
async function postUsersListsUpdateMembership(body, fetch) {
|
|
114
119
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postUsersListsUpdateMembershipRequestSchema);
|
|
115
|
-
|
|
120
|
+
await fetch("/users/lists/update-membership", "POST", jsonBody);
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
export {
|
|
@@ -125,8 +125,9 @@ let postAdminMetaResponseSchema = S.object(s => ({
|
|
|
125
125
|
inquiryUrl: s.f("inquiryUrl", S.nullableAsOption(S.string))
|
|
126
126
|
}));
|
|
127
127
|
|
|
128
|
-
function postAdminMeta(fetch) {
|
|
129
|
-
|
|
128
|
+
async function postAdminMeta(fetch) {
|
|
129
|
+
let response = await fetch("/admin/meta", "POST", undefined);
|
|
130
|
+
return S.parseOrThrow(response, postAdminMetaResponseSchema);
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
let postAnnouncementRequestSchema = S.object(s => ({
|
|
@@ -135,9 +136,10 @@ let postAnnouncementRequestSchema = S.object(s => ({
|
|
|
135
136
|
|
|
136
137
|
let postAnnouncementResponseSchema = MisskeyIoComponentSchemas.Announcement.schema;
|
|
137
138
|
|
|
138
|
-
function postAnnouncement(body, fetch) {
|
|
139
|
+
async function postAnnouncement(body, fetch) {
|
|
139
140
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAnnouncementRequestSchema);
|
|
140
|
-
|
|
141
|
+
let response = await fetch("/announcement", "POST", jsonBody);
|
|
142
|
+
return S.parseOrThrow(response, postAnnouncementResponseSchema);
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
let postAnnouncementsRequestSchema = S.object(s => ({
|
|
@@ -150,9 +152,10 @@ let postAnnouncementsRequestSchema = S.object(s => ({
|
|
|
150
152
|
|
|
151
153
|
let postAnnouncementsResponseSchema = S.array(MisskeyIoComponentSchemas.Announcement.schema);
|
|
152
154
|
|
|
153
|
-
function postAnnouncements(body, fetch) {
|
|
155
|
+
async function postAnnouncements(body, fetch) {
|
|
154
156
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAnnouncementsRequestSchema);
|
|
155
|
-
|
|
157
|
+
let response = await fetch("/announcements", "POST", jsonBody);
|
|
158
|
+
return S.parseOrThrow(response, postAnnouncementsResponseSchema);
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
let postAnnouncementsShowRequestSchema = S.object(s => ({
|
|
@@ -161,9 +164,10 @@ let postAnnouncementsShowRequestSchema = S.object(s => ({
|
|
|
161
164
|
|
|
162
165
|
let postAnnouncementsShowResponseSchema = MisskeyIoComponentSchemas.Announcement.schema;
|
|
163
166
|
|
|
164
|
-
function postAnnouncementsShow(body, fetch) {
|
|
167
|
+
async function postAnnouncementsShow(body, fetch) {
|
|
165
168
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAnnouncementsShowRequestSchema);
|
|
166
|
-
|
|
169
|
+
let response = await fetch("/announcements/show", "POST", jsonBody);
|
|
170
|
+
return S.parseOrThrow(response, postAnnouncementsShowResponseSchema);
|
|
167
171
|
}
|
|
168
172
|
|
|
169
173
|
let getEmojiRequestSchema = S.object(s => ({
|
|
@@ -172,9 +176,10 @@ let getEmojiRequestSchema = S.object(s => ({
|
|
|
172
176
|
|
|
173
177
|
let getEmojiResponseSchema = MisskeyIoComponentSchemas.EmojiDetailed.schema;
|
|
174
178
|
|
|
175
|
-
function getEmoji(body, fetch) {
|
|
179
|
+
async function getEmoji(body, fetch) {
|
|
176
180
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getEmojiRequestSchema);
|
|
177
|
-
|
|
181
|
+
let response = await fetch("/emoji", "GET", jsonBody);
|
|
182
|
+
return S.parseOrThrow(response, getEmojiResponseSchema);
|
|
178
183
|
}
|
|
179
184
|
|
|
180
185
|
let postEmojiRequestSchema = S.object(s => ({
|
|
@@ -183,25 +188,28 @@ let postEmojiRequestSchema = S.object(s => ({
|
|
|
183
188
|
|
|
184
189
|
let postEmojiResponseSchema = MisskeyIoComponentSchemas.EmojiDetailed.schema;
|
|
185
190
|
|
|
186
|
-
function postEmoji(body, fetch) {
|
|
191
|
+
async function postEmoji(body, fetch) {
|
|
187
192
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postEmojiRequestSchema);
|
|
188
|
-
|
|
193
|
+
let response = await fetch("/emoji", "POST", jsonBody);
|
|
194
|
+
return S.parseOrThrow(response, postEmojiResponseSchema);
|
|
189
195
|
}
|
|
190
196
|
|
|
191
197
|
let getEmojisResponseSchema = S.object(s => ({
|
|
192
198
|
emojis: s.f("emojis", S.array(MisskeyIoComponentSchemas.EmojiSimple.schema))
|
|
193
199
|
}));
|
|
194
200
|
|
|
195
|
-
function getEmojis(fetch) {
|
|
196
|
-
|
|
201
|
+
async function getEmojis(fetch) {
|
|
202
|
+
let response = await fetch("/emojis", "GET", undefined);
|
|
203
|
+
return S.parseOrThrow(response, getEmojisResponseSchema);
|
|
197
204
|
}
|
|
198
205
|
|
|
199
206
|
let postEmojisResponseSchema = S.object(s => ({
|
|
200
207
|
emojis: s.f("emojis", S.array(MisskeyIoComponentSchemas.EmojiSimple.schema))
|
|
201
208
|
}));
|
|
202
209
|
|
|
203
|
-
function postEmojis(fetch) {
|
|
204
|
-
|
|
210
|
+
async function postEmojis(fetch) {
|
|
211
|
+
let response = await fetch("/emojis", "POST", undefined);
|
|
212
|
+
return S.parseOrThrow(response, postEmojisResponseSchema);
|
|
205
213
|
}
|
|
206
214
|
|
|
207
215
|
let postEndpointRequestSchema = S.object(s => ({
|
|
@@ -219,15 +227,17 @@ let postEndpointResponse_1Schema = S.object(s => ({
|
|
|
219
227
|
|
|
220
228
|
let postEndpointResponseSchema = S.nullableAsOption(postEndpointResponse_1Schema);
|
|
221
229
|
|
|
222
|
-
function postEndpoint(body, fetch) {
|
|
230
|
+
async function postEndpoint(body, fetch) {
|
|
223
231
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postEndpointRequestSchema);
|
|
224
|
-
|
|
232
|
+
let response = await fetch("/endpoint", "POST", jsonBody);
|
|
233
|
+
return S.parseOrThrow(response, postEndpointResponseSchema);
|
|
225
234
|
}
|
|
226
235
|
|
|
227
236
|
let postEndpointsResponseSchema = S.array(S.string);
|
|
228
237
|
|
|
229
|
-
function postEndpoints(fetch) {
|
|
230
|
-
|
|
238
|
+
async function postEndpoints(fetch) {
|
|
239
|
+
let response = await fetch("/endpoints", "POST", undefined);
|
|
240
|
+
return S.parseOrThrow(response, postEndpointsResponseSchema);
|
|
231
241
|
}
|
|
232
242
|
|
|
233
243
|
let postFetchExternalResourcesRequestSchema = S.object(s => ({
|
|
@@ -240,9 +250,10 @@ let postFetchExternalResourcesResponseSchema = S.object(s => ({
|
|
|
240
250
|
data: s.f("data", S.string)
|
|
241
251
|
}));
|
|
242
252
|
|
|
243
|
-
function postFetchExternalResources(body, fetch) {
|
|
253
|
+
async function postFetchExternalResources(body, fetch) {
|
|
244
254
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postFetchExternalResourcesRequestSchema);
|
|
245
|
-
|
|
255
|
+
let response = await fetch("/fetch-external-resources", "POST", jsonBody);
|
|
256
|
+
return S.parseOrThrow(response, postFetchExternalResourcesResponseSchema);
|
|
246
257
|
}
|
|
247
258
|
|
|
248
259
|
let getFetchRssRequestSchema = S.object(s => ({
|
|
@@ -309,9 +320,10 @@ let getFetchRssResponseSchema = S.object(s => ({
|
|
|
309
320
|
itunes: s.f("itunes", S.option(getFetchRssResponse_4Schema))
|
|
310
321
|
}));
|
|
311
322
|
|
|
312
|
-
function getFetchRss(body, fetch) {
|
|
323
|
+
async function getFetchRss(body, fetch) {
|
|
313
324
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getFetchRssRequestSchema);
|
|
314
|
-
|
|
325
|
+
let response = await fetch("/fetch-rss", "GET", jsonBody);
|
|
326
|
+
return S.parseOrThrow(response, getFetchRssResponseSchema);
|
|
315
327
|
}
|
|
316
328
|
|
|
317
329
|
let postFetchRssRequestSchema = S.object(s => ({
|
|
@@ -378,48 +390,53 @@ let postFetchRssResponseSchema = S.object(s => ({
|
|
|
378
390
|
itunes: s.f("itunes", S.option(postFetchRssResponse_4Schema))
|
|
379
391
|
}));
|
|
380
392
|
|
|
381
|
-
function postFetchRss(body, fetch) {
|
|
393
|
+
async function postFetchRss(body, fetch) {
|
|
382
394
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postFetchRssRequestSchema);
|
|
383
|
-
|
|
395
|
+
let response = await fetch("/fetch-rss", "POST", jsonBody);
|
|
396
|
+
return S.parseOrThrow(response, postFetchRssResponseSchema);
|
|
384
397
|
}
|
|
385
398
|
|
|
386
399
|
let getGetOnlineUsersCountResponseSchema = S.object(s => ({
|
|
387
400
|
count: s.f("count", S.float)
|
|
388
401
|
}));
|
|
389
402
|
|
|
390
|
-
function getGetOnlineUsersCount(fetch) {
|
|
391
|
-
|
|
403
|
+
async function getGetOnlineUsersCount(fetch) {
|
|
404
|
+
let response = await fetch("/get-online-users-count", "GET", undefined);
|
|
405
|
+
return S.parseOrThrow(response, getGetOnlineUsersCountResponseSchema);
|
|
392
406
|
}
|
|
393
407
|
|
|
394
408
|
let postGetOnlineUsersCountResponseSchema = S.object(s => ({
|
|
395
409
|
count: s.f("count", S.float)
|
|
396
410
|
}));
|
|
397
411
|
|
|
398
|
-
function postGetOnlineUsersCount(fetch) {
|
|
399
|
-
|
|
412
|
+
async function postGetOnlineUsersCount(fetch) {
|
|
413
|
+
let response = await fetch("/get-online-users-count", "POST", undefined);
|
|
414
|
+
return S.parseOrThrow(response, postGetOnlineUsersCountResponseSchema);
|
|
400
415
|
}
|
|
401
416
|
|
|
402
417
|
let postInviteCreateResponseSchema = MisskeyIoComponentSchemas.InviteCode.schema;
|
|
403
418
|
|
|
404
|
-
function postInviteCreate(fetch) {
|
|
405
|
-
|
|
419
|
+
async function postInviteCreate(fetch) {
|
|
420
|
+
let response = await fetch("/invite/create", "POST", undefined);
|
|
421
|
+
return S.parseOrThrow(response, postInviteCreateResponseSchema);
|
|
406
422
|
}
|
|
407
423
|
|
|
408
424
|
let postInviteDeleteRequestSchema = S.object(s => ({
|
|
409
425
|
inviteId: s.f("inviteId", S.string)
|
|
410
426
|
}));
|
|
411
427
|
|
|
412
|
-
function postInviteDelete(body, fetch) {
|
|
428
|
+
async function postInviteDelete(body, fetch) {
|
|
413
429
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postInviteDeleteRequestSchema);
|
|
414
|
-
|
|
430
|
+
await fetch("/invite/delete", "POST", jsonBody);
|
|
415
431
|
}
|
|
416
432
|
|
|
417
433
|
let postInviteLimitResponseSchema = S.object(s => ({
|
|
418
434
|
remaining: s.f("remaining", S.nullableAsOption(S.int))
|
|
419
435
|
}));
|
|
420
436
|
|
|
421
|
-
function postInviteLimit(fetch) {
|
|
422
|
-
|
|
437
|
+
async function postInviteLimit(fetch) {
|
|
438
|
+
let response = await fetch("/invite/limit", "POST", undefined);
|
|
439
|
+
return S.parseOrThrow(response, postInviteLimitResponseSchema);
|
|
423
440
|
}
|
|
424
441
|
|
|
425
442
|
let postInviteListRequestSchema = S.object(s => ({
|
|
@@ -430,9 +447,10 @@ let postInviteListRequestSchema = S.object(s => ({
|
|
|
430
447
|
|
|
431
448
|
let postInviteListResponseSchema = S.array(MisskeyIoComponentSchemas.InviteCode.schema);
|
|
432
449
|
|
|
433
|
-
function postInviteList(body, fetch) {
|
|
450
|
+
async function postInviteList(body, fetch) {
|
|
434
451
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postInviteListRequestSchema);
|
|
435
|
-
|
|
452
|
+
let response = await fetch("/invite/list", "POST", jsonBody);
|
|
453
|
+
return S.parseOrThrow(response, postInviteListResponseSchema);
|
|
436
454
|
}
|
|
437
455
|
|
|
438
456
|
let getMetaRequestSchema = S.object(s => ({
|
|
@@ -441,9 +459,10 @@ let getMetaRequestSchema = S.object(s => ({
|
|
|
441
459
|
|
|
442
460
|
let getMetaResponseSchema = S.dict(S.json);
|
|
443
461
|
|
|
444
|
-
function getMeta(body, fetch) {
|
|
462
|
+
async function getMeta(body, fetch) {
|
|
445
463
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getMetaRequestSchema);
|
|
446
|
-
|
|
464
|
+
let response = await fetch("/meta", "GET", jsonBody);
|
|
465
|
+
return S.parseOrThrow(response, getMetaResponseSchema);
|
|
447
466
|
}
|
|
448
467
|
|
|
449
468
|
let postMetaRequestSchema = S.object(s => ({
|
|
@@ -452,17 +471,19 @@ let postMetaRequestSchema = S.object(s => ({
|
|
|
452
471
|
|
|
453
472
|
let postMetaResponseSchema = S.dict(S.json);
|
|
454
473
|
|
|
455
|
-
function postMeta(body, fetch) {
|
|
474
|
+
async function postMeta(body, fetch) {
|
|
456
475
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postMetaRequestSchema);
|
|
457
|
-
|
|
476
|
+
let response = await fetch("/meta", "POST", jsonBody);
|
|
477
|
+
return S.parseOrThrow(response, postMetaResponseSchema);
|
|
458
478
|
}
|
|
459
479
|
|
|
460
480
|
let postPingResponseSchema = S.object(s => ({
|
|
461
481
|
pong: s.f("pong", S.float)
|
|
462
482
|
}));
|
|
463
483
|
|
|
464
|
-
function postPing(fetch) {
|
|
465
|
-
|
|
484
|
+
async function postPing(fetch) {
|
|
485
|
+
let response = await fetch("/ping", "POST", undefined);
|
|
486
|
+
return S.parseOrThrow(response, postPingResponseSchema);
|
|
466
487
|
}
|
|
467
488
|
|
|
468
489
|
let getStatsResponseSchema = S.object(s => ({
|
|
@@ -475,8 +496,9 @@ let getStatsResponseSchema = S.object(s => ({
|
|
|
475
496
|
driveUsageRemote: s.f("driveUsageRemote", S.float)
|
|
476
497
|
}));
|
|
477
498
|
|
|
478
|
-
function getStats(fetch) {
|
|
479
|
-
|
|
499
|
+
async function getStats(fetch) {
|
|
500
|
+
let response = await fetch("/stats", "GET", undefined);
|
|
501
|
+
return S.parseOrThrow(response, getStatsResponseSchema);
|
|
480
502
|
}
|
|
481
503
|
|
|
482
504
|
let postStatsResponseSchema = S.object(s => ({
|
|
@@ -489,8 +511,9 @@ let postStatsResponseSchema = S.object(s => ({
|
|
|
489
511
|
driveUsageRemote: s.f("driveUsageRemote", S.float)
|
|
490
512
|
}));
|
|
491
513
|
|
|
492
|
-
function postStats(fetch) {
|
|
493
|
-
|
|
514
|
+
async function postStats(fetch) {
|
|
515
|
+
let response = await fetch("/stats", "POST", undefined);
|
|
516
|
+
return S.parseOrThrow(response, postStatsResponseSchema);
|
|
494
517
|
}
|
|
495
518
|
|
|
496
519
|
export {
|
|
@@ -4,8 +4,8 @@ import * as S from "sury/lib/es6/src/S.mjs";
|
|
|
4
4
|
|
|
5
5
|
S.enableJson();
|
|
6
6
|
|
|
7
|
-
function postResetDb(fetch) {
|
|
8
|
-
|
|
7
|
+
async function postResetDb(fetch) {
|
|
8
|
+
await fetch("/reset-db", "POST", undefined);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
let postTestRequestSchema = S.object(s => ({
|
|
@@ -24,9 +24,10 @@ let postTestResponseSchema = S.object(s => ({
|
|
|
24
24
|
nullableDefault: s.f("nullableDefault", S.option(S.string))
|
|
25
25
|
}));
|
|
26
26
|
|
|
27
|
-
function postTest(body, fetch) {
|
|
27
|
+
async function postTest(body, fetch) {
|
|
28
28
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postTestRequestSchema);
|
|
29
|
-
|
|
29
|
+
let response = await fetch("/test", "POST", jsonBody);
|
|
30
|
+
return S.parseOrThrow(response, postTestResponseSchema);
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export {
|