@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
|
@@ -46,17 +46,14 @@ No description provided.
|
|
|
46
46
|
|
|
47
47
|
**Credential required**: *Yes* / **Permission**: *write:account*
|
|
48
48
|
*/
|
|
49
|
-
let postAntennasCreate = (~body: postAntennasCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
49
|
+
let postAntennasCreate = async (~body: postAntennasCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAntennasCreateResponse => {
|
|
50
50
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAntennasCreateRequestSchema)
|
|
51
|
-
fetch(
|
|
51
|
+
let response = await fetch(
|
|
52
52
|
~url="/antennas/create",
|
|
53
53
|
~method_="POST",
|
|
54
54
|
~body=Some(jsonBody),
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
value
|
|
58
|
-
->Promise.resolve
|
|
59
|
-
})
|
|
55
|
+
)
|
|
56
|
+
response->S.parseOrThrow(postAntennasCreateResponseSchema)
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
type postAntennasDeleteRequest = {
|
|
@@ -76,17 +73,14 @@ No description provided.
|
|
|
76
73
|
|
|
77
74
|
**Credential required**: *Yes* / **Permission**: *write:account*
|
|
78
75
|
*/
|
|
79
|
-
let postAntennasDelete = (~body: postAntennasDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
76
|
+
let postAntennasDelete = async (~body: postAntennasDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAntennasDeleteResponse => {
|
|
80
77
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAntennasDeleteRequestSchema)
|
|
81
|
-
fetch(
|
|
78
|
+
let response = await fetch(
|
|
82
79
|
~url="/antennas/delete",
|
|
83
80
|
~method_="POST",
|
|
84
81
|
~body=Some(jsonBody),
|
|
85
|
-
)
|
|
82
|
+
)
|
|
86
83
|
let _ = response
|
|
87
|
-
()
|
|
88
|
-
->Promise.resolve
|
|
89
|
-
})
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
type postAntennasListResponse = array<MisskeyIoComponentSchemas.Antenna.t>
|
|
@@ -100,17 +94,14 @@ No description provided.
|
|
|
100
94
|
|
|
101
95
|
**Credential required**: *Yes* / **Permission**: *read:account*
|
|
102
96
|
*/
|
|
103
|
-
let postAntennasList = (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
97
|
+
let postAntennasList = async (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAntennasListResponse => {
|
|
104
98
|
|
|
105
|
-
fetch(
|
|
99
|
+
let response = await fetch(
|
|
106
100
|
~url="/antennas/list",
|
|
107
101
|
~method_="POST",
|
|
108
102
|
~body=None,
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
value
|
|
112
|
-
->Promise.resolve
|
|
113
|
-
})
|
|
103
|
+
)
|
|
104
|
+
response->S.parseOrThrow(postAntennasListResponseSchema)
|
|
114
105
|
}
|
|
115
106
|
|
|
116
107
|
type postAntennasNotesRequest = {
|
|
@@ -142,17 +133,14 @@ No description provided.
|
|
|
142
133
|
|
|
143
134
|
**Credential required**: *Yes* / **Permission**: *read:account*
|
|
144
135
|
*/
|
|
145
|
-
let postAntennasNotes = (~body: postAntennasNotesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
136
|
+
let postAntennasNotes = async (~body: postAntennasNotesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAntennasNotesResponse => {
|
|
146
137
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAntennasNotesRequestSchema)
|
|
147
|
-
fetch(
|
|
138
|
+
let response = await fetch(
|
|
148
139
|
~url="/antennas/notes",
|
|
149
140
|
~method_="POST",
|
|
150
141
|
~body=Some(jsonBody),
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
value
|
|
154
|
-
->Promise.resolve
|
|
155
|
-
})
|
|
142
|
+
)
|
|
143
|
+
response->S.parseOrThrow(postAntennasNotesResponseSchema)
|
|
156
144
|
}
|
|
157
145
|
|
|
158
146
|
type postAntennasShowRequest = {
|
|
@@ -174,17 +162,14 @@ No description provided.
|
|
|
174
162
|
|
|
175
163
|
**Credential required**: *Yes* / **Permission**: *read:account*
|
|
176
164
|
*/
|
|
177
|
-
let postAntennasShow = (~body: postAntennasShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
165
|
+
let postAntennasShow = async (~body: postAntennasShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAntennasShowResponse => {
|
|
178
166
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAntennasShowRequestSchema)
|
|
179
|
-
fetch(
|
|
167
|
+
let response = await fetch(
|
|
180
168
|
~url="/antennas/show",
|
|
181
169
|
~method_="POST",
|
|
182
170
|
~body=Some(jsonBody),
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
value
|
|
186
|
-
->Promise.resolve
|
|
187
|
-
})
|
|
171
|
+
)
|
|
172
|
+
response->S.parseOrThrow(postAntennasShowResponseSchema)
|
|
188
173
|
}
|
|
189
174
|
|
|
190
175
|
type postAntennasUpdateRequest = {
|
|
@@ -230,15 +215,12 @@ No description provided.
|
|
|
230
215
|
|
|
231
216
|
**Credential required**: *Yes* / **Permission**: *write:account*
|
|
232
217
|
*/
|
|
233
|
-
let postAntennasUpdate = (~body: postAntennasUpdateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
218
|
+
let postAntennasUpdate = async (~body: postAntennasUpdateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAntennasUpdateResponse => {
|
|
234
219
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAntennasUpdateRequestSchema)
|
|
235
|
-
fetch(
|
|
220
|
+
let response = await fetch(
|
|
236
221
|
~url="/antennas/update",
|
|
237
222
|
~method_="POST",
|
|
238
223
|
~body=Some(jsonBody),
|
|
239
|
-
)
|
|
240
|
-
|
|
241
|
-
value
|
|
242
|
-
->Promise.resolve
|
|
243
|
-
})
|
|
224
|
+
)
|
|
225
|
+
response->S.parseOrThrow(postAntennasUpdateResponseSchema)
|
|
244
226
|
}
|
|
@@ -30,17 +30,14 @@ No description provided.
|
|
|
30
30
|
|
|
31
31
|
**Credential required**: *No*
|
|
32
32
|
*/
|
|
33
|
-
let postAppCreate = (~body: postAppCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
33
|
+
let postAppCreate = async (~body: postAppCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAppCreateResponse => {
|
|
34
34
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAppCreateRequestSchema)
|
|
35
|
-
fetch(
|
|
35
|
+
let response = await fetch(
|
|
36
36
|
~url="/app/create",
|
|
37
37
|
~method_="POST",
|
|
38
38
|
~body=Some(jsonBody),
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
value
|
|
42
|
-
->Promise.resolve
|
|
43
|
-
})
|
|
39
|
+
)
|
|
40
|
+
response->S.parseOrThrow(postAppCreateResponseSchema)
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
type postAppShowRequest = {
|
|
@@ -62,15 +59,12 @@ No description provided.
|
|
|
62
59
|
|
|
63
60
|
**Credential required**: *No*
|
|
64
61
|
*/
|
|
65
|
-
let postAppShow = (~body: postAppShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
62
|
+
let postAppShow = async (~body: postAppShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAppShowResponse => {
|
|
66
63
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAppShowRequestSchema)
|
|
67
|
-
fetch(
|
|
64
|
+
let response = await fetch(
|
|
68
65
|
~url="/app/show",
|
|
69
66
|
~method_="POST",
|
|
70
67
|
~body=Some(jsonBody),
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
value
|
|
74
|
-
->Promise.resolve
|
|
75
|
-
})
|
|
68
|
+
)
|
|
69
|
+
response->S.parseOrThrow(postAppShowResponseSchema)
|
|
76
70
|
}
|
|
@@ -23,17 +23,14 @@ No description provided.
|
|
|
23
23
|
**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
|
|
24
24
|
**Credential required**: *Yes*
|
|
25
25
|
*/
|
|
26
|
-
let postAuthAccept = (~body: postAuthAcceptRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
26
|
+
let postAuthAccept = async (~body: postAuthAcceptRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAuthAcceptResponse => {
|
|
27
27
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAuthAcceptRequestSchema)
|
|
28
|
-
fetch(
|
|
28
|
+
let response = await fetch(
|
|
29
29
|
~url="/auth/accept",
|
|
30
30
|
~method_="POST",
|
|
31
31
|
~body=Some(jsonBody),
|
|
32
|
-
)
|
|
32
|
+
)
|
|
33
33
|
let _ = response
|
|
34
|
-
()
|
|
35
|
-
->Promise.resolve
|
|
36
|
-
})
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
type postAuthSessionGenerateRequest = {
|
|
@@ -61,17 +58,14 @@ No description provided.
|
|
|
61
58
|
|
|
62
59
|
**Credential required**: *No*
|
|
63
60
|
*/
|
|
64
|
-
let postAuthSessionGenerate = (~body: postAuthSessionGenerateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
61
|
+
let postAuthSessionGenerate = async (~body: postAuthSessionGenerateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAuthSessionGenerateResponse => {
|
|
65
62
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAuthSessionGenerateRequestSchema)
|
|
66
|
-
fetch(
|
|
63
|
+
let response = await fetch(
|
|
67
64
|
~url="/auth/session/generate",
|
|
68
65
|
~method_="POST",
|
|
69
66
|
~body=Some(jsonBody),
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
value
|
|
73
|
-
->Promise.resolve
|
|
74
|
-
})
|
|
67
|
+
)
|
|
68
|
+
response->S.parseOrThrow(postAuthSessionGenerateResponseSchema)
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
type postAuthSessionShowRequest = {
|
|
@@ -101,17 +95,14 @@ No description provided.
|
|
|
101
95
|
|
|
102
96
|
**Credential required**: *No*
|
|
103
97
|
*/
|
|
104
|
-
let postAuthSessionShow = (~body: postAuthSessionShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
98
|
+
let postAuthSessionShow = async (~body: postAuthSessionShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAuthSessionShowResponse => {
|
|
105
99
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAuthSessionShowRequestSchema)
|
|
106
|
-
fetch(
|
|
100
|
+
let response = await fetch(
|
|
107
101
|
~url="/auth/session/show",
|
|
108
102
|
~method_="POST",
|
|
109
103
|
~body=Some(jsonBody),
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
value
|
|
113
|
-
->Promise.resolve
|
|
114
|
-
})
|
|
104
|
+
)
|
|
105
|
+
response->S.parseOrThrow(postAuthSessionShowResponseSchema)
|
|
115
106
|
}
|
|
116
107
|
|
|
117
108
|
type postAuthSessionUserkeyRequest = {
|
|
@@ -141,17 +132,14 @@ No description provided.
|
|
|
141
132
|
|
|
142
133
|
**Credential required**: *No*
|
|
143
134
|
*/
|
|
144
|
-
let postAuthSessionUserkey = (~body: postAuthSessionUserkeyRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
135
|
+
let postAuthSessionUserkey = async (~body: postAuthSessionUserkeyRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postAuthSessionUserkeyResponse => {
|
|
145
136
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postAuthSessionUserkeyRequestSchema)
|
|
146
|
-
fetch(
|
|
137
|
+
let response = await fetch(
|
|
147
138
|
~url="/auth/session/userkey",
|
|
148
139
|
~method_="POST",
|
|
149
140
|
~body=Some(jsonBody),
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
value
|
|
153
|
-
->Promise.resolve
|
|
154
|
-
})
|
|
141
|
+
)
|
|
142
|
+
response->S.parseOrThrow(postAuthSessionUserkeyResponseSchema)
|
|
155
143
|
}
|
|
156
144
|
|
|
157
145
|
type postMiauthGenTokenRequest = {
|
|
@@ -186,15 +174,12 @@ No description provided.
|
|
|
186
174
|
**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
|
|
187
175
|
**Credential required**: *Yes*
|
|
188
176
|
*/
|
|
189
|
-
let postMiauthGenToken = (~body: postMiauthGenTokenRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
177
|
+
let postMiauthGenToken = async (~body: postMiauthGenTokenRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postMiauthGenTokenResponse => {
|
|
190
178
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postMiauthGenTokenRequestSchema)
|
|
191
|
-
fetch(
|
|
179
|
+
let response = await fetch(
|
|
192
180
|
~url="/miauth/gen-token",
|
|
193
181
|
~method_="POST",
|
|
194
182
|
~body=Some(jsonBody),
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
value
|
|
198
|
-
->Promise.resolve
|
|
199
|
-
})
|
|
183
|
+
)
|
|
184
|
+
response->S.parseOrThrow(postMiauthGenTokenResponseSchema)
|
|
200
185
|
}
|
|
@@ -34,17 +34,14 @@ No description provided.
|
|
|
34
34
|
|
|
35
35
|
**Credential required**: *Yes* / **Permission**: *write:channels*
|
|
36
36
|
*/
|
|
37
|
-
let postChannelsCreate = (~body: postChannelsCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
37
|
+
let postChannelsCreate = async (~body: postChannelsCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsCreateResponse => {
|
|
38
38
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsCreateRequestSchema)
|
|
39
|
-
fetch(
|
|
39
|
+
let response = await fetch(
|
|
40
40
|
~url="/channels/create",
|
|
41
41
|
~method_="POST",
|
|
42
42
|
~body=Some(jsonBody),
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
value
|
|
46
|
-
->Promise.resolve
|
|
47
|
-
})
|
|
43
|
+
)
|
|
44
|
+
response->S.parseOrThrow(postChannelsCreateResponseSchema)
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
type postChannelsFavoriteRequest = {
|
|
@@ -64,17 +61,14 @@ No description provided.
|
|
|
64
61
|
|
|
65
62
|
**Credential required**: *Yes* / **Permission**: *write:channels*
|
|
66
63
|
*/
|
|
67
|
-
let postChannelsFavorite = (~body: postChannelsFavoriteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
64
|
+
let postChannelsFavorite = async (~body: postChannelsFavoriteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsFavoriteResponse => {
|
|
68
65
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsFavoriteRequestSchema)
|
|
69
|
-
fetch(
|
|
66
|
+
let response = await fetch(
|
|
70
67
|
~url="/channels/favorite",
|
|
71
68
|
~method_="POST",
|
|
72
69
|
~body=Some(jsonBody),
|
|
73
|
-
)
|
|
70
|
+
)
|
|
74
71
|
let _ = response
|
|
75
|
-
()
|
|
76
|
-
->Promise.resolve
|
|
77
|
-
})
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
type postChannelsFeaturedResponse = array<MisskeyIoComponentSchemas.Channel.t>
|
|
@@ -88,17 +82,14 @@ No description provided.
|
|
|
88
82
|
|
|
89
83
|
**Credential required**: *No*
|
|
90
84
|
*/
|
|
91
|
-
let postChannelsFeatured = (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
85
|
+
let postChannelsFeatured = async (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsFeaturedResponse => {
|
|
92
86
|
|
|
93
|
-
fetch(
|
|
87
|
+
let response = await fetch(
|
|
94
88
|
~url="/channels/featured",
|
|
95
89
|
~method_="POST",
|
|
96
90
|
~body=None,
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
value
|
|
100
|
-
->Promise.resolve
|
|
101
|
-
})
|
|
91
|
+
)
|
|
92
|
+
response->S.parseOrThrow(postChannelsFeaturedResponseSchema)
|
|
102
93
|
}
|
|
103
94
|
|
|
104
95
|
type postChannelsFeaturedGamesResponse = array<MisskeyIoComponentSchemas.Channel.t>
|
|
@@ -112,17 +103,14 @@ No description provided.
|
|
|
112
103
|
|
|
113
104
|
**Credential required**: *No*
|
|
114
105
|
*/
|
|
115
|
-
let postChannelsFeaturedGames = (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
106
|
+
let postChannelsFeaturedGames = async (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsFeaturedGamesResponse => {
|
|
116
107
|
|
|
117
|
-
fetch(
|
|
108
|
+
let response = await fetch(
|
|
118
109
|
~url="/channels/featured-games",
|
|
119
110
|
~method_="POST",
|
|
120
111
|
~body=None,
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
value
|
|
124
|
-
->Promise.resolve
|
|
125
|
-
})
|
|
112
|
+
)
|
|
113
|
+
response->S.parseOrThrow(postChannelsFeaturedGamesResponseSchema)
|
|
126
114
|
}
|
|
127
115
|
|
|
128
116
|
type postChannelsFollowRequest = {
|
|
@@ -142,17 +130,14 @@ No description provided.
|
|
|
142
130
|
|
|
143
131
|
**Credential required**: *Yes* / **Permission**: *write:channels*
|
|
144
132
|
*/
|
|
145
|
-
let postChannelsFollow = (~body: postChannelsFollowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
133
|
+
let postChannelsFollow = async (~body: postChannelsFollowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsFollowResponse => {
|
|
146
134
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsFollowRequestSchema)
|
|
147
|
-
fetch(
|
|
135
|
+
let response = await fetch(
|
|
148
136
|
~url="/channels/follow",
|
|
149
137
|
~method_="POST",
|
|
150
138
|
~body=Some(jsonBody),
|
|
151
|
-
)
|
|
139
|
+
)
|
|
152
140
|
let _ = response
|
|
153
|
-
()
|
|
154
|
-
->Promise.resolve
|
|
155
|
-
})
|
|
156
141
|
}
|
|
157
142
|
|
|
158
143
|
type postChannelsFollowedRequest = {
|
|
@@ -178,17 +163,14 @@ No description provided.
|
|
|
178
163
|
|
|
179
164
|
**Credential required**: *Yes* / **Permission**: *read:channels*
|
|
180
165
|
*/
|
|
181
|
-
let postChannelsFollowed = (~body: postChannelsFollowedRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
166
|
+
let postChannelsFollowed = async (~body: postChannelsFollowedRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsFollowedResponse => {
|
|
182
167
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsFollowedRequestSchema)
|
|
183
|
-
fetch(
|
|
168
|
+
let response = await fetch(
|
|
184
169
|
~url="/channels/followed",
|
|
185
170
|
~method_="POST",
|
|
186
171
|
~body=Some(jsonBody),
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
value
|
|
190
|
-
->Promise.resolve
|
|
191
|
-
})
|
|
172
|
+
)
|
|
173
|
+
response->S.parseOrThrow(postChannelsFollowedResponseSchema)
|
|
192
174
|
}
|
|
193
175
|
|
|
194
176
|
type postChannelsMyFavoritesResponse = array<MisskeyIoComponentSchemas.Channel.t>
|
|
@@ -202,17 +184,14 @@ No description provided.
|
|
|
202
184
|
|
|
203
185
|
**Credential required**: *Yes* / **Permission**: *read:channels*
|
|
204
186
|
*/
|
|
205
|
-
let postChannelsMyFavorites = (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
187
|
+
let postChannelsMyFavorites = async (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsMyFavoritesResponse => {
|
|
206
188
|
|
|
207
|
-
fetch(
|
|
189
|
+
let response = await fetch(
|
|
208
190
|
~url="/channels/my-favorites",
|
|
209
191
|
~method_="POST",
|
|
210
192
|
~body=None,
|
|
211
|
-
)
|
|
212
|
-
|
|
213
|
-
value
|
|
214
|
-
->Promise.resolve
|
|
215
|
-
})
|
|
193
|
+
)
|
|
194
|
+
response->S.parseOrThrow(postChannelsMyFavoritesResponseSchema)
|
|
216
195
|
}
|
|
217
196
|
|
|
218
197
|
type postChannelsOwnedRequest = {
|
|
@@ -238,17 +217,14 @@ No description provided.
|
|
|
238
217
|
|
|
239
218
|
**Credential required**: *Yes* / **Permission**: *read:channels*
|
|
240
219
|
*/
|
|
241
|
-
let postChannelsOwned = (~body: postChannelsOwnedRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
220
|
+
let postChannelsOwned = async (~body: postChannelsOwnedRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsOwnedResponse => {
|
|
242
221
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsOwnedRequestSchema)
|
|
243
|
-
fetch(
|
|
222
|
+
let response = await fetch(
|
|
244
223
|
~url="/channels/owned",
|
|
245
224
|
~method_="POST",
|
|
246
225
|
~body=Some(jsonBody),
|
|
247
|
-
)
|
|
248
|
-
|
|
249
|
-
value
|
|
250
|
-
->Promise.resolve
|
|
251
|
-
})
|
|
226
|
+
)
|
|
227
|
+
response->S.parseOrThrow(postChannelsOwnedResponseSchema)
|
|
252
228
|
}
|
|
253
229
|
|
|
254
230
|
type postChannelsSearchRequest = {
|
|
@@ -278,17 +254,14 @@ No description provided.
|
|
|
278
254
|
|
|
279
255
|
**Credential required**: *No*
|
|
280
256
|
*/
|
|
281
|
-
let postChannelsSearch = (~body: postChannelsSearchRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
257
|
+
let postChannelsSearch = async (~body: postChannelsSearchRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsSearchResponse => {
|
|
282
258
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsSearchRequestSchema)
|
|
283
|
-
fetch(
|
|
259
|
+
let response = await fetch(
|
|
284
260
|
~url="/channels/search",
|
|
285
261
|
~method_="POST",
|
|
286
262
|
~body=Some(jsonBody),
|
|
287
|
-
)
|
|
288
|
-
|
|
289
|
-
value
|
|
290
|
-
->Promise.resolve
|
|
291
|
-
})
|
|
263
|
+
)
|
|
264
|
+
response->S.parseOrThrow(postChannelsSearchResponseSchema)
|
|
292
265
|
}
|
|
293
266
|
|
|
294
267
|
type postChannelsShowRequest = {
|
|
@@ -310,17 +283,14 @@ No description provided.
|
|
|
310
283
|
|
|
311
284
|
**Credential required**: *No*
|
|
312
285
|
*/
|
|
313
|
-
let postChannelsShow = (~body: postChannelsShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
286
|
+
let postChannelsShow = async (~body: postChannelsShowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsShowResponse => {
|
|
314
287
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsShowRequestSchema)
|
|
315
|
-
fetch(
|
|
288
|
+
let response = await fetch(
|
|
316
289
|
~url="/channels/show",
|
|
317
290
|
~method_="POST",
|
|
318
291
|
~body=Some(jsonBody),
|
|
319
|
-
)
|
|
320
|
-
|
|
321
|
-
value
|
|
322
|
-
->Promise.resolve
|
|
323
|
-
})
|
|
292
|
+
)
|
|
293
|
+
response->S.parseOrThrow(postChannelsShowResponseSchema)
|
|
324
294
|
}
|
|
325
295
|
|
|
326
296
|
type postChannelsUnfavoriteRequest = {
|
|
@@ -340,17 +310,14 @@ No description provided.
|
|
|
340
310
|
|
|
341
311
|
**Credential required**: *Yes* / **Permission**: *write:channels*
|
|
342
312
|
*/
|
|
343
|
-
let postChannelsUnfavorite = (~body: postChannelsUnfavoriteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
313
|
+
let postChannelsUnfavorite = async (~body: postChannelsUnfavoriteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsUnfavoriteResponse => {
|
|
344
314
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsUnfavoriteRequestSchema)
|
|
345
|
-
fetch(
|
|
315
|
+
let response = await fetch(
|
|
346
316
|
~url="/channels/unfavorite",
|
|
347
317
|
~method_="POST",
|
|
348
318
|
~body=Some(jsonBody),
|
|
349
|
-
)
|
|
319
|
+
)
|
|
350
320
|
let _ = response
|
|
351
|
-
()
|
|
352
|
-
->Promise.resolve
|
|
353
|
-
})
|
|
354
321
|
}
|
|
355
322
|
|
|
356
323
|
type postChannelsUnfollowRequest = {
|
|
@@ -370,17 +337,14 @@ No description provided.
|
|
|
370
337
|
|
|
371
338
|
**Credential required**: *Yes* / **Permission**: *write:channels*
|
|
372
339
|
*/
|
|
373
|
-
let postChannelsUnfollow = (~body: postChannelsUnfollowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
340
|
+
let postChannelsUnfollow = async (~body: postChannelsUnfollowRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsUnfollowResponse => {
|
|
374
341
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsUnfollowRequestSchema)
|
|
375
|
-
fetch(
|
|
342
|
+
let response = await fetch(
|
|
376
343
|
~url="/channels/unfollow",
|
|
377
344
|
~method_="POST",
|
|
378
345
|
~body=Some(jsonBody),
|
|
379
|
-
)
|
|
346
|
+
)
|
|
380
347
|
let _ = response
|
|
381
|
-
()
|
|
382
|
-
->Promise.resolve
|
|
383
|
-
})
|
|
384
348
|
}
|
|
385
349
|
|
|
386
350
|
type postChannelsUpdateRequest = {
|
|
@@ -418,15 +382,12 @@ No description provided.
|
|
|
418
382
|
|
|
419
383
|
**Credential required**: *Yes* / **Permission**: *write:channels*
|
|
420
384
|
*/
|
|
421
|
-
let postChannelsUpdate = (~body: postChannelsUpdateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>):
|
|
385
|
+
let postChannelsUpdate = async (~body: postChannelsUpdateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postChannelsUpdateResponse => {
|
|
422
386
|
let jsonBody = body->S.reverseConvertToJsonOrThrow(postChannelsUpdateRequestSchema)
|
|
423
|
-
fetch(
|
|
387
|
+
let response = await fetch(
|
|
424
388
|
~url="/channels/update",
|
|
425
389
|
~method_="POST",
|
|
426
390
|
~body=Some(jsonBody),
|
|
427
|
-
)
|
|
428
|
-
|
|
429
|
-
value
|
|
430
|
-
->Promise.resolve
|
|
431
|
-
})
|
|
391
|
+
)
|
|
392
|
+
response->S.parseOrThrow(postChannelsUpdateResponseSchema)
|
|
432
393
|
}
|