@f3liz/rescript-misskey-api 0.6.5 → 0.6.7
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/generated/kokonect-link/api/KokonectLinkAccount.mjs +123 -123
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAdmin.mjs +307 -307
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkAntennas.mjs +18 -18
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkApp.mjs +1 -1
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkChannels.mjs +29 -29
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkCharts.mjs +4 -4
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkChat.mjs +47 -47
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkClips.mjs +10 -10
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkComponentSchemas.mjs +145 -145
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkDefault.mjs +18 -18
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkDrive.mjs +44 -44
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFederation.mjs +31 -31
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFlash.mjs +6 -6
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkFollowing.mjs +13 -13
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkGallery.mjs +11 -11
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkHashtags.mjs +3 -3
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkLists.mjs +8 -8
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkMeta.mjs +14 -14
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkNotes.mjs +247 -247
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkNotifications.mjs +2 -2
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkPages.mjs +13 -13
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkRole.mjs +10 -10
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkUsers.mjs +51 -51
- package/lib/es6/src/generated/kokonect-link/api/KokonectLinkWebhooks.mjs +6 -6
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAccount.mjs +100 -100
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAdmin.mjs +360 -360
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAntennas.mjs +21 -21
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoApp.mjs +1 -1
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoAuth.mjs +3 -3
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoChannels.mjs +23 -23
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoCharts.mjs +48 -48
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoClips.mjs +5 -5
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoComponentSchemas.mjs +122 -122
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoDefault.mjs +42 -42
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoDrive.mjs +39 -39
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoFederation.mjs +33 -33
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoFlash.mjs +8 -8
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoFollowing.mjs +11 -11
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoGallery.mjs +11 -11
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoHashtags.mjs +11 -11
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoLists.mjs +9 -9
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoMeta.mjs +85 -85
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoNonProductive.mjs +8 -8
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoNotes.mjs +147 -147
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoNotifications.mjs +2 -2
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoPages.mjs +18 -18
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoRole.mjs +9 -9
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoUsers.mjs +69 -69
- package/lib/es6/src/generated/misskey-io/api/MisskeyIoWebhooks.mjs +12 -12
- package/lib/es6/src/stream/StreamClient.mjs +13 -2
- package/package.json +2 -2
- package/src/generated/kokonect-link/api/KokonectLinkAccount.res +123 -123
- package/src/generated/kokonect-link/api/KokonectLinkAdmin.res +307 -307
- package/src/generated/kokonect-link/api/KokonectLinkAntennas.res +18 -18
- package/src/generated/kokonect-link/api/KokonectLinkApp.res +1 -1
- package/src/generated/kokonect-link/api/KokonectLinkChannels.res +29 -29
- package/src/generated/kokonect-link/api/KokonectLinkCharts.res +4 -4
- package/src/generated/kokonect-link/api/KokonectLinkChat.res +47 -47
- package/src/generated/kokonect-link/api/KokonectLinkClips.res +10 -10
- package/src/generated/kokonect-link/api/KokonectLinkComponentSchemas.res +145 -145
- package/src/generated/kokonect-link/api/KokonectLinkDefault.res +18 -18
- package/src/generated/kokonect-link/api/KokonectLinkDrive.res +44 -44
- package/src/generated/kokonect-link/api/KokonectLinkFederation.res +31 -31
- package/src/generated/kokonect-link/api/KokonectLinkFlash.res +6 -6
- package/src/generated/kokonect-link/api/KokonectLinkFollowing.res +13 -13
- package/src/generated/kokonect-link/api/KokonectLinkGallery.res +11 -11
- package/src/generated/kokonect-link/api/KokonectLinkHashtags.res +3 -3
- package/src/generated/kokonect-link/api/KokonectLinkLists.res +8 -8
- package/src/generated/kokonect-link/api/KokonectLinkMeta.res +14 -14
- package/src/generated/kokonect-link/api/KokonectLinkNotes.res +247 -247
- package/src/generated/kokonect-link/api/KokonectLinkNotifications.res +2 -2
- package/src/generated/kokonect-link/api/KokonectLinkPages.res +13 -13
- package/src/generated/kokonect-link/api/KokonectLinkRole.res +10 -10
- package/src/generated/kokonect-link/api/KokonectLinkUsers.res +51 -51
- package/src/generated/kokonect-link/api/KokonectLinkWebhooks.res +6 -6
- package/src/generated/misskey-io/api/MisskeyIoAccount.res +100 -100
- package/src/generated/misskey-io/api/MisskeyIoAdmin.res +359 -359
- package/src/generated/misskey-io/api/MisskeyIoAntennas.res +21 -21
- package/src/generated/misskey-io/api/MisskeyIoApp.res +1 -1
- package/src/generated/misskey-io/api/MisskeyIoAuth.res +3 -3
- package/src/generated/misskey-io/api/MisskeyIoChannels.res +23 -23
- package/src/generated/misskey-io/api/MisskeyIoCharts.res +48 -48
- package/src/generated/misskey-io/api/MisskeyIoClips.res +5 -5
- package/src/generated/misskey-io/api/MisskeyIoComponentSchemas.res +122 -122
- package/src/generated/misskey-io/api/MisskeyIoDefault.res +42 -42
- package/src/generated/misskey-io/api/MisskeyIoDrive.res +39 -39
- package/src/generated/misskey-io/api/MisskeyIoFederation.res +33 -33
- package/src/generated/misskey-io/api/MisskeyIoFlash.res +8 -8
- package/src/generated/misskey-io/api/MisskeyIoFollowing.res +11 -11
- package/src/generated/misskey-io/api/MisskeyIoGallery.res +11 -11
- package/src/generated/misskey-io/api/MisskeyIoHashtags.res +11 -11
- package/src/generated/misskey-io/api/MisskeyIoLists.res +9 -9
- package/src/generated/misskey-io/api/MisskeyIoMeta.res +85 -85
- package/src/generated/misskey-io/api/MisskeyIoNonProductive.res +8 -8
- package/src/generated/misskey-io/api/MisskeyIoNotes.res +147 -147
- package/src/generated/misskey-io/api/MisskeyIoNotifications.res +2 -2
- package/src/generated/misskey-io/api/MisskeyIoPages.res +18 -18
- package/src/generated/misskey-io/api/MisskeyIoRole.res +9 -9
- package/src/generated/misskey-io/api/MisskeyIoUsers.res +69 -69
- package/src/generated/misskey-io/api/MisskeyIoWebhooks.res +12 -12
- package/src/stream/StreamClient.res +14 -2
|
@@ -258,12 +258,12 @@ type postUsersRequest = {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
let postUsersRequestSchema = S.object(s => {
|
|
261
|
-
limit: s.
|
|
262
|
-
offset: s.
|
|
263
|
-
sort: s.
|
|
264
|
-
state: s.
|
|
265
|
-
origin: s.
|
|
266
|
-
hostname: s.
|
|
261
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
262
|
+
offset: s.field("offset", S.option(S.int)),
|
|
263
|
+
sort: s.field("sort", S.option(S.string)),
|
|
264
|
+
state: s.field("state", S.option(S.string)),
|
|
265
|
+
origin: s.field("origin", S.option(S.string)),
|
|
266
|
+
hostname: s.field("hostname", S.option(S.string)),
|
|
267
267
|
})
|
|
268
268
|
|
|
269
269
|
type postUsersResponse = array<MisskeyIoComponentSchemas.UserDetailed.t>
|
|
@@ -299,9 +299,9 @@ type postUsersClipsRequest = {
|
|
|
299
299
|
|
|
300
300
|
let postUsersClipsRequestSchema = S.object(s => {
|
|
301
301
|
userId: s.field("userId", S.string),
|
|
302
|
-
limit: s.
|
|
303
|
-
sinceId: s.
|
|
304
|
-
untilId: s.
|
|
302
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
303
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
304
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
305
305
|
})
|
|
306
306
|
|
|
307
307
|
type postUsersClipsResponse = array<MisskeyIoComponentSchemas.Clip.t>
|
|
@@ -337,9 +337,9 @@ type postUsersFlashsRequest = {
|
|
|
337
337
|
|
|
338
338
|
let postUsersFlashsRequestSchema = S.object(s => {
|
|
339
339
|
userId: s.field("userId", S.string),
|
|
340
|
-
limit: s.
|
|
341
|
-
sinceId: s.
|
|
342
|
-
untilId: s.
|
|
340
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
341
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
342
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
343
343
|
})
|
|
344
344
|
|
|
345
345
|
type postUsersFlashsResponse = array<MisskeyIoComponentSchemas.Flash.t>
|
|
@@ -376,12 +376,12 @@ type postUsersFollowersRequest = {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
let postUsersFollowersRequestSchema = S.object(s => {
|
|
379
|
-
sinceId: s.
|
|
380
|
-
untilId: s.
|
|
381
|
-
limit: s.
|
|
382
|
-
userId: s.
|
|
383
|
-
username: s.
|
|
384
|
-
host: s.
|
|
379
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
380
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
381
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
382
|
+
userId: s.field("userId", S.option(S.string)),
|
|
383
|
+
username: s.field("username", S.option(S.string)),
|
|
384
|
+
host: s.field("host", S.option(S.string)),
|
|
385
385
|
})
|
|
386
386
|
|
|
387
387
|
type postUsersFollowersResponse = array<MisskeyIoComponentSchemas.Following.t>
|
|
@@ -419,13 +419,13 @@ type postUsersFollowingRequest = {
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
let postUsersFollowingRequestSchema = S.object(s => {
|
|
422
|
-
sinceId: s.
|
|
423
|
-
untilId: s.
|
|
424
|
-
limit: s.
|
|
425
|
-
userId: s.
|
|
426
|
-
username: s.
|
|
427
|
-
host: s.
|
|
428
|
-
birthday: s.
|
|
422
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
423
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
424
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
425
|
+
userId: s.field("userId", S.option(S.string)),
|
|
426
|
+
username: s.field("username", S.option(S.string)),
|
|
427
|
+
host: s.field("host", S.option(S.string)),
|
|
428
|
+
birthday: s.field("birthday", S.option(S.string->S.pattern(/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/))),
|
|
429
429
|
})
|
|
430
430
|
|
|
431
431
|
type postUsersFollowingResponse = array<MisskeyIoComponentSchemas.Following.t>
|
|
@@ -461,9 +461,9 @@ type postUsersGalleryPostsRequest = {
|
|
|
461
461
|
|
|
462
462
|
let postUsersGalleryPostsRequestSchema = S.object(s => {
|
|
463
463
|
userId: s.field("userId", S.string),
|
|
464
|
-
limit: s.
|
|
465
|
-
sinceId: s.
|
|
466
|
-
untilId: s.
|
|
464
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
465
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
466
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
467
467
|
})
|
|
468
468
|
|
|
469
469
|
type postUsersGalleryPostsResponse = array<MisskeyIoComponentSchemas.GalleryPost.t>
|
|
@@ -514,15 +514,15 @@ let postUsersGetFollowingBirthdayUsersRequest_2Schema = S.object(s => {
|
|
|
514
514
|
})
|
|
515
515
|
|
|
516
516
|
let postUsersGetFollowingBirthdayUsersRequest_1Schema = S.object(s => {
|
|
517
|
-
month: s.
|
|
518
|
-
day: s.
|
|
519
|
-
begin: s.
|
|
520
|
-
end_: s.
|
|
517
|
+
month: s.field("month", S.option(S.int->S.min(1)->S.max(12))),
|
|
518
|
+
day: s.field("day", S.option(S.int->S.min(1)->S.max(31))),
|
|
519
|
+
begin: s.field("begin", S.option(postUsersGetFollowingBirthdayUsersRequest_2Schema)),
|
|
520
|
+
end_: s.field("end", S.option(postUsersGetFollowingBirthdayUsersRequest_2Schema)),
|
|
521
521
|
})
|
|
522
522
|
|
|
523
523
|
let postUsersGetFollowingBirthdayUsersRequestSchema = S.object(s => {
|
|
524
|
-
limit: s.
|
|
525
|
-
offset: s.
|
|
524
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
525
|
+
offset: s.field("offset", S.option(S.int)),
|
|
526
526
|
birthday: s.field("birthday", postUsersGetFollowingBirthdayUsersRequest_1Schema),
|
|
527
527
|
})
|
|
528
528
|
|
|
@@ -567,7 +567,7 @@ type postUsersGetFrequentlyRepliedUsersRequest = {
|
|
|
567
567
|
|
|
568
568
|
let postUsersGetFrequentlyRepliedUsersRequestSchema = S.object(s => {
|
|
569
569
|
userId: s.field("userId", S.string),
|
|
570
|
-
limit: s.
|
|
570
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
571
571
|
})
|
|
572
572
|
|
|
573
573
|
type postUsersGetFrequentlyRepliedUsersResponse_1 = {
|
|
@@ -774,16 +774,16 @@ type postUsersNotesRequest = {
|
|
|
774
774
|
|
|
775
775
|
let postUsersNotesRequestSchema = S.object(s => {
|
|
776
776
|
userId: s.field("userId", S.string),
|
|
777
|
-
withReplies: s.
|
|
778
|
-
withRenotes: s.
|
|
779
|
-
withChannelNotes: s.
|
|
780
|
-
limit: s.
|
|
781
|
-
sinceId: s.
|
|
782
|
-
untilId: s.
|
|
783
|
-
sinceDate: s.
|
|
784
|
-
untilDate: s.
|
|
785
|
-
allowPartial: s.
|
|
786
|
-
withFiles: s.
|
|
777
|
+
withReplies: s.field("withReplies", S.option(S.bool)),
|
|
778
|
+
withRenotes: s.field("withRenotes", S.option(S.bool)),
|
|
779
|
+
withChannelNotes: s.field("withChannelNotes", S.option(S.bool)),
|
|
780
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
781
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
782
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
783
|
+
sinceDate: s.field("sinceDate", S.option(S.int)),
|
|
784
|
+
untilDate: s.field("untilDate", S.option(S.int)),
|
|
785
|
+
allowPartial: s.field("allowPartial", S.option(S.bool)),
|
|
786
|
+
withFiles: s.field("withFiles", S.option(S.bool)),
|
|
787
787
|
})
|
|
788
788
|
|
|
789
789
|
type postUsersNotesResponse = array<MisskeyIoComponentSchemas.Note.t>
|
|
@@ -819,9 +819,9 @@ type postUsersPagesRequest = {
|
|
|
819
819
|
|
|
820
820
|
let postUsersPagesRequestSchema = S.object(s => {
|
|
821
821
|
userId: s.field("userId", S.string),
|
|
822
|
-
limit: s.
|
|
823
|
-
sinceId: s.
|
|
824
|
-
untilId: s.
|
|
822
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
823
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
824
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
825
825
|
})
|
|
826
826
|
|
|
827
827
|
type postUsersPagesResponse = array<MisskeyIoComponentSchemas.Page.t>
|
|
@@ -859,11 +859,11 @@ type postUsersReactionsRequest = {
|
|
|
859
859
|
|
|
860
860
|
let postUsersReactionsRequestSchema = S.object(s => {
|
|
861
861
|
userId: s.field("userId", S.string),
|
|
862
|
-
limit: s.
|
|
863
|
-
sinceId: s.
|
|
864
|
-
untilId: s.
|
|
865
|
-
sinceDate: s.
|
|
866
|
-
untilDate: s.
|
|
862
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
863
|
+
sinceId: s.field("sinceId", S.option(S.string)),
|
|
864
|
+
untilId: s.field("untilId", S.option(S.string)),
|
|
865
|
+
sinceDate: s.field("sinceDate", S.option(S.int)),
|
|
866
|
+
untilDate: s.field("untilDate", S.option(S.int)),
|
|
867
867
|
})
|
|
868
868
|
|
|
869
869
|
type postUsersReactionsResponse = array<MisskeyIoComponentSchemas.NoteReaction.t>
|
|
@@ -896,8 +896,8 @@ type postUsersRecommendationRequest = {
|
|
|
896
896
|
}
|
|
897
897
|
|
|
898
898
|
let postUsersRecommendationRequestSchema = S.object(s => {
|
|
899
|
-
limit: s.
|
|
900
|
-
offset: s.
|
|
899
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
900
|
+
offset: s.field("offset", S.option(S.int)),
|
|
901
901
|
})
|
|
902
902
|
|
|
903
903
|
type postUsersRecommendationResponse = array<MisskeyIoComponentSchemas.UserDetailed.t>
|
|
@@ -989,7 +989,7 @@ type postUsersReportAbuseRequest = {
|
|
|
989
989
|
let postUsersReportAbuseRequestSchema = S.object(s => {
|
|
990
990
|
userId: s.field("userId", S.string),
|
|
991
991
|
comment: s.field("comment", S.string->S.min(1)->S.max(2048)),
|
|
992
|
-
category: s.
|
|
992
|
+
category: s.field("category", S.option(S.string)),
|
|
993
993
|
})
|
|
994
994
|
|
|
995
995
|
type postUsersReportAbuseResponse = unit
|
|
@@ -1024,10 +1024,10 @@ type postUsersSearchRequest = {
|
|
|
1024
1024
|
|
|
1025
1025
|
let postUsersSearchRequestSchema = S.object(s => {
|
|
1026
1026
|
query: s.field("query", S.string),
|
|
1027
|
-
offset: s.
|
|
1028
|
-
limit: s.
|
|
1029
|
-
origin: s.
|
|
1030
|
-
detail: s.
|
|
1027
|
+
offset: s.field("offset", S.option(S.int)),
|
|
1028
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
1029
|
+
origin: s.field("origin", S.option(S.string)),
|
|
1030
|
+
detail: s.field("detail", S.option(S.bool)),
|
|
1031
1031
|
})
|
|
1032
1032
|
|
|
1033
1033
|
type postUsersSearchResponse = array<MisskeyIoComponentSchemas.User.t>
|
|
@@ -1062,10 +1062,10 @@ type postUsersSearchByUsernameAndHostRequest = {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
|
|
1064
1064
|
let postUsersSearchByUsernameAndHostRequestSchema = S.object(s => {
|
|
1065
|
-
limit: s.
|
|
1066
|
-
detail: s.
|
|
1067
|
-
username: s.
|
|
1068
|
-
host: s.
|
|
1065
|
+
limit: s.field("limit", S.option(S.int->S.min(1)->S.max(100))),
|
|
1066
|
+
detail: s.field("detail", S.option(S.bool)),
|
|
1067
|
+
username: s.field("username", S.option(S.string)),
|
|
1068
|
+
host: s.field("host", S.option(S.string)),
|
|
1069
1069
|
})
|
|
1070
1070
|
|
|
1071
1071
|
type postUsersSearchByUsernameAndHostResponse = array<MisskeyIoComponentSchemas.User.t>
|
|
@@ -1101,11 +1101,11 @@ type postUsersShowRequest = {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
1103
1103
|
let postUsersShowRequestSchema = S.object(s => {
|
|
1104
|
-
userId: s.
|
|
1105
|
-
userIds: s.
|
|
1106
|
-
username: s.
|
|
1107
|
-
host: s.
|
|
1108
|
-
detailed: s.
|
|
1104
|
+
userId: s.field("userId", S.option(S.string)),
|
|
1105
|
+
userIds: s.field("userIds", S.option(S.array(S.string))),
|
|
1106
|
+
username: s.field("username", S.option(S.string)),
|
|
1107
|
+
host: s.field("host", S.option(S.string)),
|
|
1108
|
+
detailed: s.field("detailed", S.option(S.bool)),
|
|
1109
1109
|
})
|
|
1110
1110
|
|
|
1111
1111
|
type postUsersShowResponse = array<MisskeyIoComponentSchemas.UserDetailed.t>
|
|
@@ -17,14 +17,14 @@ type postAdminSystemWebhookTestRequest = {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
let postAdminSystemWebhookTestRequest_1Schema = S.object(s => {
|
|
20
|
-
url: s.
|
|
21
|
-
secret: s.
|
|
20
|
+
url: s.field("url", S.option(S.string)),
|
|
21
|
+
secret: s.field("secret", S.option(S.string)),
|
|
22
22
|
})
|
|
23
23
|
|
|
24
24
|
let postAdminSystemWebhookTestRequestSchema = S.object(s => {
|
|
25
25
|
webhookId: s.field("webhookId", S.string),
|
|
26
26
|
type_: s.field("type", S.string),
|
|
27
|
-
override: s.
|
|
27
|
+
override: s.field("override", S.option(postAdminSystemWebhookTestRequest_1Schema)),
|
|
28
28
|
})
|
|
29
29
|
|
|
30
30
|
type postAdminSystemWebhookTestResponse = unit
|
|
@@ -60,7 +60,7 @@ type postIWebhooksCreateRequest = {
|
|
|
60
60
|
let postIWebhooksCreateRequestSchema = S.object(s => {
|
|
61
61
|
name: s.field("name", S.string->S.min(1)->S.max(100)),
|
|
62
62
|
url: s.field("url", S.string->S.min(1)->S.max(1024)),
|
|
63
|
-
secret: s.
|
|
63
|
+
secret: s.field("secret", S.option(S.string->S.max(1024))),
|
|
64
64
|
on: s.field("on", S.array(S.string)),
|
|
65
65
|
})
|
|
66
66
|
|
|
@@ -250,14 +250,14 @@ type postIWebhooksTestRequest = {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
let postIWebhooksTestRequest_1Schema = S.object(s => {
|
|
253
|
-
url: s.
|
|
254
|
-
secret: s.
|
|
253
|
+
url: s.field("url", S.option(S.string)),
|
|
254
|
+
secret: s.field("secret", S.option(S.string)),
|
|
255
255
|
})
|
|
256
256
|
|
|
257
257
|
let postIWebhooksTestRequestSchema = S.object(s => {
|
|
258
258
|
webhookId: s.field("webhookId", S.string),
|
|
259
259
|
type_: s.field("type", S.string),
|
|
260
|
-
override: s.
|
|
260
|
+
override: s.field("override", S.option(postIWebhooksTestRequest_1Schema)),
|
|
261
261
|
})
|
|
262
262
|
|
|
263
263
|
type postIWebhooksTestResponse = unit
|
|
@@ -294,11 +294,11 @@ type postIWebhooksUpdateRequest = {
|
|
|
294
294
|
|
|
295
295
|
let postIWebhooksUpdateRequestSchema = S.object(s => {
|
|
296
296
|
webhookId: s.field("webhookId", S.string),
|
|
297
|
-
name: s.
|
|
298
|
-
url: s.
|
|
299
|
-
secret: s.
|
|
300
|
-
on: s.
|
|
301
|
-
active: s.
|
|
297
|
+
name: s.field("name", S.option(S.string->S.min(1)->S.max(100))),
|
|
298
|
+
url: s.field("url", S.option(S.string->S.min(1)->S.max(1024))),
|
|
299
|
+
secret: s.field("secret", S.option(S.string->S.max(1024))),
|
|
300
|
+
on: s.field("on", S.option(S.array(S.string))),
|
|
301
|
+
active: s.field("active", S.option(S.bool)),
|
|
302
302
|
})
|
|
303
303
|
|
|
304
304
|
type postIWebhooksUpdateResponse = unit
|
|
@@ -29,6 +29,7 @@ type t = {
|
|
|
29
29
|
broadcastHandlers: Dict.t<JSON.t => unit>,
|
|
30
30
|
mutable onConnectedCallback: option<unit => unit>,
|
|
31
31
|
mutable onDisconnectedCallback: option<unit => unit>,
|
|
32
|
+
mutable pendingMessages: array<string>,
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
// Generate unique ID for connections
|
|
@@ -54,6 +55,7 @@ let make = (~origin: string, ~credential: option<string>=?, ()): t => {
|
|
|
54
55
|
broadcastHandlers: Dict.make(),
|
|
55
56
|
onConnectedCallback: None,
|
|
56
57
|
onDisconnectedCallback: None,
|
|
58
|
+
pendingMessages: [],
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
// Set up WebSocket event handlers
|
|
@@ -61,6 +63,11 @@ let make = (~origin: string, ~credential: option<string>=?, ()): t => {
|
|
|
61
63
|
let isReconnect = stream.state == #reconnecting
|
|
62
64
|
stream.state = #connected
|
|
63
65
|
|
|
66
|
+
// Flush any pending messages
|
|
67
|
+
let pending = stream.pendingMessages
|
|
68
|
+
stream.pendingMessages = []
|
|
69
|
+
pending->Array.forEach(msg => stream.ws->WS.send(msg))
|
|
70
|
+
|
|
64
71
|
// Call user callback
|
|
65
72
|
switch stream.onConnectedCallback {
|
|
66
73
|
| Some(cb) => cb()
|
|
@@ -148,10 +155,15 @@ let make = (~origin: string, ~credential: option<string>=?, ()): t => {
|
|
|
148
155
|
stream
|
|
149
156
|
}
|
|
150
157
|
|
|
151
|
-
// Send a message
|
|
158
|
+
// Send a message (queues if WebSocket not yet open)
|
|
152
159
|
let send = (stream: t, msg: Protocol.outgoingMessage): unit => {
|
|
153
160
|
let serialized = Protocol.serializeOutgoing(msg)
|
|
154
|
-
stream.ws
|
|
161
|
+
if WS.isOpen(stream.ws) && Array.length(stream.pendingMessages) == 0 {
|
|
162
|
+
stream.ws->WS.send(serialized)
|
|
163
|
+
} else {
|
|
164
|
+
// Queue for when connection opens or if there are already pending messages
|
|
165
|
+
stream.pendingMessages = stream.pendingMessages->Array.concat([serialized])
|
|
166
|
+
}
|
|
155
167
|
}
|
|
156
168
|
|
|
157
169
|
// Ping the server
|