@f3liz/rescript-misskey-api 0.6.8 → 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 +241 -313
- package/src/generated/kokonect-link/api/KokonectLinkAdmin.res +485 -632
- package/src/generated/kokonect-link/api/KokonectLinkAntennas.res +30 -39
- package/src/generated/kokonect-link/api/KokonectLinkApp.res +20 -26
- package/src/generated/kokonect-link/api/KokonectLinkAuth.res +20 -26
- package/src/generated/kokonect-link/api/KokonectLinkChannels.res +60 -78
- package/src/generated/kokonect-link/api/KokonectLinkCharts.res +20 -26
- package/src/generated/kokonect-link/api/KokonectLinkChat.res +260 -341
- package/src/generated/kokonect-link/api/KokonectLinkClips.res +40 -52
- package/src/generated/kokonect-link/api/KokonectLinkDefault.res +101 -131
- package/src/generated/kokonect-link/api/KokonectLinkDrive.res +119 -155
- package/src/generated/kokonect-link/api/KokonectLinkFederation.res +60 -78
- package/src/generated/kokonect-link/api/KokonectLinkFlash.res +31 -40
- package/src/generated/kokonect-link/api/KokonectLinkFlashs.res +10 -13
- package/src/generated/kokonect-link/api/KokonectLinkFollowing.res +70 -91
- package/src/generated/kokonect-link/api/KokonectLinkGallery.res +40 -52
- package/src/generated/kokonect-link/api/KokonectLinkGroups.res +116 -152
- package/src/generated/kokonect-link/api/KokonectLinkHashtags.res +20 -26
- package/src/generated/kokonect-link/api/KokonectLinkLists.res +30 -39
- package/src/generated/kokonect-link/api/KokonectLinkMeta.res +94 -121
- package/src/generated/kokonect-link/api/KokonectLinkNotes.res +289 -376
- package/src/generated/kokonect-link/api/KokonectLinkNotifications.res +9 -12
- package/src/generated/kokonect-link/api/KokonectLinkPages.res +29 -38
- package/src/generated/kokonect-link/api/KokonectLinkRole.res +30 -39
- package/src/generated/kokonect-link/api/KokonectLinkUsers.res +119 -155
- package/src/generated/kokonect-link/api/KokonectLinkWebhooks.res +30 -39
- package/src/generated/kokonect-link/types/Account.d.ts +235 -177
- package/src/generated/kokonect-link/types/Admin.d.ts +640 -484
- package/src/generated/kokonect-link/types/Antennas.d.ts +36 -27
- package/src/generated/kokonect-link/types/App.d.ts +16 -12
- package/src/generated/kokonect-link/types/Auth.d.ts +30 -23
- package/src/generated/kokonect-link/types/Channels.d.ts +76 -57
- package/src/generated/kokonect-link/types/Charts.d.ts +104 -78
- package/src/generated/kokonect-link/types/Chat.d.ts +108 -81
- package/src/generated/kokonect-link/types/Clip.d.ts +8 -6
- package/src/generated/kokonect-link/types/Clips.d.ts +40 -30
- package/src/generated/kokonect-link/types/Default.d.ts +297 -232
- package/src/generated/kokonect-link/types/Drive.d.ts +120 -90
- package/src/generated/kokonect-link/types/Federation.d.ts +68 -51
- package/src/generated/kokonect-link/types/Flash.d.ts +33 -25
- package/src/generated/kokonect-link/types/Flashs.d.ts +12 -9
- package/src/generated/kokonect-link/types/Following.d.ts +68 -51
- package/src/generated/kokonect-link/types/Gallery.d.ts +52 -39
- package/src/generated/kokonect-link/types/Groups.d.ts +48 -36
- package/src/generated/kokonect-link/types/Hashtags.d.ts +32 -24
- package/src/generated/kokonect-link/types/Lists.d.ts +48 -36
- package/src/generated/kokonect-link/types/Meta.d.ts +133 -100
- package/src/generated/kokonect-link/types/NonProductive.d.ts +8 -6
- package/src/generated/kokonect-link/types/Notes.d.ts +256 -192
- package/src/generated/kokonect-link/types/Notifications.d.ts +20 -15
- package/src/generated/kokonect-link/types/Pages.d.ts +40 -30
- package/src/generated/kokonect-link/types/Reactions.d.ts +8 -6
- package/src/generated/kokonect-link/types/ResetPassword.d.ts +8 -6
- package/src/generated/kokonect-link/types/Role.d.ts +28 -21
- package/src/generated/kokonect-link/types/Users.d.ts +161 -121
- package/src/generated/kokonect-link/types/Webhooks.d.ts +44 -34
- package/src/generated/kokonect-link/types/index.d.ts +1 -2
- package/src/generated/kokonect-link/wrapper/index.d.ts +4813 -2131
- package/src/generated/kokonect-link/wrapper/index.mjs +2 -710
- package/src/generated/misskey-io/api/MisskeyIoAccount.res +335 -437
- package/src/generated/misskey-io/api/MisskeyIoAdmin.res +1035 -1356
- package/src/generated/misskey-io/api/MisskeyIoAntennas.res +60 -78
- package/src/generated/misskey-io/api/MisskeyIoApp.res +20 -26
- package/src/generated/misskey-io/api/MisskeyIoAuth.res +51 -66
- package/src/generated/misskey-io/api/MisskeyIoChannels.res +129 -168
- package/src/generated/misskey-io/api/MisskeyIoCharts.res +240 -312
- package/src/generated/misskey-io/api/MisskeyIoClip.res +18 -24
- package/src/generated/misskey-io/api/MisskeyIoClips.res +60 -78
- package/src/generated/misskey-io/api/MisskeyIoDefault.res +561 -726
- package/src/generated/misskey-io/api/MisskeyIoDrive.res +178 -232
- package/src/generated/misskey-io/api/MisskeyIoFederation.res +109 -142
- package/src/generated/misskey-io/api/MisskeyIoFlash.res +47 -62
- package/src/generated/misskey-io/api/MisskeyIoFlashs.res +19 -25
- package/src/generated/misskey-io/api/MisskeyIoFollowing.res +97 -127
- package/src/generated/misskey-io/api/MisskeyIoGallery.res +88 -115
- package/src/generated/misskey-io/api/MisskeyIoHashtags.res +62 -80
- package/src/generated/misskey-io/api/MisskeyIoLists.res +86 -113
- package/src/generated/misskey-io/api/MisskeyIoMeta.res +251 -323
- package/src/generated/misskey-io/api/MisskeyIoNonProductive.res +19 -25
- package/src/generated/misskey-io/api/MisskeyIoNotes.res +341 -446
- package/src/generated/misskey-io/api/MisskeyIoNotifications.res +39 -51
- package/src/generated/misskey-io/api/MisskeyIoPages.res +67 -88
- package/src/generated/misskey-io/api/MisskeyIoReactions.res +18 -24
- package/src/generated/misskey-io/api/MisskeyIoResetPassword.res +18 -24
- package/src/generated/misskey-io/api/MisskeyIoRole.res +41 -53
- package/src/generated/misskey-io/api/MisskeyIoUsers.res +284 -368
- package/src/generated/misskey-io/api/MisskeyIoWebhooks.res +69 -90
- package/src/generated/misskey-io/types/Account.d.ts +139 -105
- package/src/generated/misskey-io/types/Admin.d.ts +438 -331
- package/src/generated/misskey-io/types/Antennas.d.ts +24 -18
- package/src/generated/misskey-io/types/App.d.ts +8 -6
- package/src/generated/misskey-io/types/Auth.d.ts +22 -17
- package/src/generated/misskey-io/types/Channels.d.ts +52 -39
- package/src/generated/misskey-io/types/Charts.d.ts +96 -72
- package/src/generated/misskey-io/types/Clip.d.ts +8 -6
- package/src/generated/misskey-io/types/Clips.d.ts +24 -18
- package/src/generated/misskey-io/types/Default.d.ts +253 -198
- package/src/generated/misskey-io/types/Drive.d.ts +72 -54
- package/src/generated/misskey-io/types/Federation.d.ts +44 -33
- package/src/generated/misskey-io/types/Flash.d.ts +20 -15
- package/src/generated/misskey-io/types/Flashs.d.ts +8 -6
- package/src/generated/misskey-io/types/Following.d.ts +40 -30
- package/src/generated/misskey-io/types/Gallery.d.ts +36 -27
- package/src/generated/misskey-io/types/Hashtags.d.ts +24 -18
- package/src/generated/misskey-io/types/Lists.d.ts +36 -27
- package/src/generated/misskey-io/types/Meta.d.ts +97 -73
- package/src/generated/misskey-io/types/NonProductive.d.ts +8 -6
- package/src/generated/misskey-io/types/Notes.d.ts +140 -105
- package/src/generated/misskey-io/types/Notifications.d.ts +16 -12
- package/src/generated/misskey-io/types/Pages.d.ts +28 -21
- package/src/generated/misskey-io/types/Reactions.d.ts +8 -6
- package/src/generated/misskey-io/types/ResetPassword.d.ts +8 -6
- package/src/generated/misskey-io/types/Role.d.ts +16 -12
- package/src/generated/misskey-io/types/Users.d.ts +113 -85
- package/src/generated/misskey-io/types/Webhooks.d.ts +30 -23
- package/src/generated/misskey-io/types/index.d.ts +1 -2
- package/src/generated/misskey-io/wrapper/index.d.ts +3127 -1399
- package/src/generated/misskey-io/wrapper/index.mjs +2 -469
|
@@ -14,9 +14,10 @@ let postAppCreateRequestSchema = S.object(s => ({
|
|
|
14
14
|
|
|
15
15
|
let postAppCreateResponseSchema = KokonectLinkComponentSchemas.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 = KokonectLinkComponentSchemas.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 {
|
|
@@ -15,9 +15,10 @@ let postAuthSessionShowResponseSchema = S.object(s => ({
|
|
|
15
15
|
token: s.f("token", S.string)
|
|
16
16
|
}));
|
|
17
17
|
|
|
18
|
-
function postAuthSessionShow(body, fetch) {
|
|
18
|
+
async function postAuthSessionShow(body, fetch) {
|
|
19
19
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAuthSessionShowRequestSchema);
|
|
20
|
-
|
|
20
|
+
let response = await fetch("/auth/session/show", "POST", jsonBody);
|
|
21
|
+
return S.parseOrThrow(response, postAuthSessionShowResponseSchema);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
let postAuthSessionUserkeyRequestSchema = S.object(s => ({
|
|
@@ -30,9 +31,10 @@ let postAuthSessionUserkeyResponseSchema = S.object(s => ({
|
|
|
30
31
|
user: s.f("user", KokonectLinkComponentSchemas.UserDetailedNotMe.schema)
|
|
31
32
|
}));
|
|
32
33
|
|
|
33
|
-
function postAuthSessionUserkey(body, fetch) {
|
|
34
|
+
async function postAuthSessionUserkey(body, fetch) {
|
|
34
35
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postAuthSessionUserkeyRequestSchema);
|
|
35
|
-
|
|
36
|
+
let response = await fetch("/auth/session/userkey", "POST", jsonBody);
|
|
37
|
+
return S.parseOrThrow(response, postAuthSessionUserkeyResponseSchema);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export {
|
|
@@ -16,9 +16,10 @@ let postChannelsCreateRequestSchema = S.object(s => ({
|
|
|
16
16
|
|
|
17
17
|
let postChannelsCreateResponseSchema = KokonectLinkComponentSchemas.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 postChannelsFollowedRequestSchema = S.object(s => ({
|
|
@@ -31,9 +32,10 @@ let postChannelsFollowedRequestSchema = S.object(s => ({
|
|
|
31
32
|
|
|
32
33
|
let postChannelsFollowedResponseSchema = S.array(KokonectLinkComponentSchemas.Channel.schema);
|
|
33
34
|
|
|
34
|
-
function postChannelsFollowed(body, fetch) {
|
|
35
|
+
async function postChannelsFollowed(body, fetch) {
|
|
35
36
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsFollowedRequestSchema);
|
|
36
|
-
|
|
37
|
+
let response = await fetch("/channels/followed", "POST", jsonBody);
|
|
38
|
+
return S.parseOrThrow(response, postChannelsFollowedResponseSchema);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
let postChannelsOwnedRequestSchema = S.object(s => ({
|
|
@@ -46,9 +48,10 @@ let postChannelsOwnedRequestSchema = S.object(s => ({
|
|
|
46
48
|
|
|
47
49
|
let postChannelsOwnedResponseSchema = S.array(KokonectLinkComponentSchemas.Channel.schema);
|
|
48
50
|
|
|
49
|
-
function postChannelsOwned(body, fetch) {
|
|
51
|
+
async function postChannelsOwned(body, fetch) {
|
|
50
52
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsOwnedRequestSchema);
|
|
51
|
-
|
|
53
|
+
let response = await fetch("/channels/owned", "POST", jsonBody);
|
|
54
|
+
return S.parseOrThrow(response, postChannelsOwnedResponseSchema);
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
let postChannelsSearchRequestSchema = S.object(s => ({
|
|
@@ -63,9 +66,10 @@ let postChannelsSearchRequestSchema = S.object(s => ({
|
|
|
63
66
|
|
|
64
67
|
let postChannelsSearchResponseSchema = S.array(KokonectLinkComponentSchemas.Channel.schema);
|
|
65
68
|
|
|
66
|
-
function postChannelsSearch(body, fetch) {
|
|
69
|
+
async function postChannelsSearch(body, fetch) {
|
|
67
70
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsSearchRequestSchema);
|
|
68
|
-
|
|
71
|
+
let response = await fetch("/channels/search", "POST", jsonBody);
|
|
72
|
+
return S.parseOrThrow(response, postChannelsSearchResponseSchema);
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
let postChannelsShowRequestSchema = S.object(s => ({
|
|
@@ -74,9 +78,10 @@ let postChannelsShowRequestSchema = S.object(s => ({
|
|
|
74
78
|
|
|
75
79
|
let postChannelsShowResponseSchema = KokonectLinkComponentSchemas.Channel.schema;
|
|
76
80
|
|
|
77
|
-
function postChannelsShow(body, fetch) {
|
|
81
|
+
async function postChannelsShow(body, fetch) {
|
|
78
82
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsShowRequestSchema);
|
|
79
|
-
|
|
83
|
+
let response = await fetch("/channels/show", "POST", jsonBody);
|
|
84
|
+
return S.parseOrThrow(response, postChannelsShowResponseSchema);
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
let postChannelsUpdateRequestSchema = S.object(s => ({
|
|
@@ -93,9 +98,10 @@ let postChannelsUpdateRequestSchema = S.object(s => ({
|
|
|
93
98
|
|
|
94
99
|
let postChannelsUpdateResponseSchema = KokonectLinkComponentSchemas.Channel.schema;
|
|
95
100
|
|
|
96
|
-
function postChannelsUpdate(body, fetch) {
|
|
101
|
+
async function postChannelsUpdate(body, fetch) {
|
|
97
102
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChannelsUpdateRequestSchema);
|
|
98
|
-
|
|
103
|
+
let response = await fetch("/channels/update", "POST", jsonBody);
|
|
104
|
+
return S.parseOrThrow(response, postChannelsUpdateResponseSchema);
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
export {
|
|
@@ -22,9 +22,10 @@ let getChartsFederationResponseSchema = S.object(s => ({
|
|
|
22
22
|
software: s.f("software", S.array(S.float))
|
|
23
23
|
}));
|
|
24
24
|
|
|
25
|
-
function getChartsFederation(body, fetch) {
|
|
25
|
+
async function getChartsFederation(body, fetch) {
|
|
26
26
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, getChartsFederationRequestSchema);
|
|
27
|
-
|
|
27
|
+
let response = await fetch("/charts/federation", "GET", jsonBody);
|
|
28
|
+
return S.parseOrThrow(response, getChartsFederationResponseSchema);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
let postChartsFederationRequestSchema = S.object(s => ({
|
|
@@ -45,9 +46,10 @@ let postChartsFederationResponseSchema = S.object(s => ({
|
|
|
45
46
|
software: s.f("software", S.array(S.float))
|
|
46
47
|
}));
|
|
47
48
|
|
|
48
|
-
function postChartsFederation(body, fetch) {
|
|
49
|
+
async function postChartsFederation(body, fetch) {
|
|
49
50
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChartsFederationRequestSchema);
|
|
50
|
-
|
|
51
|
+
let response = await fetch("/charts/federation", "POST", jsonBody);
|
|
52
|
+
return S.parseOrThrow(response, postChartsFederationResponseSchema);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
export {
|
|
@@ -12,9 +12,10 @@ let postChatHistoryRequestSchema = S.object(s => ({
|
|
|
12
12
|
|
|
13
13
|
let postChatHistoryResponseSchema = S.array(KokonectLinkComponentSchemas.ChatMessage.schema);
|
|
14
14
|
|
|
15
|
-
function postChatHistory(body, fetch) {
|
|
15
|
+
async function postChatHistory(body, fetch) {
|
|
16
16
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatHistoryRequestSchema);
|
|
17
|
-
|
|
17
|
+
let response = await fetch("/chat/history", "POST", jsonBody);
|
|
18
|
+
return S.parseOrThrow(response, postChatHistoryResponseSchema);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
let postChatMessagesCreateToRoomRequestSchema = S.object(s => ({
|
|
@@ -25,9 +26,10 @@ let postChatMessagesCreateToRoomRequestSchema = S.object(s => ({
|
|
|
25
26
|
|
|
26
27
|
let postChatMessagesCreateToRoomResponseSchema = KokonectLinkComponentSchemas.ChatMessageLiteForRoom.schema;
|
|
27
28
|
|
|
28
|
-
function postChatMessagesCreateToRoom(body, fetch) {
|
|
29
|
+
async function postChatMessagesCreateToRoom(body, fetch) {
|
|
29
30
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesCreateToRoomRequestSchema);
|
|
30
|
-
|
|
31
|
+
let response = await fetch("/chat/messages/create-to-room", "POST", jsonBody);
|
|
32
|
+
return S.parseOrThrow(response, postChatMessagesCreateToRoomResponseSchema);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
let postChatMessagesCreateToUserRequestSchema = S.object(s => ({
|
|
@@ -38,18 +40,19 @@ let postChatMessagesCreateToUserRequestSchema = S.object(s => ({
|
|
|
38
40
|
|
|
39
41
|
let postChatMessagesCreateToUserResponseSchema = KokonectLinkComponentSchemas.ChatMessageLiteFor1on1.schema;
|
|
40
42
|
|
|
41
|
-
function postChatMessagesCreateToUser(body, fetch) {
|
|
43
|
+
async function postChatMessagesCreateToUser(body, fetch) {
|
|
42
44
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesCreateToUserRequestSchema);
|
|
43
|
-
|
|
45
|
+
let response = await fetch("/chat/messages/create-to-user", "POST", jsonBody);
|
|
46
|
+
return S.parseOrThrow(response, postChatMessagesCreateToUserResponseSchema);
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
let postChatMessagesDeleteRequestSchema = S.object(s => ({
|
|
47
50
|
messageId: s.f("messageId", S.string)
|
|
48
51
|
}));
|
|
49
52
|
|
|
50
|
-
function postChatMessagesDelete(body, fetch) {
|
|
53
|
+
async function postChatMessagesDelete(body, fetch) {
|
|
51
54
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesDeleteRequestSchema);
|
|
52
|
-
|
|
55
|
+
await fetch("/chat/messages/delete", "POST", jsonBody);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
let postChatMessagesReactRequestSchema = S.object(s => ({
|
|
@@ -57,9 +60,9 @@ let postChatMessagesReactRequestSchema = S.object(s => ({
|
|
|
57
60
|
reaction: s.f("reaction", S.string)
|
|
58
61
|
}));
|
|
59
62
|
|
|
60
|
-
function postChatMessagesReact(body, fetch) {
|
|
63
|
+
async function postChatMessagesReact(body, fetch) {
|
|
61
64
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesReactRequestSchema);
|
|
62
|
-
|
|
65
|
+
await fetch("/chat/messages/react", "POST", jsonBody);
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
let postChatMessagesRoomTimelineRequestSchema = S.object(s => ({
|
|
@@ -73,9 +76,10 @@ let postChatMessagesRoomTimelineRequestSchema = S.object(s => ({
|
|
|
73
76
|
|
|
74
77
|
let postChatMessagesRoomTimelineResponseSchema = S.array(KokonectLinkComponentSchemas.ChatMessageLiteForRoom.schema);
|
|
75
78
|
|
|
76
|
-
function postChatMessagesRoomTimeline(body, fetch) {
|
|
79
|
+
async function postChatMessagesRoomTimeline(body, fetch) {
|
|
77
80
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesRoomTimelineRequestSchema);
|
|
78
|
-
|
|
81
|
+
let response = await fetch("/chat/messages/room-timeline", "POST", jsonBody);
|
|
82
|
+
return S.parseOrThrow(response, postChatMessagesRoomTimelineResponseSchema);
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
let postChatMessagesSearchRequestSchema = S.object(s => ({
|
|
@@ -87,9 +91,10 @@ let postChatMessagesSearchRequestSchema = S.object(s => ({
|
|
|
87
91
|
|
|
88
92
|
let postChatMessagesSearchResponseSchema = S.array(KokonectLinkComponentSchemas.ChatMessage.schema);
|
|
89
93
|
|
|
90
|
-
function postChatMessagesSearch(body, fetch) {
|
|
94
|
+
async function postChatMessagesSearch(body, fetch) {
|
|
91
95
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesSearchRequestSchema);
|
|
92
|
-
|
|
96
|
+
let response = await fetch("/chat/messages/search", "POST", jsonBody);
|
|
97
|
+
return S.parseOrThrow(response, postChatMessagesSearchResponseSchema);
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
let postChatMessagesShowRequestSchema = S.object(s => ({
|
|
@@ -98,9 +103,10 @@ let postChatMessagesShowRequestSchema = S.object(s => ({
|
|
|
98
103
|
|
|
99
104
|
let postChatMessagesShowResponseSchema = KokonectLinkComponentSchemas.ChatMessage.schema;
|
|
100
105
|
|
|
101
|
-
function postChatMessagesShow(body, fetch) {
|
|
106
|
+
async function postChatMessagesShow(body, fetch) {
|
|
102
107
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesShowRequestSchema);
|
|
103
|
-
|
|
108
|
+
let response = await fetch("/chat/messages/show", "POST", jsonBody);
|
|
109
|
+
return S.parseOrThrow(response, postChatMessagesShowResponseSchema);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
let postChatMessagesUnreactRequestSchema = S.object(s => ({
|
|
@@ -108,9 +114,9 @@ let postChatMessagesUnreactRequestSchema = S.object(s => ({
|
|
|
108
114
|
reaction: s.f("reaction", S.string)
|
|
109
115
|
}));
|
|
110
116
|
|
|
111
|
-
function postChatMessagesUnreact(body, fetch) {
|
|
117
|
+
async function postChatMessagesUnreact(body, fetch) {
|
|
112
118
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesUnreactRequestSchema);
|
|
113
|
-
|
|
119
|
+
await fetch("/chat/messages/unreact", "POST", jsonBody);
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
let postChatMessagesUserTimelineRequestSchema = S.object(s => ({
|
|
@@ -124,13 +130,14 @@ let postChatMessagesUserTimelineRequestSchema = S.object(s => ({
|
|
|
124
130
|
|
|
125
131
|
let postChatMessagesUserTimelineResponseSchema = S.array(KokonectLinkComponentSchemas.ChatMessageLiteFor1on1.schema);
|
|
126
132
|
|
|
127
|
-
function postChatMessagesUserTimeline(body, fetch) {
|
|
133
|
+
async function postChatMessagesUserTimeline(body, fetch) {
|
|
128
134
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatMessagesUserTimelineRequestSchema);
|
|
129
|
-
|
|
135
|
+
let response = await fetch("/chat/messages/user-timeline", "POST", jsonBody);
|
|
136
|
+
return S.parseOrThrow(response, postChatMessagesUserTimelineResponseSchema);
|
|
130
137
|
}
|
|
131
138
|
|
|
132
|
-
function postChatReadAll(fetch) {
|
|
133
|
-
|
|
139
|
+
async function postChatReadAll(fetch) {
|
|
140
|
+
await fetch("/chat/read-all", "POST", undefined);
|
|
134
141
|
}
|
|
135
142
|
|
|
136
143
|
let postChatRoomsCreateRequestSchema = S.object(s => ({
|
|
@@ -140,27 +147,28 @@ let postChatRoomsCreateRequestSchema = S.object(s => ({
|
|
|
140
147
|
|
|
141
148
|
let postChatRoomsCreateResponseSchema = KokonectLinkComponentSchemas.ChatRoom.schema;
|
|
142
149
|
|
|
143
|
-
function postChatRoomsCreate(body, fetch) {
|
|
150
|
+
async function postChatRoomsCreate(body, fetch) {
|
|
144
151
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsCreateRequestSchema);
|
|
145
|
-
|
|
152
|
+
let response = await fetch("/chat/rooms/create", "POST", jsonBody);
|
|
153
|
+
return S.parseOrThrow(response, postChatRoomsCreateResponseSchema);
|
|
146
154
|
}
|
|
147
155
|
|
|
148
156
|
let postChatRoomsDeleteRequestSchema = S.object(s => ({
|
|
149
157
|
roomId: s.f("roomId", S.string)
|
|
150
158
|
}));
|
|
151
159
|
|
|
152
|
-
function postChatRoomsDelete(body, fetch) {
|
|
160
|
+
async function postChatRoomsDelete(body, fetch) {
|
|
153
161
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsDeleteRequestSchema);
|
|
154
|
-
|
|
162
|
+
await fetch("/chat/rooms/delete", "POST", jsonBody);
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
let postChatRoomsInvitationsCancelRequestSchema = S.object(s => ({
|
|
158
166
|
invitationId: s.f("invitationId", S.string)
|
|
159
167
|
}));
|
|
160
168
|
|
|
161
|
-
function postChatRoomsInvitationsCancel(body, fetch) {
|
|
169
|
+
async function postChatRoomsInvitationsCancel(body, fetch) {
|
|
162
170
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsInvitationsCancelRequestSchema);
|
|
163
|
-
|
|
171
|
+
await fetch("/chat/rooms/invitations/cancel", "POST", jsonBody);
|
|
164
172
|
}
|
|
165
173
|
|
|
166
174
|
let postChatRoomsInvitationsCreateRequestSchema = S.object(s => ({
|
|
@@ -170,18 +178,19 @@ let postChatRoomsInvitationsCreateRequestSchema = S.object(s => ({
|
|
|
170
178
|
|
|
171
179
|
let postChatRoomsInvitationsCreateResponseSchema = KokonectLinkComponentSchemas.ChatRoomInvitation.schema;
|
|
172
180
|
|
|
173
|
-
function postChatRoomsInvitationsCreate(body, fetch) {
|
|
181
|
+
async function postChatRoomsInvitationsCreate(body, fetch) {
|
|
174
182
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsInvitationsCreateRequestSchema);
|
|
175
|
-
|
|
183
|
+
let response = await fetch("/chat/rooms/invitations/create", "POST", jsonBody);
|
|
184
|
+
return S.parseOrThrow(response, postChatRoomsInvitationsCreateResponseSchema);
|
|
176
185
|
}
|
|
177
186
|
|
|
178
187
|
let postChatRoomsInvitationsIgnoreRequestSchema = S.object(s => ({
|
|
179
188
|
roomId: s.f("roomId", S.string)
|
|
180
189
|
}));
|
|
181
190
|
|
|
182
|
-
function postChatRoomsInvitationsIgnore(body, fetch) {
|
|
191
|
+
async function postChatRoomsInvitationsIgnore(body, fetch) {
|
|
183
192
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsInvitationsIgnoreRequestSchema);
|
|
184
|
-
|
|
193
|
+
await fetch("/chat/rooms/invitations/ignore", "POST", jsonBody);
|
|
185
194
|
}
|
|
186
195
|
|
|
187
196
|
let postChatRoomsInvitationsInboxRequestSchema = S.object(s => ({
|
|
@@ -194,9 +203,10 @@ let postChatRoomsInvitationsInboxRequestSchema = S.object(s => ({
|
|
|
194
203
|
|
|
195
204
|
let postChatRoomsInvitationsInboxResponseSchema = S.array(KokonectLinkComponentSchemas.ChatRoomInvitation.schema);
|
|
196
205
|
|
|
197
|
-
function postChatRoomsInvitationsInbox(body, fetch) {
|
|
206
|
+
async function postChatRoomsInvitationsInbox(body, fetch) {
|
|
198
207
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsInvitationsInboxRequestSchema);
|
|
199
|
-
|
|
208
|
+
let response = await fetch("/chat/rooms/invitations/inbox", "POST", jsonBody);
|
|
209
|
+
return S.parseOrThrow(response, postChatRoomsInvitationsInboxResponseSchema);
|
|
200
210
|
}
|
|
201
211
|
|
|
202
212
|
let postChatRoomsInvitationsOutboxRequestSchema = S.object(s => ({
|
|
@@ -210,27 +220,28 @@ let postChatRoomsInvitationsOutboxRequestSchema = S.object(s => ({
|
|
|
210
220
|
|
|
211
221
|
let postChatRoomsInvitationsOutboxResponseSchema = S.array(KokonectLinkComponentSchemas.ChatRoomInvitation.schema);
|
|
212
222
|
|
|
213
|
-
function postChatRoomsInvitationsOutbox(body, fetch) {
|
|
223
|
+
async function postChatRoomsInvitationsOutbox(body, fetch) {
|
|
214
224
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsInvitationsOutboxRequestSchema);
|
|
215
|
-
|
|
225
|
+
let response = await fetch("/chat/rooms/invitations/outbox", "POST", jsonBody);
|
|
226
|
+
return S.parseOrThrow(response, postChatRoomsInvitationsOutboxResponseSchema);
|
|
216
227
|
}
|
|
217
228
|
|
|
218
229
|
let postChatRoomsInvitationsRejectRequestSchema = S.object(s => ({
|
|
219
230
|
roomId: s.f("roomId", S.string)
|
|
220
231
|
}));
|
|
221
232
|
|
|
222
|
-
function postChatRoomsInvitationsReject(body, fetch) {
|
|
233
|
+
async function postChatRoomsInvitationsReject(body, fetch) {
|
|
223
234
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsInvitationsRejectRequestSchema);
|
|
224
|
-
|
|
235
|
+
await fetch("/chat/rooms/invitations/reject", "POST", jsonBody);
|
|
225
236
|
}
|
|
226
237
|
|
|
227
238
|
let postChatRoomsJoinRequestSchema = S.object(s => ({
|
|
228
239
|
roomId: s.f("roomId", S.string)
|
|
229
240
|
}));
|
|
230
241
|
|
|
231
|
-
function postChatRoomsJoin(body, fetch) {
|
|
242
|
+
async function postChatRoomsJoin(body, fetch) {
|
|
232
243
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsJoinRequestSchema);
|
|
233
|
-
|
|
244
|
+
await fetch("/chat/rooms/join", "POST", jsonBody);
|
|
234
245
|
}
|
|
235
246
|
|
|
236
247
|
let postChatRoomsJoiningRequestSchema = S.object(s => ({
|
|
@@ -243,18 +254,19 @@ let postChatRoomsJoiningRequestSchema = S.object(s => ({
|
|
|
243
254
|
|
|
244
255
|
let postChatRoomsJoiningResponseSchema = S.array(KokonectLinkComponentSchemas.ChatRoomMembership.schema);
|
|
245
256
|
|
|
246
|
-
function postChatRoomsJoining(body, fetch) {
|
|
257
|
+
async function postChatRoomsJoining(body, fetch) {
|
|
247
258
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsJoiningRequestSchema);
|
|
248
|
-
|
|
259
|
+
let response = await fetch("/chat/rooms/joining", "POST", jsonBody);
|
|
260
|
+
return S.parseOrThrow(response, postChatRoomsJoiningResponseSchema);
|
|
249
261
|
}
|
|
250
262
|
|
|
251
263
|
let postChatRoomsLeaveRequestSchema = S.object(s => ({
|
|
252
264
|
roomId: s.f("roomId", S.string)
|
|
253
265
|
}));
|
|
254
266
|
|
|
255
|
-
function postChatRoomsLeave(body, fetch) {
|
|
267
|
+
async function postChatRoomsLeave(body, fetch) {
|
|
256
268
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsLeaveRequestSchema);
|
|
257
|
-
|
|
269
|
+
await fetch("/chat/rooms/leave", "POST", jsonBody);
|
|
258
270
|
}
|
|
259
271
|
|
|
260
272
|
let postChatRoomsMembersRequestSchema = S.object(s => ({
|
|
@@ -268,9 +280,10 @@ let postChatRoomsMembersRequestSchema = S.object(s => ({
|
|
|
268
280
|
|
|
269
281
|
let postChatRoomsMembersResponseSchema = S.array(KokonectLinkComponentSchemas.ChatRoomMembership.schema);
|
|
270
282
|
|
|
271
|
-
function postChatRoomsMembers(body, fetch) {
|
|
283
|
+
async function postChatRoomsMembers(body, fetch) {
|
|
272
284
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsMembersRequestSchema);
|
|
273
|
-
|
|
285
|
+
let response = await fetch("/chat/rooms/members", "POST", jsonBody);
|
|
286
|
+
return S.parseOrThrow(response, postChatRoomsMembersResponseSchema);
|
|
274
287
|
}
|
|
275
288
|
|
|
276
289
|
let postChatRoomsMuteRequestSchema = S.object(s => ({
|
|
@@ -278,9 +291,9 @@ let postChatRoomsMuteRequestSchema = S.object(s => ({
|
|
|
278
291
|
mute: s.f("mute", S.bool)
|
|
279
292
|
}));
|
|
280
293
|
|
|
281
|
-
function postChatRoomsMute(body, fetch) {
|
|
294
|
+
async function postChatRoomsMute(body, fetch) {
|
|
282
295
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsMuteRequestSchema);
|
|
283
|
-
|
|
296
|
+
await fetch("/chat/rooms/mute", "POST", jsonBody);
|
|
284
297
|
}
|
|
285
298
|
|
|
286
299
|
let postChatRoomsOwnedRequestSchema = S.object(s => ({
|
|
@@ -293,9 +306,10 @@ let postChatRoomsOwnedRequestSchema = S.object(s => ({
|
|
|
293
306
|
|
|
294
307
|
let postChatRoomsOwnedResponseSchema = S.array(KokonectLinkComponentSchemas.ChatRoom.schema);
|
|
295
308
|
|
|
296
|
-
function postChatRoomsOwned(body, fetch) {
|
|
309
|
+
async function postChatRoomsOwned(body, fetch) {
|
|
297
310
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsOwnedRequestSchema);
|
|
298
|
-
|
|
311
|
+
let response = await fetch("/chat/rooms/owned", "POST", jsonBody);
|
|
312
|
+
return S.parseOrThrow(response, postChatRoomsOwnedResponseSchema);
|
|
299
313
|
}
|
|
300
314
|
|
|
301
315
|
let postChatRoomsShowRequestSchema = S.object(s => ({
|
|
@@ -304,9 +318,10 @@ let postChatRoomsShowRequestSchema = S.object(s => ({
|
|
|
304
318
|
|
|
305
319
|
let postChatRoomsShowResponseSchema = KokonectLinkComponentSchemas.ChatRoom.schema;
|
|
306
320
|
|
|
307
|
-
function postChatRoomsShow(body, fetch) {
|
|
321
|
+
async function postChatRoomsShow(body, fetch) {
|
|
308
322
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsShowRequestSchema);
|
|
309
|
-
|
|
323
|
+
let response = await fetch("/chat/rooms/show", "POST", jsonBody);
|
|
324
|
+
return S.parseOrThrow(response, postChatRoomsShowResponseSchema);
|
|
310
325
|
}
|
|
311
326
|
|
|
312
327
|
let postChatRoomsUpdateRequestSchema = S.object(s => ({
|
|
@@ -317,9 +332,10 @@ let postChatRoomsUpdateRequestSchema = S.object(s => ({
|
|
|
317
332
|
|
|
318
333
|
let postChatRoomsUpdateResponseSchema = KokonectLinkComponentSchemas.ChatRoom.schema;
|
|
319
334
|
|
|
320
|
-
function postChatRoomsUpdate(body, fetch) {
|
|
335
|
+
async function postChatRoomsUpdate(body, fetch) {
|
|
321
336
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postChatRoomsUpdateRequestSchema);
|
|
322
|
-
|
|
337
|
+
let response = await fetch("/chat/rooms/update", "POST", jsonBody);
|
|
338
|
+
return S.parseOrThrow(response, postChatRoomsUpdateResponseSchema);
|
|
323
339
|
}
|
|
324
340
|
|
|
325
341
|
export {
|
|
@@ -13,9 +13,10 @@ let postClipsCreateRequestSchema = S.object(s => ({
|
|
|
13
13
|
|
|
14
14
|
let postClipsCreateResponseSchema = KokonectLinkComponentSchemas.Clip.schema;
|
|
15
15
|
|
|
16
|
-
function postClipsCreate(body, fetch) {
|
|
16
|
+
async function postClipsCreate(body, fetch) {
|
|
17
17
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postClipsCreateRequestSchema);
|
|
18
|
-
|
|
18
|
+
let response = await fetch("/clips/create", "POST", jsonBody);
|
|
19
|
+
return S.parseOrThrow(response, postClipsCreateResponseSchema);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
let postClipsListRequestSchema = S.object(s => ({
|
|
@@ -28,9 +29,10 @@ let postClipsListRequestSchema = S.object(s => ({
|
|
|
28
29
|
|
|
29
30
|
let postClipsListResponseSchema = S.array(KokonectLinkComponentSchemas.Clip.schema);
|
|
30
31
|
|
|
31
|
-
function postClipsList(body, fetch) {
|
|
32
|
+
async function postClipsList(body, fetch) {
|
|
32
33
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postClipsListRequestSchema);
|
|
33
|
-
|
|
34
|
+
let response = await fetch("/clips/list", "POST", jsonBody);
|
|
35
|
+
return S.parseOrThrow(response, postClipsListResponseSchema);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
let postClipsShowRequestSchema = S.object(s => ({
|
|
@@ -39,9 +41,10 @@ let postClipsShowRequestSchema = S.object(s => ({
|
|
|
39
41
|
|
|
40
42
|
let postClipsShowResponseSchema = KokonectLinkComponentSchemas.Clip.schema;
|
|
41
43
|
|
|
42
|
-
function postClipsShow(body, fetch) {
|
|
44
|
+
async function postClipsShow(body, fetch) {
|
|
43
45
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postClipsShowRequestSchema);
|
|
44
|
-
|
|
46
|
+
let response = await fetch("/clips/show", "POST", jsonBody);
|
|
47
|
+
return S.parseOrThrow(response, postClipsShowResponseSchema);
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
let postClipsUpdateRequestSchema = S.object(s => ({
|
|
@@ -53,9 +56,10 @@ let postClipsUpdateRequestSchema = S.object(s => ({
|
|
|
53
56
|
|
|
54
57
|
let postClipsUpdateResponseSchema = KokonectLinkComponentSchemas.Clip.schema;
|
|
55
58
|
|
|
56
|
-
function postClipsUpdate(body, fetch) {
|
|
59
|
+
async function postClipsUpdate(body, fetch) {
|
|
57
60
|
let jsonBody = S.reverseConvertToJsonOrThrow(body, postClipsUpdateRequestSchema);
|
|
58
|
-
|
|
61
|
+
let response = await fetch("/clips/update", "POST", jsonBody);
|
|
62
|
+
return S.parseOrThrow(response, postClipsUpdateResponseSchema);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
export {
|