@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
|
@@ -22,24 +22,26 @@ let postAntennasCreateRequestSchema = S.object(s => ({
|
|
|
22
22
|
|
|
23
23
|
let postAntennasCreateResponseSchema = MisskeyIoComponentSchemas.Antenna.schema;
|
|
24
24
|
|
|
25
|
-
function postAntennasCreate(body, fetch) {
|
|
25
|
+
async function postAntennasCreate(body, fetch) {
|
|
26
26
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAntennasCreateRequestSchema);
|
|
27
|
-
|
|
27
|
+
let response = await fetch("/antennas/create", "POST", jsonBody);
|
|
28
|
+
return S.parseOrThrow(response, postAntennasCreateResponseSchema);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
let postAntennasDeleteRequestSchema = S.object(s => ({
|
|
31
32
|
antennaId: s.f("antennaId", S.string)
|
|
32
33
|
}));
|
|
33
34
|
|
|
34
|
-
function postAntennasDelete(body, fetch) {
|
|
35
|
+
async function postAntennasDelete(body, fetch) {
|
|
35
36
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAntennasDeleteRequestSchema);
|
|
36
|
-
|
|
37
|
+
await fetch("/antennas/delete", "POST", jsonBody);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
let postAntennasListResponseSchema = S.array(MisskeyIoComponentSchemas.Antenna.schema);
|
|
40
41
|
|
|
41
|
-
function postAntennasList(fetch) {
|
|
42
|
-
|
|
42
|
+
async function postAntennasList(fetch) {
|
|
43
|
+
let response = await fetch("/antennas/list", "POST", undefined);
|
|
44
|
+
return S.parseOrThrow(response, postAntennasListResponseSchema);
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
let postAntennasNotesRequestSchema = S.object(s => ({
|
|
@@ -53,9 +55,10 @@ let postAntennasNotesRequestSchema = S.object(s => ({
|
|
|
53
55
|
|
|
54
56
|
let postAntennasNotesResponseSchema = S.array(MisskeyIoComponentSchemas.Note.schema);
|
|
55
57
|
|
|
56
|
-
function postAntennasNotes(body, fetch) {
|
|
58
|
+
async function postAntennasNotes(body, fetch) {
|
|
57
59
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAntennasNotesRequestSchema);
|
|
58
|
-
|
|
60
|
+
let response = await fetch("/antennas/notes", "POST", jsonBody);
|
|
61
|
+
return S.parseOrThrow(response, postAntennasNotesResponseSchema);
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
let postAntennasShowRequestSchema = S.object(s => ({
|
|
@@ -64,9 +67,10 @@ let postAntennasShowRequestSchema = S.object(s => ({
|
|
|
64
67
|
|
|
65
68
|
let postAntennasShowResponseSchema = MisskeyIoComponentSchemas.Antenna.schema;
|
|
66
69
|
|
|
67
|
-
function postAntennasShow(body, fetch) {
|
|
70
|
+
async function postAntennasShow(body, fetch) {
|
|
68
71
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAntennasShowRequestSchema);
|
|
69
|
-
|
|
72
|
+
let response = await fetch("/antennas/show", "POST", jsonBody);
|
|
73
|
+
return S.parseOrThrow(response, postAntennasShowResponseSchema);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
let postAntennasUpdateRequestSchema = S.object(s => ({
|
|
@@ -87,9 +91,10 @@ let postAntennasUpdateRequestSchema = S.object(s => ({
|
|
|
87
91
|
|
|
88
92
|
let postAntennasUpdateResponseSchema = MisskeyIoComponentSchemas.Antenna.schema;
|
|
89
93
|
|
|
90
|
-
function postAntennasUpdate(body, fetch) {
|
|
94
|
+
async function postAntennasUpdate(body, fetch) {
|
|
91
95
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAntennasUpdateRequestSchema);
|
|
92
|
-
|
|
96
|
+
let response = await fetch("/antennas/update", "POST", jsonBody);
|
|
97
|
+
return S.parseOrThrow(response, postAntennasUpdateResponseSchema);
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
export {
|
|
@@ -14,9 +14,10 @@ let postAppCreateRequestSchema = S.object(s => ({
|
|
|
14
14
|
|
|
15
15
|
let postAppCreateResponseSchema = MisskeyIoComponentSchemas.App.schema;
|
|
16
16
|
|
|
17
|
-
function postAppCreate(body, fetch) {
|
|
17
|
+
async function postAppCreate(body, fetch) {
|
|
18
18
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAppCreateRequestSchema);
|
|
19
|
-
|
|
19
|
+
let response = await fetch("/app/create", "POST", jsonBody);
|
|
20
|
+
return S.parseOrThrow(response, postAppCreateResponseSchema);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
let postAppShowRequestSchema = S.object(s => ({
|
|
@@ -25,9 +26,10 @@ let postAppShowRequestSchema = S.object(s => ({
|
|
|
25
26
|
|
|
26
27
|
let postAppShowResponseSchema = MisskeyIoComponentSchemas.App.schema;
|
|
27
28
|
|
|
28
|
-
function postAppShow(body, fetch) {
|
|
29
|
+
async function postAppShow(body, fetch) {
|
|
29
30
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAppShowRequestSchema);
|
|
30
|
-
|
|
31
|
+
let response = await fetch("/app/show", "POST", jsonBody);
|
|
32
|
+
return S.parseOrThrow(response, postAppShowResponseSchema);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
export {
|
|
@@ -9,9 +9,9 @@ let postAuthAcceptRequestSchema = S.object(s => ({
|
|
|
9
9
|
token: s.f("token", S.string)
|
|
10
10
|
}));
|
|
11
11
|
|
|
12
|
-
function postAuthAccept(body, fetch) {
|
|
12
|
+
async function postAuthAccept(body, fetch) {
|
|
13
13
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAuthAcceptRequestSchema);
|
|
14
|
-
|
|
14
|
+
await fetch("/auth/accept", "POST", jsonBody);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
let postAuthSessionGenerateRequestSchema = S.object(s => ({
|
|
@@ -23,9 +23,10 @@ let postAuthSessionGenerateResponseSchema = S.object(s => ({
|
|
|
23
23
|
url: s.f("url", S.string)
|
|
24
24
|
}));
|
|
25
25
|
|
|
26
|
-
function postAuthSessionGenerate(body, fetch) {
|
|
26
|
+
async function postAuthSessionGenerate(body, fetch) {
|
|
27
27
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAuthSessionGenerateRequestSchema);
|
|
28
|
-
|
|
28
|
+
let response = await fetch("/auth/session/generate", "POST", jsonBody);
|
|
29
|
+
return S.parseOrThrow(response, postAuthSessionGenerateResponseSchema);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
let postAuthSessionShowRequestSchema = S.object(s => ({
|
|
@@ -38,9 +39,10 @@ let postAuthSessionShowResponseSchema = S.object(s => ({
|
|
|
38
39
|
token: s.f("token", S.string)
|
|
39
40
|
}));
|
|
40
41
|
|
|
41
|
-
function postAuthSessionShow(body, fetch) {
|
|
42
|
+
async function postAuthSessionShow(body, fetch) {
|
|
42
43
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAuthSessionShowRequestSchema);
|
|
43
|
-
|
|
44
|
+
let response = await fetch("/auth/session/show", "POST", jsonBody);
|
|
45
|
+
return S.parseOrThrow(response, postAuthSessionShowResponseSchema);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
let postAuthSessionUserkeyRequestSchema = S.object(s => ({
|
|
@@ -53,9 +55,10 @@ let postAuthSessionUserkeyResponseSchema = S.object(s => ({
|
|
|
53
55
|
user: s.f("user", MisskeyIoComponentSchemas.UserDetailed.schema)
|
|
54
56
|
}));
|
|
55
57
|
|
|
56
|
-
function postAuthSessionUserkey(body, fetch) {
|
|
58
|
+
async function postAuthSessionUserkey(body, fetch) {
|
|
57
59
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAuthSessionUserkeyRequestSchema);
|
|
58
|
-
|
|
60
|
+
let response = await fetch("/auth/session/userkey", "POST", jsonBody);
|
|
61
|
+
return S.parseOrThrow(response, postAuthSessionUserkeyResponseSchema);
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
let postMiauthGenTokenRequestSchema = S.object(s => ({
|
|
@@ -70,9 +73,10 @@ let postMiauthGenTokenResponseSchema = S.object(s => ({
|
|
|
70
73
|
token: s.f("token", S.string)
|
|
71
74
|
}));
|
|
72
75
|
|
|
73
|
-
function postMiauthGenToken(body, fetch) {
|
|
76
|
+
async function postMiauthGenToken(body, fetch) {
|
|
74
77
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postMiauthGenTokenRequestSchema);
|
|
75
|
-
|
|
78
|
+
let response = await fetch("/miauth/gen-token", "POST", jsonBody);
|
|
79
|
+
return S.parseOrThrow(response, postMiauthGenTokenResponseSchema);
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
export {
|
|
@@ -16,39 +16,42 @@ let postChannelsCreateRequestSchema = S.object(s => ({
|
|
|
16
16
|
|
|
17
17
|
let postChannelsCreateResponseSchema = MisskeyIoComponentSchemas.Channel.schema;
|
|
18
18
|
|
|
19
|
-
function postChannelsCreate(body, fetch) {
|
|
19
|
+
async function postChannelsCreate(body, fetch) {
|
|
20
20
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsCreateRequestSchema);
|
|
21
|
-
|
|
21
|
+
let response = await fetch("/channels/create", "POST", jsonBody);
|
|
22
|
+
return S.parseOrThrow(response, postChannelsCreateResponseSchema);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
let postChannelsFavoriteRequestSchema = S.object(s => ({
|
|
25
26
|
channelId: s.f("channelId", S.string)
|
|
26
27
|
}));
|
|
27
28
|
|
|
28
|
-
function postChannelsFavorite(body, fetch) {
|
|
29
|
+
async function postChannelsFavorite(body, fetch) {
|
|
29
30
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsFavoriteRequestSchema);
|
|
30
|
-
|
|
31
|
+
await fetch("/channels/favorite", "POST", jsonBody);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
let postChannelsFeaturedResponseSchema = S.array(MisskeyIoComponentSchemas.Channel.schema);
|
|
34
35
|
|
|
35
|
-
function postChannelsFeatured(fetch) {
|
|
36
|
-
|
|
36
|
+
async function postChannelsFeatured(fetch) {
|
|
37
|
+
let response = await fetch("/channels/featured", "POST", undefined);
|
|
38
|
+
return S.parseOrThrow(response, postChannelsFeaturedResponseSchema);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
let postChannelsFeaturedGamesResponseSchema = S.array(MisskeyIoComponentSchemas.Channel.schema);
|
|
40
42
|
|
|
41
|
-
function postChannelsFeaturedGames(fetch) {
|
|
42
|
-
|
|
43
|
+
async function postChannelsFeaturedGames(fetch) {
|
|
44
|
+
let response = await fetch("/channels/featured-games", "POST", undefined);
|
|
45
|
+
return S.parseOrThrow(response, postChannelsFeaturedGamesResponseSchema);
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
let postChannelsFollowRequestSchema = S.object(s => ({
|
|
46
49
|
channelId: s.f("channelId", S.string)
|
|
47
50
|
}));
|
|
48
51
|
|
|
49
|
-
function postChannelsFollow(body, fetch) {
|
|
52
|
+
async function postChannelsFollow(body, fetch) {
|
|
50
53
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsFollowRequestSchema);
|
|
51
|
-
|
|
54
|
+
await fetch("/channels/follow", "POST", jsonBody);
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
let postChannelsFollowedRequestSchema = S.object(s => ({
|
|
@@ -59,15 +62,17 @@ let postChannelsFollowedRequestSchema = S.object(s => ({
|
|
|
59
62
|
|
|
60
63
|
let postChannelsFollowedResponseSchema = S.array(MisskeyIoComponentSchemas.Channel.schema);
|
|
61
64
|
|
|
62
|
-
function postChannelsFollowed(body, fetch) {
|
|
65
|
+
async function postChannelsFollowed(body, fetch) {
|
|
63
66
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsFollowedRequestSchema);
|
|
64
|
-
|
|
67
|
+
let response = await fetch("/channels/followed", "POST", jsonBody);
|
|
68
|
+
return S.parseOrThrow(response, postChannelsFollowedResponseSchema);
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
let postChannelsMyFavoritesResponseSchema = S.array(MisskeyIoComponentSchemas.Channel.schema);
|
|
68
72
|
|
|
69
|
-
function postChannelsMyFavorites(fetch) {
|
|
70
|
-
|
|
73
|
+
async function postChannelsMyFavorites(fetch) {
|
|
74
|
+
let response = await fetch("/channels/my-favorites", "POST", undefined);
|
|
75
|
+
return S.parseOrThrow(response, postChannelsMyFavoritesResponseSchema);
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
let postChannelsOwnedRequestSchema = S.object(s => ({
|
|
@@ -78,9 +83,10 @@ let postChannelsOwnedRequestSchema = S.object(s => ({
|
|
|
78
83
|
|
|
79
84
|
let postChannelsOwnedResponseSchema = S.array(MisskeyIoComponentSchemas.Channel.schema);
|
|
80
85
|
|
|
81
|
-
function postChannelsOwned(body, fetch) {
|
|
86
|
+
async function postChannelsOwned(body, fetch) {
|
|
82
87
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsOwnedRequestSchema);
|
|
83
|
-
|
|
88
|
+
let response = await fetch("/channels/owned", "POST", jsonBody);
|
|
89
|
+
return S.parseOrThrow(response, postChannelsOwnedResponseSchema);
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
let postChannelsSearchRequestSchema = S.object(s => ({
|
|
@@ -93,9 +99,10 @@ let postChannelsSearchRequestSchema = S.object(s => ({
|
|
|
93
99
|
|
|
94
100
|
let postChannelsSearchResponseSchema = S.array(MisskeyIoComponentSchemas.Channel.schema);
|
|
95
101
|
|
|
96
|
-
function postChannelsSearch(body, fetch) {
|
|
102
|
+
async function postChannelsSearch(body, fetch) {
|
|
97
103
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsSearchRequestSchema);
|
|
98
|
-
|
|
104
|
+
let response = await fetch("/channels/search", "POST", jsonBody);
|
|
105
|
+
return S.parseOrThrow(response, postChannelsSearchResponseSchema);
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
let postChannelsShowRequestSchema = S.object(s => ({
|
|
@@ -104,27 +111,28 @@ let postChannelsShowRequestSchema = S.object(s => ({
|
|
|
104
111
|
|
|
105
112
|
let postChannelsShowResponseSchema = MisskeyIoComponentSchemas.Channel.schema;
|
|
106
113
|
|
|
107
|
-
function postChannelsShow(body, fetch) {
|
|
114
|
+
async function postChannelsShow(body, fetch) {
|
|
108
115
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsShowRequestSchema);
|
|
109
|
-
|
|
116
|
+
let response = await fetch("/channels/show", "POST", jsonBody);
|
|
117
|
+
return S.parseOrThrow(response, postChannelsShowResponseSchema);
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
let postChannelsUnfavoriteRequestSchema = S.object(s => ({
|
|
113
121
|
channelId: s.f("channelId", S.string)
|
|
114
122
|
}));
|
|
115
123
|
|
|
116
|
-
function postChannelsUnfavorite(body, fetch) {
|
|
124
|
+
async function postChannelsUnfavorite(body, fetch) {
|
|
117
125
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsUnfavoriteRequestSchema);
|
|
118
|
-
|
|
126
|
+
await fetch("/channels/unfavorite", "POST", jsonBody);
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
let postChannelsUnfollowRequestSchema = S.object(s => ({
|
|
122
130
|
channelId: s.f("channelId", S.string)
|
|
123
131
|
}));
|
|
124
132
|
|
|
125
|
-
function postChannelsUnfollow(body, fetch) {
|
|
133
|
+
async function postChannelsUnfollow(body, fetch) {
|
|
126
134
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsUnfollowRequestSchema);
|
|
127
|
-
|
|
135
|
+
await fetch("/channels/unfollow", "POST", jsonBody);
|
|
128
136
|
}
|
|
129
137
|
|
|
130
138
|
let postChannelsUpdateRequestSchema = S.object(s => ({
|
|
@@ -141,9 +149,10 @@ let postChannelsUpdateRequestSchema = S.object(s => ({
|
|
|
141
149
|
|
|
142
150
|
let postChannelsUpdateResponseSchema = MisskeyIoComponentSchemas.Channel.schema;
|
|
143
151
|
|
|
144
|
-
function postChannelsUpdate(body, fetch) {
|
|
152
|
+
async function postChannelsUpdate(body, fetch) {
|
|
145
153
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsUpdateRequestSchema);
|
|
146
|
-
|
|
154
|
+
let response = await fetch("/channels/update", "POST", jsonBody);
|
|
155
|
+
return S.parseOrThrow(response, postChannelsUpdateResponseSchema);
|
|
147
156
|
}
|
|
148
157
|
|
|
149
158
|
export {
|
|
@@ -22,9 +22,10 @@ let getChartsActiveUsersResponseSchema = S.object(s => ({
|
|
|
22
22
|
registeredOutsideYear: s.f("registeredOutsideYear", S.array(S.float))
|
|
23
23
|
}));
|
|
24
24
|
|
|
25
|
-
function getChartsActiveUsers(body, fetch) {
|
|
25
|
+
async function getChartsActiveUsers(body, fetch) {
|
|
26
26
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsActiveUsersRequestSchema);
|
|
27
|
-
|
|
27
|
+
let response = await fetch("/charts/active-users", "GET", jsonBody);
|
|
28
|
+
return S.parseOrThrow(response, getChartsActiveUsersResponseSchema);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
let postChartsActiveUsersRequestSchema = S.object(s => ({
|
|
@@ -45,9 +46,10 @@ let postChartsActiveUsersResponseSchema = S.object(s => ({
|
|
|
45
46
|
registeredOutsideYear: s.f("registeredOutsideYear", S.array(S.float))
|
|
46
47
|
}));
|
|
47
48
|
|
|
48
|
-
function postChartsActiveUsers(body, fetch) {
|
|
49
|
+
async function postChartsActiveUsers(body, fetch) {
|
|
49
50
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsActiveUsersRequestSchema);
|
|
50
|
-
|
|
51
|
+
let response = await fetch("/charts/active-users", "POST", jsonBody);
|
|
52
|
+
return S.parseOrThrow(response, postChartsActiveUsersResponseSchema);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
let getChartsApRequestRequestSchema = S.object(s => ({
|
|
@@ -62,9 +64,10 @@ let getChartsApRequestResponseSchema = S.object(s => ({
|
|
|
62
64
|
inboxReceived: s.f("inboxReceived", S.array(S.float))
|
|
63
65
|
}));
|
|
64
66
|
|
|
65
|
-
function getChartsApRequest(body, fetch) {
|
|
67
|
+
async function getChartsApRequest(body, fetch) {
|
|
66
68
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsApRequestRequestSchema);
|
|
67
|
-
|
|
69
|
+
let response = await fetch("/charts/ap-request", "GET", jsonBody);
|
|
70
|
+
return S.parseOrThrow(response, getChartsApRequestResponseSchema);
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
let postChartsApRequestRequestSchema = S.object(s => ({
|
|
@@ -79,9 +82,10 @@ let postChartsApRequestResponseSchema = S.object(s => ({
|
|
|
79
82
|
inboxReceived: s.f("inboxReceived", S.array(S.float))
|
|
80
83
|
}));
|
|
81
84
|
|
|
82
|
-
function postChartsApRequest(body, fetch) {
|
|
85
|
+
async function postChartsApRequest(body, fetch) {
|
|
83
86
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsApRequestRequestSchema);
|
|
84
|
-
|
|
87
|
+
let response = await fetch("/charts/ap-request", "POST", jsonBody);
|
|
88
|
+
return S.parseOrThrow(response, postChartsApRequestResponseSchema);
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
let getChartsDriveRequestSchema = S.object(s => ({
|
|
@@ -102,9 +106,10 @@ let getChartsDriveResponseSchema = S.object(s => ({
|
|
|
102
106
|
remote: s.f("remote", getChartsDriveResponse_1Schema)
|
|
103
107
|
}));
|
|
104
108
|
|
|
105
|
-
function getChartsDrive(body, fetch) {
|
|
109
|
+
async function getChartsDrive(body, fetch) {
|
|
106
110
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsDriveRequestSchema);
|
|
107
|
-
|
|
111
|
+
let response = await fetch("/charts/drive", "GET", jsonBody);
|
|
112
|
+
return S.parseOrThrow(response, getChartsDriveResponseSchema);
|
|
108
113
|
}
|
|
109
114
|
|
|
110
115
|
let postChartsDriveRequestSchema = S.object(s => ({
|
|
@@ -125,9 +130,10 @@ let postChartsDriveResponseSchema = S.object(s => ({
|
|
|
125
130
|
remote: s.f("remote", postChartsDriveResponse_1Schema)
|
|
126
131
|
}));
|
|
127
132
|
|
|
128
|
-
function postChartsDrive(body, fetch) {
|
|
133
|
+
async function postChartsDrive(body, fetch) {
|
|
129
134
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsDriveRequestSchema);
|
|
130
|
-
|
|
135
|
+
let response = await fetch("/charts/drive", "POST", jsonBody);
|
|
136
|
+
return S.parseOrThrow(response, postChartsDriveResponseSchema);
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
let getChartsFederationRequestSchema = S.object(s => ({
|
|
@@ -147,9 +153,10 @@ let getChartsFederationResponseSchema = S.object(s => ({
|
|
|
147
153
|
pubActive: s.f("pubActive", S.array(S.float))
|
|
148
154
|
}));
|
|
149
155
|
|
|
150
|
-
function getChartsFederation(body, fetch) {
|
|
156
|
+
async function getChartsFederation(body, fetch) {
|
|
151
157
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsFederationRequestSchema);
|
|
152
|
-
|
|
158
|
+
let response = await fetch("/charts/federation", "GET", jsonBody);
|
|
159
|
+
return S.parseOrThrow(response, getChartsFederationResponseSchema);
|
|
153
160
|
}
|
|
154
161
|
|
|
155
162
|
let postChartsFederationRequestSchema = S.object(s => ({
|
|
@@ -169,9 +176,10 @@ let postChartsFederationResponseSchema = S.object(s => ({
|
|
|
169
176
|
pubActive: s.f("pubActive", S.array(S.float))
|
|
170
177
|
}));
|
|
171
178
|
|
|
172
|
-
function postChartsFederation(body, fetch) {
|
|
179
|
+
async function postChartsFederation(body, fetch) {
|
|
173
180
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsFederationRequestSchema);
|
|
174
|
-
|
|
181
|
+
let response = await fetch("/charts/federation", "POST", jsonBody);
|
|
182
|
+
return S.parseOrThrow(response, postChartsFederationResponseSchema);
|
|
175
183
|
}
|
|
176
184
|
|
|
177
185
|
let getChartsInstanceRequestSchema = S.object(s => ({
|
|
@@ -224,9 +232,10 @@ let getChartsInstanceResponseSchema = S.object(s => ({
|
|
|
224
232
|
drive: s.f("drive", getChartsInstanceResponse_4Schema)
|
|
225
233
|
}));
|
|
226
234
|
|
|
227
|
-
function getChartsInstance(body, fetch) {
|
|
235
|
+
async function getChartsInstance(body, fetch) {
|
|
228
236
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsInstanceRequestSchema);
|
|
229
|
-
|
|
237
|
+
let response = await fetch("/charts/instance", "GET", jsonBody);
|
|
238
|
+
return S.parseOrThrow(response, getChartsInstanceResponseSchema);
|
|
230
239
|
}
|
|
231
240
|
|
|
232
241
|
let postChartsInstanceRequestSchema = S.object(s => ({
|
|
@@ -279,9 +288,10 @@ let postChartsInstanceResponseSchema = S.object(s => ({
|
|
|
279
288
|
drive: s.f("drive", postChartsInstanceResponse_4Schema)
|
|
280
289
|
}));
|
|
281
290
|
|
|
282
|
-
function postChartsInstance(body, fetch) {
|
|
291
|
+
async function postChartsInstance(body, fetch) {
|
|
283
292
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsInstanceRequestSchema);
|
|
284
|
-
|
|
293
|
+
let response = await fetch("/charts/instance", "POST", jsonBody);
|
|
294
|
+
return S.parseOrThrow(response, postChartsInstanceResponseSchema);
|
|
285
295
|
}
|
|
286
296
|
|
|
287
297
|
let getChartsNotesRequestSchema = S.object(s => ({
|
|
@@ -309,9 +319,10 @@ let getChartsNotesResponseSchema = S.object(s => ({
|
|
|
309
319
|
remote: s.f("remote", getChartsNotesResponse_1Schema)
|
|
310
320
|
}));
|
|
311
321
|
|
|
312
|
-
function getChartsNotes(body, fetch) {
|
|
322
|
+
async function getChartsNotes(body, fetch) {
|
|
313
323
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsNotesRequestSchema);
|
|
314
|
-
|
|
324
|
+
let response = await fetch("/charts/notes", "GET", jsonBody);
|
|
325
|
+
return S.parseOrThrow(response, getChartsNotesResponseSchema);
|
|
315
326
|
}
|
|
316
327
|
|
|
317
328
|
let postChartsNotesRequestSchema = S.object(s => ({
|
|
@@ -339,9 +350,10 @@ let postChartsNotesResponseSchema = S.object(s => ({
|
|
|
339
350
|
remote: s.f("remote", postChartsNotesResponse_1Schema)
|
|
340
351
|
}));
|
|
341
352
|
|
|
342
|
-
function postChartsNotes(body, fetch) {
|
|
353
|
+
async function postChartsNotes(body, fetch) {
|
|
343
354
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsNotesRequestSchema);
|
|
344
|
-
|
|
355
|
+
let response = await fetch("/charts/notes", "POST", jsonBody);
|
|
356
|
+
return S.parseOrThrow(response, postChartsNotesResponseSchema);
|
|
345
357
|
}
|
|
346
358
|
|
|
347
359
|
let getChartsUserDriveRequestSchema = S.object(s => ({
|
|
@@ -360,9 +372,10 @@ let getChartsUserDriveResponseSchema = S.object(s => ({
|
|
|
360
372
|
decSize: s.f("decSize", S.array(S.float))
|
|
361
373
|
}));
|
|
362
374
|
|
|
363
|
-
function getChartsUserDrive(body, fetch) {
|
|
375
|
+
async function getChartsUserDrive(body, fetch) {
|
|
364
376
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsUserDriveRequestSchema);
|
|
365
|
-
|
|
377
|
+
let response = await fetch("/charts/user/drive", "GET", jsonBody);
|
|
378
|
+
return S.parseOrThrow(response, getChartsUserDriveResponseSchema);
|
|
366
379
|
}
|
|
367
380
|
|
|
368
381
|
let postChartsUserDriveRequestSchema = S.object(s => ({
|
|
@@ -381,9 +394,10 @@ let postChartsUserDriveResponseSchema = S.object(s => ({
|
|
|
381
394
|
decSize: s.f("decSize", S.array(S.float))
|
|
382
395
|
}));
|
|
383
396
|
|
|
384
|
-
function postChartsUserDrive(body, fetch) {
|
|
397
|
+
async function postChartsUserDrive(body, fetch) {
|
|
385
398
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsUserDriveRequestSchema);
|
|
386
|
-
|
|
399
|
+
let response = await fetch("/charts/user/drive", "POST", jsonBody);
|
|
400
|
+
return S.parseOrThrow(response, postChartsUserDriveResponseSchema);
|
|
387
401
|
}
|
|
388
402
|
|
|
389
403
|
let getChartsUserFollowingRequestSchema = S.object(s => ({
|
|
@@ -409,9 +423,10 @@ let getChartsUserFollowingResponseSchema = S.object(s => ({
|
|
|
409
423
|
remote: s.f("remote", getChartsUserFollowingResponse_1Schema)
|
|
410
424
|
}));
|
|
411
425
|
|
|
412
|
-
function getChartsUserFollowing(body, fetch) {
|
|
426
|
+
async function getChartsUserFollowing(body, fetch) {
|
|
413
427
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsUserFollowingRequestSchema);
|
|
414
|
-
|
|
428
|
+
let response = await fetch("/charts/user/following", "GET", jsonBody);
|
|
429
|
+
return S.parseOrThrow(response, getChartsUserFollowingResponseSchema);
|
|
415
430
|
}
|
|
416
431
|
|
|
417
432
|
let postChartsUserFollowingRequestSchema = S.object(s => ({
|
|
@@ -437,9 +452,10 @@ let postChartsUserFollowingResponseSchema = S.object(s => ({
|
|
|
437
452
|
remote: s.f("remote", postChartsUserFollowingResponse_1Schema)
|
|
438
453
|
}));
|
|
439
454
|
|
|
440
|
-
function postChartsUserFollowing(body, fetch) {
|
|
455
|
+
async function postChartsUserFollowing(body, fetch) {
|
|
441
456
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsUserFollowingRequestSchema);
|
|
442
|
-
|
|
457
|
+
let response = await fetch("/charts/user/following", "POST", jsonBody);
|
|
458
|
+
return S.parseOrThrow(response, postChartsUserFollowingResponseSchema);
|
|
443
459
|
}
|
|
444
460
|
|
|
445
461
|
let getChartsUserNotesRequestSchema = S.object(s => ({
|
|
@@ -463,9 +479,10 @@ let getChartsUserNotesResponseSchema = S.object(s => ({
|
|
|
463
479
|
diffs: s.f("diffs", getChartsUserNotesResponse_1Schema)
|
|
464
480
|
}));
|
|
465
481
|
|
|
466
|
-
function getChartsUserNotes(body, fetch) {
|
|
482
|
+
async function getChartsUserNotes(body, fetch) {
|
|
467
483
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsUserNotesRequestSchema);
|
|
468
|
-
|
|
484
|
+
let response = await fetch("/charts/user/notes", "GET", jsonBody);
|
|
485
|
+
return S.parseOrThrow(response, getChartsUserNotesResponseSchema);
|
|
469
486
|
}
|
|
470
487
|
|
|
471
488
|
let postChartsUserNotesRequestSchema = S.object(s => ({
|
|
@@ -489,9 +506,10 @@ let postChartsUserNotesResponseSchema = S.object(s => ({
|
|
|
489
506
|
diffs: s.f("diffs", postChartsUserNotesResponse_1Schema)
|
|
490
507
|
}));
|
|
491
508
|
|
|
492
|
-
function postChartsUserNotes(body, fetch) {
|
|
509
|
+
async function postChartsUserNotes(body, fetch) {
|
|
493
510
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsUserNotesRequestSchema);
|
|
494
|
-
|
|
511
|
+
let response = await fetch("/charts/user/notes", "POST", jsonBody);
|
|
512
|
+
return S.parseOrThrow(response, postChartsUserNotesResponseSchema);
|
|
495
513
|
}
|
|
496
514
|
|
|
497
515
|
let getChartsUserPvRequestSchema = S.object(s => ({
|
|
@@ -511,9 +529,10 @@ let getChartsUserPvResponseSchema = S.object(s => ({
|
|
|
511
529
|
pv: s.f("pv", getChartsUserPvResponse_1Schema)
|
|
512
530
|
}));
|
|
513
531
|
|
|
514
|
-
function getChartsUserPv(body, fetch) {
|
|
532
|
+
async function getChartsUserPv(body, fetch) {
|
|
515
533
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsUserPvRequestSchema);
|
|
516
|
-
|
|
534
|
+
let response = await fetch("/charts/user/pv", "GET", jsonBody);
|
|
535
|
+
return S.parseOrThrow(response, getChartsUserPvResponseSchema);
|
|
517
536
|
}
|
|
518
537
|
|
|
519
538
|
let postChartsUserPvRequestSchema = S.object(s => ({
|
|
@@ -533,9 +552,10 @@ let postChartsUserPvResponseSchema = S.object(s => ({
|
|
|
533
552
|
pv: s.f("pv", postChartsUserPvResponse_1Schema)
|
|
534
553
|
}));
|
|
535
554
|
|
|
536
|
-
function postChartsUserPv(body, fetch) {
|
|
555
|
+
async function postChartsUserPv(body, fetch) {
|
|
537
556
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsUserPvRequestSchema);
|
|
538
|
-
|
|
557
|
+
let response = await fetch("/charts/user/pv", "POST", jsonBody);
|
|
558
|
+
return S.parseOrThrow(response, postChartsUserPvResponseSchema);
|
|
539
559
|
}
|
|
540
560
|
|
|
541
561
|
let getChartsUserReactionsRequestSchema = S.object(s => ({
|
|
@@ -554,9 +574,10 @@ let getChartsUserReactionsResponseSchema = S.object(s => ({
|
|
|
554
574
|
remote: s.f("remote", getChartsUserReactionsResponse_1Schema)
|
|
555
575
|
}));
|
|
556
576
|
|
|
557
|
-
function getChartsUserReactions(body, fetch) {
|
|
577
|
+
async function getChartsUserReactions(body, fetch) {
|
|
558
578
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsUserReactionsRequestSchema);
|
|
559
|
-
|
|
579
|
+
let response = await fetch("/charts/user/reactions", "GET", jsonBody);
|
|
580
|
+
return S.parseOrThrow(response, getChartsUserReactionsResponseSchema);
|
|
560
581
|
}
|
|
561
582
|
|
|
562
583
|
let postChartsUserReactionsRequestSchema = S.object(s => ({
|
|
@@ -575,9 +596,10 @@ let postChartsUserReactionsResponseSchema = S.object(s => ({
|
|
|
575
596
|
remote: s.f("remote", postChartsUserReactionsResponse_1Schema)
|
|
576
597
|
}));
|
|
577
598
|
|
|
578
|
-
function postChartsUserReactions(body, fetch) {
|
|
599
|
+
async function postChartsUserReactions(body, fetch) {
|
|
579
600
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsUserReactionsRequestSchema);
|
|
580
|
-
|
|
601
|
+
let response = await fetch("/charts/user/reactions", "POST", jsonBody);
|
|
602
|
+
return S.parseOrThrow(response, postChartsUserReactionsResponseSchema);
|
|
581
603
|
}
|
|
582
604
|
|
|
583
605
|
let getChartsUsersRequestSchema = S.object(s => ({
|
|
@@ -597,9 +619,10 @@ let getChartsUsersResponseSchema = S.object(s => ({
|
|
|
597
619
|
remote: s.f("remote", getChartsUsersResponse_1Schema)
|
|
598
620
|
}));
|
|
599
621
|
|
|
600
|
-
function getChartsUsers(body, fetch) {
|
|
622
|
+
async function getChartsUsers(body, fetch) {
|
|
601
623
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsUsersRequestSchema);
|
|
602
|
-
|
|
624
|
+
let response = await fetch("/charts/users", "GET", jsonBody);
|
|
625
|
+
return S.parseOrThrow(response, getChartsUsersResponseSchema);
|
|
603
626
|
}
|
|
604
627
|
|
|
605
628
|
let postChartsUsersRequestSchema = S.object(s => ({
|
|
@@ -619,9 +642,10 @@ let postChartsUsersResponseSchema = S.object(s => ({
|
|
|
619
642
|
remote: s.f("remote", postChartsUsersResponse_1Schema)
|
|
620
643
|
}));
|
|
621
644
|
|
|
622
|
-
function postChartsUsers(body, fetch) {
|
|
645
|
+
async function postChartsUsers(body, fetch) {
|
|
623
646
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsUsersRequestSchema);
|
|
624
|
-
|
|
647
|
+
let response = await fetch("/charts/users", "POST", jsonBody);
|
|
648
|
+
return S.parseOrThrow(response, postChartsUsersResponseSchema);
|
|
625
649
|
}
|
|
626
650
|
|
|
627
651
|
export {
|
|
@@ -8,18 +8,18 @@ let postClipsFavoriteRequestSchema = S.object(s => ({
|
|
|
8
8
|
clipId: s.f("clipId", S.string)
|
|
9
9
|
}));
|
|
10
10
|
|
|
11
|
-
function postClipsFavorite(body, fetch) {
|
|
11
|
+
async function postClipsFavorite(body, fetch) {
|
|
12
12
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postClipsFavoriteRequestSchema);
|
|
13
|
-
|
|
13
|
+
await fetch("/clips/favorite", "POST", jsonBody);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
let postClipsUnfavoriteRequestSchema = S.object(s => ({
|
|
17
17
|
clipId: s.f("clipId", S.string)
|
|
18
18
|
}));
|
|
19
19
|
|
|
20
|
-
function postClipsUnfavorite(body, fetch) {
|
|
20
|
+
async function postClipsUnfavorite(body, fetch) {
|
|
21
21
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postClipsUnfavoriteRequestSchema);
|
|
22
|
-
|
|
22
|
+
await fetch("/clips/unfavorite", "POST", jsonBody);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export {
|