@f3liz/rescript-misskey-api 0.6.9 → 0.8.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.
Files changed (113) hide show
  1. package/lib/es6/src/Misskey.mjs +472 -159
  2. package/lib/es6/src/bindings/Ofetch.mjs +2 -0
  3. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAccount.mjs +70 -48
  4. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAdmin.mjs +133 -98
  5. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAntennas.mjs +9 -6
  6. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkApp.mjs +6 -4
  7. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAuth.mjs +6 -4
  8. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkChannels.mjs +18 -12
  9. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkCharts.mjs +6 -4
  10. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkChat.mjs +70 -54
  11. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkClips.mjs +12 -8
  12. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkDefault.mjs +27 -20
  13. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkDrive.mjs +35 -24
  14. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFederation.mjs +18 -12
  15. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFlash.mjs +9 -6
  16. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFlashs.mjs +3 -2
  17. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFollowing.mjs +21 -14
  18. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkGallery.mjs +12 -8
  19. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkGroups.mjs +30 -24
  20. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkHashtags.mjs +6 -4
  21. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkLists.mjs +9 -6
  22. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkMeta.mjs +27 -18
  23. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkNotes.mjs +85 -58
  24. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkNotifications.mjs +2 -2
  25. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkPages.mjs +8 -6
  26. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkRole.mjs +9 -6
  27. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkUsers.mjs +35 -24
  28. package/lib/es6/src/generated/kokonect-link/api/KokonectLinkWebhooks.mjs +7 -6
  29. package/lib/es6/src/generated/misskey-io/api/MisskeyIoAccount.mjs +92 -68
  30. package/lib/es6/src/generated/misskey-io/api/MisskeyIoAdmin.mjs +266 -214
  31. package/lib/es6/src/generated/misskey-io/api/MisskeyIoAntennas.mjs +17 -12
  32. package/lib/es6/src/generated/misskey-io/api/MisskeyIoApp.mjs +6 -4
  33. package/lib/es6/src/generated/misskey-io/api/MisskeyIoAuth.mjs +14 -10
  34. package/lib/es6/src/generated/misskey-io/api/MisskeyIoChannels.mjs +35 -26
  35. package/lib/es6/src/generated/misskey-io/api/MisskeyIoCharts.mjs +72 -48
  36. package/lib/es6/src/generated/misskey-io/api/MisskeyIoClip.mjs +4 -4
  37. package/lib/es6/src/generated/misskey-io/api/MisskeyIoClips.mjs +17 -12
  38. package/lib/es6/src/generated/misskey-io/api/MisskeyIoDefault.mjs +133 -110
  39. package/lib/es6/src/generated/misskey-io/api/MisskeyIoDrive.mjs +51 -36
  40. package/lib/es6/src/generated/misskey-io/api/MisskeyIoFederation.mjs +32 -22
  41. package/lib/es6/src/generated/misskey-io/api/MisskeyIoFlash.mjs +12 -10
  42. package/lib/es6/src/generated/misskey-io/api/MisskeyIoFlashs.mjs +5 -4
  43. package/lib/es6/src/generated/misskey-io/api/MisskeyIoFollowing.mjs +27 -20
  44. package/lib/es6/src/generated/misskey-io/api/MisskeyIoGallery.mjs +24 -18
  45. package/lib/es6/src/generated/misskey-io/api/MisskeyIoHashtags.mjs +18 -12
  46. package/lib/es6/src/generated/misskey-io/api/MisskeyIoLists.mjs +23 -18
  47. package/lib/es6/src/generated/misskey-io/api/MisskeyIoMeta.mjs +71 -48
  48. package/lib/es6/src/generated/misskey-io/api/MisskeyIoNonProductive.mjs +5 -4
  49. package/lib/es6/src/generated/misskey-io/api/MisskeyIoNotes.mjs +96 -70
  50. package/lib/es6/src/generated/misskey-io/api/MisskeyIoNotifications.mjs +8 -8
  51. package/lib/es6/src/generated/misskey-io/api/MisskeyIoPages.mjs +17 -14
  52. package/lib/es6/src/generated/misskey-io/api/MisskeyIoReactions.mjs +4 -4
  53. package/lib/es6/src/generated/misskey-io/api/MisskeyIoResetPassword.mjs +4 -4
  54. package/lib/es6/src/generated/misskey-io/api/MisskeyIoRole.mjs +12 -8
  55. package/lib/es6/src/generated/misskey-io/api/MisskeyIoUsers.mjs +83 -56
  56. package/lib/es6/src/generated/misskey-io/api/MisskeyIoWebhooks.mjs +17 -14
  57. package/package.json +3 -2
  58. package/src/Misskey.res +423 -151
  59. package/src/bindings/Ofetch.res +14 -0
  60. package/src/generated/kokonect-link/api/KokonectLinkAccount.res +94 -166
  61. package/src/generated/kokonect-link/api/KokonectLinkAdmin.res +182 -329
  62. package/src/generated/kokonect-link/api/KokonectLinkAntennas.res +12 -21
  63. package/src/generated/kokonect-link/api/KokonectLinkApp.res +8 -14
  64. package/src/generated/kokonect-link/api/KokonectLinkAuth.res +8 -14
  65. package/src/generated/kokonect-link/api/KokonectLinkChannels.res +24 -42
  66. package/src/generated/kokonect-link/api/KokonectLinkCharts.res +8 -14
  67. package/src/generated/kokonect-link/api/KokonectLinkChat.res +97 -178
  68. package/src/generated/kokonect-link/api/KokonectLinkClips.res +16 -28
  69. package/src/generated/kokonect-link/api/KokonectLinkDefault.res +37 -67
  70. package/src/generated/kokonect-link/api/KokonectLinkDrive.res +47 -83
  71. package/src/generated/kokonect-link/api/KokonectLinkFederation.res +24 -42
  72. package/src/generated/kokonect-link/api/KokonectLinkFlash.res +12 -21
  73. package/src/generated/kokonect-link/api/KokonectLinkFlashs.res +4 -7
  74. package/src/generated/kokonect-link/api/KokonectLinkFollowing.res +28 -49
  75. package/src/generated/kokonect-link/api/KokonectLinkGallery.res +16 -28
  76. package/src/generated/kokonect-link/api/KokonectLinkGroups.res +42 -78
  77. package/src/generated/kokonect-link/api/KokonectLinkHashtags.res +8 -14
  78. package/src/generated/kokonect-link/api/KokonectLinkLists.res +12 -21
  79. package/src/generated/kokonect-link/api/KokonectLinkMeta.res +36 -63
  80. package/src/generated/kokonect-link/api/KokonectLinkNotes.res +114 -201
  81. package/src/generated/kokonect-link/api/KokonectLinkNotifications.res +3 -6
  82. package/src/generated/kokonect-link/api/KokonectLinkPages.res +11 -20
  83. package/src/generated/kokonect-link/api/KokonectLinkRole.res +12 -21
  84. package/src/generated/kokonect-link/api/KokonectLinkUsers.res +47 -83
  85. package/src/generated/kokonect-link/api/KokonectLinkWebhooks.res +10 -19
  86. package/src/generated/misskey-io/api/MisskeyIoAccount.res +126 -228
  87. package/src/generated/misskey-io/api/MisskeyIoAdmin.res +373 -694
  88. package/src/generated/misskey-io/api/MisskeyIoAntennas.res +23 -41
  89. package/src/generated/misskey-io/api/MisskeyIoApp.res +8 -14
  90. package/src/generated/misskey-io/api/MisskeyIoAuth.res +19 -34
  91. package/src/generated/misskey-io/api/MisskeyIoChannels.res +48 -87
  92. package/src/generated/misskey-io/api/MisskeyIoCharts.res +96 -168
  93. package/src/generated/misskey-io/api/MisskeyIoClip.res +6 -12
  94. package/src/generated/misskey-io/api/MisskeyIoClips.res +23 -41
  95. package/src/generated/misskey-io/api/MisskeyIoDefault.res +188 -353
  96. package/src/generated/misskey-io/api/MisskeyIoDrive.res +69 -123
  97. package/src/generated/misskey-io/api/MisskeyIoFederation.res +43 -76
  98. package/src/generated/misskey-io/api/MisskeyIoFlash.res +17 -32
  99. package/src/generated/misskey-io/api/MisskeyIoFlashs.res +7 -13
  100. package/src/generated/misskey-io/api/MisskeyIoFollowing.res +37 -67
  101. package/src/generated/misskey-io/api/MisskeyIoGallery.res +33 -60
  102. package/src/generated/misskey-io/api/MisskeyIoHashtags.res +24 -42
  103. package/src/generated/misskey-io/api/MisskeyIoLists.res +32 -59
  104. package/src/generated/misskey-io/api/MisskeyIoMeta.res +95 -167
  105. package/src/generated/misskey-io/api/MisskeyIoNonProductive.res +7 -13
  106. package/src/generated/misskey-io/api/MisskeyIoNotes.res +131 -236
  107. package/src/generated/misskey-io/api/MisskeyIoNotifications.res +12 -24
  108. package/src/generated/misskey-io/api/MisskeyIoPages.res +24 -45
  109. package/src/generated/misskey-io/api/MisskeyIoReactions.res +6 -12
  110. package/src/generated/misskey-io/api/MisskeyIoResetPassword.res +6 -12
  111. package/src/generated/misskey-io/api/MisskeyIoRole.res +16 -28
  112. package/src/generated/misskey-io/api/MisskeyIoUsers.res +111 -195
  113. package/src/generated/misskey-io/api/MisskeyIoWebhooks.res +24 -45
@@ -24,17 +24,14 @@ No description provided.
24
24
 
25
25
  **Credential required**: *Yes* / **Permission**: *write:blocks*
26
26
  */
27
- let postBlockingCreate = (~body: postBlockingCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postBlockingCreateResponse> => {
27
+ let postBlockingCreate = async (~body: postBlockingCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postBlockingCreateResponse => {
28
28
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postBlockingCreateRequestSchema)
29
- fetch(
29
+ let response = await fetch(
30
30
  ~url="/blocking/create",
31
31
  ~method_="POST",
32
32
  ~body=Some(jsonBody),
33
- )->Promise.then(response => {
34
- let value = response->S.parseOrThrow(postBlockingCreateResponseSchema)
35
- value
36
- ->Promise.resolve
37
- })
33
+ )
34
+ response->S.parseOrThrow(postBlockingCreateResponseSchema)
38
35
  }
39
36
 
40
37
  type postBlockingDeleteRequest = {
@@ -56,17 +53,14 @@ No description provided.
56
53
 
57
54
  **Credential required**: *Yes* / **Permission**: *write:blocks*
58
55
  */
59
- let postBlockingDelete = (~body: postBlockingDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postBlockingDeleteResponse> => {
56
+ let postBlockingDelete = async (~body: postBlockingDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postBlockingDeleteResponse => {
60
57
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postBlockingDeleteRequestSchema)
61
- fetch(
58
+ let response = await fetch(
62
59
  ~url="/blocking/delete",
63
60
  ~method_="POST",
64
61
  ~body=Some(jsonBody),
65
- )->Promise.then(response => {
66
- let value = response->S.parseOrThrow(postBlockingDeleteResponseSchema)
67
- value
68
- ->Promise.resolve
69
- })
62
+ )
63
+ response->S.parseOrThrow(postBlockingDeleteResponseSchema)
70
64
  }
71
65
 
72
66
  type postBlockingListRequest = {
@@ -92,17 +86,14 @@ No description provided.
92
86
 
93
87
  **Credential required**: *Yes* / **Permission**: *read:blocks*
94
88
  */
95
- let postBlockingList = (~body: postBlockingListRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postBlockingListResponse> => {
89
+ let postBlockingList = async (~body: postBlockingListRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postBlockingListResponse => {
96
90
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postBlockingListRequestSchema)
97
- fetch(
91
+ let response = await fetch(
98
92
  ~url="/blocking/list",
99
93
  ~method_="POST",
100
94
  ~body=Some(jsonBody),
101
- )->Promise.then(response => {
102
- let value = response->S.parseOrThrow(postBlockingListResponseSchema)
103
- value
104
- ->Promise.resolve
105
- })
95
+ )
96
+ response->S.parseOrThrow(postBlockingListResponseSchema)
106
97
  }
107
98
 
108
99
  type postClipsAddNoteRequest = {
@@ -124,17 +115,14 @@ No description provided.
124
115
 
125
116
  **Credential required**: *Yes* / **Permission**: *write:account*
126
117
  */
127
- let postClipsAddNote = (~body: postClipsAddNoteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postClipsAddNoteResponse> => {
118
+ let postClipsAddNote = async (~body: postClipsAddNoteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postClipsAddNoteResponse => {
128
119
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postClipsAddNoteRequestSchema)
129
- fetch(
120
+ let response = await fetch(
130
121
  ~url="/clips/add-note",
131
122
  ~method_="POST",
132
123
  ~body=Some(jsonBody),
133
- )->Promise.then(response => {
124
+ )
134
125
  let _ = response
135
- ()
136
- ->Promise.resolve
137
- })
138
126
  }
139
127
 
140
128
  type postClipsMyFavoritesResponse = array<MisskeyIoComponentSchemas.Clip.t>
@@ -148,17 +136,14 @@ No description provided.
148
136
 
149
137
  **Credential required**: *Yes* / **Permission**: *read:clip-favorite*
150
138
  */
151
- let postClipsMyFavorites = (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postClipsMyFavoritesResponse> => {
139
+ let postClipsMyFavorites = async (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postClipsMyFavoritesResponse => {
152
140
 
153
- fetch(
141
+ let response = await fetch(
154
142
  ~url="/clips/my-favorites",
155
143
  ~method_="POST",
156
144
  ~body=None,
157
- )->Promise.then(response => {
158
- let value = response->S.parseOrThrow(postClipsMyFavoritesResponseSchema)
159
- value
160
- ->Promise.resolve
161
- })
145
+ )
146
+ response->S.parseOrThrow(postClipsMyFavoritesResponseSchema)
162
147
  }
163
148
 
164
149
  type postClipsNotesRequest = {
@@ -186,17 +171,14 @@ No description provided.
186
171
 
187
172
  **Credential required**: *No* / **Permission**: *read:account*
188
173
  */
189
- let postClipsNotes = (~body: postClipsNotesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postClipsNotesResponse> => {
174
+ let postClipsNotes = async (~body: postClipsNotesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postClipsNotesResponse => {
190
175
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postClipsNotesRequestSchema)
191
- fetch(
176
+ let response = await fetch(
192
177
  ~url="/clips/notes",
193
178
  ~method_="POST",
194
179
  ~body=Some(jsonBody),
195
- )->Promise.then(response => {
196
- let value = response->S.parseOrThrow(postClipsNotesResponseSchema)
197
- value
198
- ->Promise.resolve
199
- })
180
+ )
181
+ response->S.parseOrThrow(postClipsNotesResponseSchema)
200
182
  }
201
183
 
202
184
  type postClipsRemoveNoteRequest = {
@@ -218,17 +200,14 @@ No description provided.
218
200
 
219
201
  **Credential required**: *Yes* / **Permission**: *write:account*
220
202
  */
221
- let postClipsRemoveNote = (~body: postClipsRemoveNoteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postClipsRemoveNoteResponse> => {
203
+ let postClipsRemoveNote = async (~body: postClipsRemoveNoteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postClipsRemoveNoteResponse => {
222
204
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postClipsRemoveNoteRequestSchema)
223
- fetch(
205
+ let response = await fetch(
224
206
  ~url="/clips/remove-note",
225
207
  ~method_="POST",
226
208
  ~body=Some(jsonBody),
227
- )->Promise.then(response => {
209
+ )
228
210
  let _ = response
229
- ()
230
- ->Promise.resolve
231
- })
232
211
  }
233
212
 
234
213
  type postFlashMyRequest = {
@@ -254,17 +233,14 @@ No description provided.
254
233
 
255
234
  **Credential required**: *Yes* / **Permission**: *read:flash*
256
235
  */
257
- let postFlashMy = (~body: postFlashMyRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postFlashMyResponse> => {
236
+ let postFlashMy = async (~body: postFlashMyRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postFlashMyResponse => {
258
237
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postFlashMyRequestSchema)
259
- fetch(
238
+ let response = await fetch(
260
239
  ~url="/flash/my",
261
240
  ~method_="POST",
262
241
  ~body=Some(jsonBody),
263
- )->Promise.then(response => {
264
- let value = response->S.parseOrThrow(postFlashMyResponseSchema)
265
- value
266
- ->Promise.resolve
267
- })
242
+ )
243
+ response->S.parseOrThrow(postFlashMyResponseSchema)
268
244
  }
269
245
 
270
246
  type postFlashMyLikesRequest = {
@@ -300,17 +276,14 @@ No description provided.
300
276
 
301
277
  **Credential required**: *Yes* / **Permission**: *read:flash-likes*
302
278
  */
303
- let postFlashMyLikes = (~body: postFlashMyLikesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postFlashMyLikesResponse> => {
279
+ let postFlashMyLikes = async (~body: postFlashMyLikesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postFlashMyLikesResponse => {
304
280
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postFlashMyLikesRequestSchema)
305
- fetch(
281
+ let response = await fetch(
306
282
  ~url="/flash/my-likes",
307
283
  ~method_="POST",
308
284
  ~body=Some(jsonBody),
309
- )->Promise.then(response => {
310
- let value = response->S.parseOrThrow(postFlashMyLikesResponseSchema)
311
- value
312
- ->Promise.resolve
313
- })
285
+ )
286
+ response->S.parseOrThrow(postFlashMyLikesResponseSchema)
314
287
  }
315
288
 
316
289
  type postIResponse = MisskeyIoComponentSchemas.MeDetailed.t
@@ -324,17 +297,14 @@ No description provided.
324
297
 
325
298
  **Credential required**: *Yes* / **Permission**: *read:account*
326
299
  */
327
- let postI = (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIResponse> => {
300
+ let postI = async (~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIResponse => {
328
301
 
329
- fetch(
302
+ let response = await fetch(
330
303
  ~url="/i",
331
304
  ~method_="POST",
332
305
  ~body=None,
333
- )->Promise.then(response => {
334
- let value = response->S.parseOrThrow(postIResponseSchema)
335
- value
336
- ->Promise.resolve
337
- })
306
+ )
307
+ response->S.parseOrThrow(postIResponseSchema)
338
308
  }
339
309
 
340
310
  type postIFavoritesRequest = {
@@ -360,17 +330,14 @@ No description provided.
360
330
 
361
331
  **Credential required**: *Yes* / **Permission**: *read:favorites*
362
332
  */
363
- let postIFavorites = (~body: postIFavoritesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIFavoritesResponse> => {
333
+ let postIFavorites = async (~body: postIFavoritesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIFavoritesResponse => {
364
334
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIFavoritesRequestSchema)
365
- fetch(
335
+ let response = await fetch(
366
336
  ~url="/i/favorites",
367
337
  ~method_="POST",
368
338
  ~body=Some(jsonBody),
369
- )->Promise.then(response => {
370
- let value = response->S.parseOrThrow(postIFavoritesResponseSchema)
371
- value
372
- ->Promise.resolve
373
- })
339
+ )
340
+ response->S.parseOrThrow(postIFavoritesResponseSchema)
374
341
  }
375
342
 
376
343
  type postIGalleryLikesRequest = {
@@ -406,17 +373,14 @@ No description provided.
406
373
 
407
374
  **Credential required**: *Yes* / **Permission**: *read:gallery-likes*
408
375
  */
409
- let postIGalleryLikes = (~body: postIGalleryLikesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIGalleryLikesResponse> => {
376
+ let postIGalleryLikes = async (~body: postIGalleryLikesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIGalleryLikesResponse => {
410
377
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIGalleryLikesRequestSchema)
411
- fetch(
378
+ let response = await fetch(
412
379
  ~url="/i/gallery/likes",
413
380
  ~method_="POST",
414
381
  ~body=Some(jsonBody),
415
- )->Promise.then(response => {
416
- let value = response->S.parseOrThrow(postIGalleryLikesResponseSchema)
417
- value
418
- ->Promise.resolve
419
- })
382
+ )
383
+ response->S.parseOrThrow(postIGalleryLikesResponseSchema)
420
384
  }
421
385
 
422
386
  type postIGalleryPostsRequest = {
@@ -442,17 +406,14 @@ No description provided.
442
406
 
443
407
  **Credential required**: *Yes* / **Permission**: *read:gallery*
444
408
  */
445
- let postIGalleryPosts = (~body: postIGalleryPostsRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIGalleryPostsResponse> => {
409
+ let postIGalleryPosts = async (~body: postIGalleryPostsRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIGalleryPostsResponse => {
446
410
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIGalleryPostsRequestSchema)
447
- fetch(
411
+ let response = await fetch(
448
412
  ~url="/i/gallery/posts",
449
413
  ~method_="POST",
450
414
  ~body=Some(jsonBody),
451
- )->Promise.then(response => {
452
- let value = response->S.parseOrThrow(postIGalleryPostsResponseSchema)
453
- value
454
- ->Promise.resolve
455
- })
415
+ )
416
+ response->S.parseOrThrow(postIGalleryPostsResponseSchema)
456
417
  }
457
418
 
458
419
  type postINotificationsRequest = {
@@ -484,17 +445,14 @@ No description provided.
484
445
 
485
446
  **Credential required**: *Yes* / **Permission**: *read:notifications*
486
447
  */
487
- let postINotifications = (~body: postINotificationsRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postINotificationsResponse> => {
448
+ let postINotifications = async (~body: postINotificationsRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postINotificationsResponse => {
488
449
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postINotificationsRequestSchema)
489
- fetch(
450
+ let response = await fetch(
490
451
  ~url="/i/notifications",
491
452
  ~method_="POST",
492
453
  ~body=Some(jsonBody),
493
- )->Promise.then(response => {
494
- let value = response->S.parseOrThrow(postINotificationsResponseSchema)
495
- value
496
- ->Promise.resolve
497
- })
454
+ )
455
+ response->S.parseOrThrow(postINotificationsResponseSchema)
498
456
  }
499
457
 
500
458
  type postINotificationsGroupedRequest = {
@@ -526,17 +484,14 @@ No description provided.
526
484
 
527
485
  **Credential required**: *Yes* / **Permission**: *read:notifications*
528
486
  */
529
- let postINotificationsGrouped = (~body: postINotificationsGroupedRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postINotificationsGroupedResponse> => {
487
+ let postINotificationsGrouped = async (~body: postINotificationsGroupedRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postINotificationsGroupedResponse => {
530
488
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postINotificationsGroupedRequestSchema)
531
- fetch(
489
+ let response = await fetch(
532
490
  ~url="/i/notifications-grouped",
533
491
  ~method_="POST",
534
492
  ~body=Some(jsonBody),
535
- )->Promise.then(response => {
536
- let value = response->S.parseOrThrow(postINotificationsGroupedResponseSchema)
537
- value
538
- ->Promise.resolve
539
- })
493
+ )
494
+ response->S.parseOrThrow(postINotificationsGroupedResponseSchema)
540
495
  }
541
496
 
542
497
  type postIPageLikesRequest = {
@@ -572,17 +527,14 @@ No description provided.
572
527
 
573
528
  **Credential required**: *Yes* / **Permission**: *read:page-likes*
574
529
  */
575
- let postIPageLikes = (~body: postIPageLikesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIPageLikesResponse> => {
530
+ let postIPageLikes = async (~body: postIPageLikesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIPageLikesResponse => {
576
531
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIPageLikesRequestSchema)
577
- fetch(
532
+ let response = await fetch(
578
533
  ~url="/i/page-likes",
579
534
  ~method_="POST",
580
535
  ~body=Some(jsonBody),
581
- )->Promise.then(response => {
582
- let value = response->S.parseOrThrow(postIPageLikesResponseSchema)
583
- value
584
- ->Promise.resolve
585
- })
536
+ )
537
+ response->S.parseOrThrow(postIPageLikesResponseSchema)
586
538
  }
587
539
 
588
540
  type postIPagesRequest = {
@@ -608,17 +560,14 @@ No description provided.
608
560
 
609
561
  **Credential required**: *Yes* / **Permission**: *read:pages*
610
562
  */
611
- let postIPages = (~body: postIPagesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIPagesResponse> => {
563
+ let postIPages = async (~body: postIPagesRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIPagesResponse => {
612
564
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIPagesRequestSchema)
613
- fetch(
565
+ let response = await fetch(
614
566
  ~url="/i/pages",
615
567
  ~method_="POST",
616
568
  ~body=Some(jsonBody),
617
- )->Promise.then(response => {
618
- let value = response->S.parseOrThrow(postIPagesResponseSchema)
619
- value
620
- ->Promise.resolve
621
- })
569
+ )
570
+ response->S.parseOrThrow(postIPagesResponseSchema)
622
571
  }
623
572
 
624
573
  type postIPinRequest = {
@@ -640,17 +589,14 @@ No description provided.
640
589
 
641
590
  **Credential required**: *Yes* / **Permission**: *write:account*
642
591
  */
643
- let postIPin = (~body: postIPinRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIPinResponse> => {
592
+ let postIPin = async (~body: postIPinRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIPinResponse => {
644
593
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIPinRequestSchema)
645
- fetch(
594
+ let response = await fetch(
646
595
  ~url="/i/pin",
647
596
  ~method_="POST",
648
597
  ~body=Some(jsonBody),
649
- )->Promise.then(response => {
650
- let value = response->S.parseOrThrow(postIPinResponseSchema)
651
- value
652
- ->Promise.resolve
653
- })
598
+ )
599
+ response->S.parseOrThrow(postIPinResponseSchema)
654
600
  }
655
601
 
656
602
  type postIPurgeTimelineCacheRequest = {
@@ -674,17 +620,14 @@ No description provided.
674
620
 
675
621
  **Credential required**: *Yes* / **Permission**: *write:account*
676
622
  */
677
- let postIPurgeTimelineCache = (~body: postIPurgeTimelineCacheRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIPurgeTimelineCacheResponse> => {
623
+ let postIPurgeTimelineCache = async (~body: postIPurgeTimelineCacheRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIPurgeTimelineCacheResponse => {
678
624
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIPurgeTimelineCacheRequestSchema)
679
- fetch(
625
+ let response = await fetch(
680
626
  ~url="/i/purge-timeline-cache",
681
627
  ~method_="POST",
682
628
  ~body=Some(jsonBody),
683
- )->Promise.then(response => {
629
+ )
684
630
  let _ = response
685
- ()
686
- ->Promise.resolve
687
- })
688
631
  }
689
632
 
690
633
  type postIReadAnnouncementRequest = {
@@ -704,17 +647,14 @@ No description provided.
704
647
 
705
648
  **Credential required**: *Yes* / **Permission**: *write:account*
706
649
  */
707
- let postIReadAnnouncement = (~body: postIReadAnnouncementRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIReadAnnouncementResponse> => {
650
+ let postIReadAnnouncement = async (~body: postIReadAnnouncementRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIReadAnnouncementResponse => {
708
651
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIReadAnnouncementRequestSchema)
709
- fetch(
652
+ let response = await fetch(
710
653
  ~url="/i/read-announcement",
711
654
  ~method_="POST",
712
655
  ~body=Some(jsonBody),
713
- )->Promise.then(response => {
656
+ )
714
657
  let _ = response
715
- ()
716
- ->Promise.resolve
717
- })
718
658
  }
719
659
 
720
660
  type postIUnpinRequest = {
@@ -736,17 +676,14 @@ No description provided.
736
676
 
737
677
  **Credential required**: *Yes* / **Permission**: *write:account*
738
678
  */
739
- let postIUnpin = (~body: postIUnpinRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIUnpinResponse> => {
679
+ let postIUnpin = async (~body: postIUnpinRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIUnpinResponse => {
740
680
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIUnpinRequestSchema)
741
- fetch(
681
+ let response = await fetch(
742
682
  ~url="/i/unpin",
743
683
  ~method_="POST",
744
684
  ~body=Some(jsonBody),
745
- )->Promise.then(response => {
746
- let value = response->S.parseOrThrow(postIUnpinResponseSchema)
747
- value
748
- ->Promise.resolve
749
- })
685
+ )
686
+ response->S.parseOrThrow(postIUnpinResponseSchema)
750
687
  }
751
688
 
752
689
  type postIUpdateRequest_5 = {
@@ -932,17 +869,14 @@ No description provided.
932
869
 
933
870
  **Credential required**: *Yes* / **Permission**: *write:account*
934
871
  */
935
- let postIUpdate = (~body: postIUpdateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postIUpdateResponse> => {
872
+ let postIUpdate = async (~body: postIUpdateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postIUpdateResponse => {
936
873
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postIUpdateRequestSchema)
937
- fetch(
874
+ let response = await fetch(
938
875
  ~url="/i/update",
939
876
  ~method_="POST",
940
877
  ~body=Some(jsonBody),
941
- )->Promise.then(response => {
942
- let value = response->S.parseOrThrow(postIUpdateResponseSchema)
943
- value
944
- ->Promise.resolve
945
- })
878
+ )
879
+ response->S.parseOrThrow(postIUpdateResponseSchema)
946
880
  }
947
881
 
948
882
  type postMuteCreateRequest = {
@@ -964,17 +898,14 @@ No description provided.
964
898
 
965
899
  **Credential required**: *Yes* / **Permission**: *write:mutes*
966
900
  */
967
- let postMuteCreate = (~body: postMuteCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postMuteCreateResponse> => {
901
+ let postMuteCreate = async (~body: postMuteCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postMuteCreateResponse => {
968
902
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postMuteCreateRequestSchema)
969
- fetch(
903
+ let response = await fetch(
970
904
  ~url="/mute/create",
971
905
  ~method_="POST",
972
906
  ~body=Some(jsonBody),
973
- )->Promise.then(response => {
907
+ )
974
908
  let _ = response
975
- ()
976
- ->Promise.resolve
977
- })
978
909
  }
979
910
 
980
911
  type postMuteDeleteRequest = {
@@ -994,17 +925,14 @@ No description provided.
994
925
 
995
926
  **Credential required**: *Yes* / **Permission**: *write:mutes*
996
927
  */
997
- let postMuteDelete = (~body: postMuteDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postMuteDeleteResponse> => {
928
+ let postMuteDelete = async (~body: postMuteDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postMuteDeleteResponse => {
998
929
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postMuteDeleteRequestSchema)
999
- fetch(
930
+ let response = await fetch(
1000
931
  ~url="/mute/delete",
1001
932
  ~method_="POST",
1002
933
  ~body=Some(jsonBody),
1003
- )->Promise.then(response => {
934
+ )
1004
935
  let _ = response
1005
- ()
1006
- ->Promise.resolve
1007
- })
1008
936
  }
1009
937
 
1010
938
  type postMuteListRequest = {
@@ -1030,17 +958,14 @@ No description provided.
1030
958
 
1031
959
  **Credential required**: *Yes* / **Permission**: *read:mutes*
1032
960
  */
1033
- let postMuteList = (~body: postMuteListRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postMuteListResponse> => {
961
+ let postMuteList = async (~body: postMuteListRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postMuteListResponse => {
1034
962
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postMuteListRequestSchema)
1035
- fetch(
963
+ let response = await fetch(
1036
964
  ~url="/mute/list",
1037
965
  ~method_="POST",
1038
966
  ~body=Some(jsonBody),
1039
- )->Promise.then(response => {
1040
- let value = response->S.parseOrThrow(postMuteListResponseSchema)
1041
- value
1042
- ->Promise.resolve
1043
- })
967
+ )
968
+ response->S.parseOrThrow(postMuteListResponseSchema)
1044
969
  }
1045
970
 
1046
971
  type postMyAppsRequest = {
@@ -1064,17 +989,14 @@ No description provided.
1064
989
 
1065
990
  **Credential required**: *Yes* / **Permission**: *read:account*
1066
991
  */
1067
- let postMyApps = (~body: postMyAppsRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postMyAppsResponse> => {
992
+ let postMyApps = async (~body: postMyAppsRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postMyAppsResponse => {
1068
993
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postMyAppsRequestSchema)
1069
- fetch(
994
+ let response = await fetch(
1070
995
  ~url="/my/apps",
1071
996
  ~method_="POST",
1072
997
  ~body=Some(jsonBody),
1073
- )->Promise.then(response => {
1074
- let value = response->S.parseOrThrow(postMyAppsResponseSchema)
1075
- value
1076
- ->Promise.resolve
1077
- })
998
+ )
999
+ response->S.parseOrThrow(postMyAppsResponseSchema)
1078
1000
  }
1079
1001
 
1080
1002
  type postRenoteMuteCreateRequest = {
@@ -1094,17 +1016,14 @@ No description provided.
1094
1016
 
1095
1017
  **Credential required**: *Yes* / **Permission**: *write:mutes*
1096
1018
  */
1097
- let postRenoteMuteCreate = (~body: postRenoteMuteCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postRenoteMuteCreateResponse> => {
1019
+ let postRenoteMuteCreate = async (~body: postRenoteMuteCreateRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postRenoteMuteCreateResponse => {
1098
1020
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postRenoteMuteCreateRequestSchema)
1099
- fetch(
1021
+ let response = await fetch(
1100
1022
  ~url="/renote-mute/create",
1101
1023
  ~method_="POST",
1102
1024
  ~body=Some(jsonBody),
1103
- )->Promise.then(response => {
1025
+ )
1104
1026
  let _ = response
1105
- ()
1106
- ->Promise.resolve
1107
- })
1108
1027
  }
1109
1028
 
1110
1029
  type postRenoteMuteDeleteRequest = {
@@ -1124,17 +1043,14 @@ No description provided.
1124
1043
 
1125
1044
  **Credential required**: *Yes* / **Permission**: *write:mutes*
1126
1045
  */
1127
- let postRenoteMuteDelete = (~body: postRenoteMuteDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postRenoteMuteDeleteResponse> => {
1046
+ let postRenoteMuteDelete = async (~body: postRenoteMuteDeleteRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postRenoteMuteDeleteResponse => {
1128
1047
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postRenoteMuteDeleteRequestSchema)
1129
- fetch(
1048
+ let response = await fetch(
1130
1049
  ~url="/renote-mute/delete",
1131
1050
  ~method_="POST",
1132
1051
  ~body=Some(jsonBody),
1133
- )->Promise.then(response => {
1052
+ )
1134
1053
  let _ = response
1135
- ()
1136
- ->Promise.resolve
1137
- })
1138
1054
  }
1139
1055
 
1140
1056
  type postRenoteMuteListRequest = {
@@ -1160,17 +1076,14 @@ No description provided.
1160
1076
 
1161
1077
  **Credential required**: *Yes* / **Permission**: *read:mutes*
1162
1078
  */
1163
- let postRenoteMuteList = (~body: postRenoteMuteListRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postRenoteMuteListResponse> => {
1079
+ let postRenoteMuteList = async (~body: postRenoteMuteListRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postRenoteMuteListResponse => {
1164
1080
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postRenoteMuteListRequestSchema)
1165
- fetch(
1081
+ let response = await fetch(
1166
1082
  ~url="/renote-mute/list",
1167
1083
  ~method_="POST",
1168
1084
  ~body=Some(jsonBody),
1169
- )->Promise.then(response => {
1170
- let value = response->S.parseOrThrow(postRenoteMuteListResponseSchema)
1171
- value
1172
- ->Promise.resolve
1173
- })
1085
+ )
1086
+ response->S.parseOrThrow(postRenoteMuteListResponseSchema)
1174
1087
  }
1175
1088
 
1176
1089
  type postSwRegisterRequest = {
@@ -1211,17 +1124,14 @@ Register to receive push notifications.
1211
1124
  **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
1212
1125
  **Credential required**: *Yes*
1213
1126
  */
1214
- let postSwRegister = (~body: postSwRegisterRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postSwRegisterResponse> => {
1127
+ let postSwRegister = async (~body: postSwRegisterRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postSwRegisterResponse => {
1215
1128
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postSwRegisterRequestSchema)
1216
- fetch(
1129
+ let response = await fetch(
1217
1130
  ~url="/sw/register",
1218
1131
  ~method_="POST",
1219
1132
  ~body=Some(jsonBody),
1220
- )->Promise.then(response => {
1221
- let value = response->S.parseOrThrow(postSwRegisterResponseSchema)
1222
- value
1223
- ->Promise.resolve
1224
- })
1133
+ )
1134
+ response->S.parseOrThrow(postSwRegisterResponseSchema)
1225
1135
  }
1226
1136
 
1227
1137
  type postSwShowRegistrationRequest = {
@@ -1256,17 +1166,14 @@ Check push notification registration exists.
1256
1166
  **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
1257
1167
  **Credential required**: *Yes*
1258
1168
  */
1259
- let postSwShowRegistration = (~body: postSwShowRegistrationRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postSwShowRegistrationResponse> => {
1169
+ let postSwShowRegistration = async (~body: postSwShowRegistrationRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postSwShowRegistrationResponse => {
1260
1170
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postSwShowRegistrationRequestSchema)
1261
- fetch(
1171
+ let response = await fetch(
1262
1172
  ~url="/sw/show-registration",
1263
1173
  ~method_="POST",
1264
1174
  ~body=Some(jsonBody),
1265
- )->Promise.then(response => {
1266
- let value = response->S.parseOrThrow(postSwShowRegistrationResponseSchema)
1267
- value
1268
- ->Promise.resolve
1269
- })
1175
+ )
1176
+ response->S.parseOrThrow(postSwShowRegistrationResponseSchema)
1270
1177
  }
1271
1178
 
1272
1179
  type postSwUnregisterRequest = {
@@ -1286,17 +1193,14 @@ Unregister from receiving push notifications.
1286
1193
 
1287
1194
  **Credential required**: *No*
1288
1195
  */
1289
- let postSwUnregister = (~body: postSwUnregisterRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postSwUnregisterResponse> => {
1196
+ let postSwUnregister = async (~body: postSwUnregisterRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postSwUnregisterResponse => {
1290
1197
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postSwUnregisterRequestSchema)
1291
- fetch(
1198
+ let response = await fetch(
1292
1199
  ~url="/sw/unregister",
1293
1200
  ~method_="POST",
1294
1201
  ~body=Some(jsonBody),
1295
- )->Promise.then(response => {
1202
+ )
1296
1203
  let _ = response
1297
- ()
1298
- ->Promise.resolve
1299
- })
1300
1204
  }
1301
1205
 
1302
1206
  type postSwUpdateRegistrationRequest = {
@@ -1329,17 +1233,14 @@ Update push notification registration.
1329
1233
  **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
1330
1234
  **Credential required**: *Yes*
1331
1235
  */
1332
- let postSwUpdateRegistration = (~body: postSwUpdateRegistrationRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postSwUpdateRegistrationResponse> => {
1236
+ let postSwUpdateRegistration = async (~body: postSwUpdateRegistrationRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postSwUpdateRegistrationResponse => {
1333
1237
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postSwUpdateRegistrationRequestSchema)
1334
- fetch(
1238
+ let response = await fetch(
1335
1239
  ~url="/sw/update-registration",
1336
1240
  ~method_="POST",
1337
1241
  ~body=Some(jsonBody),
1338
- )->Promise.then(response => {
1339
- let value = response->S.parseOrThrow(postSwUpdateRegistrationResponseSchema)
1340
- value
1341
- ->Promise.resolve
1342
- })
1242
+ )
1243
+ response->S.parseOrThrow(postSwUpdateRegistrationResponseSchema)
1343
1244
  }
1344
1245
 
1345
1246
  type postUsersUpdateMemoRequest = {
@@ -1361,15 +1262,12 @@ No description provided.
1361
1262
 
1362
1263
  **Credential required**: *Yes* / **Permission**: *write:account*
1363
1264
  */
1364
- let postUsersUpdateMemo = (~body: postUsersUpdateMemoRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): promise<postUsersUpdateMemoResponse> => {
1265
+ let postUsersUpdateMemo = async (~body: postUsersUpdateMemoRequest, ~fetch: (~url: string, ~method_: string, ~body: option<JSON.t>) => Promise.t<JSON.t>): postUsersUpdateMemoResponse => {
1365
1266
  let jsonBody = body->S.reverseConvertToJsonOrThrow(postUsersUpdateMemoRequestSchema)
1366
- fetch(
1267
+ let response = await fetch(
1367
1268
  ~url="/users/update-memo",
1368
1269
  ~method_="POST",
1369
1270
  ~body=Some(jsonBody),
1370
- )->Promise.then(response => {
1271
+ )
1371
1272
  let _ = response
1372
- ()
1373
- ->Promise.resolve
1374
- })
1375
1273
  }